Skip to content

Commit 0e367f7

Browse files
author
unconst
committed
set tao weight
1 parent 009961d commit 0e367f7

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

pallets/subtensor/src/tests/coinbase.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,21 @@ fn test_coinbase_tao_issuance_base() {
8080
});
8181
}
8282

83+
// SKIP_WASM_BUILD=1 RUST_LOG=debug cargo test --package pallet-subtensor --lib -- tests::coinbase::test_coinbase_tao_issuance_base_low --exact --show-output --nocapture
84+
#[test]
85+
fn test_coinbase_tao_issuance_base_low() {
86+
new_test_ext(1).execute_with(|| {
87+
let netuid: u16 = 1;
88+
let emission: u64 = 1;
89+
add_network(netuid, 1, 0);
90+
assert_eq!(SubnetTAO::<Test>::get(netuid), 0);
91+
SubtensorModule::run_coinbase(I96F32::from_num(emission));
92+
assert_eq!(SubnetTAO::<Test>::get(netuid), emission);
93+
assert_eq!(TotalIssuance::<Test>::get(), emission);
94+
assert_eq!(TotalStake::<Test>::get(), emission);
95+
});
96+
}
97+
8398
// Test emission distribution across multiple subnets.
8499
// This test verifies that:
85100
// - Multiple subnets receive equal portions of the total emission

runtime/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ parameter_types! {
10521052
pub const SubtensorInitialNetworkMaxStake: u64 = u64::MAX; // Maximum possible value for u64, this make the make stake infinity
10531053
pub const InitialColdkeySwapScheduleDuration: BlockNumber = 5 * 24 * 60 * 60 / 12; // 5 days
10541054
pub const InitialDissolveNetworkScheduleDuration: BlockNumber = 5 * 24 * 60 * 60 / 12; // 5 days
1055-
pub const SubtensorInitialTaoWeight: u64 = 332_041_393_326_771_929; // 18% global weigh.
1055+
pub const SubtensorInitialTaoWeight: u64 = 971_718_665_099_567_868; // 0.05267697438728329% tao weight.
10561056
}
10571057

10581058
impl pallet_subtensor::Config for Runtime {

0 commit comments

Comments
 (0)