Skip to content
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

Devnet ready 26262024 #584

Merged
merged 454 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
454 commits
Select commit Hold shift + click to select a range
a9bbc88
tweak branches
sam0x17 May 23, 2024
e294b20
fix typos
sam0x17 May 23, 2024
571a409
Merge pull request #460 from opentensor/junius/fix-wrong-raw-spec
distributedstatemachine May 23, 2024
42ff4c9
Merge pull request #364 from PawKanarek/fix-run-subtensor
distributedstatemachine May 23, 2024
8ee36c9
fix spec in dev
open-junius May 24, 2024
c8ec264
fix the spec
open-junius May 24, 2024
0ea83b5
Merge pull request #470 from opentensor/junius/fix-spec-dev
distributedstatemachine May 24, 2024
86ea8d4
add test
JohnReedV May 24, 2024
1f4a389
use reference instead of take()
JohnReedV May 24, 2024
46990bd
feat: burn emissions for subnets with registrations turned off
May 25, 2024
490ea18
chore: make registrations allowed field pub
May 25, 2024
05151ef
chore: use getter
May 25, 2024
b09065c
tests
May 25, 2024
a90a3ce
Merge branch 'development' into backport/dev_no_registration_no_emission
distributedstatemachine May 27, 2024
04137e1
chore: change error def in delegate take test , lints
May 27, 2024
cbc5e4b
Add salt to weights commit-reveal
gztensor May 27, 2024
0acb78f
chore: clippy
May 27, 2024
d3c487a
chore: fmt
May 27, 2024
52e1ed3
feat: chain extension
orriin May 24, 2024
037d7cc
Merge pull request #471 from opentensor/junius/fix-spec-testnet
open-junius May 27, 2024
8b28f54
Enable exponential backoff for AuRa
keithtensor May 27, 2024
da7b41c
cargo fmt
keithtensor May 27, 2024
fc61185
fix: skip_children only available in nightly
May 27, 2024
e5708f0
test: turn reg on , gets emissions
May 27, 2024
848a6ee
chore: turn reg off for netuid that was on and assert no new emissions
May 27, 2024
906864b
Use 15 blocks as the unfinalized slack
keithtensor May 27, 2024
25abdf3
Use 6 blocks as the unfinalized slack
keithtensor May 27, 2024
40a8321
Merge pull request #474 from opentensor/hotfix/no_registration_no_emi…
distributedstatemachine May 27, 2024
38ea19d
Merge pull request #480 from opentensor/enable-exponential-backoff
distributedstatemachine May 27, 2024
e93174d
feat: localnet fast blocks
orriin May 28, 2024
abaaf60
Merge branch 'development' into feat/localnet-fast-blocks
orriin May 28, 2024
7c6e34f
fix: clean up hanging nodes
orriin May 28, 2024
c56a418
Merge pull request #481 from opentensor/feat/localnet-fast-blocks
distributedstatemachine May 28, 2024
c911072
feat: add cititation.cft
May 28, 2024
d969e6c
add set_target_stakes_per_interval extrinsic
open-junius May 28, 2024
cf8be17
add it in mock file
open-junius May 28, 2024
0b283e2
Merge pull request #483 from opentensor/junius/add-one-admin-extrinsic
open-junius May 28, 2024
b89bbdf
cargo fmt & clippy
JohnReedV May 28, 2024
b6965ef
add event for stakes interval set
open-junius May 28, 2024
5e061dd
update SOP period for testnet
sam0x17 May 28, 2024
4e319c5
Merge remote-tracking branch 'origin/main' into sam-revamp-deployment
sam0x17 May 28, 2024
06295e4
salt u8 -> u16
JohnReedV May 28, 2024
686e6fb
Merge pull request #346 from opentensor/sam-revamp-deployment
sam0x17 May 28, 2024
86ee896
Merge branch 'development' into feat/chain-extension
orriin May 29, 2024
255d867
Merge pull request #479 from opentensor/feat/chain-extension
orriin May 29, 2024
00edfef
add test
camfairchild May 29, 2024
e73d193
Merge pull request #478 from opentensor/feat/add-random-salt-commit-r…
distributedstatemachine May 29, 2024
1025aee
add test tracking events
camfairchild May 29, 2024
737adf8
Merge branch 'testnet_290524' into development
distributedstatemachine May 29, 2024
8431083
Merge remote-tracking branch 'origin/development' into sudo-calls-com…
JohnReedV May 29, 2024
8060e47
fix merge
JohnReedV May 29, 2024
396b035
Merge pull request #484 from opentensor/junius/event-for-stakes-inter…
distributedstatemachine May 29, 2024
e663b37
Merge branch 'development' into sudo-calls-commit-reveal
JohnReedV May 29, 2024
b59e28c
fix merge
JohnReedV May 29, 2024
bb73abf
Merge branch 'development' into backport/dev_no_registration_no_emission
distributedstatemachine May 29, 2024
8b91ed4
Merge pull request #475 from opentensor/backport/dev_no_registration_…
distributedstatemachine May 29, 2024
cac9b44
Merge branch 'development' into sudo-calls-commit-reveal
May 29, 2024
86b7f6d
Merge pull request #432 from opentensor/sudo-calls-commit-reveal
distributedstatemachine May 29, 2024
41f9d25
Merge pull request #492 from opentensor/testnet_290524
distributedstatemachine May 29, 2024
2dd7140
fix: chain spec irregularities
orriin May 30, 2024
920834b
feat: docker ci , update compose
May 30, 2024
168a5e1
chore: update compose
May 30, 2024
f84b277
Update .github/workflows/docker.yml
distributedstatemachine May 30, 2024
cbd42df
Merge pull request #496 from opentensor/hotfix/docker
distributedstatemachine May 31, 2024
9b144ed
fix: write permissions for ci packages
May 31, 2024
fb3c041
chore: trigger on pull
May 31, 2024
92ecda5
chore: only on prs , not pushes to main
May 31, 2024
81c6dce
chore: tag latest
May 31, 2024
3b549b6
fix: build on pushes to main
May 31, 2024
f94e0d4
feat: check chainspec ci
orriin May 31, 2024
cdf96f4
feat: add bootnodes
orriin May 31, 2024
a96b41d
feat: build_all_chainspecs.sh script
orriin May 31, 2024
d97ab58
Apply automatic changes
orriin Jun 2, 2024
674d0da
feat: build_all_chainspecs.sh script
orriin May 31, 2024
f3cc5b2
Merge branch 'fix/chainspecs' of github.com:opentensor/subtensor into…
orriin Jun 2, 2024
5c84d8c
chore: better automated commit message
orriin Jun 2, 2024
2e1d938
chore: simplify ci
orriin Jun 2, 2024
f045ffa
Update chainspecs
orriin Jun 2, 2024
ec14176
chore: trigger ci
orriin Jun 2, 2024
df40180
Update chainspecs
orriin Jun 2, 2024
2596553
chore: trigger ci
orriin Jun 2, 2024
0d15170
Merge branch 'fix/chainspecs' of github.com:opentensor/subtensor into…
orriin Jun 2, 2024
c96818c
ci: only build chain specs on push to main, development, staging
orriin Jun 2, 2024
890f2f6
Merge branch 'main' into fix/chainspecs
orriin Jun 3, 2024
bbd26ca
Revert "Merge branch 'main' into fix/chainspecs"
orriin Jun 3, 2024
3434c95
ci to always check chainspecs build
orriin Jun 3, 2024
590249c
ci: install pytest
orriin Jun 3, 2024
0c77062
Merge pull request #499 from opentensor/hotfix/docker
distributedstatemachine Jun 3, 2024
d86cd11
revert axon info field ordering
camfairchild Jun 4, 2024
58765c7
bump spec
camfairchild Jun 5, 2024
1ad28e4
Merge pull request #512 from opentensor/fix/swap-back-fields
distributedstatemachine Jun 5, 2024
ab2f918
only test for contains event
camfairchild Jun 5, 2024
a7da684
add events and errors
camfairchild Jun 5, 2024
03ec10d
fix comment numbering
camfairchild Jun 5, 2024
357672b
extract join senate to helper
camfairchild Jun 5, 2024
a7ea851
add adjust senate call
camfairchild Jun 5, 2024
4b21dca
add macros crate
sam0x17 Jun 7, 2024
dc1550e
scaffold
sam0x17 Jun 7, 2024
d116b3b
almost working
sam0x17 Jun 7, 2024
54f31ce
working
sam0x17 Jun 7, 2024
2885c23
rip out cargo-husky 🐶✂️
sam0x17 Jun 7, 2024
658bf43
Merge branch 'main' into finney_deployment_11062024
Jun 11, 2024
bfbfde6
chore: bump spec
Jun 11, 2024
de68e52
chore: install pytest , add bt.snap to gitignore
Jun 11, 2024
81888af
chore: install pytest
Jun 11, 2024
4819b33
chore: update repo path
Jun 11, 2024
b82a57e
chore: update repo path
Jun 11, 2024
703bdbd
Merge pull request #519 from opentensor/finney_deployment_11062024
distributedstatemachine Jun 11, 2024
201c15e
fix
JohnReedV Jun 13, 2024
7113573
fix priority
JohnReedV Jun 13, 2024
3c17efb
Ban unsafe arithmetic operations
keithtensor May 24, 2024
7408aca
root weight dipatch test
Jun 13, 2024
d99f7dc
handle zero args case
sam0x17 Jun 13, 2024
54fee90
stable hashing algorithm
sam0x17 Jun 13, 2024
e6175e9
Merge remote-tracking branch 'origin/main' into sam-add-freeze-layout
sam0x17 Jun 13, 2024
5e95bd0
delete random file
sam0x17 Jun 13, 2024
0618272
add macros to workspace deps
sam0x17 Jun 13, 2024
e8b03cb
chore: bump spec version
Jun 13, 2024
ad39bdd
add to existing storage structs
sam0x17 Jun 13, 2024
b52e2e5
update localnet script
Jun 13, 2024
0a5368a
chore: run ci on every push
Jun 13, 2024
377086e
add freeze_struct_ignore_ra
sam0x17 Jun 13, 2024
4c05546
WIP
sam0x17 Jun 13, 2024
a2464b8
fix : ci rust
Jun 13, 2024
dd78f0e
chore: uncomment push conditions
Jun 13, 2024
7682875
chore: lint
Jun 13, 2024
d237974
chore: silence clippy in tests
Jun 13, 2024
a079954
fix problematic cases
sam0x17 Jun 13, 2024
f9ff8d1
chore: fmt
Jun 13, 2024
398b8f5
chore: use stable in ci
Jun 13, 2024
2bf5a35
chore: comment out clippy
Jun 13, 2024
fc2bf27
add test for root weights transaction validation
camfairchild Jun 14, 2024
07cf0e0
also test commit/reveal transaction validity check
camfairchild Jun 14, 2024
072a149
Merge branch 'main' into fix/add-adjust-senate-call
camfairchild Jun 14, 2024
5ad6570
chore: cargo fmt
camfairchild Jun 14, 2024
51160f3
mock should match lib
camfairchild Jun 14, 2024
d967644
add extra assert to test
camfairchild Jun 14, 2024
e42c10a
uncomment ci
Jun 14, 2024
c638e59
chore: clippy
Jun 14, 2024
98ed152
fix clippy
open-junius Jun 14, 2024
673d619
fix clippy
open-junius Jun 14, 2024
3656126
fix clippy
open-junius Jun 14, 2024
530b05d
fix clippy
open-junius Jun 14, 2024
7173614
fix clippy
open-junius Jun 14, 2024
8445ab7
fix clippy
open-junius Jun 14, 2024
cecdf02
fix clippy
open-junius Jun 14, 2024
edce0dd
fix clippy
open-junius Jun 14, 2024
2b07546
fix clippy
open-junius Jun 14, 2024
6cccfb5
fix clippy
open-junius Jun 14, 2024
ef4b241
fix: fast blocks false
Jun 14, 2024
eba20c2
chore: remove hard coded false
Jun 14, 2024
d16970a
Update pallets/subtensor/tests/block_step.rs
distributedstatemachine Jun 14, 2024
5a40b75
Update pallets/subtensor/tests/block_step.rs
distributedstatemachine Jun 14, 2024
87e47c5
clippy: just block
camfairchild Jun 14, 2024
b4ca34b
Merge pull request #527 from opentensor/hotfix/set-root-weights
distributedstatemachine Jun 14, 2024
64784b9
working
sam0x17 Jun 14, 2024
a764728
Merge remote-tracking branch 'origin/main' into sam-add-freeze-layout
sam0x17 Jun 14, 2024
1fe85aa
clippy fixes
sam0x17 Jun 14, 2024
a79a38a
fix Dockerfile
sam0x17 Jun 14, 2024
65423b4
only apply devnet-pass/testnet-pass label check to PRs on main
sam0x17 Jun 14, 2024
e8eae82
Merge pull request #538 from opentensor/sam-fix-check-labels
sam0x17 Jun 18, 2024
1a0d09f
Merge pull request #529 from opentensor/ban-unsafe-arithmetic-devnet
sam0x17 Jun 19, 2024
6959cba
merge
orriin Jun 19, 2024
9b5a3ea
fix main merge
orriin Jun 19, 2024
e2282e4
disallow changing genesis
orriin Jun 19, 2024
1876bc6
reset raw
orriin Jun 19, 2024
892b76c
fix specs
orriin Jun 19, 2024
544d2cd
rename file
orriin Jun 19, 2024
43a3e1b
remove raw_testspec.json
sam0x17 Jun 19, 2024
f647b16
missed one
sam0x17 Jun 19, 2024
c8016ca
Merge remote-tracking branch 'origin/main' into sam-add-freeze-layout
sam0x17 Jun 19, 2024
2cf595b
more that I missed
sam0x17 Jun 19, 2024
5e9955a
Merge remote-tracking branch 'origin/devnet-ready' into sam-add-freez…
sam0x17 Jun 19, 2024
68ab335
appease clippy
sam0x17 Jun 19, 2024
6000266
Merge pull request #550 from opentensor/sam-add-freeze-layout-devnet
sam0x17 Jun 19, 2024
a570df6
Pays Yes
camfairchild Jun 19, 2024
e0bf26b
feat: liquid alpha
Jun 20, 2024
6ca15b9
feat: clippy , zepter
Jun 20, 2024
6b00382
chore: bump spec
Jun 20, 2024
ed87610
add import
JohnReedV Jun 20, 2024
5487aeb
feat: use u16:MAX norm , update tests
Jun 20, 2024
c7dc69b
fix tests lints
Jun 21, 2024
98da543
fix: check migrations for right environments
Jun 21, 2024
e0c9f2a
fix: feature propagation
Jun 21, 2024
adce61b
chore: saturating div , update ema dense
Jun 21, 2024
de9c54a
lint
Jun 21, 2024
b4b24b7
Implement safe mode pallet
keithtensor Jun 13, 2024
e444b64
properly use item_clone to generate hash
sam0x17 Jun 21, 2024
705bfe7
Merge remote-tracking branch 'origin/devnet-ready' into sam-add-freez…
sam0x17 Jun 21, 2024
925b06c
bump CI
sam0x17 Jun 21, 2024
b5bc72d
Merge remote-tracking branch 'origin/devnet-ready' into fix-chainspec…
sam0x17 Jun 21, 2024
61fa5bd
Merge pull request #555 from opentensor/fix-chainspecs-devnet-companion
sam0x17 Jun 21, 2024
fce53c0
Merge pull request #554 from opentensor/sam-add-freeze-layout-devnet-2
sam0x17 Jun 21, 2024
d01cd1c
unite alpha getters/setters & add extrinsic
JohnReedV Jun 21, 2024
8624c93
Merge remote-tracking branch 'origin/main' into fix/add-adjust-senate…
sam0x17 Jun 21, 2024
f339e8e
bump CI
sam0x17 Jun 21, 2024
ccddd7b
ensure caller is subnet owner & tests
JohnReedV Jun 21, 2024
fae9db0
Merge branch 'devnet-ready' into fix-add-adjust-senate-call-vune-devn…
Jun 21, 2024
9f09d94
chore: clippy
Jun 21, 2024
f34be4c
Merge pull request #557 from opentensor/fix-add-adjust-senate-call-vu…
distributedstatemachine Jun 21, 2024
35dc7a5
cargo update to prevent lockfile issue
sam0x17 Jun 21, 2024
2b07824
Merge remote-tracking branch 'origin/devnet-ready' into keith-safe-mo…
sam0x17 Jun 21, 2024
a4f9ad7
re-generate Cargo.lock after merge
sam0x17 Jun 21, 2024
74e1beb
fix
sam0x17 Jun 21, 2024
1692d24
Merge pull request #559 from opentensor/keith-safe-mode-devnet-compan…
distributedstatemachine Jun 21, 2024
39b4fae
move set_alpha extrinsic to admin-utils
JohnReedV Jun 21, 2024
a4d6dfd
separate params in SubnetInfo
JohnReedV Jun 21, 2024
2e51ebd
test: compute alpha for 256 miners
Jun 22, 2024
b836401
lints , use sat maths for 256 miner alpha test
Jun 23, 2024
ced39fd
override default pages to 60k
orriin Jun 23, 2024
f5dff31
update doc
orriin Jun 24, 2024
6c300a0
fix subnet info
JohnReedV Jun 24, 2024
abe2f3e
Merge branch 'devnet-ready' into devnet_companion_feat/liquid_alpha_2
Jun 24, 2024
abc7798
clippy
Jun 24, 2024
ab6212a
Merge pull request #562 from opentensor/override-default-pages-devnet…
sam0x17 Jun 24, 2024
b1c26b3
feat: clippy
Jun 24, 2024
5c66560
Merge pull request #568 from opentensor/devnet_companion_feat/liquid_…
sam0x17 Jun 24, 2024
2b10e12
refactor: hotkey swap + tests
Jun 17, 2024
7eb29f9
chore: lints
Jun 17, 2024
6ddcfe2
chore: clippy
Jun 17, 2024
45e828d
chore: give 1k on faucet for easier to create networks locally
Jun 17, 2024
c12ec37
Correct the expected weights on the register extrinsic
keithtensor Jun 17, 2024
5eaa088
Update pallets/subtensor/src/swap.rs
distributedstatemachine Jun 17, 2024
969a4f8
chore: updates from using real weights in tests
Jun 17, 2024
6b68263
chore: review comments , make swap cost a constant
Jun 17, 2024
ec27e77
chore: runtime consts
Jun 17, 2024
fc82551
chore: clear prefix for removing old value from stake map
Jun 17, 2024
5057472
chore: pr comments assert keys
Jun 17, 2024
dd9672b
chore: pr comments: remove last tx block
Jun 17, 2024
60019a9
chore: fmt
Jun 17, 2024
2cd90dd
Use concrete numbers for weight expectations
keithtensor Jun 18, 2024
5743ae7
Update pallets/subtensor/src/swap.rs
distributedstatemachine Jun 18, 2024
f358847
chore: add test_swap_hotkey_tx_rate_limit_exceeded
Jun 18, 2024
768e8e4
chore: fmt
Jun 18, 2024
cb078a2
chore: review comments
Jun 18, 2024
814447f
fix: pr comments
Jun 21, 2024
680e4ad
chore: lint
Jun 21, 2024
f7b567a
fix: remove unused function
Jun 21, 2024
78663d8
add requirement for `devnet-companion` label for `devnet-ready` PRs
sam0x17 Jun 19, 2024
76d9439
add testnet-ready labels check
sam0x17 Jun 19, 2024
6bd2e42
update CONTRIBUTING.md with additional info
sam0x17 Jun 19, 2024
ad85c27
update docs
sam0x17 Jun 19, 2024
66c87af
clippy fix
sam0x17 Jun 21, 2024
01dca6a
make clippy happy
Jun 24, 2024
5c46be0
Merge pull request #567 from opentensor/devnet_companion_refactor/hot…
sam0x17 Jun 24, 2024
ecb6221
update spec file usage
orriin Jun 25, 2024
efb18f3
Merge pull request #571 from opentensor/chainspec-file-update
orriin Jun 25, 2024
81ed321
feat: bump spec
Jun 25, 2024
2ea077b
feat: benchmark adjust senate
Jun 25, 2024
2b6d54f
Merge pull request #583 from opentensor/feat/adjust_senate_benchmarks
distributedstatemachine Jun 25, 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
18 changes: 0 additions & 18 deletions .cargo-husky/hooks/prepare-commit-msg

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/check-devnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Devnet Deploy Check

