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 deployment 20082024 #743

Merged
merged 224 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
224 commits
Select commit Hold shift + click to select a range
f241f66
add root crate
sam0x17 Jul 17, 2024
770b21a
linting scaffold
sam0x17 Jul 17, 2024
aebe741
lints trait
sam0x17 Jul 17, 2024
33d11d7
more
sam0x17 Jul 17, 2024
44e1d4d
working but not parallel
sam0x17 Jul 17, 2024
e900f03
Removing from the "main" branch the doc to run subtensor locally
rajkaramchedu Jul 22, 2024
55e6d06
Update README.md
rajkaramchedu Jul 22, 2024
d2e83ac
Merge remote-tracking branch 'origin/main' into rajkaramchedu-patch-1
sam0x17 Jul 23, 2024
9925305
Merge remote-tracking branch 'origin/main' into rajkaramchedu-patch-1-1
sam0x17 Jul 23, 2024
ed729b6
Added --no-purge flag to scripts/localnet.sh to be able to save state…
roman-opentensor Jul 23, 2024
c69bb7c
Merge pull request #656 from opentensor/rajkaramchedu-patch-1
garrett-opentensor Jul 23, 2024
aec052a
Update CODEOWNERS
unconst Jul 23, 2024
b003138
bump up the `runtime/src/lib.rs::spec_version;L142`
roman-opentensor Jul 23, 2024
562b19e
Merge branch 'devnet-ready' into feat/roman/no-purge-flag
roman-opentensor Jul 23, 2024
1332d07
Merge pull request #657 from opentensor/rajkaramchedu-patch-1-1
unconst Jul 23, 2024
7b04c49
Merge branch 'devnet-ready' into feat/roman/no-purge-flag
roman-opentensor Jul 24, 2024
f9b6828
try state for total issuance done
Jul 24, 2024
c958621
ranked choice voting
Jul 24, 2024
625da92
Merge pull request #687 from opentensor/total_issuance_migration
unconst Jul 24, 2024
53288a0
add tests and add swap
Jul 24, 2024
7107ae0
fmt
Jul 24, 2024
a1e2287
Merge pull request #688 from opentensor/swap_parents_children
unconst Jul 24, 2024
dd938c2
initial commit
Jul 24, 2024
f991965
Merge pull request #690 from opentensor/remove_registry
unconst Jul 24, 2024
dc9ee3d
fix identity migration
JohnReedV Jul 24, 2024
3233133
fmt
JohnReedV Jul 24, 2024
6dca681
Merge pull request #691 from opentensor/fix-identity-migration
unconst Jul 24, 2024
3b1352d
Only run spec version check when the skip label doesn't exist
keithtensor Jul 25, 2024
58cc59b
Fix syntax error
keithtensor Jul 25, 2024
771ce01
fix test
JohnReedV Jul 25, 2024
dccfd98
fmt & clippy
JohnReedV Jul 26, 2024
cb78f39
clippy
Jul 26, 2024
4dbdd77
fmt & clippy
JohnReedV Jul 26, 2024
646f19d
remove tarpaulin references
JohnReedV Jul 26, 2024
2ab7d27
Update Cargo.toml
JohnReedV Jul 26, 2024
d9b8eb9
stash
Jul 29, 2024
5b5f500
Merge pull request #693 from opentensor/fix-identity-migration-test
JohnReedV Jul 29, 2024
4a0eada
Merge pull request #694 from opentensor/devnet
sam0x17 Jul 29, 2024
d7ef058
fix compile error
open-junius Jul 30, 2024
2260fa0
fix error
open-junius Jul 30, 2024
ed345c5
fix clippy
open-junius Jul 30, 2024
3e6d1af
fix clippy
open-junius Jul 30, 2024
31d6fe3
Fix syntax
keithtensor Jul 30, 2024
8dda65d
fix unit test
open-junius Jul 30, 2024
8ce0d69
feat: child key takes
Jul 30, 2024
9917c03
chore: lints
Jul 30, 2024
f212a59
Fix clippy
keithtensor Jul 30, 2024
b656a58
feat: benchmarks
Jul 30, 2024
ee8aa6b
chore: remove todos
Jul 30, 2024
c1dbc59
chore: remove more comments
Jul 30, 2024
01cabbd
chore: multiple network child key takes
Jul 30, 2024
f7f243c
chore: clippy
Jul 30, 2024
e0ff073
custom errors signed extension
JohnReedV Jul 30, 2024
8d1c3d6
Merge pull request #698 from opentensor/junius/fix_scheduled_coldkey_…
distributedstatemachine Jul 30, 2024
1887925
update tests
JohnReedV Jul 30, 2024
75e7299
clippy
JohnReedV Jul 30, 2024
38ad516
fmt
JohnReedV Jul 30, 2024
826e55c
add custom error 7 & fix clippy
JohnReedV Jul 30, 2024
0b5e24d
chore: scheduler tests
Jul 30, 2024
06f1b9d
bump spec version
Jul 30, 2024
850caf6
chore: lints
Jul 30, 2024
d8acb8b
feat: isabella question
Jul 30, 2024
a03ce30
Merge pull request #675 from opentensor/feat/roman/no-purge-flag
distributedstatemachine Jul 31, 2024
3d4d571
start the unit test fix
open-junius Jul 31, 2024
5d48fae
chore: PR review comments
Jul 31, 2024
b1037ab
chore: clippy
Jul 31, 2024
531417a
chore: bump spec
Jul 31, 2024
beadf9f
add missing validate tests
JohnReedV Jul 31, 2024
a125856
fix unit test
open-junius Aug 1, 2024
0c1816c
fixed the config level issue
open-junius Aug 1, 2024
aad89d8
fix compilation
open-junius Aug 1, 2024
53ccd94
all unit test passed
open-junius Aug 1, 2024
2f83b84
clean up code
open-junius Aug 1, 2024
d80a928
fix clippy
open-junius Aug 1, 2024
1633b6c
fix admin test
open-junius Aug 1, 2024
49bd0c5
fix test
open-junius Aug 1, 2024
0f2fa05
remove unneeded feature
open-junius Aug 1, 2024
59dc95c
clean up code
open-junius Aug 1, 2024
9250464
update feature dependency
open-junius Aug 2, 2024
9364492
Replace SubtensorInterface with tight pallet coupling
keithtensor Aug 2, 2024
b0202f4
Remove SubtensorInterface in tests
keithtensor Aug 2, 2024
83d680d
Remove unused import
keithtensor Aug 2, 2024
063cf57
Fix clippy
keithtensor Aug 2, 2024
af4bf35
fix zepter
open-junius Aug 2, 2024
0bce83e
fix clippy
open-junius Aug 2, 2024
5181bef
Remove references to T::Subtensor in benchmarks
keithtensor Aug 2, 2024
06013f8
chore: remove childkey take removal
Aug 2, 2024
7a935f9
cargo fmt
keithtensor Aug 2, 2024
16b097c
Merge pull request #707 from opentensor/junius/fix_scheduled_coldkey_…
distributedstatemachine Aug 3, 2024
88f6b57
Merge pull request #692 from opentensor/no-spec-version-bump
unconst Aug 3, 2024
049275b
Merge remote-tracking branch 'origin/devnet-ready' into use-subtensor…
Aug 4, 2024
d719cf6
chore: fmt
Aug 4, 2024
d35d20b
chore: bump spec
Aug 4, 2024
148bb10
Merge remote-tracking branch 'origin/devnet-ready' into custom-errors…
Aug 4, 2024
02325f3
bump spec , formats
Aug 4, 2024
22cc4b5
chore: skip wasm builds on test scripts
Jul 31, 2024
21e3c26
feat: patch errors and assertions
Aug 4, 2024
fa1f279
Merge remote-tracking branch 'origin/devnet-ready' into feat/schedule…
Aug 4, 2024
1a88e73
Merge remote-tracking branch 'origin/devnet-ready' into feat/childkey…
Aug 5, 2024
9b557c4
feat: fix child take tests
Aug 5, 2024
2625b5d
remove unneeded label checks now that we have a simpler process
sam0x17 Aug 5, 2024
4dcd6c4
bump spec version
orriin Aug 5, 2024
7654191
update CONTRIBUTING.md
sam0x17 Aug 5, 2024
d1c40dd
run checks more often
sam0x17 Aug 5, 2024
8389088
Merge pull request #716 from opentensor/sam-remove-old-ci-stuff
sam0x17 Aug 6, 2024
d0649dc
fix clippy collapsible match
orriin Aug 6, 2024
67de45c
add schedule dissolve network
open-junius Aug 6, 2024
106df9e
fix clippy
open-junius Aug 6, 2024
cc036e5
fix clippy
open-junius Aug 6, 2024
70f624f
udpate comments
open-junius Aug 6, 2024
4734542
clippy
orriin Aug 6, 2024
771b120
fix bechmarks
open-junius Aug 7, 2024
f603944
Merge pull request #718 from opentensor/fix-collapsible-match-clippy
unconst Aug 7, 2024
6a37d4b
Merge pull request #714 from opentensor/bump-spec-version
unconst Aug 7, 2024
a65fb77
Merge remote-tracking branch 'origin/devnet-ready' into sam-custom-lints
sam0x17 Aug 7, 2024
eb4746f
fix warnings
sam0x17 Aug 7, 2024
252fea5
cargo +nightly fmt
sam0x17 Aug 7, 2024
b2e5290
cargo fix --workspace
sam0x17 Aug 7, 2024
6764633
feat: add more childkey tests
Aug 7, 2024
932e7b2
compiling but overflowing stack
sam0x17 Aug 7, 2024
4a87650
working in parallel :tada:
sam0x17 Aug 7, 2024
60f04ad
use channels, warning syntax 100% working
sam0x17 Aug 7, 2024
3de5b03
Update run_coinbase.rs
JohnReedV Aug 7, 2024
037b76d
add test_blocks_since_last_step
JohnReedV Aug 7, 2024
75857e9
freeze struct lint scaffold
sam0x17 Aug 7, 2024
a9200bc
working! cleaning up now
sam0x17 Aug 7, 2024
323f5ef
now actually working, before had false positives
sam0x17 Aug 7, 2024
a71a3a0
WIP
sam0x17 Aug 7, 2024
dad50ac
ALMOST
sam0x17 Aug 7, 2024
303db90
add new proxy types
camfairchild Aug 8, 2024
8a86e36
add supersets
camfairchild Aug 8, 2024
43dbb6c
add test
camfairchild Aug 8, 2024
e1ba277
clean up
sam0x17 Aug 8, 2024
0d486ba
reorder so enum doesnt change
camfairchild Aug 8, 2024
13db9e6
add missing freeze_struct to Registration
sam0x17 Aug 8, 2024
a6d13f6
Add short default tempo to fast-blocks feature
gztensor Aug 8, 2024
6a792ce
add missing freeze_structs + confirm detection issue with crate::free…
sam0x17 Aug 8, 2024
b3485c9
fix detection issue
sam0x17 Aug 8, 2024
a76484c
fix rerun-if logic
sam0x17 Aug 8, 2024
f704724
add missing freeze_struct to PrometheusInfo
sam0x17 Aug 8, 2024
955ee84
hack: include linting framework in main crate so we can test it
sam0x17 Aug 8, 2024
19aa49f
refactor to enable testing, separate linting crate
sam0x17 Aug 8, 2024
2abb319
tests for freeze struct lint
sam0x17 Aug 8, 2024
c34d72b
neuron pruning changes, initial tests
VectorChat Aug 8, 2024
069a33d
adding comments
VectorChat Aug 8, 2024
1011425
Add short InitialTxChildkeyTakeRateLimit to fast-blocks feature
gztensor Aug 8, 2024
4e976a1
ensure no warnings allowed / re-enable cargo check --workspace job
sam0x17 Aug 8, 2024
583c6a7
cargo clippy --fix --workspace
sam0x17 Aug 8, 2024
34ca8a9
cargo +nightly fmt
sam0x17 Aug 8, 2024
3c4903e
check that CI fails successfully
sam0x17 Aug 8, 2024
b98133d
test warning detection in CI
sam0x17 Aug 9, 2024
af6435a
proper check for custom lint failures
sam0x17 Aug 9, 2024
e47f2de
clippy fixes
sam0x17 Aug 9, 2024
3398adc
tweak
sam0x17 Aug 9, 2024
63da5af
try again
sam0x17 Aug 9, 2024
fad9f69
tweak again
sam0x17 Aug 9, 2024
4b79e61
try again
sam0x17 Aug 9, 2024
a4ac8b6
try echoing the file
sam0x17 Aug 9, 2024
4021d60
warning detection should be working in CI now
sam0x17 Aug 9, 2024
dbe2a89
but actually now
sam0x17 Aug 9, 2024
fe0d6ad
try catting
sam0x17 Aug 9, 2024
68ec4c6
feat: bump network max stake
Aug 9, 2024
9c3690b
strip color codes
sam0x17 Aug 9, 2024
370ca7f
whoops
sam0x17 Aug 9, 2024
75df997
working, now proper error message at the end
sam0x17 Aug 9, 2024
567696f
fix exit status
sam0x17 Aug 9, 2024
7aa4dc8
fix unwrap
sam0x17 Aug 9, 2024
ae40d0f
chore: add sudo calls for setting min/max childkey takes
Aug 9, 2024
320aecf
fix clippy warning
sam0x17 Aug 9, 2024
8f9e841
Merge pull request #725 from opentensor/feat/fast_tempo_for_fast_blocks
distributedstatemachine Aug 9, 2024
7072971
last remaining warning
sam0x17 Aug 9, 2024
15366cf
clippy
VectorChat Aug 9, 2024
681097b
more clippy
VectorChat Aug 10, 2024
2cb7ef4
allow multiple linting errors per file
sam0x17 Aug 11, 2024
3b8cab1
change Lint trait to take a syn::File instead
sam0x17 Aug 11, 2024
ee1422e
cargo clippy --fix --workspace --all-features
sam0x17 Aug 11, 2024
fec737d
bump spec version
sam0x17 Aug 11, 2024
bbd1b5f
fix localnet.sh to use production profile + sane workspace setup
sam0x17 Aug 11, 2024
9ef28bf
add line
JohnReedV Aug 12, 2024
58196b1
remove line
JohnReedV Aug 12, 2024
144be21
initial script
sam0x17 Aug 13, 2024
ab0e99a
Merge branch 'devnet-ready' into feat/neuron-pruning-change
JohnReedV Aug 13, 2024
0323d50
working but running into commit reveal issues
sam0x17 Aug 13, 2024
46f3287
debug runtime log level
orriin Aug 13, 2024
5b2dde6
Merge pull request #726 from VectorChat/feat/neuron-pruning-change
sam0x17 Aug 13, 2024
ce0dfa7
Fix rate limit for setting children
gztensor Aug 14, 2024
2c25fa3
Include the devnet-ready branch when checking for deployment
keithtensor Aug 14, 2024
5d1e951
Check for devnet-ready as well
keithtensor Aug 14, 2024
9509ce9
Skip spec_version bump if 'no-spec-version-bump' label exists
keithtensor Aug 14, 2024
42cb74f
Merge remote-tracking branch 'origin/devnet-ready' into sam-custom-lints
sam0x17 Aug 15, 2024
d3f13d5
Merge remote-tracking branch 'origin/devnet-ready' into sam-benchmarking
sam0x17 Aug 15, 2024
18274b0
Merge pull request #734 from opentensor/include-devnet-ready
unconst Aug 15, 2024
3707b8d
Merge pull request #719 from opentensor/schedule_dissolve_network
distributedstatemachine Aug 16, 2024
d4a5165
Merge remote-tracking branch 'origin/devnet-ready' into sam-custom-lints
sam0x17 Aug 16, 2024
9b0d246
switch localnet back to release
sam0x17 Aug 16, 2024
6333edd
strip out DummyLint
sam0x17 Aug 16, 2024
d6790a3
Use passes_rate_limit_on_subnet for setting children
gztensor Aug 16, 2024
cb35762
Merge pull request #733 from opentensor/fix/childkey-rate-limits
distributedstatemachine Aug 16, 2024
5eb5e93
Merge pull request #732 from opentensor/runtime-log-level
unconst Aug 16, 2024
164e64b
Merge pull request #730 from opentensor/sam-benchmarking
unconst Aug 16, 2024
5bbe575
Merge pull request #724 from opentensor/sam-custom-lints
unconst Aug 16, 2024
3536a8b
Merge pull request #723 from opentensor/feat/more-proxy-types
unconst Aug 16, 2024
41fd2f6
Merge pull request #722 from opentensor/increment-blocks-since-last-step
unconst Aug 16, 2024
37e6169
Merge pull request #700 from opentensor/custom-errors-signed-extension
unconst Aug 16, 2024
f4c0a66
Merge branch 'devnet-ready' into use-subtensor-pallet-in-admin
keithtensor Aug 16, 2024
f1866df
draft take tests
Aug 9, 2024
aa19201
chore: make rate limit prettier
Aug 19, 2024
c68f4e4
chore: remove commented test
Aug 19, 2024
dc67f8f
chore: fmt
Aug 19, 2024
74fcd80
chore: tidy
Aug 19, 2024
ff87b7b
chore: use forked substrate fixed
Aug 19, 2024
8ab4573
clean code and fix a bug
open-junius Aug 19, 2024
e2f372b
remove unused dispatch
open-junius Aug 19, 2024
9cbc5a2
Fix merge conflict
keithtensor Aug 19, 2024
bb66f09
cargo fmt
keithtensor Aug 19, 2024
1f92aa1
Merge pull request #699 from opentensor/feat/childkey_take
unconst Aug 19, 2024
42fdebf
Merge pull request #709 from opentensor/use-subtensor-pallet-in-admin
unconst Aug 19, 2024
2fc1e3c
Merge pull request #741 from opentensor/feat/substrate_fixed
unconst Aug 19, 2024
9047781
chore: max childkey take
Aug 19, 2024
b60176d
chore: add vars
Aug 19, 2024
488e2cf
Merge pull request #742 from opentensor/feat/maxchildkeytake
unconst Aug 19, 2024
e432f4c
Merge remote-tracking branch 'origin/devnet-ready' into feat/schedule…
Aug 19, 2024
51aa073
Merge remote-tracking branch 'origin/devnet' into feat/scheduled_cold…
Aug 19, 2024
4ebbf92
Merge pull request #713 from opentensor/feat/scheduled_coldkey_swap_back
unconst Aug 19, 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
Empty file.
7 changes: 4 additions & 3 deletions .github/workflows/check-devnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Devnet Deploy Check

