From a5596919906404187600775b4b5fcd0f17b43968 Mon Sep 17 00:00:00 2001 From: JohnReedV <87283488+JohnReedV@users.noreply.github.com> Date: Thu, 19 Dec 2024 14:05:11 -0800 Subject: [PATCH 1/4] if its the epoch block push to next epoch --- pallets/subtensor/src/subnets/weights.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pallets/subtensor/src/subnets/weights.rs b/pallets/subtensor/src/subnets/weights.rs index ed7708448..765ee7a0d 100644 --- a/pallets/subtensor/src/subnets/weights.rs +++ b/pallets/subtensor/src/subnets/weights.rs @@ -262,7 +262,11 @@ impl Pallet { // 5. Retrieve or initialize the VecDeque of commits for the hotkey. let cur_block = Self::get_current_block_as_u64(); - let cur_epoch = Self::get_epoch_index(netuid, cur_block); + let cur_epoch = match Self::should_run_epoch(netuid, commit_block) { + true => Self::get_epoch_index(netuid, cur_block).saturating_add(1), + false => Self::get_epoch_index(netuid, cur_block) + }; + CRV3WeightCommits::::try_mutate(netuid, cur_epoch, |commits| -> DispatchResult { // 6. Verify that the number of unrevealed commits is within the allowed limit. From 77351293dca13b9b815283361ca707e7a0cfbd18 Mon Sep 17 00:00:00 2001 From: JohnReedV <87283488+JohnReedV@users.noreply.github.com> Date: Thu, 19 Dec 2024 14:37:59 -0800 Subject: [PATCH 2/4] fmt --- pallets/subtensor/src/subnets/weights.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/subtensor/src/subnets/weights.rs b/pallets/subtensor/src/subnets/weights.rs index 765ee7a0d..f57dde793 100644 --- a/pallets/subtensor/src/subnets/weights.rs +++ b/pallets/subtensor/src/subnets/weights.rs @@ -264,7 +264,7 @@ impl Pallet { let cur_block = Self::get_current_block_as_u64(); let cur_epoch = match Self::should_run_epoch(netuid, commit_block) { true => Self::get_epoch_index(netuid, cur_block).saturating_add(1), - false => Self::get_epoch_index(netuid, cur_block) + false => Self::get_epoch_index(netuid, cur_block), }; CRV3WeightCommits::::try_mutate(netuid, cur_epoch, |commits| -> DispatchResult { From ba4f6d20673349751abea437193e345922cb4b20 Mon Sep 17 00:00:00 2001 From: JohnReedV <87283488+JohnReedV@users.noreply.github.com> Date: Fri, 20 Dec 2024 09:48:41 -0800 Subject: [PATCH 3/4] 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 6a3c8a69a..574b76df6 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -220,7 +220,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: 216, + spec_version: 217, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1, From 129bf3ee9c9f4109508d68fea48a182e80e1002d Mon Sep 17 00:00:00 2001 From: JohnReedV <87283488+JohnReedV@users.noreply.github.com> Date: Mon, 30 Dec 2024 09:22:32 -0800 Subject: [PATCH 4/4] 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 574b76df6..1aeaa36ff 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -220,7 +220,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: 217, + spec_version: 218, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1,