on:
pull_request:
branches: [devnet]

env:
CARGO_TERM_COLOR: always

jobs:
check-spec-version:
name: Check spec_version bump
runs-on: SubtensorCI
steps:
- name: Dependencies
run: |
sudo apt-get update &&
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

- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4

- name: Check that spec_version has been bumped
run: |
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://dev.chain.opentensor.ai:443 | tr -d '\n')
echo "network spec_version: $spec_version"
: ${spec_version:?bad spec version}
local_spec_version=$(cargo run -p node-subtensor-runtime --bin spec_version | tr -d '\n')
echo "local spec_version: $local_spec_version"
echo "network spec_version: $spec_version"
if (( $(echo "$local_spec_version <= $spec_version" | bc -l) )); then echo "$local_spec_version ≯ $spec_version ❌"; exit 1; fi
echo "$local_spec_version > $spec_version ✅"

check-devnet-migrations:
name: check devnet migrations
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Run Try Runtime Checks
uses: "paritytech/try-runtime-gha@v0.1.0"
with:
runtime-package: "node-subtensor-runtime"
node-uri: "wss://dev.chain.opentensor.ai:443"
checks: "pre-and-post"
extra-args: "--disable-spec-version-check --no-weight-warnings"
53 changes: 53 additions & 0 deletions .github/workflows/check-finney.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Finney Deploy Check

