From 05cc0ebde9f60850a5e9085682fe3bb9c0ed970d Mon Sep 17 00:00:00 2001 From: Cameron Fairchild Date: Wed, 6 Nov 2024 21:47:26 -0500 Subject: [PATCH 1/2] skip netuid 0 for pending emission accum --- pallets/subtensor/src/coinbase/run_coinbase.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pallets/subtensor/src/coinbase/run_coinbase.rs b/pallets/subtensor/src/coinbase/run_coinbase.rs index badb811fa..2571e37ac 100644 --- a/pallets/subtensor/src/coinbase/run_coinbase.rs +++ b/pallets/subtensor/src/coinbase/run_coinbase.rs @@ -48,6 +48,9 @@ impl Pallet { // --- 3. Drain the subnet block emission and accumulate it as subnet emission, which increases until the tempo is reached in #4. // subnet_blockwise_emission -> subnet_pending_emission for netuid in subnets.clone().iter() { + if *netuid == 0 { + continue; + } // --- 3.1 Get the network's block-wise emission amount. // This value is newly minted TAO which has not reached staking accounts yet. let subnet_blockwise_emission: u64 = EmissionValues::::get(*netuid); @@ -87,6 +90,11 @@ impl Pallet { Self::set_blocks_since_last_step(*netuid, 0); Self::set_last_mechanism_step_block(*netuid, current_block); + if *netuid == 0 { + // Skip netuid 0 + continue; + } + // --- 4.4 Distribute owner take. if SubnetOwner::::contains_key(netuid) { // Does the subnet have an owner? From 0dffff35de09593b2733a614c20012f30c258d8c Mon Sep 17 00:00:00 2001 From: Cameron Fairchild Date: Wed, 6 Nov 2024 21:47:44 -0500 Subject: [PATCH 2/2] comment --- pallets/subtensor/src/coinbase/run_coinbase.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/subtensor/src/coinbase/run_coinbase.rs b/pallets/subtensor/src/coinbase/run_coinbase.rs index 2571e37ac..0615ccc39 100644 --- a/pallets/subtensor/src/coinbase/run_coinbase.rs +++ b/pallets/subtensor/src/coinbase/run_coinbase.rs @@ -91,7 +91,7 @@ impl Pallet { Self::set_last_mechanism_step_block(*netuid, current_block); if *netuid == 0 { - // Skip netuid 0 + // Skip netuid 0 payouts continue; }