Skip to content

mainnet deploy 3/27/2025 #1479

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

Merged
merged 158 commits into from
Mar 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
6d1668d
initial tlock commitments impl
JohnReedV Feb 26, 2025
b9d69ca
Update tests.rs
JohnReedV Feb 26, 2025
6938c1a
fmt
JohnReedV Feb 26, 2025
3f3c0e0
refactor timelock commitments
JohnReedV Feb 27, 2025
3c6bf20
add reveal_timelocked_commitments to block_step
JohnReedV Mar 1, 2025
c7bcf7d
add basic commitments tetsts
JohnReedV Mar 3, 2025
f95ca64
restructure commitments pallet
JohnReedV Mar 3, 2025
be5bf5e
Merge branch 'devnet-ready' into tlock-commitments
JohnReedV Mar 3, 2025
423fe2c
tlock commitments unit tests
JohnReedV Mar 3, 2025
3c8d3de
zepter
JohnReedV Mar 3, 2025
4a2b298
address lints
JohnReedV Mar 3, 2025
1f3fb77
Merge branch 'devnet-ready' into tlock-commitments
JohnReedV Mar 4, 2025
0872889
add import
JohnReedV Mar 4, 2025
7e76fb1
handle multiple fields
JohnReedV Mar 4, 2025
937368a
only iterate over timelocked commitments in reveal
JohnReedV Mar 4, 2025
99b5a28
remove block_number param
JohnReedV Mar 6, 2025
af779f8
Merge branch 'devnet-ready' into tlock-commitments
JohnReedV Mar 6, 2025
f115be2
Merge branch 'devnet-ready' into tlock-commitments
JohnReedV Mar 11, 2025
5cc2355
Merge branch 'devnet-ready' into tlock-commitments
JohnReedV Mar 12, 2025
20bf502
fix merge
JohnReedV Mar 12, 2025
4b237ea
use space based rate limit per subnet tempo
JohnReedV Mar 13, 2025
5e70dc1
clippy
JohnReedV Mar 13, 2025
b441d87
fix `required_space`
JohnReedV Mar 13, 2025
c94ea1f
add tests
JohnReedV Mar 13, 2025
501baa2
clippy
JohnReedV Mar 13, 2025
2376741
revert unneeded
JohnReedV Mar 13, 2025
a0b33c7
revert unneeded change
JohnReedV Mar 13, 2025
c1236c6
rename set_max_space
JohnReedV Mar 14, 2025
2b9a90f
add test for reveal in blockstep
JohnReedV Mar 14, 2025
a245655
fmt
JohnReedV Mar 14, 2025
b0eb8bb
commitments data limit follows tempo exactly
JohnReedV Mar 14, 2025
c1015da
fix mock
JohnReedV Mar 14, 2025
bd33f8c
Add burn/recycle extrinsics
ales-otf Mar 18, 2025
a9e6f83
Rewrite recycle/burn alpha
ales-otf Mar 18, 2025
114938a
Add benchmarks for burn/recycle alpha
ales-otf Mar 19, 2025
1aba3f7
Reformat
ales-otf Mar 19, 2025
2fb469f
Update spec version
ales-otf Mar 19, 2025
3ba0c70
Resolve git conflicts
ales-otf Mar 19, 2025
dbd4a3a
Update spec version
ales-otf Mar 19, 2025
f3ccdf9
Merge pull request #1423 from opentensor/feat/burn-recycle
sam0x17 Mar 19, 2025
cc39b6e
feature start call
open-junius Mar 20, 2025
9dbc817
merge with target branch
open-junius Mar 20, 2025
dbce5ac
commit Cargo.lock
open-junius Mar 20, 2025
93dcb79
fix test cases
open-junius Mar 20, 2025
d4d6748
update runtime version
open-junius Mar 20, 2025
d6321c0
commit Cargo.lock
open-junius Mar 20, 2025
fdbbcec
more unit test
open-junius Mar 20, 2025
b38e79d
add doc
open-junius Mar 20, 2025
38a2fc1
Merge branch 'devnet-ready' into tlock-commitments
JohnReedV Mar 20, 2025
0686b06
update actions version
basfroman Mar 20, 2025
533c291
upload docker image to artifacts
basfroman Mar 20, 2025
498d87e
add `on.workflow_run` trigger
basfroman Mar 20, 2025
c611966
add actions/download-artifact name
basfroman Mar 20, 2025
eed9be6
delete, moved this logic to e2e related workflow
basfroman Mar 20, 2025
ce18e25
combine 2 workflow to one
basfroman Mar 20, 2025
00c03cb
swap
basfroman Mar 20, 2025
bdd5bcc
fix ids
basfroman Mar 20, 2025
4030e7c
fixes
basfroman Mar 20, 2025
91d61ed
add run-bittensor-e2e-tests output
basfroman Mar 20, 2025
f84be89
fix needs reference in main steps
basfroman Mar 20, 2025
397e187
remove path
basfroman Mar 20, 2025
e31c452
remove path for cli step
basfroman Mar 20, 2025
2b674c7
reset bonds for miners recently deregistered
camfairchild Mar 21, 2025
4725f55
reset bonds from deregistered validator
camfairchild Mar 21, 2025
f7e1531
add tests
camfairchild Mar 21, 2025
dfe3161
Merge pull request #1442 from opentensor/fix/roman/use-docker-image-f…
sam0x17 Mar 21, 2025
f3a108f
Merge branch 'devnet-ready' into tlock-commitments
JohnReedV Mar 21, 2025
213b7b1
use next_block/run_to_block _no_epoch
camfairchild Mar 21, 2025
cbca1c3
chore: fmt
camfairchild Mar 21, 2025
c86de44
benchmark file update
open-junius Mar 21, 2025
ceed34a
Merge pull request #1443 from opentensor/feat/reset-bonds-on-dereg
sam0x17 Mar 21, 2025
187ed94
mark deprecated items
JohnReedV Mar 21, 2025
ef9a7af
Adjust staking fees
gztensor Mar 21, 2025
589f9f2
Revert move fee
gztensor Mar 21, 2025
b683362
add a pending alpha (to valis) for prop em
camfairchild Mar 21, 2025
ef17ae6
undo move epoch
camfairchild Mar 21, 2025
abc3603
rename the storage
open-junius Mar 24, 2025
9d8877f
cargo fix
open-junius Mar 24, 2025
5887a92
Merge branch 'devnet-ready' into feat/start-call
open-junius Mar 24, 2025
b8c8da7
commit Cargo.lock
open-junius Mar 24, 2025
810f94c
update migration name
open-junius Mar 24, 2025
5fb588a
update coinbase test case
open-junius Mar 24, 2025
ad195fd
doc: added comment in localnet Dockerfile about fastblocks default
l0r1s Mar 24, 2025
ea8d0e3
Merge pull request #1448 from l0r1s/docfix-docker-localnet-fastblocks
sam0x17 Mar 24, 2025
d5e97c3
Merge pull request #1445 from opentensor/fix/tx-fees
sam0x17 Mar 24, 2025
5127d4d
Merge pull request #1354 from opentensor/tlock-commitments
sam0x17 Mar 24, 2025
8206aa3
Add start call to subtensor module (#1436)
ales-otf Mar 24, 2025
1428d24
remove `TotalHotkeyAlpha` balances that drop to 0
JohnReedV Mar 24, 2025
c862c46
add migration to remove existing zero value items
JohnReedV Mar 24, 2025
b663a4f
add migration test
JohnReedV Mar 24, 2025
280079d
fmt
JohnReedV Mar 24, 2025
554a7e8
clippy
JohnReedV Mar 24, 2025
660d9c7
Merge pull request #1449 from opentensor/debloat-TotalHotkeyAlpha
sam0x17 Mar 24, 2025
ef5d36f
feat: add actual_fee to StakeAdded and StakeRemoved events
tb-team-dev-2 Mar 24, 2025
9d9893a
feat: add actual_fee to StakeAdded and StakeRemoved events pt 2
tb-team-dev-2 Mar 24, 2025
d72d641
Merge branch 'devnet-ready' into feat/actual-fee-in-events
tb-team-dev-2 Mar 24, 2025
60b3551
shorten start call duration for fast blocks
camfairchild Mar 25, 2025
31a7f62
use prop_alpha_dividends
camfairchild Mar 21, 2025
eeba941
refactor coinbase for testability
camfairchild Mar 21, 2025
7ed1430
rename
camfairchild Mar 21, 2025
5c64e93
use stake_map as input instead of storage
camfairchild Mar 21, 2025
9f43a9d
extract tao_weight
camfairchild Mar 21, 2025
c0d04c6
test dividend distr sums near inputs
camfairchild Mar 21, 2025
76b52d8
extract functions from drain_pending
camfairchild Mar 22, 2025
a2e0a31
add more tests
camfairchild Mar 22, 2025
28a17c3
add epoch test for single reg
camfairchild Mar 22, 2025
834b6d3
add test for calc divs and incentives fn
camfairchild Mar 22, 2025
4e33275
extract calls to drain
camfairchild Mar 22, 2025
c46718d
fix/add tests
camfairchild Mar 22, 2025
c35d7ee
fix no miners alpha drain
camfairchild Mar 25, 2025
705dd77
remove magic number from test
camfairchild Mar 25, 2025
99f43db
fix tests
camfairchild Mar 25, 2025
6464278
spec bump
camfairchild Mar 25, 2025
0e85b7f
Merge branch 'devnet-ready' into fix/alpha-underpayment
camfairchild Mar 25, 2025
1047a72
Merge pull request #1447 from opentensor/fix/alpha-underpayment
sam0x17 Mar 25, 2025
6a2be68
bump spec version
sam0x17 Mar 25, 2025
22aefdd
Merge pull request #1455 from opentensor/feat/fast-blocks-start-call-…
sam0x17 Mar 25, 2025
a6a979a
add subnets_to_emit_to
camfairchild Mar 25, 2025
aadd712
Merge branch 'devnet-ready' into fix/runs-epoch-before-start-call
camfairchild Mar 25, 2025
a8b80a5
Merge branch 'devnet-ready' into feat/actual-fee-in-events
tb-team-dev-2 Mar 25, 2025
33a970c
fix clippy
camfairchild Mar 25, 2025
e7ea5d9
move test utils
camfairchild Mar 25, 2025
d100cb5
add tests. including for start call
camfairchild Mar 25, 2025
75c0d6e
set init bonds penalty to 1.0 (u16 max)
camfairchild Mar 26, 2025
bd8ed7b
Merge pull request #1462 from opentensor/fix/runs-epoch-before-start-…
sam0x17 Mar 26, 2025
d48f224
oops
camfairchild Mar 26, 2025
eb9549f
Merge pull request #1464 from opentensor/fix/default-bond-penalty-one
sam0x17 Mar 26, 2025
259a0ec
Merge pull request #1465 from opentensor/devnet-ready
sam0x17 Mar 26, 2025
a77ea67
add error UnexpectedUnreserveLeftover
JohnReedV Mar 26, 2025
ba02bea
better logic
JohnReedV Mar 26, 2025
9179e14
fix min burn set too low
camfairchild Mar 26, 2025
8d3044c
add to mock and add a test
camfairchild Mar 26, 2025
96f7501
spec bump
camfairchild Mar 26, 2025
ada3a06
fix mechid in event
camfairchild Mar 26, 2025
1f606bc
Merge branch 'devnet-ready' into feat/actual-fee-in-events
tb-team-dev-2 Mar 26, 2025
33779ef
fix event filtering
camfairchild Mar 26, 2025
32954b8
clippy
JohnReedV Mar 26, 2025
58b0640
bump spec
JohnReedV Mar 26, 2025
67920ac
remove unwrap from test
camfairchild Mar 26, 2025
c3b3f92
fix burn adjust test
camfairchild Mar 26, 2025
e8d73bc
Merge pull request #1470 from opentensor/commitments-deposit-error
sam0x17 Mar 26, 2025
17dc5dd
Merge branch 'devnet-ready' into feat/actual-fee-in-events
tb-team-dev-2 Mar 26, 2025
96939a7
Merge pull request #1454 from tb-team-dev-2/feat/actual-fee-in-events
sam0x17 Mar 26, 2025
340060c
Merge pull request #1469 from opentensor/fix/min-burn-set-low-on-new-…
sam0x17 Mar 26, 2025
7ced248
Merge pull request #1471 from opentensor/devnet-ready
sam0x17 Mar 26, 2025
f64b0a1
fix recycle alpha, allow nom usage and deduct from shares
camfairchild Mar 27, 2025
9b5d162
add failing tests
camfairchild Mar 27, 2025
7521a52
fix impl
camfairchild Mar 27, 2025
30b5510
update tests
camfairchild Mar 27, 2025
7c549ac
add test for root netuid no burn/recyc
camfairchild Mar 27, 2025
094b875
dont burn TAO
camfairchild Mar 27, 2025
5bcf610
bump spec
camfairchild Mar 27, 2025
0042e50
test with root subnet creation
camfairchild Mar 27, 2025
34c60ef
bump spec version
sam0x17 Mar 27, 2025
e47fa2d
Merge remote-tracking branch 'origin/devnet-ready' into fix/recycle-b…
sam0x17 Mar 27, 2025
0a92a5e
Merge pull request #1473 from opentensor/fix/recycle-burn-ext
sam0x17 Mar 27, 2025
f376f75
Merge pull request #1477 from opentensor/devnet-ready
sam0x17 Mar 27, 2025
9ee2ea5
Merge pull request #1461 from opentensor/devnet
sam0x17 Mar 27, 2025
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
292 changes: 292 additions & 0 deletions .github/workflows/check-bittensor-e2e-tests.yml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,292 @@
name: Bittensor Bittensor E2E Test

permissions:
pull-requests: write
contents: read

concurrency:
group: e2e-cli-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
branches:
- devnet
- devnet-ready
- testnet
- testnet-ready
- main
types: [opened, synchronize, reopened, labeled, unlabeled]

env:
CARGO_TERM_COLOR: always
VERBOSE: ${{ github.event.inputs.verbose }}

jobs:
apply-label-to-new-pr:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.draft == false }}
outputs:
should_continue: ${{ steps.check.outputs.should_continue }}
steps:
- name: Check
id: check
run: |
ACTION="${{ github.event.action }}"
if [[ "$ACTION" == "opened" || "$ACTION" == "reopened" ]]; then
echo "should_continue=true" >> $GITHUB_OUTPUT
else
echo "should_continue=false" >> $GITHUB_OUTPUT
fi
shell: bash

