Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
836eab5
Introduce palletId-based subnet account Ids
gztensor Mar 19, 2026
e97adb8
Forbid use of subnet account IDs as hotkey and as subnet owner hotkey
gztensor Mar 20, 2026
b51fe9c
Document subnet account IDs for subnets 0-1024
gztensor Mar 23, 2026
4fcb784
Organize TAO critical operations
gztensor Mar 25, 2026
9bed7bb
Add BurnAccountId for maintenance of burned TAO - WIP
gztensor Mar 30, 2026
5c87144
Getting rid of add_balance_to_coldkey_account and remove_balance_to_c…
gztensor Apr 1, 2026
f9e6777
Remove add/remove balance methods in runtime code, replace with safe …
gztensor Apr 1, 2026
e220c39
Merge branch 'devnet-ready' into chore/imbalances
gztensor Apr 1, 2026
ebb26f9
Cleanup merge of devnet-ready
gztensor Apr 1, 2026
164a18f
Organize TAO operations in a single file. Move remove_balance_from_co…
gztensor Apr 2, 2026
d27e709
Merge branch 'devnet-ready' into chore/imbalances
gztensor Apr 2, 2026
c008e8d
Merge devnet-ready WIP
gztensor Apr 3, 2026
b69a116
Cleanup devnet-ready merge
gztensor Apr 3, 2026
40e7a2c
Merge branch 'devnet-ready' into chore/imbalances
gztensor Apr 3, 2026
799a59a
Merge devnet-ready
gztensor Apr 3, 2026
35ef578
Add migration to mint SubnetTAO and SUbnetLocked into subnet accounts
gztensor Apr 3, 2026
a6194d2
Merge branch 'devnet-ready' into chore/imbalances
gztensor Apr 6, 2026
66b350f
fmt
gztensor Apr 6, 2026
2c698c6
Add tao balance operations tests
gztensor Apr 6, 2026
10d250e
Correct TI after balances migration
gztensor Apr 6, 2026
d0b4c89
Add more logging to subnet balances migration
gztensor Apr 7, 2026
48fef13
Add correction to subnet balances migration for subnet locked
gztensor Apr 7, 2026
be0a47a
Account for unburn
gztensor Apr 7, 2026
6cc127d
Migration subnet balances: TI match
gztensor Apr 8, 2026
1e9a0a6
Merge branch 'devnet-ready' into chore/imbalances
gztensor Apr 8, 2026
467ad2c
devnet-ready merge cleanup
gztensor Apr 8, 2026
cc2fc3b
Update get_block_emission and run_coinbase signatures for imbalances
gztensor Apr 8, 2026
7fde419
Move all subtensor TotalIssuance runtime changes to tao.rs
gztensor Apr 9, 2026
e8f7f6b
Fix root claim TAO management
gztensor Apr 10, 2026
c6b94e0
Fix TotalStake handling in root claim
gztensor Apr 10, 2026
3b337e7
Robust owner refund and recycle remaining tao on dissolution
gztensor Apr 14, 2026
440cfc2
clippy
gztensor Apr 14, 2026
e02a94c
Merge branch 'devnet-ready' into chore/imbalances
gztensor Apr 14, 2026
482a24f
Cleanup merge
gztensor Apr 14, 2026
412f9c9
Fix check_total_issuance in try runtime
gztensor Apr 14, 2026
5fd8646
Restore benchmark for deprecated sudo_set_total_issuance
gztensor Apr 14, 2026
4171384
Add error logging to try-runtime
gztensor Apr 14, 2026
bce4699
Fix try-runtime
gztensor Apr 14, 2026
625a7cb
Fix try-runtime
gztensor Apr 15, 2026
dd5b35c
Add more debug info for try runtime check_total_issuance
gztensor Apr 15, 2026
f8dad68
Make try-runtime total issuance check run identical adjustments to su…
gztensor Apr 15, 2026
f660aea
Fix check_total_issuance
gztensor Apr 15, 2026
7223a6e
Fix migrate_total_issuance adjustment
gztensor Apr 15, 2026
74968a4
Fix subnet locked calculation in try-runtime
gztensor Apr 15, 2026
b031662
Fix migrate_total_issuance adjustment
gztensor Apr 15, 2026
d541917
Re-allow migrate_init_total_issuance one time as migrate_init_total_i…
gztensor Apr 15, 2026
f8f15c8
Fix eco tests
gztensor Apr 15, 2026
aed96b6
Benchmarks
gztensor Apr 16, 2026
e1aa86a
Swap benchmarks
gztensor Apr 17, 2026
23bc21a
Merge branch 'devnet-ready' into chore/imbalances
gztensor Apr 17, 2026
1a2c4dd
Merge devnet-ready
gztensor Apr 17, 2026
7d0b49b
spec bump
gztensor Apr 17, 2026
4c225fb
Fix set_weights benchmark
gztensor Apr 17, 2026
fad2517
Fix subtensor benchmarks
gztensor Apr 17, 2026
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
19 changes: 17 additions & 2 deletions chain-extensions/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,8 @@ parameter_types! {
pub const LeaseDividendsDistributionInterval: u32 = 100;
pub const MaxImmuneUidsPercentage: Percent = Percent::from_percent(80);
pub const EvmKeyAssociateRateLimit: u64 = 10;
pub const SubtensorPalletId: PalletId = PalletId(*b"subtensr");
pub const BurnAccountId: PalletId = PalletId(*b"burntnsr");
}

