Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
fb47d0c
Merge mock and mock_high_ed
lorismoulin Jun 10, 2026
485f4bf
Added SubnetSaleOffers and frozen coldkey/hotkey storage
lorismoulin Jun 10, 2026
25d83ba
Added extrinsic to create/cancel sale offer
lorismoulin Jun 10, 2026
5e9801f
Cleanup sale offer on subnet removal
lorismoulin Jun 10, 2026
a93d4a9
Added tests
lorismoulin Jun 10, 2026
35bf96b
Added CheckSubnetSale dispatch extension
lorismoulin Jun 10, 2026
54cf502
Added benchmarks and weights placeholder
lorismoulin Jun 10, 2026
4e25ad2
Merge branch 'devnet-ready' into subnet-sale-offer
lorismoulin Jun 10, 2026
79fbaad
Added creation date for later use
lorismoulin Jun 10, 2026
175bd10
Merge branch 'devnet-ready' into subnet-sale-offer
lorismoulin Jul 1, 2026
d664ff9
Fix some issues
lorismoulin Jul 5, 2026
1733a3b
Added SaleOfferId and harden protection against swaps
lorismoulin Jul 5, 2026
36752d1
Add missing benchmark for extension
lorismoulin Jul 5, 2026
54a4601
cargo fmt
lorismoulin Jul 5, 2026
6fe155c
auto-update benchmark weights
github-actions[bot] Jul 6, 2026
f327d37
Add sale offer calls to SubtensorCommonCalls
lorismoulin Jul 6, 2026
9cd2a95
Merge remote-tracking branch 'refs/remotes/origin/subnet-sale-offer' …
lorismoulin Jul 6, 2026
e97ff3a
Sale offer creation excluded from every group and cancel as common
lorismoulin Jul 6, 2026
bf1b3c8
cargo fmt
lorismoulin Jul 6, 2026
3858895
Merge branch 'devnet-ready' into subnet-sale-offer
lorismoulin Jul 8, 2026
d5e046f
Merge branch 'devnet-ready' into subnet-sale-offer
lorismoulin Jul 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 64 additions & 13 deletions pallets/commitments/src/weights.rs
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@

//! Autogenerated weights for `pallet_commitments`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-12-08, STEPS: `2`, REPEAT: `1`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0
//! DATE: 2026-07-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `rustys-mbp.lan`, CPU: `<UNKNOWN>`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("local")`, DB CACHE: `1024`
//! HOSTNAME: `runnervmkkn4f`, CPU: `AMD EPYC 9V74 80-Core Processor`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`

// Executed Command:
// ./target/release/node-subtensor
// /home/runner/work/subtensor/subtensor/target/production/node-subtensor
// benchmark
// pallet
// --chain=local
// --execution=wasm
// --runtime=/home/runner/work/subtensor/subtensor/target/production/wbuild/node-subtensor-runtime/node_subtensor_runtime.compact.compressed.wasm
// --genesis-builder=runtime
// --genesis-builder-preset=benchmark
// --wasm-execution=compiled
// --pallet=pallet_commitments
// --extrinsic=*
// --output=pallets/commitments/src/weights.rs
// --template=./.maintain/frame-weight-template.hbs
// --steps=50
// --repeat=20
// --no-storage-info
// --no-min-squares
// --no-median-slopes
// --output=/tmp/tmp.V8xURZVxTO
// --template=/home/runner/work/subtensor/subtensor/.maintain/frame-weight-template.hbs

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]
#![allow(dead_code)]

use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use core::marker::PhantomData;
Expand All @@ -36,26 +43,70 @@ pub trait WeightInfo {
/// Weights for `pallet_commitments` using the Substrate node and recommended hardware.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Storage: `Commitments::UsedSpaceOf` (r:1 w:1)
/// Proof: `Commitments::UsedSpaceOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `SubtensorModule::SubnetEpochIndex` (r:1 w:0)
/// Proof: `SubtensorModule::SubnetEpochIndex` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Commitments::MaxSpace` (r:1 w:0)
/// Proof: `Commitments::MaxSpace` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Commitments::CommitmentOf` (r:1 w:1)
/// Proof: `Commitments::CommitmentOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Commitments::TimelockedIndex` (r:1 w:1)
/// Proof: `Commitments::TimelockedIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Commitments::LastCommitment` (r:0 w:1)
/// Proof: `Commitments::LastCommitment` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn set_commitment() -> Weight {
Weight::from_parts(33_480_000, 0)
// Proof Size summary in bytes:
// Measured: `504`
// Estimated: `3969`
// Minimum execution time: 19_540_000 picoseconds.
Weight::from_parts(20_150_000, 3969)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
/// Storage: `Commitments::MaxSpace` (r:0 w:1)
/// Proof: `Commitments::MaxSpace` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn set_max_space() -> Weight {
Weight::from_parts(2_856_000, 0)
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_372_000 picoseconds.
Weight::from_parts(1_692_000, 0)
.saturating_add(T::DbWeight::get().writes(1_u64))
}
}