on:
pull_request:
branches: [devnet]
branches: [devnet, devnet-ready]

env:
CARGO_TERM_COLOR: always
Expand All @@ -11,6 +11,7 @@ jobs:
check-spec-version:
name: Check spec_version bump
runs-on: SubtensorCI
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-spec-version-bump') }}
steps:
- name: Dependencies
run: |
Expand All @@ -37,7 +38,7 @@ jobs:
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
Expand All @@ -51,4 +52,4 @@ jobs:
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"
extra-args: "--disable-spec-version-check --no-weight-warnings"
1 change: 1 addition & 0 deletions .github/workflows/check-finney.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
check-spec-version:
name: Check spec_version bump
runs-on: SubtensorCI
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-spec-version-bump') }}
steps:
- name: Dependencies
run: |
Expand Down
52 changes: 48 additions & 4 deletions .github/workflows/check-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,54 @@ jobs:
- name: cargo clippy --workspace --all-targets -- -D warnings
run: cargo clippy --workspace --all-targets -- -D warnings

cargo-check-lints:
name: check custom lints
runs-on: SubtensorCI
strategy:
matrix:
rust-branch:
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
os:
- ubuntu-latest
# - 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 }}
steps:
- name: Check-out repository 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 ${{ matrix.rust-branch }}
uses: actions-rs/[email protected]
with:
toolchain: ${{ matrix.rust-branch }}
components: rustfmt, clippy
profile: minimal

