Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
269 commits
Select commit Hold shift + click to select a range
426d432
remove obsolete storage
open-junius Oct 30, 2025
ab5b272
bump version
open-junius Oct 30, 2025
742c4aa
Disable root claim fees.
shamil-gadelshin Oct 31, 2025
d69790e
Add subnet deregistration priority flag
ppolewicz Oct 31, 2025
1e45805
Add extrinsic to clear subnet deregistration flag
ppolewicz Oct 31, 2025
4c57621
Add scheduling controls for subnet deregistration priority
ppolewicz Oct 31, 2025
0314ae9
Restrict deregistration flag clearing to root
ppolewicz Nov 2, 2025
989944b
Remove claim root on network deregistration
shamil-gadelshin Oct 31, 2025
e4da052
Bump chain spec version.
shamil-gadelshin Nov 3, 2025
c6cfaeb
auto-update benchmark weights
github-actions[bot] Nov 3, 2025
c5e0161
Merge pull request #2168 from opentensor/disable-root-claim-fees
sam0x17 Nov 3, 2025
3b64fb8
Merge remote-tracking branch 'origin/devnet-ready' into network-disso…
sam0x17 Nov 3, 2025
0d66053
Init flows instead of transition, set temperature = 1.0
gztensor Nov 3, 2025
895a29c
impl
camfairchild Nov 3, 2025
431b1ca
chore: fmt
camfairchild Nov 3, 2025
d6eacc2
evm test wip
camfairchild Nov 3, 2025
9f84b02
Remove init_factor
gztensor Nov 3, 2025
d3211b7
Merge pull request #2171 from opentensor/feat/flow-emissions
sam0x17 Nov 3, 2025
e846eba
Merge pull request #2170 from opentensor/network-dissolution-optimiza…
sam0x17 Nov 3, 2025
9d794ed
fix conflict
open-junius Nov 4, 2025
3ef0ba9
typo
open-junius Nov 4, 2025
3de77ee
fix linter
open-junius Nov 4, 2025
c0f1720
commit Cargo.lock
open-junius Nov 4, 2025
506c1ea
commit Cargo.lock
open-junius Nov 4, 2025
c754aff
commit Cargo.lock
open-junius Nov 4, 2025
ed5971b
update test case
open-junius Nov 4, 2025
5966335
add more e2e test
open-junius Nov 4, 2025
5971124
bump version
open-junius Nov 4, 2025
8f585ec
clean up code
open-junius Nov 4, 2025
6218ecc
Merge pull request #2161 from opentensor/testnet
sam0x17 Nov 4, 2025
05c8c69
Re-init tao flows
gztensor Nov 4, 2025
60c4a5c
Revert back to ema-prices
gztensor Nov 4, 2025
a97e22b
Merge pull request #2174 from opentensor/fix/revert-tao-flow-back-to-…
sam0x17 Nov 4, 2025
3ec6631
Migration to remove SubnetEmaTaoFlow and cause it's re-initialization
gztensor Nov 5, 2025
04337b0
Spec bump
gztensor Nov 5, 2025
2f49bca
Merge branch 'devnet-ready' into fix/init-tao-flows
gztensor Nov 5, 2025
ccad010
Merge pull request #2175 from opentensor/fix/init-tao-flows
sam0x17 Nov 5, 2025
54b5090
Spec bump
gztensor Nov 5, 2025
cf2b75c
Merge branch 'devnet-ready' into fix/revert-tao-flow-back-to-prices
gztensor Nov 5, 2025
a95bc8e
Reorder functions
gztensor Nov 5, 2025
6b8440c
Merge branch 'fix/revert-tao-flow-back-to-prices' of github.com:opent…
gztensor Nov 5, 2025
e36f94c
fix bug
open-junius Nov 5, 2025
fe78a60
cargo fix
open-junius Nov 5, 2025
bf0ee07
remove kill case
open-junius Nov 5, 2025
a18639d
bump version
open-junius Nov 5, 2025
4e4addd
Merge pull request #2176 from opentensor/fix/revert-tao-flow-back-to-…
sam0x17 Nov 5, 2025
120be4f
Re-enable tao flow
gztensor Nov 5, 2025
e48ef84
Spec bump
gztensor Nov 5, 2025
71455aa
Merge pull request #2179 from opentensor/fix/init-tao-flows
sam0x17 Nov 5, 2025
1f520ed
Merge pull request #2177 from opentensor/testnet
sam0x17 Nov 5, 2025
757b846
fix wrong variable
open-junius Nov 5, 2025
85657c5
fix conflict
open-junius Nov 5, 2025
8458abe
fix conflict
open-junius Nov 5, 2025
b2385bd
add comments for pallet config in test
open-junius Nov 5, 2025
842c2ae
Separate admin freeze window check from rate limit check
ales-otf Nov 5, 2025
34dc6e7
Update spec version
ales-otf Nov 5, 2025
6326a1a
Merge pull request #2180 from opentensor/chore/separate-admin-freeze-…
sam0x17 Nov 5, 2025
b6cb088
impl tests benchmarks
camfairchild Nov 5, 2025
3118bb7
bump spec
camfairchild Nov 5, 2025
843bc88
remove duplicate remove
camfairchild Nov 5, 2025
fb053c8
use alpha out here
camfairchild Nov 5, 2025
cb2085e
Hotfix/vune/epoch sub fix (#2186)
0xcacti Nov 5, 2025
b068d02
emit full alpha if subsidized
camfairchild Nov 5, 2025
7d77cf0
fix coinbase test
camfairchild Nov 5, 2025
e792dd1
fix tests
camfairchild Nov 5, 2025
d7a28ba
Revert "Hotfix/vune/epoch sub fix (#2186)"
camfairchild Nov 5, 2025
a837632
add total issuance bump
camfairchild Nov 5, 2025
6bddb56
no alpha out thing
camfairchild Nov 6, 2025
b857d4d
add tests for emissions w/ subs
camfairchild Nov 6, 2025
e1feb05
bump spec
camfairchild Nov 6, 2025
2af7993
Merge remote-tracking branch 'origin/testnet' into devnet-ready
sam0x17 Nov 6, 2025
ad602c1
Fix clippy warnings
shamil-gadelshin Nov 6, 2025
fbefae9
fix conflict
open-junius Nov 6, 2025
3ee8f4d
bump version
open-junius Nov 6, 2025
cac43c5
Hotfix/vune/epoch sub fix (#2186)
0xcacti Nov 5, 2025
85fe2d4
rename drain_pending to distr em
camfairchild Nov 6, 2025
90d4be4
remove arg and total internally
camfairchild Nov 6, 2025
f81986b
test pending em
camfairchild Nov 6, 2025
be16df6
make sure we check subsidize during those tests
camfairchild Nov 6, 2025
69249f4
fix root claim tests
camfairchild Nov 6, 2025
9762f6a
helper and clippy
camfairchild Nov 6, 2025
94d31d7
bump spec
camfairchild Nov 6, 2025
186c717
rename subsidy to root flag
camfairchild Nov 6, 2025
25290f1
only pull these values if root selling
camfairchild Nov 6, 2025
d3698bf
rename subsidy checks to the root_sell flag
camfairchild Nov 6, 2025
62ecfe1
rename subsidy to excess_tao
camfairchild Nov 6, 2025
c5a7f51
use recycle alpha helper
camfairchild Nov 6, 2025
54e7033
change name of reveal fn and move to block step
camfairchild Nov 6, 2025
8ad48b3
update moving prices outside of coinbase
camfairchild Nov 6, 2025
f00a7ac
filter root out just in case
camfairchild Nov 6, 2025
feeee61
refactor coinbase
camfairchild Nov 6, 2025
4abd92d
chore: fmt
camfairchild Nov 6, 2025
1f965d4
chore: clippy
camfairchild Nov 6, 2025
1ea4ddf
add test for reg disabled
camfairchild Nov 6, 2025
7a9b662
refactor get sn terms
camfairchild Nov 6, 2025
0b5df3c
test wip -- set price
camfairchild Nov 6, 2025
75440be
Hotfix/vune/subnet-dereg-burn-use-issuance (#2190)
camfairchild Nov 6, 2025
40b4ffc
remove log out
camfairchild Nov 6, 2025
fb0cd73
make maybe init v3 pub
camfairchild Nov 6, 2025
6e20035
add type
camfairchild Nov 6, 2025
660b1c6
fix coinbase test
camfairchild Nov 6, 2025
a0c2369
rename test vars and add comment
camfairchild Nov 6, 2025
8652a5f
rename fn
camfairchild Nov 6, 2025
ba0fae0
rename sub -> excess
camfairchild Nov 6, 2025
47a5d54
Merge branch 'hotfix/vune/epoch-fn-inp' into feat/new-coinbase
camfairchild Nov 6, 2025
8e6286c
remove ref to subs
camfairchild Nov 6, 2025
c38aa09
remove dup fn
camfairchild Nov 6, 2025
61227c8
rename vars
camfairchild Nov 6, 2025
c2598a9
add test for injection order
camfairchild Nov 7, 2025
09a2cac
add comment to test
camfairchild Nov 7, 2025
3b9c11e
add tests for drain pending
camfairchild Nov 7, 2025
1b540d9
rename test
camfairchild Nov 7, 2025
d3d5819
rename tests
camfairchild Nov 7, 2025
f1c0476
lower eps
camfairchild Nov 7, 2025
9de47ed
add another subnetterms test
camfairchild Nov 7, 2025
01f8f61
remove unneeded test setup
camfairchild Nov 7, 2025
6a76ecc
hotfix: epoch w/subsidy fix (#2187)
camfairchild Nov 7, 2025
e9c9424
add totalemission counter
camfairchild Nov 7, 2025
5cafe0a
burn alpha not sold by root
camfairchild Nov 7, 2025
16822b4
wip
camfairchild Nov 7, 2025
cfca5d0
chore: fmt
camfairchild Nov 7, 2025
3975359
bump spec
camfairchild Nov 7, 2025
abef5e0
add pending server and pending vali emissions
camfairchild Nov 7, 2025
6418911
fix args for em distr in tests
camfairchild Nov 7, 2025
264d9c3
use new pending em storages
camfairchild Nov 7, 2025
94d093b
use migration to clear the old pending em map
camfairchild Nov 7, 2025
c2e6ab7
amend comment
camfairchild Nov 7, 2025
c474b21
Merge remote-tracking branch 'origin/main' into devnet
sam0x17 Nov 7, 2025
8237617
Merge remote-tracking branch 'origin/hotfix/vune/recycle-root-alpha-i…
sam0x17 Nov 7, 2025
e931123
Update pallets/subtensor/src/lib.rs
camfairchild Nov 7, 2025
b179867
Merge pull request #2191 from opentensor/hotfix/vune/recycle-root-alp…
sam0x17 Nov 8, 2025
53db5e0
use get_sn_to_emit_to fn and test
camfairchild Nov 8, 2025
0c56418
spec bump
camfairchild Nov 8, 2025
5e0028d
add mirgation to reset inactive SNs
camfairchild Nov 8, 2025
1346bca
set firstemissionblock in tests
camfairchild Nov 8, 2025
0fb1ea7
use pool initial alpha
camfairchild Nov 8, 2025
e974c0b
comment
camfairchild Nov 8, 2025
9273671
insert properly to the btreemap
camfairchild Nov 8, 2025
b68847e
docs: typo
camfairchild Nov 8, 2025
9c07bd0
use mutate instead
camfairchild Nov 8, 2025
5be2d44
use explicit filter for correct SNs and test
camfairchild Nov 8, 2025
6e37470
clear protocol liq and raorecycled for reg
camfairchild Nov 8, 2025
eea9be4
chore: clippy
camfairchild Nov 8, 2025
79f5dd9
add weights
camfairchild Nov 8, 2025
6c1b39f
optimize migration
camfairchild Nov 8, 2025
f74517b
also dec totalstake for recycle
camfairchild Nov 8, 2025
b9c597c
move clear liq up
camfairchild Nov 8, 2025
a1a92a7
use var
camfairchild Nov 8, 2025
fb7c4c5
add burn reg to migration test
camfairchild Nov 8, 2025
f4eb1ad
Merge branch 'main' into feat/new-coinbase
camfairchild Nov 8, 2025
8b8f763
move reg disabled filter to sn to emit to
camfairchild Nov 8, 2025
717be51
remove extra counters
camfairchild Nov 8, 2025
1ca583a
test for idempotence with ti migration: wip
camfairchild Nov 9, 2025
67634ba
commit Cargo.lock
sam0x17 Nov 9, 2025
3a8baf1
fix test
sam0x17 Nov 9, 2025
3493ec9
cargo fmt
sam0x17 Nov 9, 2025
a8a1498
fix tests
sam0x17 Nov 9, 2025
e52cccd
cargo fmt
sam0x17 Nov 9, 2025
fed50da
fix custom lints
sam0x17 Nov 9, 2025
1660517
remove locks from ti migration
camfairchild Nov 9, 2025
86cbbdc
remove extra ti migration
camfairchild Nov 9, 2025
08ad9f0
bump ti in test helper
camfairchild Nov 9, 2025
39a3b56
dont need subnet lock
camfairchild Nov 9, 2025
4250875
ust use total issuance migration
camfairchild Nov 9, 2025
f3c7319
mint TAO in the case that the SubnetTAO is lower than init
camfairchild Nov 9, 2025
97065fe
cleanup test
camfairchild Nov 9, 2025
d9aac6e
fix test
camfairchild Nov 9, 2025
e20ad6f
fix custom lints
sam0x17 Nov 9, 2025
d3564f2
fix more lints
sam0x17 Nov 9, 2025
500891a
use if instead of saturating
camfairchild Nov 9, 2025
3a82a73
update evm e2e tests
camfairchild Nov 10, 2025
1c4729a
commit Cargo.lock
open-junius Nov 10, 2025
41f4d15
commit Cargo.lock
open-junius Nov 10, 2025
448c5f1
fix CI
open-junius Nov 10, 2025
830ca37
bump version
open-junius Nov 10, 2025
6684a27
Merge remote-tracking branch 'origin/hotfix/sn-to-emit-to' into devnet
sam0x17 Nov 10, 2025
6053ed5
don't clear alpha maps
camfairchild Nov 10, 2025
7a40853
only reset the pending em
camfairchild Nov 10, 2025
2c37bc2
dont call ti migration
camfairchild Nov 10, 2025
e64150b
revert changes to swap interface
camfairchild Nov 10, 2025
c01f1bb
undo comment/fmt changes in swap
camfairchild Nov 10, 2025
69fb210
Merge remote-tracking branch 'origin/hotfix/sn-to-emit-to' into devnet
sam0x17 Nov 10, 2025
4fdcdbc
fix leasing to distribute alpha only
l0r1s Nov 10, 2025
0e3b8cc
bump CI
sam0x17 Nov 11, 2025
d968a93
add run ti migration before migration in idemp test.
camfairchild Nov 11, 2025
8f33f8c
Merge pull request #2192 from opentensor/hotfix/sn-to-emit-to
sam0x17 Nov 11, 2025
b4f259e
Merge branch 'main' into feat/new-coinbase
camfairchild Nov 12, 2025
1615fd7
Merge remote-tracking branch 'origin/hotfix/sn-to-emit-to' into testnet
camfairchild Nov 12, 2025
5ac4880
add dividends emission event
l0r1s Nov 11, 2025
e60d314
Merge branch 'main' into testnet
camfairchild Nov 12, 2025
b97bb55
Merge branch 'devnet' into devnet-ready
camfairchild Nov 12, 2025
e3400c9
Merge branch 'devnet-ready' into feat/new-coinbase
camfairchild Nov 12, 2025
5dfdf47
fix test for change from main
camfairchild Nov 12, 2025
5cfed02
remove line from merge resolution
camfairchild Nov 12, 2025
55e52c1
refactor emit_to_sns
camfairchild Nov 12, 2025
6fc320e
fix conflict
open-junius Nov 12, 2025
d740a8e
bump version
open-junius Nov 12, 2025
c4f92ad
fix conflict
open-junius Nov 12, 2025
bfb1111
bump version
open-junius Nov 12, 2025
55d642e
Merge branch 'devnet-ready' into leasing-alpha-distrib
l0r1s Nov 12, 2025
c32c955
fix conflict
open-junius Nov 12, 2025
5c08499
fix evm test
open-junius Nov 12, 2025
b65feee
bump version
open-junius Nov 12, 2025
87b78c5
fix clippy
l0r1s Nov 12, 2025
5a4f754
bump spec version
l0r1s Nov 12, 2025
6942824
Merge pull request #2197 from opentensor/fix-evm-testing
open-junius Nov 12, 2025
adc634d
Merge branch 'devnet-ready' into fix_warning_in_test
open-junius Nov 12, 2025
4530cc9
Merge branch 'devnet-ready' into fix-doc-for-storage
open-junius Nov 12, 2025
f89b7d9
Merge remote-tracking branch 'origin/main' into testnet
sam0x17 Nov 12, 2025
7e4cf14
Merge remote-tracking branch 'origin/devnet' into devnet-ready
sam0x17 Nov 12, 2025
e0e8c9b
bump spec
camfairchild Nov 12, 2025
9578092
Merge pull request #2193 from opentensor/fix_warning_in_test
sam0x17 Nov 12, 2025
45a36ee
Merge pull request #2144 from opentensor/fix-doc-for-storage
sam0x17 Nov 12, 2025
5557500
switch e2e tests to github runners
sam0x17 Nov 12, 2025
6511867
Merge remote-tracking branch 'origin/devnet-ready' into feat/new-coin…
sam0x17 Nov 12, 2025
119281e
Merge pull request #2172 from opentensor/feat/evm-pure-proxy-precompile
sam0x17 Nov 12, 2025
a90a5bc
Merge branch 'devnet-ready' into leasing-alpha-distrib
l0r1s Nov 12, 2025
d3a662e
fix evm test
l0r1s Nov 13, 2025
800cddd
debug github action
l0r1s Nov 13, 2025
e30e8b5
combine build directly as tar
l0r1s Nov 13, 2025
d8c42d4
reset debug
l0r1s Nov 13, 2025
ce25ddc
try fix 2
l0r1s Nov 13, 2025
2020da5
missing sudo
l0r1s Nov 13, 2025
2d93e2e
exporter fix
l0r1s Nov 13, 2025
391397d
trigger ci?
l0r1s Nov 13, 2025
ca14a10
try with cache to /mnt
l0r1s Nov 13, 2025
827b81b
build on root but save on mnt
l0r1s Nov 13, 2025
a791e75
missing sudo 2
l0r1s Nov 13, 2025
f713dfd
try to docker root to /mnt
l0r1s Nov 13, 2025
2ed1e77
fix perms
l0r1s Nov 13, 2025
bbcd169
Merge pull request #2188 from opentensor/feat/new-coinbase
sam0x17 Nov 13, 2025
3e7825c
fix e2e bittensor pipeline
l0r1s Nov 13, 2025
89115b9
fix evm test
l0r1s Nov 13, 2025
1a6fc1d
Merge pull request #2203 from opentensor/fix-e2e-ci
sam0x17 Nov 14, 2025
f678cdd
Merge pull request #2196 from opentensor/leasing-alpha-distrib
l0r1s Nov 14, 2025
6cb6b9a
Fifo queue instead of a priority flag
ppolewicz Nov 15, 2025
e6cc8f7
tweak a comment
ppolewicz Nov 17, 2025
ecd8941
Merge branch 'devnet-ready' into voluntary_deregistration
ppolewicz Nov 17, 2025
b8e96a3
fix compile errors
JohnReedV Nov 20, 2025
20cb50b
refactor to address warning
JohnReedV Nov 20, 2025
dfa5af8
fmt
JohnReedV Nov 20, 2025
7af9a65
clippy
JohnReedV Nov 20, 2025
3f654da
remove effects of bad merge
ppolewicz Nov 22, 2025
e9ad332
split manage_deregistration_priority()
ppolewicz Nov 22, 2025
55e6597
make force_set_deregistration_priority Pays::Yes
ppolewicz Nov 22, 2025
a8b0d50
rename force_set_deregistration_priority to enqueue_subnet_deregistra…
ppolewicz Nov 22, 2025
02e528e
Fix enqueue_subnet_deregistration when subnet is not scheduled for dereg
ppolewicz Nov 22, 2025
3dc8a6d
new setting for deregistration priority schedule delay
ppolewicz Nov 22, 2025
8cfd5c6
Rename the deregistration-related events
ppolewicz Nov 22, 2025
7329b01
Renames
ppolewicz Nov 22, 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
30 changes: 20 additions & 10 deletions .github/workflows/check-bittensor-e2e-tests.yml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ env:

jobs:
check-label:
runs-on: [self-hosted, type-ccx13]
runs-on: ubuntu-latest
outputs:
skip-bittensor-e2e-tests: ${{ steps.get-labels.outputs.skip-bittensor-e2e-tests }}
steps:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
find-btcli-e2e-tests:
needs: check-label
if: needs.check-label.outputs.skip-bittensor-e2e-tests == 'false'
runs-on: [self-hosted, type-ccx13]
runs-on: ubuntu-latest
outputs:
test-files: ${{ steps.get-btcli-tests.outputs.test-files }}
steps:
Expand All @@ -84,7 +84,7 @@ jobs:
find-sdk-e2e-tests:
needs: check-label
if: needs.check-label.outputs.skip-bittensor-e2e-tests == 'false'
runs-on: [self-hosted, type-ccx13]
runs-on: ubuntu-latest
outputs:
test-files: ${{ steps.get-sdk-tests.outputs.test-files }}
steps:
Expand All @@ -111,7 +111,7 @@ jobs:
build-image-with-current-branch:
needs: check-label
if: needs.check-label.outputs.skip-bittensor-e2e-tests == 'false'
runs-on: [self-hosted, type-ccx33]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -130,17 +130,27 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Move Docker data-root to /mnt/data
run: |
sudo systemctl stop docker
sudo mkdir -p /mnt/data/docker
sudo chown -R runner:runner /mnt/data
sudo chmod -R 777 /mnt/data
echo '{"data-root": "/mnt/data/docker"}' | sudo tee /etc/docker/daemon.json
sudo systemctl start docker
docker info | grep "Docker Root Dir"

- 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
run: docker save -o /mnt/data/subtensor-localnet.tar localnet

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

# main btcli job
run-btcli-e2e-tests:
Expand All @@ -149,7 +159,7 @@ jobs:
- find-btcli-e2e-tests
- build-image-with-current-branch
if: needs.check-label.outputs.skip-bittensor-e2e-tests == 'false'
runs-on: [self-hosted, type-ccx13]
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 16
Expand Down Expand Up @@ -181,7 +191,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: 'false'
enable-cache: "false"

- name: Create Python virtual environment
working-directory: ${{ github.workspace }}
Expand Down Expand Up @@ -243,7 +253,7 @@ jobs:
- find-sdk-e2e-tests
- build-image-with-current-branch
if: needs.check-label.outputs.skip-bittensor-e2e-tests == 'false'
runs-on: [self-hosted, type-ccx13]
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 16
Expand Down Expand Up @@ -275,7 +285,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: 'false'
enable-cache: "false"

- name: Create Python virtual environment
working-directory: ${{ github.workspace }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/evm-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ permissions:

jobs:
run:
runs-on: [self-hosted, type-ccx33]
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: full
steps:
Expand Down
2 changes: 2 additions & 0 deletions chain-extensions/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ parameter_types! {
pub const InitialYuma3On: bool = false; // Default value for Yuma3On
// pub const InitialNetworkMaxStake: u64 = u64::MAX; // (DEPRECATED)
pub const InitialColdkeySwapScheduleDuration: u64 = 5 * 24 * 60 * 60 / 12; // Default as 5 days
pub const InitialDeregistrationPriorityScheduleDelay: u64 = 5 * 24 * 60 * 60 / 12; // Default as 5 days
pub const InitialColdkeySwapRescheduleDuration: u64 = 24 * 60 * 60 / 12; // Default as 1 day
pub const InitialDissolveNetworkScheduleDuration: u64 = 5 * 24 * 60 * 60 / 12; // Default as 5 days
pub const InitialTaoWeight: u64 = 0; // 100% global weight.
Expand Down Expand Up @@ -398,6 +399,7 @@ impl pallet_subtensor::Config for Test {
type Yuma3On = InitialYuma3On;
type Preimages = Preimage;
type InitialColdkeySwapScheduleDuration = InitialColdkeySwapScheduleDuration;
type InitialDeregistrationPriorityScheduleDelay = InitialDeregistrationPriorityScheduleDelay;
type InitialColdkeySwapRescheduleDuration = InitialColdkeySwapRescheduleDuration;
type InitialDissolveNetworkScheduleDuration = InitialDissolveNetworkScheduleDuration;
type InitialTaoWeight = InitialTaoWeight;
Expand Down
27 changes: 27 additions & 0 deletions common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,33 @@ pub enum ProxyType {
RootClaim,
}

impl TryFrom<u8> for ProxyType {
type Error = ();

fn try_from(value: u8) -> Result<Self, Self::Error> {
match value {
0 => Ok(Self::Any),
1 => Ok(Self::Owner),
2 => Ok(Self::NonCritical),
3 => Ok(Self::NonTransfer),
4 => Ok(Self::Senate),
5 => Ok(Self::NonFungible),
6 => Ok(Self::Triumvirate),
7 => Ok(Self::Governance),
8 => Ok(Self::Staking),
9 => Ok(Self::Registration),
10 => Ok(Self::Transfer),
11 => Ok(Self::SmallTransfer),
12 => Ok(Self::RootWeights),
13 => Ok(Self::ChildKeys),
14 => Ok(Self::SudoUncheckedSetCode),
15 => Ok(Self::SwapHotkey),
16 => Ok(Self::SubnetLeaseBeneficiary),
_ => Err(()),
}
}
}

impl Default for ProxyType {
// allow all Calls; required to be most permissive
fn default() -> Self {
Expand Down
2 changes: 1 addition & 1 deletion evm-tests/src/address-utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Address } from "viem"
import { encodeAddress } from "@polkadot/util-crypto";
import { ss58Address } from "@polkadot-labs/hdkd-helpers";
import { ss58Address, ss58Decode } from "@polkadot-labs/hdkd-helpers";
import { hexToU8a } from "@polkadot/util";
import { blake2AsU8a, decodeAddress } from "@polkadot/util-crypto";
import { Binary } from "polkadot-api";
Expand Down
148 changes: 148 additions & 0 deletions evm-tests/src/contracts/proxy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
export const IPROXY_ADDRESS = "0x000000000000000000000000000000000000080b";

export const IProxyABI = [
{
"inputs": [
{
"internalType": "uint8",
"name": "proxy_type",
"type": "uint8"
},
{
"internalType": "uint32",
"name": "delay",
"type": "uint32"
},
{
"internalType": "uint16",
"name": "index",
"type": "uint16"
}
],
"name": "createPureProxy",
"outputs": [
{
"internalType": "bytes32",
"name": "proxy",
"type": "bytes32"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "spawner",
"type": "bytes32"
},
{
"internalType": "uint8",
"name": "proxy_type",
"type": "uint8"
},
{
"internalType": "uint16",
"name": "index",
"type": "uint16"
},
{
"internalType": "uint32",
"name": "height",
"type": "uint32"
},
{
"internalType": "uint32",
"name": "ext_index",
"type": "uint32"
}
],
"name": "killPureProxy",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "real",
"type": "bytes32"
},
{
"internalType": "uint8[]",
"name": "force_proxy_type", // optional
"type": "uint8[]"
},
{
"internalType": "uint8[]",
"name": "call",
"type": "uint8[]"
}
],
"name": "proxyCall",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "removeProxies",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}, {
"inputs": [],
"name": "pokeDeposit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "delegate",
"type": "bytes32"
},
{
"internalType": "uint8",
"name": "proxy_type",
"type": "uint8"
},
{
"internalType": "uint32",
"name": "delay",
"type": "uint32"
}
],
"name": "removeProxy",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "delegate",
"type": "bytes32"
},
{
"internalType": "uint8",
"name": "proxy_type",
"type": "uint8"
},
{
"internalType": "uint32",
"name": "delay",
"type": "uint32"
}
],
"name": "addProxy",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
];
4 changes: 2 additions & 2 deletions evm-tests/test/neuron.precompile.emission-check.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe("Test the Neuron precompile with emission", () => {

it("Burned register and check emission", async () => {
let netuid = (await api.query.SubtensorModule.TotalNetworks.getValue()) - 1

const uid = await api.query.SubtensorModule.SubnetworkN.getValue(netuid)
const contract = new ethers.Contract(INEURON_ADDRESS, INeuronABI, wallet);

Expand All @@ -63,7 +63,7 @@ describe("Test the Neuron precompile with emission", () => {

let i = 0;
while (i < 10) {
const emission = await api.query.SubtensorModule.PendingEmission.getValue(netuid)
const emission = await api.query.SubtensorModule.Emission.getValue(netuid)

console.log("emission is ", emission);
await new Promise((resolve) => setTimeout(resolve, 2000));
Expand Down
Loading
Loading