From fd798cc0ae40c4607cf03e0e51d355a41aea627f Mon Sep 17 00:00:00 2001 From: Cameron Fairchild Date: Fri, 28 Mar 2025 14:05:19 -0400 Subject: [PATCH 1/2] divs are minimum zero --- pallets/subtensor/src/coinbase/run_coinbase.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pallets/subtensor/src/coinbase/run_coinbase.rs b/pallets/subtensor/src/coinbase/run_coinbase.rs index 1ff8b2760d..1f4b5284bd 100644 --- a/pallets/subtensor/src/coinbase/run_coinbase.rs +++ b/pallets/subtensor/src/coinbase/run_coinbase.rs @@ -331,9 +331,9 @@ impl Pallet { // Compute root prop. 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); + let root_divs: I96F32 = dividend.saturating_mul(root_prop).max(zero); // Compute alpha dividends - let alpha_divs: I96F32 = dividend.saturating_sub(root_divs); + let alpha_divs: I96F32 = dividend.saturating_sub(root_divs).max(zero); // Record the alpha dividends. alpha_dividends .entry(hotkey.clone()) From 2ebf807242fbb2d4dc6f91db02a851f2f47eda16 Mon Sep 17 00:00:00 2001 From: Cameron Fairchild Date: Fri, 28 Mar 2025 14:05:50 -0400 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 e9ead1812f..dc00e1d2fa 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -207,7 +207,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: 257, + spec_version: 258, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1,