on:
pull_request:
branches: [finney, main]

env:
CARGO_TERM_COLOR: always

jobs:
check-spec-version:
name: Check spec_version bump
runs-on: SubtensorCI
steps:
- name: Dependencies
run: |
sudo apt-get update &&
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

- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4

- name: Check that spec_version has been bumped
run: |
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://entrypoint-finney.opentensor.ai:443 | tr -d '\n')
echo "network spec_version: $spec_version"
: ${spec_version:?bad spec version}
local_spec_version=$(cargo run -p node-subtensor-runtime --bin spec_version | tr -d '\n')
echo "local spec_version: $local_spec_version"
echo "network spec_version: $spec_version"
if (( $(echo "$local_spec_version <= $spec_version" | bc -l) )); then echo "$local_spec_version ≯ $spec_version ❌"; exit 1; fi
echo "$local_spec_version > $spec_version ✅"

check-finney-migrations:
name: check finney migrations
runs-on: SubtensorCI
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Run Try Runtime Checks
uses: "paritytech/try-runtime-gha@v0.1.0"
with:
runtime-package: "node-subtensor-runtime"
node-uri: "wss://entrypoint-finney.opentensor.ai:443"
checks: "pre-and-post"
extra-args: "--disable-spec-version-check --no-weight-warnings"
86 changes: 16 additions & 70 deletions .github/workflows/check-rust.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
name: CI
name: Check Rust