- name: Add label
if: steps.check.outputs.should_continue == 'true'
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: run-bittensor-e2e-tests

check-label:
needs: apply-label-to-new-pr
runs-on: ubuntu-latest
if: always()
outputs:
run-bittensor-e2e-tests: ${{ steps.get-labels.outputs.run-bittensor-e2e-tests }}
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Get labels from PR
id: get-labels
run: |
LABELS=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name')
echo "Current labels: $LABELS"
if echo "$LABELS" | grep -q "run-bittensor-e2e-tests"; then
echo "run-bittensor-e2e-tests=true" >> $GITHUB_ENV
echo "::set-output name=run-bittensor-e2e-tests::true"
else
echo "run-bittensor-e2e-tests=false" >> $GITHUB_ENV
echo "::set-output name=run-bittensor-e2e-tests::false"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

find-btcli-e2e-tests:
needs: check-label
if: always() && needs.check-label.outputs.run-bittensor-e2e-tests == 'true'
runs-on: ubuntu-latest
outputs:
test-files: ${{ steps.get-btcli-tests.outputs.test-files }}
steps:
- name: Research preparation
working-directory: ${{ github.workspace }}
run: git clone https://github.com/opentensor/btcli.git

- name: Checkout
working-directory: ${{ github.workspace }}/btcli
run: git checkout staging