impl pallet_subtensor::Config for Test {
Expand Down Expand Up @@ -423,6 +425,8 @@ impl pallet_subtensor::Config for Test {
type CommitmentsInterface = CommitmentsI;
type EvmKeyAssociateRateLimit = EvmKeyAssociateRateLimit;
type AuthorshipProvider = MockAuthorshipProvider;
type SubtensorPalletId = SubtensorPalletId;
type BurnAccountId = BurnAccountId;
type WeightInfo = ();
}

Expand Down Expand Up @@ -690,7 +694,7 @@ pub fn register_ok_neuron(

let bal: TaoBalance = SubtensorModule::get_coldkey_balance(&cold);
if bal < min_balance_needed {
SubtensorModule::add_balance_to_coldkey_account(&cold, min_balance_needed - bal);
add_balance_to_coldkey_account(&cold, min_balance_needed - bal);
}
};

Expand Down Expand Up @@ -727,11 +731,22 @@ pub fn register_ok_neuron(
);
}

#[allow(dead_code)]
pub fn add_balance_to_coldkey_account(coldkey: &U256, tao: TaoBalance) {
let credit = SubtensorModule::mint_tao(tao);
let _ = SubtensorModule::spend_tao(coldkey, credit, tao).unwrap();
}

#[allow(dead_code)]
pub fn remove_balance_from_coldkey_account(coldkey: &U256, tao: TaoBalance) {
let _ = SubtensorModule::burn_tao(coldkey, tao);
}