concurrency:
group: ci-${{ github.ref }}
group: check-rust-${{ github.ref }}
cancel-in-progress: true

on:
## Run automatically for all PRs against main, regardless of what the changes are
## to be safe and so we can more easily force re-run the CI when github is being
## weird by using a blank commit
push:
branches: [main, development, staging]
branches: [main, devnet-ready, devnet, testnet, finney]

##
# Run automatically for PRs against default/main branch if Rust files change
pull_request:
branches: [main, development, staging]

## Allow running workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -56,7 +50,7 @@ jobs:
TARGET: ${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential
Expand All @@ -77,7 +71,7 @@ jobs:
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
Expand All @@ -97,7 +91,7 @@ jobs:
TARGET: ${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand Down Expand Up @@ -125,7 +119,7 @@ jobs:
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
Expand Down Expand Up @@ -166,15 +160,14 @@ jobs:

- name: cargo clippy --workspace --all-targets --all-features -- -D warnings
run: cargo clippy --workspace --all-targets --all-features -- -D warnings

# runs cargo test --workspace
cargo-test:
name: cargo test
runs-on: SubtensorCI
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
Expand All @@ -194,7 +187,7 @@ jobs:
TARGET: ${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand Down Expand Up @@ -223,7 +216,7 @@ jobs:
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
Expand All @@ -243,7 +236,7 @@ jobs:
TARGET: ${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand Down Expand Up @@ -272,7 +265,7 @@ jobs:
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
Expand All @@ -292,7 +285,7 @@ jobs:
TARGET: ${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand Down Expand Up @@ -339,60 +332,13 @@ jobs:
run: cargo install --locked -q zepter && zepter --version

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # Dont clone historic commits.

- name: Check features
run: zepter run check

check-finney-migrations:
name: check finney migrations
runs-on: SubtensorCI
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Run Try Runtime Checks
uses: "paritytech/try-runtime-gha@v0.1.0"
with:
runtime-package: "node-subtensor-runtime"
node-uri: "wss://entrypoint-finney.opentensor.ai:443"
checks: "pre-and-post"
extra-args: "--disable-spec-version-check --no-weight-warnings --disable-idempotency-checks"

# ----
# We can enable devnet and finney migrations once Polkadot v1.0 is deployed to finney, after
# which time all future migrations should be idempotent and won't start failing after the
# upgrade is deployed.
# ----
# check-devnet-migrations:
# name: check devnet migrations
# runs-on: ubuntu-22.04
# steps:
# - name: Checkout sources
# uses: actions/checkout@v3
#
# - name: Run Try Runtime Checks
# uses: "paritytech/try-runtime-gha@v0.1.0"
# with:
# runtime-package: "node-subtensor-runtime"
# node-uri: "wss://dev.chain.opentensor.ai:443"
# checks: "pre-and-post"
# extra-args: "--disable-spec-version-check --no-weight-warnings --disable-idempotency-checks"
#
# check-testnet-migrations:
# name: check testnet migrations
# runs-on: ubuntu-22.04
# steps:
# - name: Checkout sources
# uses: actions/checkout@v3
#
# - name: Run Try Runtime Checks
# uses: "paritytech/try-runtime-gha@v0.1.0"
# with:
# runtime-package: "node-subtensor-runtime"
# node-uri: "wss://test.chain.opentensor.ai:443"
# checks: "pre-and-post"
# extra-args: "--disable-spec-version-check --no-weight-warnings --disable-idempotency-checks"
#


54 changes: 54 additions & 0 deletions .github/workflows/check-testnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Testnet Deploy Check

on:
pull_request:
branches: [testnet]

env:
CARGO_TERM_COLOR: always

jobs:
check-spec-version:
name: Check spec_version bump
runs-on: SubtensorCI
steps:
- name: Dependencies
run: |
sudo apt-get update &&
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

- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4

- name: Check that spec_version has been bumped
run: |
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://test.finney.opentensor.ai:443 | tr -d '\n')
echo "network spec_version: $spec_version"
: ${spec_version:?bad spec version}
local_spec_version=$(cargo run -p node-subtensor-runtime --bin spec_version | tr -d '\n')
echo "local spec_version: $local_spec_version"
echo "network spec_version: $spec_version"
if (( $(echo "$local_spec_version <= $spec_version" | bc -l) )); then echo "$local_spec_version ≯ $spec_version ❌"; exit 1; fi
echo "$local_spec_version > $spec_version ✅"

check-testnet-migrations:
name: check testnet migrations
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Run Try Runtime Checks
uses: "paritytech/try-runtime-gha@v0.1.0"
with:
runtime-package: "node-subtensor-runtime"
node-uri: "wss://test.chain.opentensor.ai:443"
checks: "pre-and-post"
extra-args: "--disable-spec-version-check --no-weight-warnings"
19 changes: 19 additions & 0 deletions .github/workflows/devnet-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Tested on Devnet
on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]
branches: [main]
jobs:
check-labels:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: mheap/github-action-required-labels@v5
with:
mode: minimum
count: 1
labels: |
devnet-pass
devnet-skip
Loading
Loading