From 3412916b4b2dfcaa5c39be060606600a15d49583 Mon Sep 17 00:00:00 2001 From: Samuel Dare Date: Mon, 9 Sep 2024 23:29:06 +0400 Subject: [PATCH 1/2] hotfit: dont drain root emisions --- 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 723edc423..73b5a80b2 100644 --- a/pallets/subtensor/src/coinbase/run_coinbase.rs +++ b/pallets/subtensor/src/coinbase/run_coinbase.rs @@ -47,7 +47,7 @@ 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() { + for netuid in subnets.clone().iter().filter(|&&id| id != 0) { // --- 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); From cf768eb5c13bdfe49e6ec3702b902a9e3a6ea81a Mon Sep 17 00:00:00 2001 From: Samuel Dare Date: Mon, 9 Sep 2024 23:39:48 +0400 Subject: [PATCH 2/2] filter 0 --- justfile | 2 +- pallets/subtensor/src/coinbase/run_coinbase.rs | 5 ++++- runtime/src/lib.rs | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/justfile b/justfile index f99f3913a..a753f7bb2 100644 --- a/justfile +++ b/justfile @@ -51,4 +51,4 @@ lint: production: @echo "Running cargo build with metadata-hash generation..." - cargo +{{RUSTV}} build --profile production --features="runtime-benchmarks metadata-hash" + cargo +{{RUSTV}} build --profile production --features="metadata-hash" diff --git a/pallets/subtensor/src/coinbase/run_coinbase.rs b/pallets/subtensor/src/coinbase/run_coinbase.rs index 73b5a80b2..1e74298a5 100644 --- a/pallets/subtensor/src/coinbase/run_coinbase.rs +++ b/pallets/subtensor/src/coinbase/run_coinbase.rs @@ -47,7 +47,10 @@ 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().filter(|&&id| id != 0) { + 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); diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index ca8f83911..5ffb0863a 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -142,7 +142,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // `spec_version`, and `authoring_version` are the same between Wasm and native. // This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use // the compatible custom types. - spec_version: 195, + spec_version: 196, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1,