#[allow(dead_code)]
pub fn add_dynamic_network(hotkey: &U256, coldkey: &U256) -> NetUid {
let netuid = SubtensorModule::get_next_netuid();
let lock_cost = SubtensorModule::get_network_lock_cost();
SubtensorModule::add_balance_to_coldkey_account(coldkey, lock_cost.into());
add_balance_to_coldkey_account(coldkey, lock_cost.into());

assert_ok!(SubtensorModule::register_network(
RawOrigin::Signed(*coldkey).into(),
Expand Down
51 changes: 13 additions & 38 deletions chain-extensions/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ use substrate_fixed::types::U96F32;
use subtensor_runtime_common::{AlphaBalance, NetUid, TaoBalance, Token};
use subtensor_swap_interface::SwapHandler;

use mock::*;

type AccountId = <mock::Test as frame_system::Config>::AccountId;

#[derive(Clone)]
Expand Down Expand Up @@ -89,7 +91,7 @@ fn remove_stake_full_limit_success_with_limit_price() {

mock::register_ok_neuron(netuid, hotkey, coldkey, 0);

pallet_subtensor::Pallet::<mock::Test>::add_balance_to_coldkey_account(
add_balance_to_coldkey_account(
&coldkey,
TaoBalance::from(stake_amount_raw + 1_000_000_000),
);
Expand Down Expand Up @@ -228,7 +230,7 @@ fn remove_stake_limit_success_respects_price_limit() {

mock::register_ok_neuron(netuid, hotkey, coldkey, 0);

pallet_subtensor::Pallet::<mock::Test>::add_balance_to_coldkey_account(
add_balance_to_coldkey_account(
&coldkey,
TaoBalance::from(stake_amount_raw + 1_000_000_000),
);
Expand Down Expand Up @@ -304,10 +306,7 @@ fn add_stake_limit_success_executes_within_price_guard() {

mock::register_ok_neuron(netuid, hotkey, coldkey, 0);

pallet_subtensor::Pallet::<mock::Test>::add_balance_to_coldkey_account(
&coldkey,
(amount_raw + 1_000_000_000).into(),
);
add_balance_to_coldkey_account(&coldkey, (amount_raw + 1_000_000_000).into());

let stake_before =
pallet_subtensor::Pallet::<mock::Test>::get_stake_for_hotkey_and_coldkey_on_subnet(
Expand Down Expand Up @@ -379,10 +378,7 @@ fn swap_stake_success_moves_between_subnets() {
mock::register_ok_neuron(netuid_a, hotkey, coldkey, 0);
mock::register_ok_neuron(netuid_b, hotkey, coldkey, 1);

pallet_subtensor::Pallet::<mock::Test>::add_balance_to_coldkey_account(
&coldkey,
(stake_amount_raw + 1_000_000_000).into(),
);
add_balance_to_coldkey_account(&coldkey, (stake_amount_raw + 1_000_000_000).into());

assert_ok!(pallet_subtensor::Pallet::<mock::Test>::add_stake(
RawOrigin::Signed(coldkey).into(),
Expand Down Expand Up @@ -456,10 +452,7 @@ fn transfer_stake_success_moves_between_coldkeys() {

mock::register_ok_neuron(netuid, hotkey, origin_coldkey, 0);

pallet_subtensor::Pallet::<mock::Test>::add_balance_to_coldkey_account(
&origin_coldkey,
(stake_amount_raw + 1_000_000_000).into(),
);
add_balance_to_coldkey_account(&origin_coldkey, (stake_amount_raw + 1_000_000_000).into());

assert_ok!(pallet_subtensor::Pallet::<mock::Test>::add_stake(
RawOrigin::Signed(origin_coldkey).into(),
Expand Down Expand Up @@ -540,10 +533,7 @@ fn move_stake_success_moves_alpha_between_hotkeys() {
mock::register_ok_neuron(netuid, origin_hotkey, coldkey, 0);
mock::register_ok_neuron(netuid, destination_hotkey, coldkey, 1);

pallet_subtensor::Pallet::<mock::Test>::add_balance_to_coldkey_account(
&coldkey,
(stake_amount_raw + 1_000_000_000).into(),
);
add_balance_to_coldkey_account(&coldkey, (stake_amount_raw + 1_000_000_000).into());

assert_ok!(pallet_subtensor::Pallet::<mock::Test>::add_stake(
RawOrigin::Signed(coldkey).into(),
Expand Down Expand Up @@ -620,10 +610,7 @@ fn unstake_all_alpha_success_moves_stake_to_root() {
);

mock::register_ok_neuron(netuid, hotkey, coldkey, 0);
pallet_subtensor::Pallet::<mock::Test>::add_balance_to_coldkey_account(
&coldkey,
(stake_amount_raw + 1_000_000_000).into(),
);
add_balance_to_coldkey_account(&coldkey, (stake_amount_raw + 1_000_000_000).into());

assert_ok!(pallet_subtensor::Pallet::<mock::Test>::add_stake(
RawOrigin::Signed(coldkey).into(),
Expand Down Expand Up @@ -667,10 +654,7 @@ fn add_proxy_success_creates_proxy_relationship() {
let delegator = U256::from(6001);
let delegate = U256::from(6002);

pallet_subtensor::Pallet::<mock::Test>::add_balance_to_coldkey_account(
&delegator,
1_000_000_000.into(),
);
add_balance_to_coldkey_account(&delegator, 1_000_000_000.into());

assert_eq!(
pallet_subtensor_proxy::Proxies::<mock::Test>::get(delegator)
Expand Down Expand Up @@ -705,10 +689,7 @@ fn remove_proxy_success_removes_proxy_relationship() {
let delegator = U256::from(7001);
let delegate = U256::from(7002);

pallet_subtensor::Pallet::<mock::Test>::add_balance_to_coldkey_account(
&delegator,
1_000_000_000.into(),
);
add_balance_to_coldkey_account(&delegator, 1_000_000_000.into());

let mut add_env = MockEnv::new(FunctionId::AddProxyV1, delegator, delegate.encode());
let ret = SubtensorChainExtension::<mock::Test>::dispatch(&mut add_env).unwrap();
Expand Down Expand Up @@ -842,10 +823,7 @@ fn add_stake_success_updates_stake_and_returns_success_code() {
);
mock::register_ok_neuron(netuid, hotkey, coldkey, 0);

pallet_subtensor::Pallet::<mock::Test>::add_balance_to_coldkey_account(
&coldkey,
amount_raw.into(),
);
add_balance_to_coldkey_account(&coldkey, amount_raw.into());

assert!(
pallet_subtensor::Pallet::<mock::Test>::get_total_stake_for_hotkey(&hotkey).is_zero()
Expand Down Expand Up @@ -930,10 +908,7 @@ fn unstake_all_success_unstakes_balance() {
);

mock::register_ok_neuron(netuid, hotkey, coldkey, 0);
pallet_subtensor::Pallet::<mock::Test>::add_balance_to_coldkey_account(
&coldkey,
(stake_amount_raw + 1_000_000_000).into(),
);
add_balance_to_coldkey_account(&coldkey, (stake_amount_raw + 1_000_000_000).into());

assert_ok!(pallet_subtensor::Pallet::<mock::Test>::add_stake(
RawOrigin::Signed(coldkey).into(),
Expand Down
4 changes: 2 additions & 2 deletions common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ pub trait TokenReserve<C: Token> {
pub trait BalanceOps<AccountId> {
fn tao_balance(account_id: &AccountId) -> TaoBalance;
fn alpha_balance(netuid: NetUid, coldkey: &AccountId, hotkey: &AccountId) -> AlphaBalance;
fn increase_balance(coldkey: &AccountId, tao: TaoBalance);
fn decrease_balance(coldkey: &AccountId, tao: TaoBalance) -> Result<TaoBalance, DispatchError>;
// fn increase_balance(coldkey: &AccountId, tao: TaoBalance);
// fn decrease_balance(coldkey: &AccountId, tao: TaoBalance) -> Result<TaoBalance, DispatchError>;
fn increase_stake(
coldkey: &AccountId,
hotkey: &AccountId,
Expand Down
136 changes: 136 additions & 0 deletions contract-tests/src/subtensor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,142 @@ export async function setNetworkLastLockCost(api: TypedApi<typeof devnet>, defau
assert.equal(defaultNetworkLastLockCost, valueOnChain)
}

export function getSubnetAccountId(netuid: number): string {
// Hardcode to speed up tests
const NETUID_TO_ACCOUNT_ID: Record<number, string> = {
0: "5EYCAe5jLQhn6ofDSvqF6iY53erXNkwhyE1aCEgvi1NNs91F",
1: "5EYCAe5jLQhn6ofDSvqWqk5fA9XiqK3ahtx5kBNmAqF78mqL",
2: "5EYCAe5jLQhn6ofDSvqnamdFGeCvHs9TSZtbJ84bdf7qQRc6",
3: "5EYCAe5jLQhn6ofDSvr4KoAqP8t7kRFLBEq6r4kS6UzZgCb5",
4: "5EYCAe5jLQhn6ofDSvrL4piRVdZKCyMCuumcQ1SGZJsHwmeE",
5: "5EYCAe5jLQhn6ofDSvrborG1c8EWfXT5eai7wx8728k2DHK7",
6: "5EYCAe5jLQhn6ofDSvrsYsobicui85YxPFedVtowUxckUuF8",
7: "5EYCAe5jLQhn6ofDSvs9HuMBq7auadeq7vb93qVmwnVUkg5A",
8: "5EYCAe5jLQhn6ofDSvsR2vtmwcG73BkhrbXebnBcQcND2Bdh",
9: "5EYCAe5jLQhn6ofDSvsgmxSN46wJVjrabGUA9isSsSEwHnFy",
10: "5EYCAe5jLQhn6ofDSvsxWyyxAbcVxHxTKwQfhfZHLG7fZUJG",
11: "5EYCAe5jLQhn6ofDSvtEG1XYH6HhQr4L4cMBFcF7o5zPpyA3",
12: "5EYCAe5jLQhn6ofDSvtW1358PaxtsQACoHHgoYvxFus86kJK",
13: "5EYCAe5jLQhn6ofDSvtmk4ciW5e6KxG5XxECMVc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TdhtxEN4PfQxQvZdimi9vW9r",
94: "5EYCAe5jLQhn6ofDSwGkqDjMa8P6QnTw8LMTxsFUBbatC8C5",
95: "5EYCAe5jLQhn6ofDSwH2aFGwgd4HsLZos1HyWowJeRTcTVsg",
96: "5EYCAe5jLQhn6ofDSwHJKGpXo7jVKtfgbgEV4kd97FLLjBeJ",
97: "5EYCAe5jLQhn6ofDSwHa4JN7ucQgnSmZLMAzchJya5D4zq8v",
98: "5EYCAe5jLQhn6ofDSwHqoKui275tEzsS527WAdzp2u5oGNSd",
99: "5EYCAe5jLQhn6ofDSwJ7YMTJ8bm5hYyJoh41iageVixXYH59",
100: "5EYCAe5jLQhn6ofDSwJPHNztF6SHA75BYMzXGXNUxYqFoj9g",
101: "5EYCAe5jLQhn6ofDSwJf2QYUMb7UcfB4H2w2pU4KRNhz5GP5",
102: "5EYCAe5jLQhn6ofDSwJvmS64U5ng5DGw1hsYNQk9tCaiLvoS",
103: "5EYCAe5jLQhn6ofDSwKCWTdeaaTsXmNokNp3vMRzM2TScknA",
104: "5EYCAe5jLQhn6ofDSwKUFVBEh594zKUgV3kZUJ7porLAtE76",
105: "5EYCAe5jLQhn6ofDSwKjzWipoZpGSsaZDih52EofGgCu9mbP",
106: "5EYCAe5jLQhn6ofDSwL1jYGQv4VTuRgRxPdaaBVVjW5dRU9u",
107: "5EYCAe5jLQhn6ofDSwLHUZp12ZAfMynJh4a688BLCKxMhEMq",
108: "5EYCAe5jLQhn6ofDSwLZDbMb93qrpXtBRjWbg4sAf9q5xtB8",
109: "5EYCAe5jLQhn6ofDSwLpxcuBFYX4H5z4AQT7E1Z17yhpELLK",
110: "5EYCAe5jLQhn6ofDSwM6heSmN3CFje5vu5PcmxEqaoaYW1KP",
111: "5EYCAe5jLQhn6ofDSwMNSfzMUXsTCCBodkL8Ktvg3dTGmYbX",
112: "5EYCAe5jLQhn6ofDSwMeBhXwb2YeekHgNRGdsqcWWTL13NLP",
113: "5EYCAe5jLQhn6ofDSwMuvj5XhXDr7JPZ76D9RnJLyHCjK2Zy",
114: "5EYCAe5jLQhn6ofDSwNBfkd7p1u3ZrVRqm9eyizBS75TaPgK",
115: "5EYCAe5jLQhn6ofDSwNTQnAhvWaF2QbJaS6AXfg1tvxBrDUN",
116: "5EYCAe5jLQhn6ofDSwNj9oiJ31FSUxhBK72g5cMrMkpv7iJx",
117: "5EYCAe5jLQhn6ofDSwNztqFt9VvdwWo43myBdZ3gpahePQpf",
118: "5EYCAe5jLQhn6ofDSwPGdroUFzbqQ4tvnSuhBVjXHQaNet2o",
119: "5EYCAe5jLQhn6ofDSwPYNtM4NVH2rczoX7rCjSRMkET6vioH",
120: "5EYCAe5jLQhn6ofDSwPp7uteUyxEKB6gFnniHP7CD4KqCQDN",
121: "5EYCAe5jLQhn6ofDSwQ5rwSEbUdRmjCYzTjDqKo2ftCZTubr",
122: "5EYCAe5jLQhn6ofDSwQMbxyphyJdEHJRj8fjPGUs8i5HjcA3",
123: "5EYCAe5jLQhn6ofDSwQdLzXQpTypgqQJTocEwDAhbXx21Awy",
124: "5EYCAe5jLQhn6ofDSwQu624zvxf29PWBCUYkV9rY4MpkGu1f",
125: "5EYCAe5jLQhn6ofDSwRAq3cb3TLDbwc3w9VG36YNXBhUYKDi",
126: "5EYCAe5jLQhn6ofDSwRSa5AB9x1R4VhvfpRmb3ECz1aCp2ze",
127: "5EYCAe5jLQhn6ofDSwRiK6hmGSgcX3ooQVNH8yv3SqSw5mpH",
128: "5EYCAe5jLQhn6ofDSwRz48FMNwMoybug9AJngvbsufKfME2t",
}

return NETUID_TO_ACCOUNT_ID[netuid];
}

export async function getStake(api: TypedApi<typeof devnet>, hotkey: string, coldkey: string, netuid: number): Promise<bigint> {
const value = (await api.query.SubtensorModule.AlphaV2.getValue(hotkey, coldkey, netuid));
Expand Down
Loading
Loading