- name: Utilize Shared Rust Cache
uses: Swatinem/[email protected]
with:
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}

- name: check lints
run: |
set -o pipefail # Ensure the pipeline fails if any command in the pipeline fails
cargo check 2>&1 | sed -r "s/\x1B\[[0-9;]*[mK]//g" | tee /dev/tty | grep -q "^warning:" && \
(echo "Build emitted the following warnings:" >&2 && exit 1) || echo "No warnings found."

cargo-clippy-all-features:
name: cargo clippy --all-features
runs-on: SubtensorCI
Expand Down Expand Up @@ -338,7 +386,3 @@ jobs:

- name: Check features
run: zepter run check




3 changes: 2 additions & 1 deletion .github/workflows/check-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Testnet Deploy Check

on:
pull_request:
branches: [testnet]
branches: [testnet, testnet-ready]

env:
CARGO_TERM_COLOR: always
Expand All @@ -11,6 +11,7 @@ jobs:
check-spec-version:
name: Check spec_version bump
runs-on: SubtensorCI
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-spec-version-bump') }}
steps:
- name: Dependencies
run: |
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/devnet-labels.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/devnet-ready-labels.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/testnet-labels.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/testnet-ready-labels.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
##
# rustup run nightly -- rustfmt node/src/main.rs

# max_width = 100
# max_width = 180
# hard_tabs = false
# tab_spaces = 4
# newline_style = "Auto"
Expand Down
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @sacha-l @lisa-parity
* @unconst
131 changes: 25 additions & 106 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Lifecycle of a Pull Request