- name: Install dependencies
run: sudo apt-get install -y jq

- name: Find e2e test files
id: get-btcli-tests
run: |
test_files=$(find ${{ github.workspace }}/btcli/tests/e2e_tests -name "test*.py" | jq -R -s -c 'split("\n") | map(select(. != ""))')
echo "::set-output name=test-files::$test_files"
shell: bash

find-sdk-e2e-tests:
needs: check-label
if: always() && needs.check-label.outputs.run-bittensor-e2e-tests == 'true'
runs-on: ubuntu-latest
outputs:
test-files: ${{ steps.get-sdk-tests.outputs.test-files }}
steps:
- name: Research preparation
working-directory: ${{ github.workspace }}
run: git clone https://github.com/opentensor/bittensor.git

- name: Checkout
working-directory: ${{ github.workspace }}/bittensor
run: git checkout staging

- name: Install dependencies
run: sudo apt-get install -y jq

- name: Find e2e test files
id: get-sdk-tests
run: |
test_files=$(find ${{ github.workspace }}/bittensor/tests/e2e_tests -name "test*.py" | jq -R -s -c 'split("\n") | map(select(. != ""))')
echo "::set-output name=test-files::$test_files"
shell: bash

build-image-with-current-branch:
needs: check-label
runs-on: SubtensorCI
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Docker Image
run: docker build -f Dockerfile-localnet -t localnet .

