Skip to content

Commit

Permalink
fix: encrypted weights clear
Browse files Browse the repository at this point in the history
  • Loading branch information
functor-flow committed Nov 20, 2024
1 parent 407e2a1 commit 723f089
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ compose:

try-runtime-upgrade-testnet:
cargo build --release --features "try-runtime,testnet"
RUST_BACKTRACE=1; RUST_LOG="${RUST_LOG}"; try-runtime --runtime target/release/wbuild/node-subspace-runtime/node_subspace_runtime.compact.compressed.wasm on-runtime-upgrade live --uri wss://testnet.api.communeai.net:443
RUST_BACKTRACE=1; RUST_LOG="${RUST_LOG}"; try-runtime --runtime target/release/wbuild/node-subspace-runtime/node_subspace_runtime.compact.compressed.wasm on-runtime-upgrade --blocktime 8000 live --uri wss://testnet.api.communeai.net:443

try-runtime-upgrade-mainnet:
cargo build --release --features try-runtime
RUST_BACKTRACE=1; RUST_LOG="${RUST_LOG}"; try-runtime --runtime target/release/wbuild/node-subspace-runtime/node_subspace_runtime.compact.compressed.wasm on-runtime-upgrade live --uri wss://api.communeai.net:443
RUST_BACKTRACE=1; RUST_LOG="${RUST_LOG}"; try-runtime --runtime target/release/wbuild/node-subspace-runtime/node_subspace_runtime.compact.compressed.wasm on-runtime-upgrade --blocktime 8000 live --uri wss://mainnet.api.communeai.net:443

run-benchmarking:
cargo build -r --features runtime-benchmarks
Expand Down
4 changes: 0 additions & 4 deletions pallets/subnet_emission/src/decryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,6 @@ impl<T: Config> Pallet<T> {
increase_pending_emission: bool,
clear_node_assing: bool,
) -> u64 {
// --- Cleanup The Core ---

// Clear hashes & encrypted weights
let _ = WeightEncryptionData::<T>::clear_prefix(subnet_id, u32::MAX, None);
// Sum up and clear ConsensusParameters
let total_emission = ConsensusParameters::<T>::iter_prefix(subnet_id)
.fold(0u64, |acc, (_, params)| {
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("node-subspace"),
impl_name: create_runtime_str!("node-subspace"),
authoring_version: 1,
spec_version: 470,
spec_version: 471,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down

0 comments on commit 723f089

Please sign in to comment.