Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expiry time for MultiSig calls #1281

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
be96656
Expiry time for MultiSig calls
Szegoo Aug 29, 2023
0d8a934
Merge branch 'master' into multisig-expiry
Szegoo Aug 29, 2023
ec70023
Update substrate/frame/multisig/src/lib.rs
Szegoo Aug 31, 2023
07dec63
Update substrate/frame/multisig/src/lib.rs
Szegoo Aug 31, 2023
9a1a619
Update substrate/frame/multisig/src/lib.rs
Szegoo Aug 31, 2023
cf140f0
Update substrate/frame/multisig/src/lib.rs
Szegoo Aug 31, 2023
6882821
Update substrate/frame/multisig/src/lib.rs
Szegoo Aug 31, 2023
5a99f94
Update substrate/frame/multisig/src/lib.rs
Szegoo Aug 31, 2023
8667b20
Update substrate/frame/multisig/src/lib.rs
Szegoo Aug 31, 2023
76cf971
Update substrate/frame/multisig/src/lib.rs
Szegoo Aug 31, 2023
9ea8802
Update substrate/frame/multisig/src/tests.rs
Szegoo Aug 31, 2023
ceb81f1
Update substrate/frame/multisig/src/tests.rs
Szegoo Aug 31, 2023
c3da879
Update substrate/frame/multisig/src/lib.rs
Szegoo Aug 31, 2023
5151675
update MultisigCancelled event & update complexity
Szegoo Aug 31, 2023
c4350c1
Update substrate/frame/multisig/src/lib.rs
Szegoo Sep 4, 2023
ddf7291
Merge branch 'master' into multisig-expiry
Szegoo Sep 4, 2023
6bc178e
Update substrate/frame/multisig/src/lib.rs
Szegoo Sep 4, 2023
7327b82
update docs & fmt
Szegoo Sep 4, 2023
e124f70
use H256 instead of [u8; 32]
Szegoo Sep 5, 2023
cce5220
more replacement & use if instead of match
Szegoo Sep 5, 2023
72d6ffe
fix?
Szegoo Sep 5, 2023
3ce4657
..
Szegoo Sep 5, 2023
f37ae10
Merge branch 'master' into multisig-expiry
Szegoo Sep 10, 2023
08bdcf0
Update substrate/frame/multisig/src/lib.rs
Szegoo Sep 11, 2023
e44881c
Update substrate/frame/multisig/src/lib.rs
Szegoo Sep 11, 2023
8b66b8c
Update substrate/frame/multisig/src/lib.rs
Szegoo Sep 11, 2023
9dfe2ee
Update substrate/frame/multisig/src/tests.rs
Szegoo Sep 11, 2023
5ca7fc3
Update substrate/frame/multisig/src/tests.rs
Szegoo Sep 11, 2023
2a8e6bd
Merge branch 'master' into multisig-expiry
Szegoo Sep 24, 2023
0471c6e
Merge branch 'paritytech:master' into multisig-expiry
Szegoo Sep 28, 2023
6b49409
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
Sep 28, 2023
dfe2e73
use the proper weight function
Szegoo Sep 28, 2023
8d58acf
Merge branch 'master' into multisig-expiry
Szegoo Oct 2, 2023
457d195
Merge branch 'paritytech:master' into multisig-expiry
Szegoo Oct 12, 2023
3e1eec9
add clear_expired_multi function to weight files
Szegoo Oct 16, 2023
3e47150
Merge branch 'master' into multisig-expiry
Szegoo Oct 17, 2023
9782b4f
".git/.scripts/commands/bench/bench.sh" --subcommand=runtime --runtim…
Oct 17, 2023
7b28274
fix warning
Szegoo Oct 17, 2023
a2b7c9c
Merge branch 'master' into multisig-expiry
franciscoaguirre Nov 13, 2023
2970d27
fix
Szegoo Nov 13, 2023
44b3372
warning fix
Szegoo Nov 14, 2023
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
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,8 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}

fn clear_expired_multi(_s: u32) -> Weight {
unimplemented!()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,8 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}

fn clear_expired_multi(_s: u32) -> Weight {
unimplemented!()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,8 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}

fn clear_expired_multi(_s: u32) -> Weight {
unimplemented!()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,8 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}

fn clear_expired_multi(_s: u32) -> Weight {
unimplemented!()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,8 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}

fn clear_expired_multi(_s: u32) -> Weight {
unimplemented!()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,8 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}

fn clear_expired_multi(_s: u32) -> Weight {
unimplemented!()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,8 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}

fn clear_expired_multi(_s: u32) -> Weight {
unimplemented!()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,8 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}

