Skip to content

finney deploy 11-19-2024 (evm) #997

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 186 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
3fedd89
Update to polkadot SDK release-polkadot-v1.11.0
gztensor Aug 28, 2024
4886e96
Add EVM pallets, rpc, and precompiles
gztensor Aug 29, 2024
dee91c0
Format
gztensor Aug 29, 2024
8dd904e
Fix clippy issues
gztensor Aug 29, 2024
86167cb
Format
gztensor Aug 29, 2024
ca953f4
Fix try-runtime build
gztensor Aug 29, 2024
fa7d30f
Fix runtime-benchmarks build
gztensor Aug 29, 2024
069bea4
Format
gztensor Aug 29, 2024
f0dde3c
Fix configuration of pallet_transaction_payment, reduce linear fees t…
gztensor Aug 29, 2024
3f3b546
Format
gztensor Aug 29, 2024
8c1de0d
Fix zepter check
gztensor Aug 29, 2024
072bdea
Fix zepter check
gztensor Aug 29, 2024
0d571b4
Cleanup and fix gas to weight to fees conversion
gztensor Aug 30, 2024
020fb2a
Format
gztensor Aug 30, 2024
9609bd2
Change chain ID to 945 for testnet
gztensor Aug 30, 2024
e88f428
Add staking precompile implementation notes
gztensor Sep 3, 2024
8285c39
add add staking logic
soring323 Sep 4, 2024
609005b
refactor execute function
soring323 Sep 4, 2024
231e586
add remove staking function
soring323 Sep 4, 2024
074c9b6
fix lint issue
soring323 Sep 4, 2024
fad6d17
add refund logic to caller
soring323 Sep 5, 2024
7e047fa
fix lint issue
soring323 Sep 5, 2024
9d0391c
Merge pull request #777 from DedicatedDev/mz/feat/staking-precompile
gztensor Sep 5, 2024
600e6d1
fix clippy lint issues
soring323 Sep 5, 2024
27797ae
fix clippy lint issues
soring323 Sep 5, 2024
74fe08d
Merge pull request #784 from DedicatedDev/mz/feat/fix-clippy-issue
gztensor Sep 5, 2024
1c2c12f
Address code review comments: Separate RPC merging into helper functions
gztensor Sep 5, 2024
89c8910
Use TryFrom for converting bytes to AccountId32 with error
gztensor Sep 5, 2024
767ed55
Bump runtime version to 197
gztensor Sep 6, 2024
bc65af2
Merge branch 'devnet-ready' into feat/evm-devnet-ready
gztensor Sep 6, 2024
56a9809
Re-add staking precompile implementation notes
gztensor Sep 6, 2024
f8632e3
Format
gztensor Sep 6, 2024
0478b8d
Fix removing stake in staking precompile
gztensor Sep 17, 2024
4cdfeb5
Remove payable modifier from removeStake precompile method
gztensor Sep 17, 2024
453a7af
Update EVM to polkadot dsk 1.16
gztensor Sep 26, 2024
5372f5e
Format
gztensor Sep 26, 2024
f706122
Make linter happy again
gztensor Sep 26, 2024
a2b8bb6
Format
gztensor Sep 26, 2024
3f147b8
Remove unused manifest key: dependencies.scale-codec.package (linter)
gztensor Sep 26, 2024
1c72c6f
Fix benchmarks
gztensor Sep 26, 2024
bb9ee35
Format
gztensor Sep 26, 2024
4966c2c
Cleanup RPC create_full bounds
gztensor Sep 27, 2024
7064b52
Add ed25519 verify precompile
gztensor Sep 30, 2024
c587301
Implement ed25519 verification precompile
gztensor Oct 1, 2024
129d3d9
Propagate features for ed25519-dalek
gztensor Oct 2, 2024
ac24a8f
Add ed25519-dalek to std feature in runtime
gztensor Oct 2, 2024
6ead778
Implement subtensor evm balance converter, use in balance transfer pr…
gztensor Oct 4, 2024
bdd85cd
Use evm balance converter in staking precompile
gztensor Oct 4, 2024
638f521
Merge devnet-ready into feat/evm-devnet-ready
gztensor Oct 4, 2024
40fff23
Recalculate decimals for gas price
gztensor Oct 4, 2024
4ea9663
Fix decimals in gas fees (max_fee_per_gas and max_priority_fee_per_gas)
gztensor Oct 15, 2024
f39520c
Format
gztensor Oct 15, 2024
d3f7013
Merge main into feat/evm-devnet-ready
gztensor Oct 15, 2024
6622905
add ability to skip cargo audit
sam0x17 Oct 16, 2024
70e86e2
Cargo update after updating frontier version of sqlx
gztensor Oct 16, 2024
3c17e7c
fix
sam0x17 Oct 16, 2024
7c4126f
Fix decimals in gas price rpc
gztensor Oct 16, 2024
042d5d7
Update frontier fork to master branch
gztensor Oct 29, 2024
a85e207
fix: whitelist
orriin Oct 30, 2024
dbb3ad3
Reapply hotkey swap fix for childkey's parents
gztensor Oct 30, 2024
d16929a
Merge pull request #890 from opentensor/fix/reapply-hotkey-swap-fix-c…
sam0x17 Oct 30, 2024
2ad1381
separate out cargo-audit so it can be canceled via label
sam0x17 Oct 30, 2024
f58977b
pin frontier version
orriin Oct 31, 2024
29cd71e
Merge branch 'devnet-ready' into feat/evm-devnet-ready
orriin Oct 31, 2024
8d084b1
fix merge
orriin Oct 31, 2024
6513d46
update cargo.lock
orriin Oct 31, 2024
d8eadf3
fix feature propagation
orriin Oct 31, 2024
3fb89ec
Merge pull request #772 from opentensor/feat/evm-devnet-ready
unconst Oct 31, 2024
f3b76d8
Merge pull request #893 from opentensor/commit-reveal-2-1
unconst Oct 31, 2024
5de9490
Merge pull request #898 from opentensor/feat/lower-key-swap-cost
unconst Oct 31, 2024
d01d038
Downgrade cargo audit
ales-otf Oct 31, 2024
2e9c89f
alice default port from 9946 to 9944
basfroman Oct 31, 2024
ef9f6c8
bump up `spec_version`
basfroman Oct 31, 2024
32a693f
bump up `spec_version`
basfroman Oct 31, 2024
290dd92
Merge pull request #901 from opentensor/fix/ci-cargo-audit
sam0x17 Oct 31, 2024
70f4c63
Merge pull request #904 from opentensor/fix/roman/alice-port-for-loca…
unconst Oct 31, 2024
514af7f
netuid stake parameter
orriin Nov 1, 2024
f4fbecf
bump spec version to 206
sam0x17 Nov 1, 2024
6136f7b
Merge branch 'devnet' into devnet-ready
sam0x17 Nov 1, 2024
b0bce33
Merge pull request #908 from opentensor/devnet-ready
unconst Nov 1, 2024
dfbed6b
Merge pull request #907 from opentensor/evm-stake-netuid
unconst Nov 2, 2024
d48e2bf
Add key swaps & set_children to proxies
JohnReedV Nov 4, 2024
aa5c4f0
new ProxyType for childkeys
JohnReedV Nov 4, 2024
9ddbf10
bump spec
JohnReedV Nov 5, 2024
1a98bae
add set_childkey_take to ChildKeys ProxyType
JohnReedV Nov 5, 2024
abd5522
lint ForbidKeysRemoveCall
eagr Nov 6, 2024
5bdee48
fix: host functions
orriin Nov 6, 2024
c05342a
Merge pull request #928 from opentensor/fix-host-functions
unconst Nov 6, 2024
a78f33c
add SetCode proxy type
camfairchild Nov 6, 2024
10dfecb
fix matching
camfairchild Nov 6, 2024
4b22f4b
bump spec ver
camfairchild Nov 6, 2024
b28ea8b
respect chk for set weights min stake filter (#935)
camfairchild Nov 7, 2024
b825a61
Hotfix/skip root for emission accum (#933)
camfairchild Nov 7, 2024
36bc1a8
use chk for neuron info lite stake (#936)
camfairchild Nov 7, 2024
819f961
Hotfix/clear stake delta on drain (#934)
camfairchild Nov 7, 2024
f5c3431
Hotfix/skip root for emission accum (#933)
camfairchild Nov 7, 2024
95411b2
Hotfix/clear stake delta on drain (#934)
camfairchild Nov 7, 2024
b312704
respect chk for set weights min stake filter (#935)
camfairchild Nov 7, 2024
7147187
use chk for neuron info lite stake (#936)
camfairchild Nov 7, 2024
c2aba47
Hotfix/skip root for emission accum (#933)
camfairchild Nov 7, 2024
a308cd4
Hotfix/clear stake delta on drain (#934)
camfairchild Nov 7, 2024
e21ba0d
respect chk for set weights min stake filter (#935)
camfairchild Nov 7, 2024
e735f72
use chk for neuron info lite stake (#936)
camfairchild Nov 7, 2024
7cf32c2
Bump spec version
keithtensor Nov 7, 2024
42fb426
lower faucet diff to 1k
camfairchild Nov 7, 2024
2b325b3
lower pow faucet diff using the fast blocks feature flag
camfairchild Nov 7, 2024
a2d8a58
add fast blocks feature to the cargo files
camfairchild Nov 7, 2024
0ece437
fix faucet diff definition
camfairchild Nov 7, 2024
fd7a996
Bump spec version to 207
gztensor Nov 7, 2024
fc972f7
Empty commit, re-trigger CI
gztensor Nov 7, 2024
00b9b3c
Bump spec version to 207
gztensor Nov 7, 2024
4ad316e
Merge pull request #924 from opentensor/check-childkey-stake
unconst Nov 7, 2024
3578597
Merge pull request #940 from opentensor/hotfixes-to-devnet-nov-6
unconst Nov 7, 2024
05a53d7
Merge pull request #941 from opentensor/hotfixes-to-testnet-nov-6
unconst Nov 7, 2024
c1a9211
Merge pull request #931 from opentensor/feat/add-setcode-proxy
unconst Nov 7, 2024
49a268a
Re-add removed main changes
gztensor Nov 7, 2024
b7a9a4c
Merge branch 'devnet-ready' into spiigot/update-proxies
JohnReedV Nov 8, 2024
4550edd
fmt & bump spec
JohnReedV Nov 8, 2024
14102b6
Fix childkey take and miner emission distribution
gztensor Nov 8, 2024
31d801e
Merge pull request #945 from opentensor/fix/reapply-reverted-main-upd…
unconst Nov 8, 2024
2de219d
fix: host functions
orriin Nov 6, 2024
bbd5a1e
fix: host functions
orriin Nov 6, 2024
97f9a6e
Format
gztensor Nov 8, 2024
53c4f5c
Merge pull request #948 from opentensor/fix-host-functions-devnet
unconst Nov 8, 2024
4a93ea0
Merge pull request #949 from opentensor/fix-host-functions-testnet
unconst Nov 8, 2024
fff8d54
Configure devnet chain spec
ales-otf Nov 8, 2024
7f6d8ca
add bot warning for hotfix PRs
sam0x17 Nov 10, 2024
3ceb522
tweak
sam0x17 Nov 10, 2024
ee4bc00
bump CI
sam0x17 Nov 10, 2024
066514a
Rename testnet_genesis function to devnet_* in devnet config
ales-otf Nov 11, 2024
8b2fb55
Clean up
ales-otf Nov 11, 2024
3235619
bump spec version to 208
sam0x17 Nov 11, 2024
47d3b45
Merge pull request #952 from opentensor/feat/add-devnet-chainspec
sam0x17 Nov 11, 2024
1d6c938
allow Keys::<T>::remove() in replace_neuron()
eagr Nov 12, 2024
82664af
Merge pull request #912 from opentensor/spiigot/update-proxies
sam0x17 Nov 12, 2024
701be73
Merge pull request #958 from opentensor/main
unconst Nov 12, 2024
db3bd8a
Merge pull request #953 from opentensor/sam-hotfix-warnings
sam0x17 Nov 12, 2024
ca1d908
Merge pull request #962 from opentensor/main
unconst Nov 12, 2024
4b45cd3
Merge pull request #944 from opentensor/feat/lower-facuet-diff
unconst Nov 12, 2024
c91adae
Merge branch 'testnet' into merge-testnet-to-devnet
gztensor Nov 12, 2024
0b49118
Address nit: rounding
gztensor Nov 12, 2024
64adce1
Merge testnet into devnet in progress
gztensor Nov 12, 2024
21527a9
Fix compilation
ales-otf Nov 12, 2024
510c422
Cleanup imports
gztensor Nov 12, 2024
8163679
Fix clippy
gztensor Nov 12, 2024
712f9e8
Merge pull request #968 from opentensor/fix/remove-generics-in-node
gztensor Nov 12, 2024
cd87781
Merge pull request #970 from opentensor/merge-testnet-to-devnet
unconst Nov 13, 2024
81c8905
Format
gztensor Nov 13, 2024
71e0e9c
Merge remote-tracking branch 'origin/devnet' into devnet-ready
sam0x17 Nov 13, 2024
63e9715
use TokenStream in place of str
eagr Nov 13, 2024
850c8e7
remove duplicate code
sam0x17 Nov 13, 2024
b096420
Merge pull request #973 from opentensor/fix-merge-conflict-devnet-ready
sam0x17 Nov 13, 2024
e28dc9c
Merge pull request #976 from opentensor/devnet-ready
unconst Nov 13, 2024
850d4ef
Remove unnecessary generics
ales-otf Nov 13, 2024
d23c372
Merge pull request #927 from eagr/forbid-keys-remove
sam0x17 Nov 13, 2024
22f0397
Fix benchmarks compilation
ales-otf Nov 13, 2024
90927da
Update spec version
ales-otf Nov 13, 2024
feaa764
Merge pull request #978 from opentensor/devnet
unconst Nov 13, 2024
7a1a38a
Fix dev flag
ales-otf Nov 12, 2024
ac6726a
Update spec version
ales-otf Nov 15, 2024
82936fa
hotfix to fix EVM balance transfer precision
sam0x17 Nov 15, 2024
6bdbaf8
improve safety and performance of EVM <=> TAO balance transfers
sam0x17 Nov 15, 2024
57efc63
bump CI
sam0x17 Nov 15, 2024
dfed247
fix
sam0x17 Nov 15, 2024
ec2b5f6
fix again
sam0x17 Nov 15, 2024
decb56a
fix
sam0x17 Nov 15, 2024
049aa86
import Balance
sam0x17 Nov 15, 2024
5254de9
actually just use BalanceConverter
sam0x17 Nov 15, 2024
0a46a73
fix SubstrateEvmBalanceConverter
sam0x17 Nov 15, 2024
43f782a
fixes
sam0x17 Nov 15, 2024
e522268
fix
sam0x17 Nov 15, 2024
14c2ce7
clippy
sam0x17 Nov 15, 2024
b903817
Merge pull request #956 from opentensor/fix/dev-flag
sam0x17 Nov 15, 2024
2b80315
Merge pull request #950 from opentensor/fix/childkey-emission-distibu…
sam0x17 Nov 15, 2024
5bcb978
Merge pull request #979 from opentensor/feat/clean-up-node-crate
sam0x17 Nov 15, 2024
de2049d
whoops
sam0x17 Nov 15, 2024
67b798e
final fix + tests
sam0x17 Nov 15, 2024
9282b6e
force cargo audit version
sam0x17 Nov 15, 2024
417c35f
display cargo-audit version
sam0x17 Nov 15, 2024
ea5d284
don't need rust cache for cargo audit step, it can't use it
sam0x17 Nov 15, 2024
cbc589d
don't need to install rust stable
sam0x17 Nov 15, 2024
4f1ef7c
some CI fixes
sam0x17 Nov 15, 2024
ed8288d
a bunch of CI fixes
sam0x17 Nov 15, 2024
03527fa
Merge pull request #984 from opentensor/fix-evm
sam0x17 Nov 15, 2024
804c9fe
Merge pull request #987 from opentensor/devnet-ready
unconst Nov 16, 2024
6fdf21e
Merge pull request #989 from opentensor/devnet
unconst Nov 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/cargo-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: cargo audit
on:
pull_request:
types:
- labeled
- unlabeled
- synchronize
concurrency:
group: cargo-audit-${{ github.ref }}
cancel-in-progress: true

jobs:
cargo-audit:
name: cargo audit
runs-on: SubtensorCI
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-cargo-audit') }}
steps:
- name: Check-out repositoroy under $GITHUB_WORKSPACE
uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update &&
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler

- name: Install cargo-audit
run: cargo install --version 0.20.1 --force cargo-audit

- name: Display cargo-audit --version
run: cargo audit --version

- name: cargo audit
run: cargo audit --ignore RUSTSEC-2024-0336 # rustls issue; wait for upstream to resolve this
3 changes: 0 additions & 3 deletions .github/workflows/check-devnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ jobs:
sudo apt-get install -y curl clang curl libssl-dev llvm \
libudev-dev protobuf-compiler

- name: Set up Rust Toolchain
run: curl https://sh.rustup.rs -sSf | sh -s -- -y

- name: Install substrate-spec-version
run: cargo install substrate-spec-version

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/check-finney.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ jobs:
sudo apt-get install -y curl clang curl libssl-dev llvm \
libudev-dev protobuf-compiler

- name: Set up Rust Toolchain
run: curl https://sh.rustup.rs -sSf | sh -s -- -y

- name: Install substrate-spec-version
run: cargo install substrate-spec-version

Expand Down
84 changes: 4 additions & 80 deletions .github/workflows/check-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ jobs:
env:
RELEASE_NAME: development
# RUSTFLAGS: -A warnings
RUSTV: ${{ matrix.rust-branch }}
RUST_BACKTRACE: full
RUST_BIN_DIR: target/${{ matrix.rust-target }}
SKIP_WASM_BUILD: 1
TARGET: ${{ matrix.rust-target }}
steps:
Expand All @@ -55,10 +53,10 @@ jobs:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential

- name: Install Rust ${{ matrix.rust-branch }}
- name: Install Rust Nightly
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: ${{ matrix.rust-branch }}
toolchain: nightly
components: rustfmt
profile: minimal

Expand All @@ -84,11 +82,10 @@ jobs:
env:
RELEASE_NAME: development
# RUSTFLAGS: -A warnings
RUSTV: ${{ matrix.rust-branch }}
RUST_BACKTRACE: full
RUST_BIN_DIR: target/${{ matrix.rust-target }}
SKIP_WASM_BUILD: 1
TARGET: ${{ matrix.rust-target }}
RUST_BIN_DIR: target/${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4
Expand All @@ -98,13 +95,6 @@ jobs:
sudo apt-get update &&
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler

- name: Install Rust ${{ matrix.rust-branch }}
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: ${{ matrix.rust-branch }}
components: rustfmt, clippy
profile: minimal

- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2.2.1
with:
Expand All @@ -128,12 +118,11 @@ jobs:
# - macos-latest
env:
RELEASE_NAME: development
RUSTV: ${{ matrix.rust-branch }}
RUSTFLAGS: -D warnings
RUST_BACKTRACE: full
RUST_BIN_DIR: target/${{ matrix.rust-target }}
SKIP_WASM_BUILD: 1
TARGET: ${{ matrix.rust-target }}
RUST_BIN_DIR: target/${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4
Expand Down Expand Up @@ -166,8 +155,6 @@ jobs:
runs-on: SubtensorCI
strategy:
matrix:
rust-branch:
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
Expand All @@ -180,7 +167,6 @@ jobs:
env:
RELEASE_NAME: development
# RUSTFLAGS: -A warnings
RUSTV: ${{ matrix.rust-branch }}
RUST_BACKTRACE: full
RUST_BIN_DIR: target/${{ matrix.rust-target }}
SKIP_WASM_BUILD: 1
Expand All @@ -194,60 +180,20 @@ jobs:
sudo apt-get update &&
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler

- name: Install Rust ${{ matrix.rust-branch }}
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: ${{ matrix.rust-branch }}
components: rustfmt, clippy
profile: minimal

- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2.2.1
with:
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}

- name: cargo clippy --workspace --all-targets --all-features -- -D warnings
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
# runs cargo audit
cargo-audit:
name: cargo audit
runs-on: SubtensorCI
if: ${{ github.event_name != 'push' && !contains(github.event.pull_request.labels.*.name, 'skip-cargo-audit') }}
steps:
- name: Check-out repositoroy under $GITHUB_WORKSPACE
uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update &&
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler

- name: Install Rust Stable
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
components: rustfmt, clippy
profile: minimal

- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2.2.1
with:
key: ubuntu-latest-${{ env.RUST_BIN_DIR }}

- name: Install cargo-audit
run: cargo install cargo-audit

- name: cargo audit
run: cargo audit --ignore RUSTSEC-2024-0336 # rustls issue; wait for upstream to resolve this

# runs cargo test --workspace
cargo-test:
name: cargo test
runs-on: SubtensorCI
strategy:
matrix:
rust-branch:
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
Expand All @@ -260,7 +206,6 @@ jobs:
env:
RELEASE_NAME: development
# RUSTFLAGS: -A warnings
RUSTV: ${{ matrix.rust-branch }}
RUST_BACKTRACE: full
RUST_BIN_DIR: target/${{ matrix.rust-target }}
SKIP_WASM_BUILD: 1
Expand All @@ -274,13 +219,6 @@ jobs:
sudo apt-get update &&
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler

- name: Install Rust ${{ matrix.rust-branch }}
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: ${{ matrix.rust-branch }}
components: rustfmt, clippy
profile: minimal

- name: Utilize Rust shared cached
uses: Swatinem/rust-cache@v2.2.1
with:
Expand Down Expand Up @@ -309,7 +247,6 @@ jobs:
env:
RELEASE_NAME: development
# RUSTFLAGS: -A warnings
RUSTV: ${{ matrix.rust-branch }}
RUST_BACKTRACE: full
RUST_BIN_DIR: target/${{ matrix.rust-target }}
SKIP_WASM_BUILD: 1
Expand All @@ -323,13 +260,6 @@ jobs:
sudo apt-get update &&
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler

- name: Install Rust ${{ matrix.rust-branch }}
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: ${{ matrix.rust-branch }}
components: rustfmt, clippy
profile: minimal

- name: Utilize Rust shared cached
uses: Swatinem/rust-cache@v2.2.1
with:
Expand All @@ -353,12 +283,6 @@ jobs:
runs-on: SubtensorCI

steps:
- name: Install stable Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Install Zepter
run: cargo install --locked -q zepter && zepter --version

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/check-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ jobs:
sudo apt-get install -y curl clang curl libssl-dev llvm \
libudev-dev protobuf-compiler

- name: Set up Rust Toolchain
run: curl https://sh.rustup.rs -sSf | sh -s -- -y

- name: Install substrate-spec-version
run: cargo install substrate-spec-version

Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/hotfixes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Handle Hotfix PRs

on:
pull_request:
types: [opened]

permissions:
pull-requests: write
contents: write

jobs:
handle-hotfix-pr:
runs-on: ubuntu-latest
steps:
- name: Check if PR is a hotfix into `main`
if: >
github.event.pull_request.base.ref == 'main' &&
github.event.pull_request.head.ref != 'testnet'
run: |
echo "Hotfix PR detected. Proceeding to label and comment."

- name: Add `hotfix` label
if: >
github.event.pull_request.base.ref == 'main' &&
github.event.pull_request.head.ref != 'testnet'
run: |
curl -X POST \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels \
-d '{"labels":["hotfix"]}'

- name: Add hotfix bot comment
if: >
github.event.pull_request.base.ref == 'main' &&
github.event.pull_request.head.ref != 'testnet'
run: |
COMMENT_BODY=$(cat <<EOF
## 🚨🚨🚨 HOTFIX DETECTED 🚨🚨🚨

It looks like you are trying to merge a hotfix PR into `main`. If this isn't what you wanted to do, and you just wanted to make a regular PR, please close this PR, base your changes off the `devnet-ready` branch and open a new PR into `devnet ready`.

If you _are_ trying to merge a hotfix PR, please complete the following essential steps:
1. [ ] go ahead and get this PR into `main` merged, so we can get the change in as quickly as possible!
2. [ ] merge `main` into `testnet`, bumping `spec_version`
3. [ ] deploy `testnet`
4. [ ] merge `testnet` into `devnet`, bumping `spec_version`
5. [ ] deploy `devnet`
6. [ ] merge `devnet` into `devnet-ready`


If you do not complete these steps, your hotfix may be inadvertently removed in the future when branches are promoted to \`main\`, so it is essential that you do so.
EOF
)

curl -X POST \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
-d "$(jq -n --arg body "$COMMENT_BODY" '{body: $body}')"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/try-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: SubtensorCI
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run Try Runtime Checks
uses: "paritytech/try-runtime-gha@v0.1.0"
Expand All @@ -29,7 +29,7 @@ jobs:
runs-on: SubtensorCI
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run Try Runtime Checks
uses: "paritytech/try-runtime-gha@v0.1.0"
Expand Down
Loading
Loading