- name: Save Docker Image as Tar
run: docker save -o subtensor-localnet.tar localnet

- name: Upload Docker Image as Artifact
uses: actions/upload-artifact@v4
with:
name: subtensor-localnet
path: subtensor-localnet.tar

# main btcli job
run-btcli-e2e-tests:
needs:
- check-label
- find-btcli-e2e-tests
- build-image-with-current-branch
if: always() && needs.check-label.outputs.run-bittensor-e2e-tests == 'true'
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 16
matrix:
rust-branch:
- stable
rust-target:
- x86_64-unknown-linux-gnu
os:
- ubuntu-latest
test-file: ${{ fromJson(needs.find-btcli-e2e-tests.outputs.test-files) }}

env:
RELEASE_NAME: development
RUSTV: ${{ matrix.rust-branch }}
RUST_BACKTRACE: full
RUST_BIN_DIR: target/${{ matrix.rust-target }}
TARGET: ${{ matrix.rust-target }}

timeout-minutes: 60
name: "cli: ${{ matrix.test-file }}"
steps:
- name: Check-out repository
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Create Python virtual environment
working-directory: ${{ github.workspace }}
run: uv venv ${{ github.workspace }}/venv

- name: Clone Bittensor CLI repo
working-directory: ${{ github.workspace }}
run: git clone https://github.com/opentensor/btcli.git