1. Individuals wishing to contribute to subtensor should develop their change/feature/fix in a
[Pull Request](https://github.com/opentensor/subtensor/compare) (PR) targeting the `main`
[Pull Request](https://github.com/opentensor/subtensor/compare) (PR) targeting the `devnet-ready`
branch of the subtensor GitHub repository. It is recommended to start your pull request as a
draft initially until you are ready to have other developers actively look at it. Any
changes to pallet/runtime code should be accompanied by integration and/or unit tests fully
Expand All @@ -13,69 +13,29 @@
Review" and request review from "Nucleus".
3. Core Nucleus team members will review your PR, possibly requesting changes, and will also
add appropriate labels to your PR as shown below. Three positive reviews are required.
4. Once the required passing reviews have been obtained, you are ready to request that your PR
be included in the next `devnet` deploy. To do this, you should open a companion PR merging
a copy of your branch into the `devnet-ready` branch. You must include a link to the parent
PR in the description and preface your PR title with "(Devnet Ready)" or the PR will be
closed/ignored. Your companion PR should have the `devnet-companion` label.
5. A core team administrator will review your "(Devnet Ready)" PR, verifying that it logically
matches the changes introduced in the parent PR (there will sometimes be minor differences
due to merge conflicts) and will either request changes or approve the PR and merge it. Once
your companion PR is merged, the administrator will add the `devnet-ready` label to the
parent PR, indicating that the PR is on the `devnet-ready` branch and will be included in
the next deploy to `devnet`.
6. At some point, a core team administrator will open a PR merging the current `devnet-ready`
4. Once the required passing reviews have been obtained, you or an administrator may merge the
PR into the `devnet-ready` branch.
5. At some point, a core team administrator will open a PR merging the current `devnet-ready`
branch into `devnet`, and the CI will enforce some additional safety checks on this PR
including a requirement that the new `spec_version` be greater than the current on-chain
`spec_version`. The PR should include a bulleted list of all PRs included in the deploy so
they can be easily found after the fact (TODO: automate this). This PR will require two
reviews from the core team as a sanity check. After merging, the administrator will then
need to update all PRs with the `devnet-ready` label to instead have the `on-devnet` label
(TODO: automate this upon merge). The administrator will then deploy `devnet`.
7. Once the `on-devnet` label appears on your PR, if you are a core team member it is your
responsibility to verify that the features/changes/fixes introduced by your PR are
functioning properly on `devnet` by interacting with the live network. If you are an
external contributor, a core team member will be assigned to test this for you.
8. If your feature/change/fix is confirmed working on `devnet`, the `devnet-pass` label should
be added. Otherwise if there are issues, the `devnet-fail` label should be added and you
will need to make changes to your PR and repeat the previous steps in this process. In some
cases a revert PR will need to be created reverting your changes from the `pre-devnet` and
`devnet` branches, respectively.
9. Once `devnet-pass` has been added to your PR, it is eligible for inclusion in the next
`testnet` deploy. We typically run `testnet` deploys every other wednesday.
10. On the appropriate date, an administrator will open a PR merging the current `devnet`
they can be easily found after the fact.
6. Once your feature/change/fix is on `devnet`, it is your responsibility to confirm it is
working properly. If it is not working and additional changes are needed, please coordinate
with a core team administrator and/or open up a new PR into `devnet` either reverting your
changes or making any required changes in order for the feature to function properly.
7. On the appropriate date, an administrator will open a PR merging the current `devnet`
branch into `testnet`. This PR should include a bulleted list of all PRs included in the
deploy so they can be easily found after the fact (TODO: automate this). The PR should
exclude any PRs that currently have the `devnet-fail` label via a revert (TODO: enforce via
CI). This PR will require two reviews from the core team as a sanity check. After merging
into `testnet`, the administrator will then need to run the deploy and update all PRs
included in the deploy with the `on-testnet` label (TODO: automate this upon merge). Next
the administrator must cut a (pre-release) release in GitHub for `testnet` (TODO: github
action to generate the release and release notes).
11. Once the `on-testnet` label appears on your PR, if you are a core team member it is your
responsibility to once again verify that the features/changes/fixes introduced by your PR
are functioning properly on `testnet` by interacting with the live network, if applicable.
If you are an external contributor, a core team member may be assigned to do this testing
for you but otherwise it will be your responsibility to show evidence on the PR that the
testing is successful. Once this has been verified, the `testnet-pass` label should be
added. If testing fails, the `testnet-fail` label should be added and PRs should be opened
reverting the change from `devnet-ready`, and then a PR should be opened merging the
modified `devnet` into `testnet`. These revert PRs, if they occur, _must_ be merged before
a new deploy can be run (TODO: enforce this via CI).
12. After the SOP period (1 week on `testnet`) has passed and the `testnet-pass` label has been
added, the CI checks on your PR should now turn all green and a core team member will be
able to merge your PR into `main`. At this point your PR is done and is eligible to be
included in the next `finney` deploy (TODO: track and enforce SOP compliance on a per-PR
basis in CI based on the timestamps of label changes). We typically run `finney` deploys
every other Wednesday, so this will typically happen the Wednesday following the Wednesday
your PR was deployed to `testnet`. An administrator will run this deploy. The process the
administrator follows is to open a PR merging `main` into the `finney` branch, which will
always track the current state of `finney`. This PR automatically has some additional
checks on it such as asserting that the spec_version gets bumped properly and other sanity
checks designed to stop a bad deploy. Once the PR is reviewed and merged, the administrator
will run the actual deploy. Once that is successful, the administrator will cut a new
GitHub release tagged off of the latest `main` branch commit that was included in the
deploy, and announcements will be made regarding the release.
deploy so they can be easily found after the fact (TODO: automate this). This PR is merged,
the administrator will deploy `testnet` and cut a (pre-release) release in GitHub for
`testnet` (TODO: github action to generate the release and release notes).
11. It is now your responsibility to once again check that your feature/change/fix is working
properly, this time on `testnet`. Once again if it is not working or additional changes are
needed, please coordinate with a core team administrator ASAP and/or open up a new PR into
`testnet` either reverting your changes or making any required changes in order for the
feature to function properly.
12. At some point the administrator will merge current `testnet` into `main` and cut a new
deploy to mainnet/finney.

## PR Labels

Expand All @@ -85,40 +45,24 @@
| `blue-team` | PR is focused on preventative/safety measures and/or dev UX improvements | none |
| `runtime` | PR contains substantive changes to runtime / pallet code | none |
| `breaking-change` | PR requires synchronized changes with bittensor | Triggers an automatic bot message so the relevant teams are made aware of the change well in advance |
| `migration` | PR contains one or more migrations | none |
| `devnet-companion` | Designates a devnet companion PR | Presence of `devnet-companion` label is checked |
| `devnet-ready` | PR's branch has been merged into the `devnet-ready` branch and will be included in the next `devnet` deploy | none |
| `on-devnet` | PR has been deployed to `devnet` | Removes `devnet-ready` |
| `devnet-pass` | PR has passed manual testing on `devnet` | `devnet-pass` or `devnet-skip` required |
| `devnet-skip` | Allows a critical hotfix PR to skip required testing on `devnet` | `devnet-pass` or `devnet-skip` required |
| `devnet-fail` | PR has failed manual testing on `devnet` and requires modification | none |
| `testnet-companion` | Designates a testnet companion PR | Presence of `testnet-companion` label is checked |
| `on-testnet` | PR has been deployed to `testnet` | none |
| `testnet-pass` | PR has passed manual testing on `testnet` | `testnet-pass` or `testnet-skip` required |
| `testnet-skip` | Allows a critical hotfix PR to skip required manual testing and SOP on `testnet` | `testnet-pass` or `testnet-skip` required |
| `testnet-fail` | PR has failed manual testing on `testnet` and requires modification | none |


## Branches


### `devnet-ready`

Companion PRs merge into this branch, eventually accumulating into a merge of `devnet-ready`
into `devnet`, coinciding with a deploy of `devnet`.
All new feature/change/fix PRs should merge into this branch.

#### Restrictions
* no deleting the branch
* no force pushes
* no direct pushes
* require 1 positive review from an administrator
* new code changes invalidate existing reviews
* require 3 positive review from an administrator
* new code changes do _not_ invalidate existing reviews
* only merge commit style merging allowed

#### CI-Enforced Restrictions
* `check-rust.yml` must pass
* TODO: parent PR must be linked to in description
* TODO: parent PR must have the required number of positive reviews


### `devnet`
Expand Down Expand Up @@ -164,33 +108,8 @@ tags for `testnet` releases.

### `main`

Default branch for all new PRs. Slightly ahead of what is currently on `finney`. When a PR is all
green and "done", meaning it has been tested on `devnet` and `testnet`, it can be merged into
`main`. Contains tags for `finney` releases.

#### Restrictions
* no deleting the branch
* no force pushes
* no direct pushes
* require 3 positive reviews from core team members
* new code changes invalidate existing reviews
* all conversations must be resolved
* only merge commit style merging allowed

#### CI-Enforced Restrictions
* `check-rust.yml` must pass
* `check-labels.yml` must pass
* must have `devnet-skip` or `devnet-pass` label
* must have `testnet-skip` or `testnet-pass` label
* if `breaking-change` label is present, bot will message the appropriate teams
* TODO: when we get auditing, presence of `needs-audit` label = require a review from auditor
* TODO: track SOP on PR based on label age


### `finney`

Tracks the current state of what is deployed to `finney` (mainnet). Updated via an
administrator-submitted PR merging `main` into `finney` in concert with a `finney` deploy.
administrator-submitted PR merging `testnet` into `main` in concert with a `finney` deploy.

#### Restrictions
* no deleting the branch
Expand All @@ -203,5 +122,5 @@ administrator-submitted PR merging `main` into `finney` in concert with a `finne
#### CI-Enforced Restrictions
* `check-rust.yml` must pass
* `check-finney.yml` must pass
* spec_version must be greater than what is currently on live `finney`
* `spec_version` must be greater than what is currently on live `finney`
* TODO: other pre-deploy sanity checks here
Loading
Loading