fn clear_expired_multi(_s: u32) -> Weight {
unimplemented!()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,8 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}

fn clear_expired_multi(_s: u32) -> Weight {
unimplemented!()
}
}
4 changes: 4 additions & 0 deletions polkadot/runtime/rococo/src/weights/pallet_multisig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,8 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
}

fn clear_expired_multi(_s: u32) -> Weight {
unimplemented!()
}
}
165 changes: 96 additions & 69 deletions polkadot/runtime/westend/src/weights/pallet_multisig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,25 @@
//! Autogenerated weights for `pallet_multisig`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-06-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! DATE: 2023-10-17, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `runner--ss9ysm1-project-163-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("westend-dev"), DB CACHE: 1024
//! HOSTNAME: `runner-cxxwyzfj-project-674-concurrent-0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `Some("westend-dev")`, DB CACHE: 1024

// Executed Command:
// ./target/production/polkadot
// target/production/polkadot
// benchmark
// pallet
// --chain=westend-dev
// --steps=50
// --repeat=20
// --no-storage-info
// --no-median-slopes
// --no-min-squares
// --pallet=pallet_multisig
// --extrinsic=*
// --execution=wasm
// --wasm-execution=compiled
// --header=./file_header.txt
// --output=./runtime/westend/src/weights/
// --heap-pages=4096
// --json-file=/builds/parity/mirrors/polkadot-sdk/.git/.artifacts/bench.json
// --pallet=pallet_multisig
// --chain=westend-dev
// --header=./polkadot/file_header.txt
// --output=./polkadot/runtime/westend/src/weights/

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
Expand All @@ -55,111 +53,140 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
// Proof Size summary in bytes:
// Measured: `0`
// Estimated: `0`
// Minimum execution time: 13_218_000 picoseconds.
Weight::from_parts(14_749_472, 0)
// Minimum execution time: 13_728_000 picoseconds.
Weight::from_parts(14_142_793, 0)
.saturating_add(Weight::from_parts(0, 0))
// Standard Error: 10
.saturating_add(Weight::from_parts(507, 0).saturating_mul(z.into()))
// Standard Error: 3
.saturating_add(Weight::from_parts(566, 0).saturating_mul(z.into()))
}
/// Storage: Multisig Multisigs (r:1 w:1)
/// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen)
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// Storage: `Multisig::MultisigExpiries` (r:1 w:0)
/// Proof: `Multisig::MultisigExpiries` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_create(s: u32, z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `309 + s * (2 ±0)`
// Measured: `267 + s * (2 ±0)`
// Estimated: `6811`
// Minimum execution time: 45_891_000 picoseconds.
Weight::from_parts(33_546_627, 0)
// Minimum execution time: 41_477_000 picoseconds.
Weight::from_parts(29_848_990, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 2_347
.saturating_add(Weight::from_parts(136_466, 0).saturating_mul(s.into()))
// Standard Error: 23
.saturating_add(Weight::from_parts(1_595, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(1))
// Standard Error: 856
.saturating_add(Weight::from_parts(130_375, 0).saturating_mul(s.into()))
// Standard Error: 8
.saturating_add(Weight::from_parts(1_586, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: Multisig Multisigs (r:1 w:1)
/// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen)
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// Storage: `Multisig::MultisigExpiries` (r:1 w:0)
/// Proof: `Multisig::MultisigExpiries` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// The range of component `s` is `[3, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `286`
// Estimated: `6811`
// Minimum execution time: 30_355_000 picoseconds.
Weight::from_parts(19_611_682, 0)
// Minimum execution time: 29_244_000 picoseconds.
Weight::from_parts(19_533_886, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 1_383
.saturating_add(Weight::from_parts(123_652, 0).saturating_mul(s.into()))
// Standard Error: 13
.saturating_add(Weight::from_parts(1_488, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(1))
// Standard Error: 658
.saturating_add(Weight::from_parts(112_698, 0).saturating_mul(s.into()))
// Standard Error: 6
.saturating_add(Weight::from_parts(1_496, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: Multisig Multisigs (r:1 w:1)
/// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen)
/// Storage: System Account (r:1 w:1)
/// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// Storage: `Multisig::MultisigExpiries` (r:1 w:0)
/// Proof: `Multisig::MultisigExpiries` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
/// The range of component `z` is `[0, 10000]`.
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `392 + s * (33 ±0)`
// Estimated: `6811`
// Minimum execution time: 50_453_000 picoseconds.
Weight::from_parts(35_628_285, 0)
// Minimum execution time: 48_402_000 picoseconds.
Weight::from_parts(34_962_279, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 3_693
.saturating_add(Weight::from_parts(203_453, 0).saturating_mul(s.into()))
// Standard Error: 36
.saturating_add(Weight::from_parts(1_726, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(2))
// Standard Error: 1_477
.saturating_add(Weight::from_parts(157_073, 0).saturating_mul(s.into()))
// Standard Error: 14
.saturating_add(Weight::from_parts(1_590, 0).saturating_mul(z.into()))
.saturating_add(T::DbWeight::get().reads(3))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: Multisig Multisigs (r:1 w:1)
/// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen)
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// Storage: `Multisig::MultisigExpiries` (r:1 w:1)
/// Proof: `Multisig::MultisigExpiries` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_create(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `314 + s * (2 ±0)`
// Measured: `267 + s * (2 ±0)`
// Estimated: `6811`
// Minimum execution time: 32_500_000 picoseconds.
Weight::from_parts(33_231_806, 0)
// Minimum execution time: 30_631_000 picoseconds.
Weight::from_parts(31_761_004, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 1_511
.saturating_add(Weight::from_parts(134_500, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
.saturating_add(T::DbWeight::get().writes(1))
// Standard Error: 1_141
.saturating_add(Weight::from_parts(128_754, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
/// Storage: Multisig Multisigs (r:1 w:1)
/// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen)
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// Storage: `Multisig::MultisigExpiries` (r:1 w:0)
/// Proof: `Multisig::MultisigExpiries` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn approve_as_multi_approve(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `286`
// Estimated: `6811`
// Minimum execution time: 17_906_000 picoseconds.
Weight::from_parts(18_757_928, 0)
// Minimum execution time: 18_303_000 picoseconds.
Weight::from_parts(19_026_721, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 1_172
.saturating_add(Weight::from_parts(113_535, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
// Standard Error: 965
.saturating_add(Weight::from_parts(105_394, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: Multisig Multisigs (r:1 w:1)
/// Proof: Multisig Multisigs (max_values: None, max_size: Some(3346), added: 5821, mode: MaxEncodedLen)
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// Storage: `Multisig::MultisigExpiries` (r:1 w:0)
/// Proof: `Multisig::MultisigExpiries` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn cancel_as_multi(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `458 + s * (1 ±0)`
// Estimated: `6811`
// Minimum execution time: 33_018_000 picoseconds.
Weight::from_parts(34_186_533, 0)
// Minimum execution time: 30_910_000 picoseconds.
Weight::from_parts(31_844_665, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 1_188
.saturating_add(Weight::from_parts(128_449, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(1))
// Standard Error: 968
.saturating_add(Weight::from_parts(115_982, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(1))
}
/// Storage: `Multisig::Multisigs` (r:1 w:1)
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
/// Storage: `Multisig::MultisigExpiries` (r:1 w:1)
/// Proof: `Multisig::MultisigExpiries` (`max_values`: None, `max_size`: Some(92), added: 2567, mode: `MaxEncodedLen`)
/// The range of component `s` is `[2, 100]`.
fn clear_expired_multi(s: u32, ) -> Weight {
// Proof Size summary in bytes:
// Measured: `572 + s * (1 ±0)`
// Estimated: `6811`
// Minimum execution time: 34_337_000 picoseconds.
Weight::from_parts(35_393_774, 0)
.saturating_add(Weight::from_parts(0, 6811))
// Standard Error: 1_006
.saturating_add(Weight::from_parts(106_678, 0).saturating_mul(s.into()))
.saturating_add(T::DbWeight::get().reads(2))
.saturating_add(T::DbWeight::get().writes(2))
}
}
3 changes: 3 additions & 0 deletions substrate/frame/multisig/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ scale-info = { version = "2.10.0", default-features = false, features = ["derive
frame-benchmarking = { path = "../benchmarking", default-features = false, optional = true}
frame-support = { path = "../support", default-features = false}
frame-system = { path = "../system", default-features = false}
sp-core = { path = "../../primitives/core", default-features = false}
sp-io = { path = "../../primitives/io", default-features = false}
sp-runtime = { path = "../../primitives/runtime", default-features = false}
sp-std = { path = "../../primitives/std", default-features = false}
Expand All @@ -27,6 +28,7 @@ log = { version = "0.4.17", default-features = false }

[dev-dependencies]
pallet-balances = { path = "../balances" }
sp-core = { path = "../../primitives/core", default-features = false}

[features]
default = [ "std" ]
Expand All @@ -38,6 +40,7 @@ std = [
"log/std",
"pallet-balances/std",
"scale-info/std",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
Expand Down
Loading