- name: Setup Bittensor-cli from cloned repo
working-directory: ${{ github.workspace }}/btcli
run: |
source ${{ github.workspace }}/venv/bin/activate
git checkout staging
git fetch origin staging
uv run --active pip install --upgrade pip
uv run --active pip install '.[dev]'
uv run --active pip install pytest

- name: Install uv dependencies
working-directory: ${{ github.workspace }}/btcli
run: uv sync --all-extras --dev

- name: Download Cached Docker Image
uses: actions/download-artifact@v4
with:
name: subtensor-localnet

- name: Load Docker Image
run: docker load -i subtensor-localnet.tar

- name: Run tests
working-directory: ${{ github.workspace }}/btcli
run: |
source ${{ github.workspace }}/venv/bin/activate
uv run pytest ${{ matrix.test-file }} -s

# main sdk job
run-sdk-e2e-tests:
needs:
- check-label
- find-sdk-e2e-tests
- build-image-with-current-branch
if: always() && needs.check-label.outputs.run-bittensor-e2e-tests == 'true'
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 16
matrix:
rust-branch:
- stable
rust-target:
- x86_64-unknown-linux-gnu
os:
- ubuntu-latest
test-file: ${{ fromJson(needs.find-sdk-e2e-tests.outputs.test-files) }}

env:
RELEASE_NAME: development
RUSTV: ${{ matrix.rust-branch }}
RUST_BACKTRACE: full
RUST_BIN_DIR: target/${{ matrix.rust-target }}
TARGET: ${{ matrix.rust-target }}

timeout-minutes: 60
name: "sdk: ${{ matrix.test-file }}"
steps:
- name: Check-out repository
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Create Python virtual environment
working-directory: ${{ github.workspace }}
run: uv venv ${{ github.workspace }}/venv

- name: Clone Bittensor SDK repo
working-directory: ${{ github.workspace }}
run: git clone https://github.com/opentensor/bittensor.git

- name: Setup Bittensor SDK from cloned repo
working-directory: ${{ github.workspace }}/bittensor
run: |
source ${{ github.workspace }}/venv/bin/activate
git checkout staging
git fetch origin staging
uv run --active pip install --upgrade pip
uv run --active pip install '.[dev]'
uv run --active pip install pytest

- name: Install uv dependencies
working-directory: ${{ github.workspace }}/bittensor
run: uv sync --all-extras --dev

- name: Download Cached Docker Image
uses: actions/download-artifact@v4
with:
name: subtensor-localnet

- name: Load Docker Image
run: docker load -i subtensor-localnet.tar

- name: Run tests
working-directory: ${{ github.workspace }}/bittensor
run: |
source ${{ github.workspace }}/venv/bin/activate
uv run pytest ${{ matrix.test-file }} -s
Loading
Loading