From 956263fbb8994386bf209d307b062955ce42d83a Mon Sep 17 00:00:00 2001 From: camfairchild Date: Wed, 19 Feb 2025 14:24:01 -0500 Subject: [PATCH 1/2] sub out root divs to get alpha divs --- pallets/subtensor/src/coinbase/run_coinbase.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pallets/subtensor/src/coinbase/run_coinbase.rs b/pallets/subtensor/src/coinbase/run_coinbase.rs index 9b119f1786..04976adc67 100644 --- a/pallets/subtensor/src/coinbase/run_coinbase.rs +++ b/pallets/subtensor/src/coinbase/run_coinbase.rs @@ -318,12 +318,14 @@ impl Pallet { let root_prop: I96F32 = root_alpha.checked_div(total_alpha).unwrap_or(zero); // Compute root dividends let root_divs: I96F32 = dividend.saturating_mul(root_prop); - // Record the root dividends. + // Compute alpha dividends + let alpha_divs: I96F32 = dividend.saturating_sub(root_divs); + // Record the alpha dividends. alpha_dividends .entry(hotkey.clone()) - .and_modify(|e| *e = e.saturating_add(dividend)) - .or_insert(dividend); - // Record the alpha_dividends. + .and_modify(|e| *e = e.saturating_add(alpha_divs)) + .or_insert(alpha_divs); + // Record the root dividends. root_dividends .entry(hotkey.clone()) .and_modify(|e| *e = e.saturating_add(root_divs)) From d55e0f6459a87d8343d9d412db5c8c5b279cb320 Mon Sep 17 00:00:00 2001 From: camfairchild Date: Wed, 19 Feb 2025 14:29:41 -0500 Subject: [PATCH 2/2] bump spec --- runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 8dcce09b1e..0320e89983 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -229,7 +229,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: 239, + spec_version: 240, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1,