// For backwards compatibility and tests.
impl WeightInfo for () {
/// Storage: `Commitments::UsedSpaceOf` (r:1 w:1)
/// Proof: `Commitments::UsedSpaceOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `SubtensorModule::SubnetEpochIndex` (r:1 w:0)
/// Proof: `SubtensorModule::SubnetEpochIndex` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Commitments::MaxSpace` (r:1 w:0)
/// Proof: `Commitments::MaxSpace` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Commitments::CommitmentOf` (r:1 w:1)
/// Proof: `Commitments::CommitmentOf` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `Commitments::TimelockedIndex` (r:1 w:1)
/// Proof: `Commitments::TimelockedIndex` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
/// Storage: `Commitments::LastCommitment` (r:0 w:1)
/// Proof: `Commitments::LastCommitment` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn set_commitment() -> Weight {
Weight::from_parts(33_480_000, 0)
// Proof Size summary in bytes:
// Measured: `504`
// Estimated: `3969`
// Minimum execution time: 19_540_000 picoseconds.
Weight::from_parts(20_150_000, 3969)
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
/// Storage: `Commitments::MaxSpace` (r:0 w:1)
/// Proof: `Commitments::MaxSpace` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
fn set_max_space() -> Weight {
Weight::from_parts(2_856_000, 0)
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 1_372_000 picoseconds.
Weight::from_parts(1_692_000, 0)
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
}
110 changes: 59 additions & 51 deletions pallets/crowdloan/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
//! Autogenerated weights for `pallet_crowdloan`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 49.1.0
//! DATE: 2026-06-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2026-07-05, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runnervmmklqx`, CPU: `AMD EPYC 9V74 80-Core Processor`
//! HOSTNAME: `runnervmkkn4f`, CPU: `AMD EPYC 9V74 80-Core Processor`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: `1024`

// Executed Command:
Expand All @@ -22,7 +22,7 @@
// --no-storage-info
// --no-min-squares
// --no-median-slopes
// --output=/tmp/tmp.CWtPZcdN9i
// --output=/tmp/tmp.HXC5x2AL6y
// --template=/home/runner/work/subtensor/subtensor/.maintain/frame-weight-template.hbs

#![cfg_attr(rustfmt, rustfmt_skip)]
Expand Down Expand Up @@ -63,8 +63,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `119`
// Estimated: `6148`
// Minimum execution time: 59_888_000 picoseconds.
Weight::from_parts(61_110_000, 6148)
// Minimum execution time: 62_814_000 picoseconds.
Weight::from_parts(65_689_000, 6148)
.saturating_add(T::DbWeight::get().reads(3_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
Expand All @@ -80,8 +80,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `448`
// Estimated: `6148`
// Minimum execution time: 65_807_000 picoseconds.
Weight::from_parts(66_819_000, 6148)
// Minimum execution time: 68_563_000 picoseconds.
Weight::from_parts(71_076_000, 6148)
.saturating_add(T::DbWeight::get().reads(5_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
Expand All @@ -95,8 +95,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `408`
// Estimated: `6148`
// Minimum execution time: 59_447_000 picoseconds.
Weight::from_parts(61_220_000, 6148)
// Minimum execution time: 61_532_000 picoseconds.
Weight::from_parts(64_286_000, 6148)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(4_u64))
}
Expand All @@ -110,13 +110,17 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `SubtensorModule::ColdkeySwapAnnouncements` (r:1 w:0)
/// Proof: `SubtensorModule::ColdkeySwapAnnouncements` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `SubtensorModule::SubnetSaleFrozenColdkeys` (r:1 w:0)
/// Proof: `SubtensorModule::SubnetSaleFrozenColdkeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `SubtensorModule::SubnetSaleFrozenHotkeys` (r:1 w:0)
/// Proof: `SubtensorModule::SubnetSaleFrozenHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn finalize() -> Weight {
// Proof Size summary in bytes:
// Measured: `1181`
// Measured: `1216`
// Estimated: `4197809`
// Minimum execution time: 32_548_000 picoseconds.
Weight::from_parts(34_110_000, 4197809)
.saturating_add(T::DbWeight::get().reads(5_u64))
// Minimum execution time: 31_887_000 picoseconds.
Weight::from_parts(33_050_000, 4197809)
.saturating_add(T::DbWeight::get().reads(7_u64))
.saturating_add(T::DbWeight::get().writes(2_u64))
}
/// Storage: `Crowdloan::Crowdloans` (r:1 w:1)
Expand All @@ -130,10 +134,10 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `324 + k * (46 ±0)`
// Estimated: `3747 + k * (2579 ±0)`
// Minimum execution time: 109_320_000 picoseconds.
Weight::from_parts(110_392_000, 3747)
// Standard Error: 94_672
.saturating_add(Weight::from_parts(39_822_919, 0).saturating_mul(k.into()))
// Minimum execution time: 109_925_000 picoseconds.
Weight::from_parts(115_633_000, 3747)
// Standard Error: 101_663
.saturating_add(Weight::from_parts(43_172_223, 0).saturating_mul(k.into()))
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(k.into())))
.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(k.into())))
Expand All @@ -151,8 +155,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `370`
// Estimated: `6148`
// Minimum execution time: 69_442_000 picoseconds.
Weight::from_parts(70_724_000, 6148)
// Minimum execution time: 69_645_000 picoseconds.
Weight::from_parts(71_247_000, 6148)
.saturating_add(T::DbWeight::get().reads(4_u64))
.saturating_add(T::DbWeight::get().writes(5_u64))
}
Expand All @@ -164,8 +168,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `229`
// Estimated: `3747`
// Minimum execution time: 13_049_000 picoseconds.
Weight::from_parts(13_510_000, 3747)
// Minimum execution time: 11_467_000 picoseconds.
Weight::from_parts(11_828_000, 3747)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
Expand All @@ -175,8 +179,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `229`
// Estimated: `3747`
// Minimum execution time: 11_557_000 picoseconds.
Weight::from_parts(12_318_000, 3747)
// Minimum execution time: 10_125_000 picoseconds.
Weight::from_parts(10_586_000, 3747)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
Expand All @@ -186,8 +190,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `229`
// Estimated: `3747`
// Minimum execution time: 11_386_000 picoseconds.
Weight::from_parts(11_797_000, 3747)
// Minimum execution time: 9_905_000 picoseconds.
Weight::from_parts(10_165_000, 3747)
.saturating_add(T::DbWeight::get().reads(1_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
Expand All @@ -201,8 +205,8 @@ impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
// Proof Size summary in bytes:
// Measured: `293`
// Estimated: `3747`
// Minimum execution time: 15_924_000 picoseconds.
Weight::from_parts(16_805_000, 3747)
// Minimum execution time: 13_941_000 picoseconds.
Weight::from_parts(14_311_000, 3747)
.saturating_add(T::DbWeight::get().reads(2_u64))
.saturating_add(T::DbWeight::get().writes(1_u64))
}
Expand All @@ -222,8 +226,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `119`
// Estimated: `6148`
// Minimum execution time: 59_888_000 picoseconds.
Weight::from_parts(61_110_000, 6148)
// Minimum execution time: 62_814_000 picoseconds.
Weight::from_parts(65_689_000, 6148)
.saturating_add(RocksDbWeight::get().reads(3_u64))
.saturating_add(RocksDbWeight::get().writes(5_u64))
}
Expand All @@ -239,8 +243,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `448`
// Estimated: `6148`
// Minimum execution time: 65_807_000 picoseconds.
Weight::from_parts(66_819_000, 6148)
// Minimum execution time: 68_563_000 picoseconds.
Weight::from_parts(71_076_000, 6148)
.saturating_add(RocksDbWeight::get().reads(5_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
Expand All @@ -254,8 +258,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `408`
// Estimated: `6148`
// Minimum execution time: 59_447_000 picoseconds.
Weight::from_parts(61_220_000, 6148)
// Minimum execution time: 61_532_000 picoseconds.
Weight::from_parts(64_286_000, 6148)
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(4_u64))
}
Expand All @@ -269,13 +273,17 @@ impl WeightInfo for () {
/// Proof: `SafeMode::EnteredUntil` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `MaxEncodedLen`)
/// Storage: `SubtensorModule::ColdkeySwapAnnouncements` (r:1 w:0)
/// Proof: `SubtensorModule::ColdkeySwapAnnouncements` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `SubtensorModule::SubnetSaleFrozenColdkeys` (r:1 w:0)
/// Proof: `SubtensorModule::SubnetSaleFrozenColdkeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
/// Storage: `SubtensorModule::SubnetSaleFrozenHotkeys` (r:1 w:0)
/// Proof: `SubtensorModule::SubnetSaleFrozenHotkeys` (`max_values`: None, `max_size`: None, mode: `Measured`)
fn finalize() -> Weight {
// Proof Size summary in bytes:
// Measured: `1181`
// Measured: `1216`
// Estimated: `4197809`
// Minimum execution time: 32_548_000 picoseconds.
Weight::from_parts(34_110_000, 4197809)
.saturating_add(RocksDbWeight::get().reads(5_u64))
// Minimum execution time: 31_887_000 picoseconds.
Weight::from_parts(33_050_000, 4197809)
.saturating_add(RocksDbWeight::get().reads(7_u64))
.saturating_add(RocksDbWeight::get().writes(2_u64))
}
/// Storage: `Crowdloan::Crowdloans` (r:1 w:1)
Expand All @@ -289,10 +297,10 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `324 + k * (46 ±0)`
// Estimated: `3747 + k * (2579 ±0)`
// Minimum execution time: 109_320_000 picoseconds.
Weight::from_parts(110_392_000, 3747)
// Standard Error: 94_672
.saturating_add(Weight::from_parts(39_822_919, 0).saturating_mul(k.into()))
// Minimum execution time: 109_925_000 picoseconds.
Weight::from_parts(115_633_000, 3747)
// Standard Error: 101_663
.saturating_add(Weight::from_parts(43_172_223, 0).saturating_mul(k.into()))
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().reads((2_u64).saturating_mul(k.into())))
.saturating_add(RocksDbWeight::get().writes((2_u64).saturating_mul(k.into())))
Expand All @@ -310,8 +318,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `370`
// Estimated: `6148`
// Minimum execution time: 69_442_000 picoseconds.
Weight::from_parts(70_724_000, 6148)
// Minimum execution time: 69_645_000 picoseconds.
Weight::from_parts(71_247_000, 6148)
.saturating_add(RocksDbWeight::get().reads(4_u64))
.saturating_add(RocksDbWeight::get().writes(5_u64))
}
Expand All @@ -323,8 +331,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `229`
// Estimated: `3747`
// Minimum execution time: 13_049_000 picoseconds.
Weight::from_parts(13_510_000, 3747)
// Minimum execution time: 11_467_000 picoseconds.
Weight::from_parts(11_828_000, 3747)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
Expand All @@ -334,8 +342,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `229`
// Estimated: `3747`
// Minimum execution time: 11_557_000 picoseconds.
Weight::from_parts(12_318_000, 3747)
// Minimum execution time: 10_125_000 picoseconds.
Weight::from_parts(10_586_000, 3747)
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
Expand All @@ -345,8 +353,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `229`
// Estimated: `3747`
// Minimum execution time: 11_386_000 picoseconds.
Weight::from_parts(11_797_000, 3747)
// Minimum execution time: 9_905_000 picoseconds.
Weight::from_parts(10_165_000, 3747)
.saturating_add(RocksDbWeight::get().reads(1_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
Expand All @@ -360,8 +368,8 @@ impl WeightInfo for () {
// Proof Size summary in bytes:
// Measured: `293`
// Estimated: `3747`
// Minimum execution time: 15_924_000 picoseconds.
Weight::from_parts(16_805_000, 3747)
// Minimum execution time: 13_941_000 picoseconds.
Weight::from_parts(14_311_000, 3747)
.saturating_add(RocksDbWeight::get().reads(2_u64))
.saturating_add(RocksDbWeight::get().writes(1_u64))
}
Expand Down
Loading