From c17190908c3382a4c107adc6148a6d1bc24e838e Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Tue, 28 Nov 2023 15:43:53 -0500 Subject: [PATCH 01/48] update program pallet --- pallets/programs/src/lib.rs | 131 ++++++++++++++++++++---------------- 1 file changed, 72 insertions(+), 59 deletions(-) diff --git a/pallets/programs/src/lib.rs b/pallets/programs/src/lib.rs index 0375c2464..9a5f79ed8 100644 --- a/pallets/programs/src/lib.rs +++ b/pallets/programs/src/lib.rs @@ -43,7 +43,7 @@ pub mod pallet { traits::{Currency, ReservableCurrency}, }; use frame_system::{pallet_prelude::*, Config as SystemConfig}; - use sp_runtime::{sp_std::str, Saturating}; + use sp_runtime::{sp_std::str, traits::Hash, Saturating}; use sp_std::vec; pub use crate::weights::WeightInfo; @@ -73,39 +73,37 @@ pub mod pallet { #[pallet::without_storage_info] pub struct Pallet(_); - /// A mapping for checking whether a program-modification account is allowed to update a - /// program on behalf of a signature-request account. - /// - /// If the program-modification account and signature-request account pair is found in storage - /// then program modification is allowed. - #[pallet::storage] - #[pallet::getter(fn sig_req_accounts)] - pub type AllowedToModifyProgram = StorageDoubleMap< - _, - Blake2_128Concat, - T::AccountId, // Program-modification account - Blake2_128Concat, - T::AccountId, // Signature-request account - (), - ResultQuery::NotAuthorized>, - >; + #[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo)] + pub struct ProgramInfo { + /// The bytecode of the program. + pub bytecode: Vec, + /// Owners of the program + pub program_modification_account: AccountId, + } /// Stores the program bytecode for a given signature-request account. #[pallet::storage] #[pallet::getter(fn bytecode)] pub type Bytecode = - StorageMap<_, Blake2_128Concat, T::AccountId, Vec, OptionQuery>; + StorageMap<_, Blake2_128Concat, T::Hash, ProgramInfo, OptionQuery>; #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { /// The bytecode of a program was updated. - ProgramUpdated { + ProgramCreated { /// The program modification account which updated the program. program_modification_account: T::AccountId, /// The new program bytecode. - new_program: Vec, + program_hash: T::Hash, + }, + ProgramRemoved { + /// The program modification account which removed the program. + program_modification_account: T::AccountId, + + /// The program bytecode removed. + old_program_hash: T::Hash, }, } @@ -116,6 +114,8 @@ pub mod pallet { /// The program length is too long. ProgramLengthExceeded, + NoProgramDefined, + ProgramAlreadySet, } #[pallet::call] @@ -125,62 +125,75 @@ pub mod pallet { /// Note that the call must be sent from a program-modification account. #[pallet::call_index(0)] #[pallet::weight({::WeightInfo::update_program()})] - pub fn update_program( - origin: OriginFor, - sig_req_account: T::AccountId, - new_program: Vec, - ) -> DispatchResult { + pub fn set_program(origin: OriginFor, new_program: Vec) -> DispatchResult { let program_modification_account = ensure_signed(origin)?; + let program_hash = T::Hashing::hash(&new_program); let new_program_length = new_program.len(); ensure!( new_program_length as u32 <= T::MaxBytecodeLength::get(), Error::::ProgramLengthExceeded ); + ensure!(Self::bytecode(&program_hash).is_none(), Error::::ProgramAlreadySet); + + Self::reserve_program_deposit(&program_modification_account, new_program_length)?; + + Bytecode::::insert( + &program_hash, + &ProgramInfo { + bytecode: new_program.clone(), + program_modification_account: program_modification_account.clone(), + }, + ); + Self::deposit_event(Event::ProgramCreated { + program_modification_account, + program_hash, + }); + Ok(()) + } + #[pallet::call_index(1)] + // TODO remove program bench + #[pallet::weight({::WeightInfo::update_program()})] + pub fn remove_program(origin: OriginFor, program_hash: T::Hash) -> DispatchResult { + let program_modification_account = ensure_signed(origin)?; + let old_program_info = + Self::bytecode(&program_hash).ok_or(Error::::NoProgramDefined)?; ensure!( - AllowedToModifyProgram::::contains_key( - &program_modification_account, - &sig_req_account - ), + old_program_info.program_modification_account == program_modification_account, Error::::NotAuthorized ); - let old_program_length = Self::bytecode(&sig_req_account).unwrap_or_default().len(); - - Self::update_program_storage_deposit( - &program_modification_account, - old_program_length, - new_program_length, - )?; - - Bytecode::::insert(&sig_req_account, &new_program); - Self::deposit_event(Event::ProgramUpdated { + Self::unreserve_program_deposit( + &old_program_info.program_modification_account, + old_program_info.bytecode.len(), + ); + Self::deposit_event(Event::ProgramRemoved { program_modification_account, - new_program, + old_program_hash: program_hash, }); Ok(()) } } impl Pallet { - /// Write a program for a given signature-request account directly into storage. - /// - /// # Note - /// - /// This does not perform any checks against the submitter of the request and whether or - /// not they are allowed to update a program for the given account. - pub fn set_program_unchecked( - sig_req_account: &T::AccountId, - program: Vec, - ) -> Result<(), Error> { - ensure!( - program.len() as u32 <= T::MaxBytecodeLength::get(), - Error::::ProgramLengthExceeded - ); - - Bytecode::::insert(sig_req_account, program); - - Ok(()) - } + // /// Write a program for a given signature-request account directly into storage. + // /// + // /// # Note + // /// + // /// This does not perform any checks against the submitter of the request and whether or + // /// not they are allowed to update a program for the given account. + // pub fn set_program_unchecked( + // sig_req_account: &T::AccountId, + // program: Vec, + // ) -> Result<(), Error> { + // ensure!( + // program.len() as u32 <= T::MaxBytecodeLength::get(), + // Error::::ProgramLengthExceeded + // ); + + // Bytecode::::insert(sig_req_account, program); + + // Ok(()) + // } /// Takes some balance from an account as a storage deposit based off the length of the /// program they wish to store on-chain. From 7690e9eb97aab8a8d966478eefc11e633a4bd6ce Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Tue, 28 Nov 2023 16:12:17 -0500 Subject: [PATCH 02/48] update relayer --- pallets/relayer/src/lib.rs | 90 +++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 44 deletions(-) diff --git a/pallets/relayer/src/lib.rs b/pallets/relayer/src/lib.rs index 3a7433374..3b11cf72f 100644 --- a/pallets/relayer/src/lib.rs +++ b/pallets/relayer/src/lib.rs @@ -45,7 +45,6 @@ pub mod pallet { traits::{ConstU32, IsSubType}, }; use frame_system::pallet_prelude::*; - use pallet_programs::{AllowedToModifyProgram, Pallet as ProgramsPallet}; use pallet_staking_extension::ServerInfo; use scale_info::TypeInfo; use sp_runtime::traits::{DispatchInfoOf, SignedExtension}; @@ -75,17 +74,18 @@ pub mod pallet { pub struct RegisteringDetails { pub program_modification_account: T::AccountId, pub confirmations: Vec, - pub program: Vec, + pub program_pointer: T::Hash, pub key_visibility: KeyVisibility, pub verifying_key: Option>>, } #[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo)] #[scale_info(skip_type_params(T))] - pub struct RegisteredInfo { + pub struct RegisteredInfo { pub key_visibility: KeyVisibility, // TODO better type pub verifying_key: BoundedVec>, + pub program_pointer: Hash, } #[pallet::genesis_config] @@ -108,12 +108,11 @@ pub mod pallet { }; Registered::::insert( account_info.0.clone(), - RegisteredInfo { key_visibility, verifying_key: BoundedVec::default() }, - ); - AllowedToModifyProgram::::insert( - account_info.0.clone(), - account_info.0.clone(), - (), + RegisteredInfo { + key_visibility, + verifying_key: BoundedVec::default(), + program_pointer: T::Hash::default(), + }, ); } } @@ -136,7 +135,7 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn registered)] pub type Registered = - StorageMap<_, Blake2_128Concat, T::AccountId, RegisteredInfo, OptionQuery>; + StorageMap<_, Blake2_128Concat, T::AccountId, RegisteredInfo, OptionQuery>; // Pallets use events to inform users when important changes are made. // https://substrate.dev/docs/en/knowledgebase/runtime/events @@ -172,6 +171,7 @@ pub mod pallet { NoSyncedValidators, MaxProgramLengthExceeded, NoVerifyingKey, + NotAuthorized, } #[pallet::call] @@ -185,14 +185,15 @@ pub mod pallet { /// [`Self::confirm_register`] extrinsic before they can be considered as registered on the /// network. #[pallet::call_index(0)] + //TODO fix #[pallet::weight({ - ::WeightInfo::register(initial_program.len() as u32) + ::WeightInfo::register(0u32) })] pub fn register( origin: OriginFor, program_modification_account: T::AccountId, key_visibility: KeyVisibility, - initial_program: Vec, + program_pointer: T::Hash, ) -> DispatchResult { let sig_req_account = ensure_signed(origin)?; @@ -203,19 +204,6 @@ pub mod pallet { Error::::AlreadySubmitted ); - ensure!( - initial_program.len() as u32 - <= ::MaxBytecodeLength::get(), - Error::::MaxProgramLengthExceeded, - ); - - // We take a storage deposit here based off the program length. This can be returned to - // the user if they clear the program from storage using the Programs pallet. - ProgramsPallet::::reserve_program_deposit( - &program_modification_account, - initial_program.len(), - )?; - let block_number = >::block_number(); Dkg::::try_mutate(block_number, |messages| -> Result<_, DispatchError> { messages.push(sig_req_account.clone().encode()); @@ -228,7 +216,7 @@ pub mod pallet { RegisteringDetails:: { program_modification_account, confirmations: vec![], - program: initial_program, + program_pointer, key_visibility, verifying_key: None, }, @@ -249,23 +237,47 @@ pub mod pallet { })] pub fn prune_registration(origin: OriginFor) -> DispatchResult { let who = ensure_signed(origin)?; - let registering_info = Self::registering(&who).ok_or(Error::::NotRegistering)?; - // return program deposit - ProgramsPallet::::unreserve_program_deposit( - ®istering_info.program_modification_account, - registering_info.program.len(), - ); + Self::registering(&who).ok_or(Error::::NotRegistering)?; Registering::::remove(&who); Self::deposit_event(Event::RegistrationCancelled(who)); Ok(()) } + #[pallet::call_index(2)] + // TODO fix bench + #[pallet::weight({ + ::WeightInfo::prune_registration() + })] + pub fn change_program_pointer( + origin: OriginFor, + program_pointer: T::Hash, + ) -> DispatchResult { + let who = ensure_signed(origin)?; + Registering::::try_mutate_exists( + &who, + |maybe_registerd_details| -> Result<_, DispatchError> { + let mut registerd_details = + maybe_registerd_details.take().ok_or(Error::::NotRegistered)?; + ensure!( + who == registerd_details.program_modification_account, + Error::::NotAuthorized + ); + registerd_details.program_pointer = program_pointer; + Ok(()) + }, + )?; + // let registerd_details = Self::registering(&who).ok_or(Error::::NotRegistering)?; + + // Self::deposit_event(Event::RegistrationCancelled(who)); + Ok(()) + } + /// Allows validators to confirm that they have received a key-share from a user that is /// in the process of registering. /// /// After a validator from each partition confirms they have a keyshare the user will be /// considered as registered on the network. - #[pallet::call_index(2)] + #[pallet::call_index(3)] #[pallet::weight({ let weight = ::WeightInfo::confirm_register_registering(SIGNING_PARTY_SIZE as u32) @@ -324,21 +336,11 @@ pub mod pallet { RegisteredInfo { key_visibility: registering_info.key_visibility, verifying_key, + program_pointer: registering_info.program_pointer, }, ); Registering::::remove(&sig_req_account); - AllowedToModifyProgram::::insert( - ®istering_info.program_modification_account, - sig_req_account.clone(), - (), - ); - - ProgramsPallet::::set_program_unchecked( - &sig_req_account, - registering_info.program, - )?; - let weight = ::WeightInfo::confirm_register_registered(confirmation_length); From 0ec0232de29fa273baab16fdb908e13ffaf46dcf Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Wed, 29 Nov 2023 12:04:55 -0500 Subject: [PATCH 03/48] programs tests --- pallets/programs/src/lib.rs | 22 +------ pallets/programs/src/tests.rs | 105 +++++++++++++++++++--------------- 2 files changed, 60 insertions(+), 67 deletions(-) diff --git a/pallets/programs/src/lib.rs b/pallets/programs/src/lib.rs index 9a5f79ed8..b53fa4acc 100644 --- a/pallets/programs/src/lib.rs +++ b/pallets/programs/src/lib.rs @@ -134,7 +134,7 @@ pub mod pallet { Error::::ProgramLengthExceeded ); ensure!(Self::bytecode(&program_hash).is_none(), Error::::ProgramAlreadySet); - + Self::reserve_program_deposit(&program_modification_account, new_program_length)?; Bytecode::::insert( @@ -175,26 +175,6 @@ pub mod pallet { } impl Pallet { - // /// Write a program for a given signature-request account directly into storage. - // /// - // /// # Note - // /// - // /// This does not perform any checks against the submitter of the request and whether or - // /// not they are allowed to update a program for the given account. - // pub fn set_program_unchecked( - // sig_req_account: &T::AccountId, - // program: Vec, - // ) -> Result<(), Error> { - // ensure!( - // program.len() as u32 <= T::MaxBytecodeLength::get(), - // Error::::ProgramLengthExceeded - // ); - - // Bytecode::::insert(sig_req_account, program); - - // Ok(()) - // } - /// Takes some balance from an account as a storage deposit based off the length of the /// program they wish to store on-chain. /// diff --git a/pallets/programs/src/tests.rs b/pallets/programs/src/tests.rs index 263e2c824..b1f4bcfc4 100644 --- a/pallets/programs/src/tests.rs +++ b/pallets/programs/src/tests.rs @@ -1,82 +1,95 @@ use frame_support::{assert_noop, assert_ok, traits::Currency}; use pallet_balances::Error as BalancesError; +use sp_runtime::traits::Hash; -use crate::{mock::*, AllowedToModifyProgram, Error}; +use crate::{mock::*, Error, ProgramInfo}; /// consts used for testing const PROGRAM_MODIFICATION_ACCOUNT: u64 = 1u64; const SIG_REQ_ACCOUNT: u64 = 2u64; #[test] -fn set_programs() { +fn set_program() { new_test_ext().execute_with(|| { - let empty_program = vec![]; let program = vec![10u8, 11u8]; let too_long = vec![1u8, 2u8, 3u8, 4u8, 5u8]; - - // make sure no one can add a program without explicit permissions + let program_hash = ::Hashing::hash(&program); + // can't pay deposit assert_noop!( - ProgramsPallet::update_program( + ProgramsPallet::set_program( RuntimeOrigin::signed(PROGRAM_MODIFICATION_ACCOUNT), - SIG_REQ_ACCOUNT, - program.clone(), + program.clone() ), - Error::::NotAuthorized + BalancesError::::InsufficientBalance ); - AllowedToModifyProgram::::insert(PROGRAM_MODIFICATION_ACCOUNT, SIG_REQ_ACCOUNT, ()); + Balances::make_free_balance_be(&PROGRAM_MODIFICATION_ACCOUNT, 100); - // can't pay deposit + assert_ok!(ProgramsPallet::set_program( + RuntimeOrigin::signed(PROGRAM_MODIFICATION_ACCOUNT), + program.clone() + )); + let program_result = ProgramInfo { + bytecode: program.clone(), + program_modification_account: PROGRAM_MODIFICATION_ACCOUNT, + }; + assert_eq!(ProgramsPallet::bytecode(program_hash).unwrap(), program_result); + // deposit taken + assert_eq!(Balances::free_balance(PROGRAM_MODIFICATION_ACCOUNT), 90); + + // program is already set assert_noop!( - ProgramsPallet::update_program( + ProgramsPallet::set_program( RuntimeOrigin::signed(PROGRAM_MODIFICATION_ACCOUNT), - SIG_REQ_ACCOUNT, - program.clone(), + program.clone() ), - BalancesError::::InsufficientBalance + Error::::ProgramAlreadySet ); + // program too long + assert_noop!( + ProgramsPallet::set_program( + RuntimeOrigin::signed(PROGRAM_MODIFICATION_ACCOUNT), + too_long, + ), + Error::::ProgramLengthExceeded + ); + }); +} - Balances::make_free_balance_be(&PROGRAM_MODIFICATION_ACCOUNT, 100); +#[test] +fn remove_program() { + new_test_ext().execute_with(|| { + let program = vec![10u8, 11u8]; + let program_hash = ::Hashing::hash(&program); - // It's okay to have an empty program - assert_ok!(ProgramsPallet::update_program( - RuntimeOrigin::signed(PROGRAM_MODIFICATION_ACCOUNT), - SIG_REQ_ACCOUNT, - empty_program.clone() - )); + // no program + assert_noop!( + ProgramsPallet::remove_program( + RuntimeOrigin::signed(PROGRAM_MODIFICATION_ACCOUNT), + program_hash.clone() + ), + Error::::NoProgramDefined + ); - assert_ok!(ProgramsPallet::update_program( + // set a program + Balances::make_free_balance_be(&PROGRAM_MODIFICATION_ACCOUNT, 100); + assert_ok!(ProgramsPallet::set_program( RuntimeOrigin::signed(PROGRAM_MODIFICATION_ACCOUNT), - SIG_REQ_ACCOUNT, program.clone() )); - - assert_eq!(ProgramsPallet::bytecode(SIG_REQ_ACCOUNT).unwrap(), program); assert_eq!(Balances::free_balance(PROGRAM_MODIFICATION_ACCOUNT), 90); - // deposit refunded partial - assert_ok!(ProgramsPallet::update_program( - RuntimeOrigin::signed(PROGRAM_MODIFICATION_ACCOUNT), - SIG_REQ_ACCOUNT, - vec![10u8] - )); - assert_eq!(Balances::free_balance(PROGRAM_MODIFICATION_ACCOUNT), 95); + // not authorized + assert_noop!( + ProgramsPallet::remove_program(RuntimeOrigin::signed(2), program_hash.clone()), + Error::::NotAuthorized + ); - // deposit refunded full - assert_ok!(ProgramsPallet::update_program( + assert_ok!(ProgramsPallet::remove_program( RuntimeOrigin::signed(PROGRAM_MODIFICATION_ACCOUNT), - SIG_REQ_ACCOUNT, - vec![] + program_hash.clone() )); + // refunded assert_eq!(Balances::free_balance(PROGRAM_MODIFICATION_ACCOUNT), 100); - - assert_noop!( - ProgramsPallet::update_program( - RuntimeOrigin::signed(PROGRAM_MODIFICATION_ACCOUNT), - SIG_REQ_ACCOUNT, - too_long, - ), - Error::::ProgramLengthExceeded - ); }); } From 8f45c052b9e798bafec4ba1effa8845cc6d01245 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Wed, 29 Nov 2023 14:47:56 -0500 Subject: [PATCH 04/48] relayer tests --- crypto/server/src/user/api.rs | 2 +- pallets/programs/src/lib.rs | 2 +- pallets/relayer/src/lib.rs | 26 +++++++---- pallets/relayer/src/tests.rs | 83 +++++++++++++++-------------------- 4 files changed, 55 insertions(+), 58 deletions(-) diff --git a/crypto/server/src/user/api.rs b/crypto/server/src/user/api.rs index 752a40833..76973a021 100644 --- a/crypto/server/src/user/api.rs +++ b/crypto/server/src/user/api.rs @@ -140,7 +140,7 @@ pub async fn sign_tx( if !has_key { recover_key(&api, &rpc, &app_state.kv_store, &signer, signing_address).await? } - + // TODO if no program at pointer fail (security what if someone pulls it) let program = get_program(&api, &rpc, &second_signing_address_conversion).await?; let mut runtime = Runtime::new(); diff --git a/pallets/programs/src/lib.rs b/pallets/programs/src/lib.rs index b53fa4acc..2d179f1f7 100644 --- a/pallets/programs/src/lib.rs +++ b/pallets/programs/src/lib.rs @@ -134,7 +134,7 @@ pub mod pallet { Error::::ProgramLengthExceeded ); ensure!(Self::bytecode(&program_hash).is_none(), Error::::ProgramAlreadySet); - + Self::reserve_program_deposit(&program_modification_account, new_program_length)?; Bytecode::::insert( diff --git a/pallets/relayer/src/lib.rs b/pallets/relayer/src/lib.rs index 3b11cf72f..915aefc60 100644 --- a/pallets/relayer/src/lib.rs +++ b/pallets/relayer/src/lib.rs @@ -81,11 +81,12 @@ pub mod pallet { #[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo)] #[scale_info(skip_type_params(T))] - pub struct RegisteredInfo { + pub struct RegisteredInfo { pub key_visibility: KeyVisibility, // TODO better type pub verifying_key: BoundedVec>, pub program_pointer: Hash, + pub program_modification_account: AccountId, } #[pallet::genesis_config] @@ -112,6 +113,7 @@ pub mod pallet { key_visibility, verifying_key: BoundedVec::default(), program_pointer: T::Hash::default(), + program_modification_account: account_info.0.clone(), }, ); } @@ -134,8 +136,13 @@ pub mod pallet { #[pallet::storage] #[pallet::getter(fn registered)] - pub type Registered = - StorageMap<_, Blake2_128Concat, T::AccountId, RegisteredInfo, OptionQuery>; + pub type Registered = StorageMap< + _, + Blake2_128Concat, + T::AccountId, + RegisteredInfo, + OptionQuery, + >; // Pallets use events to inform users when important changes are made. // https://substrate.dev/docs/en/knowledgebase/runtime/events @@ -152,6 +159,8 @@ pub mod pallet { FailedRegistration(T::AccountId), /// An account cancelled their registration RegistrationCancelled(T::AccountId), + /// An account hash changed their program pointer [who, new_program_pointer] + ProgramPointerChanged(T::AccountId, T::Hash), /// An account has been registered. [who, block_number, failures] ConfirmedDone(T::AccountId, BlockNumberFor, Vec), } @@ -209,7 +218,7 @@ pub mod pallet { messages.push(sig_req_account.clone().encode()); Ok(()) })?; - + // TODO validate program pointer exists? // Put account into a registering state Registering::::insert( &sig_req_account, @@ -250,7 +259,7 @@ pub mod pallet { })] pub fn change_program_pointer( origin: OriginFor, - program_pointer: T::Hash, + new_program_pointer: T::Hash, ) -> DispatchResult { let who = ensure_signed(origin)?; Registering::::try_mutate_exists( @@ -262,13 +271,11 @@ pub mod pallet { who == registerd_details.program_modification_account, Error::::NotAuthorized ); - registerd_details.program_pointer = program_pointer; + registerd_details.program_pointer = new_program_pointer; Ok(()) }, )?; - // let registerd_details = Self::registering(&who).ok_or(Error::::NotRegistering)?; - - // Self::deposit_event(Event::RegistrationCancelled(who)); + Self::deposit_event(Event::ProgramPointerChanged(who, new_program_pointer)); Ok(()) } @@ -337,6 +344,7 @@ pub mod pallet { key_visibility: registering_info.key_visibility, verifying_key, program_pointer: registering_info.program_pointer, + program_modification_account: registering_info.program_modification_account, }, ); Registering::::remove(&sig_req_account); diff --git a/pallets/relayer/src/tests.rs b/pallets/relayer/src/tests.rs index d2879d3bf..2f1275c81 100644 --- a/pallets/relayer/src/tests.rs +++ b/pallets/relayer/src/tests.rs @@ -6,10 +6,9 @@ use frame_support::{ traits::Currency, BoundedVec, }; -use pallet_programs::AllowedToModifyProgram; use pallet_relayer::Call as RelayerCall; use sp_runtime::{ - traits::SignedExtension, + traits::{Hash, SignedExtension}, transaction_validity::{TransactionValidity, ValidTransaction}, }; @@ -58,44 +57,18 @@ fn it_tests_get_validator_rotation() { fn it_registers_a_user() { new_test_ext().execute_with(|| { let empty_program = vec![]; + let program_hash = ::Hashing::hash(&empty_program); assert_ok!(Relayer::register( RuntimeOrigin::signed(1), 2 as ::AccountId, KeyVisibility::Public, - empty_program, + program_hash, )); assert_eq!(Relayer::dkg(0), vec![1u64.encode()]); }); } -#[test] -fn it_takes_a_program_storage_deposit_during_register() { - new_test_ext().execute_with(|| { - use frame_support::traits::Currency; - - let program = vec![1u8, 2u8]; - let initial_balance = 100; - - Balances::make_free_balance_be(&PROGRAM_MODIFICATION_ACCOUNT, initial_balance); - - assert_ok!(Relayer::register( - RuntimeOrigin::signed(SIG_REQ_ACCOUNT), - PROGRAM_MODIFICATION_ACCOUNT, - KeyVisibility::Public, - program.clone(), - )); - - let expected_reserve = ::ProgramDepositPerByte::get() - * (program.len() as u32); - - assert_eq!( - Balances::free_balance(PROGRAM_MODIFICATION_ACCOUNT), - initial_balance - (expected_reserve as u64) - ); - }); -} - #[test] fn it_confirms_registers_a_user() { new_test_ext().execute_with(|| { @@ -113,11 +86,13 @@ fn it_confirms_registers_a_user() { ); let empty_program = vec![]; + let program_hash = ::Hashing::hash(&empty_program); + assert_ok!(Relayer::register( RuntimeOrigin::signed(1), 2 as ::AccountId, KeyVisibility::Private([0; 32]), - empty_program, + program_hash.clone(), )); assert_noop!( @@ -152,11 +127,11 @@ fn it_confirms_registers_a_user() { ); let registering_info = RegisteringDetails:: { - program_modification_account: 2 as ::AccountId, confirmations: vec![0], - program: vec![], + program_pointer: program_hash.clone(), key_visibility: KeyVisibility::Private([0; 32]), verifying_key: Some(expected_verifying_key.clone()), + program_modification_account: 2, }; assert_eq!(Relayer::registering(1), Some(registering_info)); @@ -173,12 +148,11 @@ fn it_confirms_registers_a_user() { Relayer::registered(1).unwrap(), RegisteredInfo { key_visibility: KeyVisibility::Private([0; 32]), - verifying_key: expected_verifying_key + verifying_key: expected_verifying_key, + program_pointer: program_hash, + program_modification_account: 2 } ); - - // make sure program and sig req keys are set - assert!(AllowedToModifyProgram::::contains_key(2, 1)); }); } @@ -186,13 +160,14 @@ fn it_confirms_registers_a_user() { fn it_fails_on_non_matching_verifying_keys() { new_test_ext().execute_with(|| { let empty_program = vec![]; + let program_hash = ::Hashing::hash(&empty_program); let expected_verifying_key = BoundedVec::default(); let unexpected_verifying_key = vec![10]; assert_ok!(Relayer::register( RuntimeOrigin::signed(1), 2 as ::AccountId, KeyVisibility::Private([0; 32]), - empty_program, + program_hash, )); pallet_staking_extension::ThresholdToStash::::insert(1, 1); pallet_staking_extension::ThresholdToStash::::insert(2, 2); @@ -222,16 +197,23 @@ fn it_doesnt_allow_double_registering() { new_test_ext().execute_with(|| { // register a user let empty_program = vec![]; + let program_hash = ::Hashing::hash(&empty_program); + assert_ok!(Relayer::register( RuntimeOrigin::signed(1), 2, KeyVisibility::Permissioned, - empty_program, + program_hash.clone(), )); // error if they try to submit another request, even with a different program key assert_noop!( - Relayer::register(RuntimeOrigin::signed(1), 2, KeyVisibility::Permissioned, vec![]), + Relayer::register( + RuntimeOrigin::signed(1), + 2, + KeyVisibility::Permissioned, + program_hash + ), Error::::AlreadySubmitted ); }); @@ -241,31 +223,32 @@ fn it_doesnt_allow_double_registering() { fn it_tests_prune_registration() { new_test_ext().execute_with(|| { let inital_program = vec![10]; + let program_hash = ::Hashing::hash(&inital_program); + Balances::make_free_balance_be(&2, 100); // register a user assert_ok!(Relayer::register( RuntimeOrigin::signed(1), 2, KeyVisibility::Permissioned, - inital_program, + program_hash, )); - assert_eq!(Balances::free_balance(2), 95, "Deposit is charged"); assert!(Relayer::registering(1).is_some(), "Make sure there is registering state"); assert_ok!(Relayer::prune_registration(RuntimeOrigin::signed(1))); assert_eq!(Relayer::registering(1), None, "Make sure registering is pruned"); - assert_eq!(Balances::free_balance(2), 100, "Deposit is returned"); }); } #[test] fn it_provides_free_txs_confirm_done() { new_test_ext().execute_with(|| { let empty_program = vec![]; + let program_hash = ::Hashing::hash(&empty_program); let expected_verifying_key = BoundedVec::default(); assert_ok!(Relayer::register( RuntimeOrigin::signed(5), 2 as ::AccountId, KeyVisibility::Public, - empty_program, + program_hash, )); let p = ValidateConfirmRegistered::::new(); let c = RuntimeCall::Relayer(RelayerCall::confirm_register { @@ -322,12 +305,14 @@ fn it_provides_free_txs_confirm_done_fails_2() { fn it_provides_free_txs_confirm_done_fails_3() { new_test_ext().execute_with(|| { let empty_program = vec![]; + let program_hash = ::Hashing::hash(&empty_program); + let expected_verifying_key = BoundedVec::default(); assert_ok!(Relayer::register( RuntimeOrigin::signed(5), 2 as ::AccountId, KeyVisibility::Public, - empty_program, + program_hash, )); assert_ok!(Relayer::confirm_register( @@ -354,12 +339,14 @@ fn it_provides_free_txs_confirm_done_fails_3() { fn it_provides_free_txs_confirm_done_fails_4() { new_test_ext().execute_with(|| { let empty_program = vec![]; + let program_hash = ::Hashing::hash(&empty_program); + let expected_verifying_key = BoundedVec::default(); assert_ok!(Relayer::register( RuntimeOrigin::signed(5), 2 as ::AccountId, KeyVisibility::Public, - empty_program, + program_hash, )); let p = ValidateConfirmRegistered::::new(); let c = RuntimeCall::Relayer(RelayerCall::confirm_register { @@ -379,12 +366,14 @@ fn it_provides_free_txs_confirm_done_fails_4() { fn it_provides_free_txs_confirm_done_fails_5() { new_test_ext().execute_with(|| { let empty_program = vec![]; + let program_hash = ::Hashing::hash(&empty_program); + let expected_verifying_key = BoundedVec::default(); assert_ok!(Relayer::register( RuntimeOrigin::signed(5), 2 as ::AccountId, KeyVisibility::Public, - empty_program, + program_hash, )); let p = ValidateConfirmRegistered::::new(); let c = RuntimeCall::Relayer(RelayerCall::confirm_register { From 40b9be95cfea3990109935a07fd9efe5b6a1024f Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Wed, 29 Nov 2023 15:17:33 -0500 Subject: [PATCH 05/48] test change pointer --- pallets/relayer/src/lib.rs | 16 ++++++++-------- pallets/relayer/src/tests.rs | 30 +++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/pallets/relayer/src/lib.rs b/pallets/relayer/src/lib.rs index 915aefc60..09281ed69 100644 --- a/pallets/relayer/src/lib.rs +++ b/pallets/relayer/src/lib.rs @@ -251,7 +251,7 @@ pub mod pallet { Self::deposit_event(Event::RegistrationCancelled(who)); Ok(()) } - + /// Allows a user's program modification account to change their program pointer #[pallet::call_index(2)] // TODO fix bench #[pallet::weight({ @@ -259,22 +259,22 @@ pub mod pallet { })] pub fn change_program_pointer( origin: OriginFor, + sig_request_account: T::AccountId, new_program_pointer: T::Hash, ) -> DispatchResult { let who = ensure_signed(origin)?; - Registering::::try_mutate_exists( - &who, - |maybe_registerd_details| -> Result<_, DispatchError> { - let mut registerd_details = - maybe_registerd_details.take().ok_or(Error::::NotRegistered)?; + Registered::::try_mutate(&sig_request_account, |maybe_registerd_details| { + if let Some(registerd_details) = maybe_registerd_details { ensure!( who == registerd_details.program_modification_account, Error::::NotAuthorized ); registerd_details.program_pointer = new_program_pointer; Ok(()) - }, - )?; + } else { + Err(Error::::NotRegistered) + } + })?; Self::deposit_event(Event::ProgramPointerChanged(who, new_program_pointer)); Ok(()) } diff --git a/pallets/relayer/src/tests.rs b/pallets/relayer/src/tests.rs index 2f1275c81..0616de5aa 100644 --- a/pallets/relayer/src/tests.rs +++ b/pallets/relayer/src/tests.rs @@ -13,7 +13,9 @@ use sp_runtime::{ }; use crate as pallet_relayer; -use crate::{mock::*, Error, RegisteredInfo, RegisteringDetails, ValidateConfirmRegistered}; +use crate::{ + mock::*, Error, Registered, RegisteredInfo, RegisteringDetails, ValidateConfirmRegistered, +}; /// consts used for testing const PROGRAM_MODIFICATION_ACCOUNT: u64 = 1u64; @@ -156,6 +158,32 @@ fn it_confirms_registers_a_user() { }); } +#[test] +fn it_changes_a_program_pointer() { + new_test_ext().execute_with(|| { + let empty_program = vec![]; + let program_hash = ::Hashing::hash(&empty_program); + + let new_program = vec![10]; + let new_program_hash = ::Hashing::hash(&new_program); + let expected_verifying_key = BoundedVec::default(); + + let mut registered_info = RegisteredInfo { + key_visibility: KeyVisibility::Public, + verifying_key: expected_verifying_key, + program_pointer: program_hash, + program_modification_account: 2, + }; + + Registered::::insert(1, registered_info.clone()); + assert_eq!(Relayer::registered(1).unwrap(), registered_info.clone()); + + assert_ok!(Relayer::change_program_pointer(RuntimeOrigin::signed(2), 1, new_program_hash,)); + registered_info.program_pointer = new_program_hash; + assert_eq!(Relayer::registered(1).unwrap(), registered_info); + }); +} + #[test] fn it_fails_on_non_matching_verifying_keys() { new_test_ext().execute_with(|| { From 2d825a762e19ecbcd036a2212b77d906e6971950 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Thu, 30 Nov 2023 11:14:34 -0500 Subject: [PATCH 06/48] add program owner --- pallets/programs/src/lib.rs | 36 +++++++++++++++++++++++++++++- pallets/programs/src/mock.rs | 2 ++ pallets/programs/src/tests.rs | 41 ++++++++++++++++++++++++++++++----- runtime/src/lib.rs | 2 ++ 4 files changed, 75 insertions(+), 6 deletions(-) diff --git a/pallets/programs/src/lib.rs b/pallets/programs/src/lib.rs index 2d179f1f7..6e34e9d7b 100644 --- a/pallets/programs/src/lib.rs +++ b/pallets/programs/src/lib.rs @@ -59,6 +59,9 @@ pub mod pallet { /// The maximum length of a program that may be stored on-chain. type MaxBytecodeLength: Get; + /// The maximum amount of owned programs. + type MaxOwnedPrograms: Get; + /// The amount to charge, per byte, for storing a program on-chain. type ProgramDepositPerByte: Get>; @@ -87,6 +90,16 @@ pub mod pallet { pub type Bytecode = StorageMap<_, Blake2_128Concat, T::Hash, ProgramInfo, OptionQuery>; + #[pallet::storage] + #[pallet::getter(fn owned_programs)] + pub type OwnedPrograms = StorageMap< + _, + Blake2_128Concat, + T::AccountId, + BoundedVec, + ValueQuery, + >; + #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { @@ -111,11 +124,11 @@ pub mod pallet { pub enum Error { /// Program modification account doesn't have permission to modify this program. NotAuthorized, - /// The program length is too long. ProgramLengthExceeded, NoProgramDefined, ProgramAlreadySet, + TooManyProgramsOwned, } #[pallet::call] @@ -144,6 +157,15 @@ pub mod pallet { program_modification_account: program_modification_account.clone(), }, ); + OwnedPrograms::::try_mutate( + &program_modification_account, + |owned_programs| -> Result<(), DispatchError> { + owned_programs + .try_push(program_hash) + .map_err(|_| Error::::TooManyProgramsOwned)?; + Ok(()) + }, + )?; Self::deposit_event(Event::ProgramCreated { program_modification_account, program_hash, @@ -166,6 +188,18 @@ pub mod pallet { &old_program_info.program_modification_account, old_program_info.bytecode.len(), ); + OwnedPrograms::::try_mutate( + &program_modification_account, + |owned_programs| -> Result<(), DispatchError> { + let pos = owned_programs + .binary_search(&program_hash) + .ok() + .ok_or(Error::::NotAuthorized)?; + owned_programs.remove(pos); + Ok(()) + }, + )?; + Bytecode::::remove(&program_hash); Self::deposit_event(Event::ProgramRemoved { program_modification_account, old_program_hash: program_hash, diff --git a/pallets/programs/src/mock.rs b/pallets/programs/src/mock.rs index 87d3c05eb..3232124ba 100644 --- a/pallets/programs/src/mock.rs +++ b/pallets/programs/src/mock.rs @@ -54,6 +54,7 @@ impl system::Config for Test { parameter_types! { pub const MaxBytecodeLength: u32 = 3; pub const ProgramDepositPerByte: u32 = 5; + pub const MaxOwnedPrograms: u32 = 1; } parameter_types! { @@ -80,6 +81,7 @@ impl pallet_programs::Config for Test { type Currency = Balances; type MaxBytecodeLength = MaxBytecodeLength; type ProgramDepositPerByte = ProgramDepositPerByte; + type MaxOwnedPrograms = MaxOwnedPrograms; type RuntimeEvent = RuntimeEvent; type WeightInfo = (); } diff --git a/pallets/programs/src/tests.rs b/pallets/programs/src/tests.rs index b1f4bcfc4..22bf46256 100644 --- a/pallets/programs/src/tests.rs +++ b/pallets/programs/src/tests.rs @@ -12,6 +12,7 @@ const SIG_REQ_ACCOUNT: u64 = 2u64; fn set_program() { new_test_ext().execute_with(|| { let program = vec![10u8, 11u8]; + let program_2 = vec![12u8, 13u8]; let too_long = vec![1u8, 2u8, 3u8, 4u8, 5u8]; let program_hash = ::Hashing::hash(&program); // can't pay deposit @@ -33,9 +34,18 @@ fn set_program() { bytecode: program.clone(), program_modification_account: PROGRAM_MODIFICATION_ACCOUNT, }; - assert_eq!(ProgramsPallet::bytecode(program_hash).unwrap(), program_result); + assert_eq!( + ProgramsPallet::bytecode(program_hash).unwrap(), + program_result, + "Program gets set" + ); + assert_eq!( + ProgramsPallet::owned_programs(PROGRAM_MODIFICATION_ACCOUNT), + vec![program_hash], + "Program gets set to owner" + ); // deposit taken - assert_eq!(Balances::free_balance(PROGRAM_MODIFICATION_ACCOUNT), 90); + assert_eq!(Balances::free_balance(PROGRAM_MODIFICATION_ACCOUNT), 90, "Deposit charged"); // program is already set assert_noop!( @@ -45,6 +55,15 @@ fn set_program() { ), Error::::ProgramAlreadySet ); + + // Too many programs set + assert_noop!( + ProgramsPallet::set_program( + RuntimeOrigin::signed(PROGRAM_MODIFICATION_ACCOUNT), + program_2.clone() + ), + Error::::TooManyProgramsOwned + ); // program too long assert_noop!( ProgramsPallet::set_program( @@ -77,7 +96,13 @@ fn remove_program() { RuntimeOrigin::signed(PROGRAM_MODIFICATION_ACCOUNT), program.clone() )); - assert_eq!(Balances::free_balance(PROGRAM_MODIFICATION_ACCOUNT), 90); + assert_eq!( + ProgramsPallet::owned_programs(PROGRAM_MODIFICATION_ACCOUNT), + vec![program_hash], + "Program gets set to owner" + ); + assert!(ProgramsPallet::bytecode(program_hash).is_some(), "Program gets set"); + assert_eq!(Balances::free_balance(PROGRAM_MODIFICATION_ACCOUNT), 90, "Deposit charged"); // not authorized assert_noop!( @@ -86,10 +111,16 @@ fn remove_program() { ); assert_ok!(ProgramsPallet::remove_program( - RuntimeOrigin::signed(PROGRAM_MODIFICATION_ACCOUNT), + RcaruntimeOrigin::signed(PROGRAM_MODIFICATION_ACCOUNT), program_hash.clone() )); + assert!(ProgramsPallet::bytecode(program_hash).is_none(), "Program removed"); + assert_eq!( + ProgramsPallet::owned_programs(PROGRAM_MODIFICATION_ACCOUNT), + vec![], + "Program removed from owner" + ); // refunded - assert_eq!(Balances::free_balance(PROGRAM_MODIFICATION_ACCOUNT), 100); + assert_eq!(Balances::free_balance(PROGRAM_MODIFICATION_ACCOUNT), 100, "User gets refunded"); }); } diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index fae941f5b..075846166 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -1285,12 +1285,14 @@ parameter_types! { // 1mb max pub const MaxBytecodeLength: u32 = 1_000_000; pub const ProgramDepositPerByte: Balance = MILLICENTS; + pub const MaxOwnedPrograms: u32 = 25; } impl pallet_programs::Config for Runtime { type Currency = Balances; type MaxBytecodeLength = MaxBytecodeLength; type ProgramDepositPerByte = ProgramDepositPerByte; + type MaxOwnedPrograms = MaxOwnedPrograms; type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_programs::WeightInfo; } From 6a7ee42dab5f30a38b1f2bcd31f058012c08cbbe Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Fri, 1 Dec 2023 11:48:00 -0500 Subject: [PATCH 07/48] update server --- crypto/server/entropy_metadata.scale | Bin 187722 -> 188171 bytes crypto/server/src/helpers/substrate.rs | 44 +++++++++++++------- crypto/server/src/helpers/tests.rs | 38 +++++++++++++---- crypto/server/src/signing_client/api.rs | 8 +++- crypto/server/src/user/api.rs | 22 +++++----- crypto/server/src/user/tests.rs | 40 ++++++++++++++---- crypto/server/tests/protocol_wasm.rs | 6 +-- crypto/testing-utils/src/test_client/mod.rs | 20 ++++----- pallets/programs/src/lib.rs | 10 ++--- pallets/relayer/src/mock.rs | 2 + 10 files changed, 127 insertions(+), 63 deletions(-) diff --git a/crypto/server/entropy_metadata.scale b/crypto/server/entropy_metadata.scale index 011460418794eba022e047acdb1a9ed09336f6dc..f1701faf917790b346ba45395d72bcd44a3a6bc0 100644 GIT binary patch delta 2264 zcmZ`*YfKbZ6u#%~Nbf3^C4!1VT__-{RM!SuMAJZpwzi6k;DcDYj=L9jb$4c&omFUT z6)jDS8f!N8XyPNb@dq*35L3rTSH-A}^#vkTYPF?_N%>*g{_sbW+Vt)NS4x{qc4qGV z&Ue1^-E-&ecW1`!I5#fE&viM?)|GOj4YE(%X)|DAokLTbG}-S^y^7AYg&tXH;_h(G z)(I=^kX=_+_KqC%kTFs&R47*2K^XZtbsU(UZ z=uFHw6Eh9r9os4)BR_@(yx z8ZG+7-BAg{0%k$E>T^F!I+8}x>yk+8+E$&rR5!OKXl4Nk%OB*Pc;VAahrxo^3*h~% zVL1u$Nkv#u2rCO##Z7pYE&*e(IOuJ1YP>nbgL=5anU%NrKdeZy5h@)B=U&T9`&T~P zTL@t=8Mf)b=mb_AXoNK`E=_S>wUJ=qgs^Q5!~et%4KD>-X=xXLmC(9iJzrr2Ln!* zs_~52e13A8NTgX5y*gAn-}>6z1|r@FF;x&@1qq2qDZiC{#M)Rp+r{>GZrMIaB_ab^Uj;MNEfj@!;4 zwMvr-+0Mevof*cr5jbFhU2(+6H=!8z;IW%fM)xvIKM0xl*G-s5_b2SBz9r}mV)HGS z2S@POEqI9@jq%`5(U}gUJ&-rClR;^80jpYsgG$irdV`RTIIOw{-kR!V8PO>jM41vP z5fyiedT9qEUHDZG*lNCJ(&VK9-K#2MfuV~5vs9}J7eGs`>gN*a5_r)wrv+{q4~Bd? z6Sz%M6+{GO#)0rrJ6({jNn(j!VyQWXwq)n*b8~4%M7sVwy1CCZ79UMya7eD0?27@4##J!4bM2vFC+9it;9vN6UPK>K(XEhgi7h z(L}88haz~4Tl=BF_QwdLhDIAT6gTP#_VmLK@MrXvf#<)6Gc%r!2nF*fkHH-C7|ht) z4-@d@T_{5J9^@mv2YxXcxCigTcszR#UbT%kKfhq%l0ESXvIsW=HltMk`4#Mlejru{jct2e%TjF#O zpG9h~Vc2kvIt2LmIeG-@4aa#Z0W{$93v?B5Jbr;r+w5f_mS4Wm!(HoZ1KhQOYeCV2 zV$YSv#_C!UBOi%f7#n$;D?I28wlRAgu|(B$*(bgk?aW>jLx{e0@m*|7aqMj+_cnR- zJ#5PwaZGDXyiSvqpzMlvxH~cL+r7!>Kb)W_yY&~=v&5bH|Svro`_DRn?A;He=H zc9RLrv6!jUm_0y$0b2)4^>M{A#!M>3QK_{$8##Bn#h(AZQf>lHlTWPe3iKg`rV@Ugsg;YYa*?sTL_sz~X zvom|-a_}z~f~PvUq0CHdn|iwr=AP}Z^Mfz=U@lBKTX--VLZpmBU8~R)XNlY9`>x)N z|E9ofU&5EUzKFQ^v+E9Zp9&6 zJlvKHjX?d+lY!ANDZ}fwDFz>hF;tUbLEt4(czzbloH5btEBbSz|9UD&M`y*1IZlU| zQf|%iW~{~4Nw5%~oQD}W`#gMYA%tO;2qkc|9E;i^5z=sPJG{cCZ^S#ky#Vttns^*fUVrXT+LN{wJ zE`Xt1H7A!ytH1*x=LBvG_jnx!6S#d+9<&QAE7&8EeF98`JY6E~Cb%8z2890g{jdl+ zQ0<2Wa21dCLzLJFO9I~N2fsKH>niBMzX!xuatovGL&}G@m?W<+);Z5t+)Ua8u~aIB zbP@Y);d=B&dl?ZIkytEECj)5Qhb`ef4AM5b>|EzABUdp*rXQLyyt@x8(;iO<{waGu z`lkWE6T^Rs%5TsI!4`UqAm4hnj|WYdEtm27&@XvwAr z_z9Rg1U3l6#vw>t9XWv-HJKV^QUebf8$`q<@|>PGmBjmB4Z(}4P=tejK!#Mp;IywU zE)r9pK^!RlP0yg~Q6bx&<8Wwuxvf~s*KBHe&Da!NWM&Z@Afi-sTYve1kT0qMonrCj$2?=>tmZS>?5?&2QRv!A7zh, rpc: &LegacyRpcMethods, - sig_req_account: &::AccountId, + program_pointer: &::Hash, ) -> Result, UserErr> { - let bytecode_address = entropy::storage().programs().bytecode(sig_req_account); let block_hash = rpc .chain_get_block_hash(None) .await? .ok_or_else(|| UserErr::OptionUnwrapError("Error getting block hash".to_string()))?; + let bytecode_address = entropy::storage().programs().bytecode(program_pointer); - substrate_api + Ok(substrate_api .storage() .at(block_hash) .fetch(&bytecode_address) .await? - .ok_or(UserErr::NoProgramDefined) + .ok_or(UserErr::NoProgramDefined)? + .bytecode) } /// Puts a user in the Registering state on-chain and waits for that transaction to be included in a @@ -107,11 +117,13 @@ pub async fn make_register( assert!(is_registering_1.is_none()); // register the user - let empty_program = vec![]; + let empty_program_hash: H256 = + H256::from_str("0x0e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8") + .unwrap(); let registering_tx = entropy::tx().relayer().register( program_modification_account.clone(), Static(key_visibility), - empty_program, + empty_program_hash, ); api.tx() @@ -132,11 +144,11 @@ pub async fn make_register( } /// Returns a registered user's key visibility -pub async fn get_key_visibility( +pub async fn get_registered_details( api: &OnlineClient, rpc: &LegacyRpcMethods, who: &::AccountId, -) -> Result { +) -> Result, UserErr> { let registered_info_query = entropy::storage().relayer().registered(who); let block_hash = rpc .chain_get_block_hash(None) @@ -148,5 +160,5 @@ pub async fn get_key_visibility( .fetch(®istered_info_query) .await? .ok_or_else(|| UserErr::NotRegistering("Register Onchain first"))?; - Ok(result.key_visibility.0) + Ok(result) } diff --git a/crypto/server/src/helpers/tests.rs b/crypto/server/src/helpers/tests.rs index 816b3117e..a71614ef5 100644 --- a/crypto/server/src/helpers/tests.rs +++ b/crypto/server/src/helpers/tests.rs @@ -14,7 +14,7 @@ use subxt::{ ext::sp_core::{sr25519, Pair}, tx::PairSigner, utils::{AccountId32 as SubxtAccountId32, Static}, - OnlineClient, + Config, OnlineClient, }; use synedrion::KeyShare; use testing_utils::substrate_context::testing_context; @@ -163,19 +163,16 @@ pub async fn spawn_testing_validators( pub async fn update_programs( entropy_api: &OnlineClient, - sig_req_keyring: &sr25519::Pair, program_modification_account: &sr25519::Pair, initial_program: Vec, -) { +) -> ::Hash { // update/set their programs - let update_program_tx = entropy::tx() - .programs() - .update_program(SubxtAccountId32::from(sig_req_keyring.public()), initial_program); + let update_program_tx = entropy::tx().programs().set_program(initial_program); let program_modification_account = PairSigner::::new(program_modification_account.clone()); - entropy_api + let in_block = entropy_api .tx() .sign_and_submit_then_watch_default(&update_program_tx, &program_modification_account) .await @@ -186,6 +183,33 @@ pub async fn update_programs( .wait_for_success() .await .unwrap(); + + let result_event = in_block.find_first::().unwrap(); + result_event.unwrap().program_hash +} + +pub async fn update_pointer( + entropy_api: &OnlineClient, + sig_req_keyring: &sr25519::Pair, + pointer_modification_account: &sr25519::Pair, + program_hash: ::Hash, +) { + let update_pointer_tx = entropy::tx() + .relayer() + .change_program_pointer(sig_req_keyring.public().into(), program_hash); + let pointer_modification_account = + PairSigner::::new(pointer_modification_account.clone()); + entropy_api + .tx() + .sign_and_submit_then_watch_default(&update_pointer_tx, &pointer_modification_account) + .await + .unwrap() + .wait_for_in_block() + .await + .unwrap() + .wait_for_success() + .await + .unwrap(); } /// Verify that a Registering account has all confirmation, and that it is registered. diff --git a/crypto/server/src/signing_client/api.rs b/crypto/server/src/signing_client/api.rs index e6161614a..9e8672412 100644 --- a/crypto/server/src/signing_client/api.rs +++ b/crypto/server/src/signing_client/api.rs @@ -36,7 +36,7 @@ use crate::{ chain_api::{entropy, get_api, get_rpc, EntropyConfig}, helpers::{ launch::LATEST_BLOCK_NUMBER_PROACTIVE_REFRESH, - substrate::{get_key_visibility, get_subgroup, return_all_addresses_of_subgroup}, + substrate::{get_registered_details, get_subgroup, return_all_addresses_of_subgroup}, user::{check_in_registration_group, send_key}, validator::get_signer, }, @@ -87,7 +87,11 @@ pub async fn proactive_refresh( for key in proactive_refresh_keys { let sig_request_address = AccountId32::from_str(&key).map_err(ProtocolErr::StringError)?; let key_visibility = - get_key_visibility(&api, &rpc, &sig_request_address.clone().into()).await.unwrap(); + get_registered_details(&api, &rpc, &sig_request_address.clone().into()) + .await + .map_err(|e| ProtocolErr::UserError(e.to_string()))? + .key_visibility + .0; if key_visibility != KeyVisibility::Public && key_visibility != KeyVisibility::Permissioned { return Ok(StatusCode::ACCEPTED); diff --git a/crypto/server/src/user/api.rs b/crypto/server/src/user/api.rs index 76973a021..4cddac2b4 100644 --- a/crypto/server/src/user/api.rs +++ b/crypto/server/src/user/api.rs @@ -49,7 +49,7 @@ use crate::{ launch::LATEST_BLOCK_NUMBER_NEW_USER, signing::{create_unique_tx_id, do_signing, Hasher}, substrate::{ - get_key_visibility, get_program, get_subgroup, return_all_addresses_of_subgroup, + get_program, get_registered_details, get_subgroup, return_all_addresses_of_subgroup, }, user::{check_in_registration_group, do_dkg, send_key}, validator::get_signer, @@ -106,16 +106,16 @@ pub async fn sign_tx( let signing_address_arr: [u8; 32] = *signing_address_converted.as_ref(); let signing_address_subxt = SubxtAccountId32(signing_address_arr); - // TODO go back over to simplify accountID type - let second_signing_address_conversion = SubxtAccountId32::from_str(&signing_address) - .map_err(|_| UserErr::StringError("Account Conversion"))?; let api = get_api(&app_state.configuration.endpoint).await?; let rpc = get_rpc(&app_state.configuration.endpoint).await?; - - let key_visibility = get_key_visibility(&api, &rpc, &second_signing_address_conversion).await?; - - if key_visibility != KeyVisibility::Public && !signed_msg.verify() { + let user_details = get_registered_details( + &api, + &rpc, + &SubxtAccountId32::from(signing_address_converted.clone()), + ) + .await?; + if user_details.key_visibility.0 != KeyVisibility::Public && !signed_msg.verify() { return Err(UserErr::InvalidSignature("Invalid signature.")); } let decrypted_message = @@ -140,8 +140,8 @@ pub async fn sign_tx( if !has_key { recover_key(&api, &rpc, &app_state.kv_store, &signer, signing_address).await? } - // TODO if no program at pointer fail (security what if someone pulls it) - let program = get_program(&api, &rpc, &second_signing_address_conversion).await?; + + let program = get_program(&api, &rpc, &user_details.program_pointer).await?; let mut runtime = Runtime::new(); let signature_request = SignatureRequest { message, auxilary_data }; @@ -158,7 +158,7 @@ pub async fn sign_tx( &app_state, tx_id, signing_address_subxt, - key_visibility, + user_details.key_visibility.0, ) .await .map(|signature| { diff --git a/crypto/server/src/user/tests.rs b/crypto/server/src/user/tests.rs index 736f8bc25..d584ea10d 100644 --- a/crypto/server/src/user/tests.rs +++ b/crypto/server/src/user/tests.rs @@ -37,7 +37,7 @@ use subxt::{ sp_runtime::AccountId32, }, tx::PairSigner, - utils::{AccountId32 as subxtAccountId32, Static}, + utils::{AccountId32 as subxtAccountId32, Static, H256}, Config, OnlineClient, }; use synedrion::{ @@ -74,7 +74,7 @@ use crate::{ substrate::{get_subgroup, make_register, return_all_addresses_of_subgroup}, tests::{ check_if_confirmation, create_clients, initialize_test_logger, run_to_block, - setup_client, spawn_testing_validators, update_programs, + setup_client, spawn_testing_validators, update_pointer, update_programs, }, user::send_key, }, @@ -113,8 +113,8 @@ async fn test_sign_tx_no_chain() { let substrate_context = test_context_stationary().await; let entropy_api = get_api(&substrate_context.node_proc.ws_url).await.unwrap(); - update_programs(&entropy_api, &one.pair(), &one.pair(), TEST_PROGRAM_WASM_BYTECODE.to_owned()) - .await; + let program_hash = + update_programs(&entropy_api, &two.pair(), TEST_PROGRAM_WASM_BYTECODE.to_owned()).await; let validators_info = vec![ ValidatorInfo { @@ -174,6 +174,16 @@ async fn test_sign_tx_no_chain() { (validator_ips[1].clone(), X25519_PUBLIC_KEYS[1]), ]; + generic_msg.timestamp = SystemTime::now(); + // test points to no program + let test_no_program = + submit_transaction_requests(validator_ips_and_keys.clone(), generic_msg.clone(), one).await; + + for res in test_no_program { + assert_eq!(res.unwrap().text().await.unwrap(), "No program set"); + } + + update_pointer(&entropy_api, &one.pair(), &one.pair(), program_hash).await; generic_msg.timestamp = SystemTime::now(); let test_user_res = submit_transaction_requests(validator_ips_and_keys.clone(), generic_msg.clone(), one).await; @@ -189,6 +199,17 @@ async fn test_sign_tx_no_chain() { generic_msg.timestamp = SystemTime::now(); // test failing cases + let test_program_pulled = + submit_transaction_requests(validator_ips_and_keys.clone(), generic_msg.clone(), two).await; + + for res in test_program_pulled { + assert_eq!( + res.unwrap().text().await.unwrap(), + "Not Registering error: Register Onchain first" + ); + } + + generic_msg.timestamp = SystemTime::now(); let test_user_res_not_registered = submit_transaction_requests(validator_ips_and_keys.clone(), generic_msg.clone(), two).await; @@ -718,11 +739,13 @@ pub async fn put_register_request_on_chain( let sig_req_account = PairSigner::::new(sig_req_keyring.pair()); - let empty_program = vec![]; + let empty_program_hash: H256 = + H256::from_str("0x0e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8") + .unwrap(); let registering_tx = entropy::tx().relayer().register( program_modification_account, Static(key_visibility), - empty_program, + empty_program_hash, ); api.tx() @@ -752,8 +775,9 @@ async fn test_sign_tx_user_participates() { let substrate_context = test_context_stationary().await; let entropy_api = get_api(&substrate_context.node_proc.ws_url).await.unwrap(); - update_programs(&entropy_api, &one.pair(), &one.pair(), TEST_PROGRAM_WASM_BYTECODE.to_owned()) - .await; + let program_hash = + update_programs(&entropy_api, &two.pair(), TEST_PROGRAM_WASM_BYTECODE.to_owned()).await; + update_pointer(&entropy_api, &one.pair(), &one.pair(), program_hash).await; let validators_info = vec![ ValidatorInfo { diff --git a/crypto/server/tests/protocol_wasm.rs b/crypto/server/tests/protocol_wasm.rs index 9b0853587..3d47a43f9 100644 --- a/crypto/server/tests/protocol_wasm.rs +++ b/crypto/server/tests/protocol_wasm.rs @@ -19,6 +19,7 @@ use std::{ use subxt::{ backend::legacy::LegacyRpcMethods, ext::sp_core::{sr25519::Signature, Bytes}, + utils::{AccountId32 as SubxtAccountId32, H256}, Config, OnlineClient, }; use synedrion::KeyShare; @@ -58,8 +59,7 @@ async fn test_wasm_sign_tx_user_participates() { let substrate_context = test_context_stationary().await; let entropy_api = get_api(&substrate_context.node_proc.ws_url).await.unwrap(); - update_program(&entropy_api, &one.pair(), &one.pair(), TEST_PROGRAM_WASM_BYTECODE.to_owned()) - .await; + update_program(&entropy_api, &one.pair(), TEST_PROGRAM_WASM_BYTECODE.to_owned()).await; let validators_info = vec![ ValidatorInfo { @@ -360,7 +360,7 @@ async fn wait_for_register_confirmation( account_id: AccountId32, api: OnlineClient, rpc: LegacyRpcMethods, -) -> RegisteredInfo { +) -> RegisteredInfo { let account_id: ::AccountId = account_id.into(); let registered_query = entropy::storage().relayer().registered(account_id); for _ in 0..30 { diff --git a/crypto/testing-utils/src/test_client/mod.rs b/crypto/testing-utils/src/test_client/mod.rs index d6d7f7ac0..474a5b08f 100644 --- a/crypto/testing-utils/src/test_client/mod.rs +++ b/crypto/testing-utils/src/test_client/mod.rs @@ -1,14 +1,13 @@ //! Client functionality used in itegration tests use entropy_shared::KeyVisibility; +use server::chain_api::{entropy, EntropyConfig}; +use std::str::FromStr; use subxt::{ - ext::sp_core::{sr25519, Pair}, + ext::sp_core::sr25519, tx::PairSigner, - utils::{AccountId32 as SubxtAccountId32, Static}, + utils::{AccountId32 as SubxtAccountId32, Static, H256}, OnlineClient, }; - -use server::chain_api::{entropy, EntropyConfig}; - /// Submit a register transaction pub async fn put_register_request_on_chain( api: &OnlineClient, @@ -18,11 +17,13 @@ pub async fn put_register_request_on_chain( ) { let sig_req_account = PairSigner::::new(sig_req_account); - let empty_program = vec![]; + let empty_program_hash: H256 = + H256::from_str("0x0e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8") + .unwrap(); let registering_tx = entropy::tx().relayer().register( program_modification_account, Static(key_visibility), - empty_program, + empty_program_hash, ); api.tx() @@ -40,14 +41,11 @@ pub async fn put_register_request_on_chain( /// Set or update the program associated with a given entropy account pub async fn update_program( entropy_api: &OnlineClient, - sig_req_account: &sr25519::Pair, program_modification_account: &sr25519::Pair, initial_program: Vec, ) { // update/set their programs - let update_program_tx = entropy::tx() - .programs() - .update_program(SubxtAccountId32::from(sig_req_account.public()), initial_program); + let update_program_tx = entropy::tx().programs().set_program(initial_program); let program_modification_account = PairSigner::::new(program_modification_account.clone()); diff --git a/pallets/programs/src/lib.rs b/pallets/programs/src/lib.rs index 6e34e9d7b..8ee4a5dd6 100644 --- a/pallets/programs/src/lib.rs +++ b/pallets/programs/src/lib.rs @@ -39,7 +39,7 @@ pub mod pallet { use frame_support::{ dispatch::Vec, - pallet_prelude::{ResultQuery, *}, + pallet_prelude::*, traits::{Currency, ReservableCurrency}, }; use frame_system::{pallet_prelude::*, Config as SystemConfig}; @@ -146,12 +146,12 @@ pub mod pallet { new_program_length as u32 <= T::MaxBytecodeLength::get(), Error::::ProgramLengthExceeded ); - ensure!(Self::bytecode(&program_hash).is_none(), Error::::ProgramAlreadySet); + ensure!(Self::bytecode(program_hash).is_none(), Error::::ProgramAlreadySet); Self::reserve_program_deposit(&program_modification_account, new_program_length)?; Bytecode::::insert( - &program_hash, + program_hash, &ProgramInfo { bytecode: new_program.clone(), program_modification_account: program_modification_account.clone(), @@ -179,7 +179,7 @@ pub mod pallet { pub fn remove_program(origin: OriginFor, program_hash: T::Hash) -> DispatchResult { let program_modification_account = ensure_signed(origin)?; let old_program_info = - Self::bytecode(&program_hash).ok_or(Error::::NoProgramDefined)?; + Self::bytecode(program_hash).ok_or(Error::::NoProgramDefined)?; ensure!( old_program_info.program_modification_account == program_modification_account, Error::::NotAuthorized @@ -199,7 +199,7 @@ pub mod pallet { Ok(()) }, )?; - Bytecode::::remove(&program_hash); + Bytecode::::remove(program_hash); Self::deposit_event(Event::ProgramRemoved { program_modification_account, old_program_hash: program_hash, diff --git a/pallets/relayer/src/mock.rs b/pallets/relayer/src/mock.rs index d156f0370..e6cb9ea5c 100644 --- a/pallets/relayer/src/mock.rs +++ b/pallets/relayer/src/mock.rs @@ -298,12 +298,14 @@ impl pallet_relayer::Config for Test { parameter_types! { pub const MaxBytecodeLength: u32 = 3; pub const ProgramDepositPerByte: u32 = 5; + pub const MaxOwnedPrograms: u32 = 5; } impl pallet_programs::Config for Test { type Currency = Balances; type MaxBytecodeLength = MaxBytecodeLength; type ProgramDepositPerByte = ProgramDepositPerByte; + type MaxOwnedPrograms = MaxOwnedPrograms; type RuntimeEvent = RuntimeEvent; type WeightInfo = (); } From eb66a9f6aac9ec0f950fb97102a00d71481a8f2d Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Fri, 1 Dec 2023 13:19:28 -0500 Subject: [PATCH 08/48] fix tests --- pallets/propagation/src/mock.rs | 2 ++ pallets/propagation/src/tests.rs | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/pallets/propagation/src/mock.rs b/pallets/propagation/src/mock.rs index df332822b..ff419374d 100644 --- a/pallets/propagation/src/mock.rs +++ b/pallets/propagation/src/mock.rs @@ -300,12 +300,14 @@ impl pallet_relayer::Config for Test { parameter_types! { pub const MaxBytecodeLength: u32 = 3; pub const ProgramDepositPerByte: u32 = 5; + pub const MaxOwnedPrograms: u32 = 5; } impl pallet_programs::Config for Test { type Currency = (); type MaxBytecodeLength = MaxBytecodeLength; type ProgramDepositPerByte = ProgramDepositPerByte; + type MaxOwnedPrograms = MaxOwnedPrograms; type RuntimeEvent = RuntimeEvent; type WeightInfo = (); } diff --git a/pallets/propagation/src/tests.rs b/pallets/propagation/src/tests.rs index 01d9754d5..4476a64f8 100644 --- a/pallets/propagation/src/tests.rs +++ b/pallets/propagation/src/tests.rs @@ -60,8 +60,18 @@ fn knows_how_to_mock_several_http_calls() { Propagation::post_dkg(1).unwrap(); System::set_block_number(3); - assert_ok!(Relayer::register(RuntimeOrigin::signed(1), 2, KeyVisibility::Public, vec![],)); - assert_ok!(Relayer::register(RuntimeOrigin::signed(2), 3, KeyVisibility::Public, vec![],)); + assert_ok!(Relayer::register( + RuntimeOrigin::signed(1), + 2, + KeyVisibility::Public, + ::Hash::default(), + )); + assert_ok!(Relayer::register( + RuntimeOrigin::signed(2), + 3, + KeyVisibility::Public, + ::Hash::default(), + )); // full send Propagation::post_dkg(4).unwrap(); // test pruning From b6937929691eaaebb6c22020be2850e72571d702 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Fri, 1 Dec 2023 14:23:31 -0500 Subject: [PATCH 09/48] remove program bench --- pallets/programs/src/benchmarking.rs | 44 ++++- pallets/programs/src/lib.rs | 17 +- pallets/programs/src/tests.rs | 2 +- pallets/programs/src/weights.rs | 77 ++++++--- pallets/relayer/src/benchmarking.rs | 21 ++- runtime/src/weights/frame_benchmarking.rs | 20 +-- .../frame_election_provider_support.rs | 26 +-- runtime/src/weights/frame_system.rs | 32 ++-- runtime/src/weights/pallet_bags_list.rs | 8 +- runtime/src/weights/pallet_balances.rs | 30 ++-- runtime/src/weights/pallet_bounties.rs | 14 +- runtime/src/weights/pallet_collective.rs | 112 +++++++------ runtime/src/weights/pallet_democracy.rs | 124 +++++++------- .../pallet_election_provider_multi_phase.rs | 58 +++---- .../src/weights/pallet_elections_phragmen.rs | 70 ++++---- runtime/src/weights/pallet_free_tx.rs | 10 +- runtime/src/weights/pallet_identity.rs | 144 ++++++++-------- runtime/src/weights/pallet_im_online.rs | 10 +- runtime/src/weights/pallet_indices.rs | 22 +-- runtime/src/weights/pallet_membership.rs | 46 +++-- runtime/src/weights/pallet_multisig.rs | 66 ++++---- .../src/weights/pallet_nomination_pools.rs | 70 ++++---- runtime/src/weights/pallet_preimage.rs | 44 ++--- runtime/src/weights/pallet_programs.rs | 38 +++-- runtime/src/weights/pallet_proxy.rs | 80 +++++---- runtime/src/weights/pallet_recovery.rs | 30 ++-- runtime/src/weights/pallet_relayer.rs | 64 ++++--- runtime/src/weights/pallet_scheduler.rs | 50 +++--- runtime/src/weights/pallet_session.rs | 6 +- runtime/src/weights/pallet_staking.rs | 158 +++++++++--------- .../src/weights/pallet_staking_extension.rs | 28 ++-- runtime/src/weights/pallet_sudo.rs | 10 +- runtime/src/weights/pallet_timestamp.rs | 8 +- runtime/src/weights/pallet_tips.rs | 30 ++-- .../src/weights/pallet_transaction_pause.rs | 6 +- .../src/weights/pallet_transaction_storage.rs | 16 +- runtime/src/weights/pallet_treasury.rs | 22 +-- runtime/src/weights/pallet_utility.rs | 28 ++-- runtime/src/weights/pallet_vesting.rs | 88 +++++----- 39 files changed, 905 insertions(+), 824 deletions(-) diff --git a/pallets/programs/src/benchmarking.rs b/pallets/programs/src/benchmarking.rs index 7ea0f953f..9a6e65261 100644 --- a/pallets/programs/src/benchmarking.rs +++ b/pallets/programs/src/benchmarking.rs @@ -1,9 +1,12 @@ //! Benchmarking setup for pallet-propgation use frame_benchmarking::{benchmarks, impl_benchmark_test_suite, vec, whitelisted_caller}; -use frame_support::traits::Currency; +use frame_support::{ + traits::{Currency, Get}, + BoundedVec, +}; use frame_system::{EventRecord, RawOrigin}; -use sp_runtime::Saturating; +use sp_runtime::{traits::Hash, Saturating}; use super::*; #[allow(unused)] @@ -21,21 +24,48 @@ fn assert_last_event(generic_event: ::RuntimeEvent) { benchmarks! { - update_program { + set_program { let program = vec![10]; + let program_hash = T::Hashing::hash(&program); let program_modification_account: T::AccountId = whitelisted_caller(); let sig_req_account: T::AccountId = whitelisted_caller(); let value = CurrencyOf::::minimum_balance().saturating_mul(1_000_000_000u32.into()); let _ = CurrencyOf::::make_free_balance_be(&program_modification_account, value); - >::insert(program_modification_account.clone(), sig_req_account.clone(), ()); - }: _(RawOrigin::Signed(program_modification_account.clone()), sig_req_account, program.clone()) + }: _(RawOrigin::Signed(program_modification_account.clone()), program.clone()) verify { assert_last_event::( - Event::::ProgramUpdated { + Event::::ProgramCreated { program_modification_account, - new_program: program + program_hash + }.into() + ); + } + + remove_program { + let p in 0..T::MaxOwnedPrograms::get(); + let program = vec![10]; + let program_hash = T::Hashing::hash(&program); + let random_program = vec![11]; + let random_hash = T::Hashing::hash(&random_program); + let program_modification_account: T::AccountId = whitelisted_caller(); + + let value = CurrencyOf::::minimum_balance().saturating_mul(1_000_000_000u32.into()); + let _ = CurrencyOf::::make_free_balance_be(&program_modification_account, value); + >::insert(program_hash.clone(), ProgramInfo {bytecode: program, program_modification_account: program_modification_account.clone()}); + let mut program_hashes = vec![program_hash.clone()]; + for _ in 1..p { + program_hashes.push(random_hash); + } + let bounded_program_hashes: BoundedVec = BoundedVec::try_from(program_hashes).unwrap(); + >::insert(program_modification_account.clone(), bounded_program_hashes); + }: _(RawOrigin::Signed(program_modification_account.clone()), program_hash.clone()) + verify { + assert_last_event::( + Event::::ProgramRemoved { + program_modification_account, + old_program_hash: program_hash }.into() ); } diff --git a/pallets/programs/src/lib.rs b/pallets/programs/src/lib.rs index 8ee4a5dd6..c3ac8ffaa 100644 --- a/pallets/programs/src/lib.rs +++ b/pallets/programs/src/lib.rs @@ -137,7 +137,7 @@ pub mod pallet { /// /// Note that the call must be sent from a program-modification account. #[pallet::call_index(0)] - #[pallet::weight({::WeightInfo::update_program()})] + #[pallet::weight({::WeightInfo::set_program()})] pub fn set_program(origin: OriginFor, new_program: Vec) -> DispatchResult { let program_modification_account = ensure_signed(origin)?; let program_hash = T::Hashing::hash(&new_program); @@ -175,8 +175,11 @@ pub mod pallet { #[pallet::call_index(1)] // TODO remove program bench - #[pallet::weight({::WeightInfo::update_program()})] - pub fn remove_program(origin: OriginFor, program_hash: T::Hash) -> DispatchResult { + #[pallet::weight({::WeightInfo::remove_program( ::MaxOwnedPrograms::get())})] + pub fn remove_program( + origin: OriginFor, + program_hash: T::Hash, + ) -> DispatchResultWithPostInfo { let program_modification_account = ensure_signed(origin)?; let old_program_info = Self::bytecode(program_hash).ok_or(Error::::NoProgramDefined)?; @@ -188,12 +191,14 @@ pub mod pallet { &old_program_info.program_modification_account, old_program_info.bytecode.len(), ); + let mut owned_programs_length = 0; OwnedPrograms::::try_mutate( &program_modification_account, |owned_programs| -> Result<(), DispatchError> { + owned_programs_length = owned_programs.len(); let pos = owned_programs - .binary_search(&program_hash) - .ok() + .iter() + .position(|&h| h == program_hash) .ok_or(Error::::NotAuthorized)?; owned_programs.remove(pos); Ok(()) @@ -204,7 +209,7 @@ pub mod pallet { program_modification_account, old_program_hash: program_hash, }); - Ok(()) + Ok(Some(::WeightInfo::remove_program(owned_programs_length as u32)).into()) } } diff --git a/pallets/programs/src/tests.rs b/pallets/programs/src/tests.rs index 22bf46256..f867a8ca3 100644 --- a/pallets/programs/src/tests.rs +++ b/pallets/programs/src/tests.rs @@ -111,7 +111,7 @@ fn remove_program() { ); assert_ok!(ProgramsPallet::remove_program( - RcaruntimeOrigin::signed(PROGRAM_MODIFICATION_ACCOUNT), + RuntimeOrigin::signed(PROGRAM_MODIFICATION_ACCOUNT), program_hash.clone() )); assert!(ProgramsPallet::bytecode(program_hash).is_none(), "Program removed"); diff --git a/pallets/programs/src/weights.rs b/pallets/programs/src/weights.rs index 912785e5c..b859c2ca5 100644 --- a/pallets/programs/src/weights.rs +++ b/pallets/programs/src/weights.rs @@ -37,40 +37,79 @@ use core::marker::PhantomData; /// Weight functions needed for pallet_programs. pub trait WeightInfo { - fn update_program() -> Weight; + fn set_program() -> Weight; + fn remove_program(p: u32) -> Weight; } /// Weights for pallet_programs using the Substrate node and recommended hardware. pub struct SubstrateWeight(PhantomData); impl WeightInfo for SubstrateWeight { - /// Storage: `Programs::AllowedToModifyProgram` (r:1 w:0) - /// Proof: `Programs::AllowedToModifyProgram` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Programs::Bytecode` (r:1 w:1) /// Proof: `Programs::Bytecode` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn update_program() -> Weight { + /// Storage: `Programs::OwnedPrograms` (r:1 w:1) + /// Proof: `Programs::OwnedPrograms` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn set_program() -> Weight { // Proof Size summary in bytes: - // Measured: `336` - // Estimated: `3801` - // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(29_000_000, 3801) - .saturating_add(T::DbWeight::get().reads(2_u64)) - .saturating_add(T::DbWeight::get().writes(1_u64)) + // Measured: `142` + // Estimated: `3607` + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(27_000_000, 0) + .saturating_add(Weight::from_parts(0, 3607)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Programs::Bytecode` (r:1 w:1) + /// Proof: `Programs::Bytecode` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Programs::OwnedPrograms` (r:1 w:1) + /// Proof: `Programs::OwnedPrograms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[0, 25]`. + fn remove_program(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `326 + p * (32 ±0)` + // Estimated: `3809 + p * (31 ±0)` + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(26_938_669, 0) + .saturating_add(Weight::from_parts(0, 3809)) + // Standard Error: 47_904 + .saturating_add(Weight::from_parts(136_174, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 31).saturating_mul(p.into())) } } // For backwards compatibility and tests impl WeightInfo for () { - /// Storage: `Programs::AllowedToModifyProgram` (r:1 w:0) - /// Proof: `Programs::AllowedToModifyProgram` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Programs::Bytecode` (r:1 w:1) /// Proof: `Programs::Bytecode` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn update_program() -> Weight { + /// Storage: `Programs::OwnedPrograms` (r:1 w:1) + /// Proof: `Programs::OwnedPrograms` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn set_program() -> Weight { + // Proof Size summary in bytes: + // Measured: `142` + // Estimated: `3607` + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(27_000_000, 0) + .saturating_add(Weight::from_parts(0, 3607)) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + } + /// Storage: `Programs::Bytecode` (r:1 w:1) + /// Proof: `Programs::Bytecode` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Programs::OwnedPrograms` (r:1 w:1) + /// Proof: `Programs::OwnedPrograms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[0, 25]`. + fn remove_program(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `336` - // Estimated: `3801` - // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(29_000_000, 3801) - .saturating_add(RocksDbWeight::get().reads(2_u64)) - .saturating_add(RocksDbWeight::get().writes(1_u64)) + // Measured: `326 + p * (32 ±0)` + // Estimated: `3809 + p * (31 ±0)` + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(26_938_669, 0) + .saturating_add(Weight::from_parts(0, 3809)) + // Standard Error: 47_904 + .saturating_add(Weight::from_parts(136_174, 0).saturating_mul(p.into())) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 31).saturating_mul(p.into())) } } diff --git a/pallets/relayer/src/benchmarking.rs b/pallets/relayer/src/benchmarking.rs index 1a8486d62..e70e05e2b 100644 --- a/pallets/relayer/src/benchmarking.rs +++ b/pallets/relayer/src/benchmarking.rs @@ -12,6 +12,7 @@ use pallet_staking_extension::{ benchmarking::create_validators, IsValidatorSynced, ServerInfo, SigningGroups, ThresholdServers, ThresholdToStash, }; +use sp_runtime::traits::Hash; use super::*; #[allow(unused)] @@ -58,12 +59,13 @@ benchmarks! { // run let p in 0..::MaxBytecodeLength::get(); let program = vec![0u8; p as usize]; + let program_hash = T::Hashing::hash(&program); let program_modification_account: T::AccountId = whitelisted_caller(); let sig_req_account: T::AccountId = whitelisted_caller(); let balance = ::Currency::minimum_balance() * 100u32.into(); let _ = ::Currency::make_free_balance_be(&sig_req_account, balance); - }: _(RawOrigin::Signed(sig_req_account.clone()), program_modification_account, KeyVisibility::Public, program) + }: _(RawOrigin::Signed(sig_req_account.clone()), program_modification_account, KeyVisibility::Public, program_hash) verify { assert_last_event::(Event::SignalRegister(sig_req_account.clone()).into()); assert!(Registering::::contains_key(sig_req_account)); @@ -71,13 +73,15 @@ benchmarks! { prune_registration { let program_modification_account: T::AccountId = whitelisted_caller(); + let program = vec![0u8]; + let program_hash = T::Hashing::hash(&program); let sig_req_account: T::AccountId = whitelisted_caller(); let balance = ::Currency::minimum_balance() * 100u32.into(); let _ = ::Currency::make_free_balance_be(&sig_req_account, balance); >::insert(&sig_req_account, RegisteringDetails:: { program_modification_account: sig_req_account.clone(), confirmations: vec![], - program: vec![], + program_pointer: program_hash, key_visibility: KeyVisibility::Public, verifying_key: Some(BoundedVec::default()) }); @@ -88,6 +92,8 @@ benchmarks! { confirm_register_registering { let c in 0 .. SIG_PARTIES as u32; + let program = vec![0u8]; + let program_hash = T::Hashing::hash(&program); let sig_req_account: T::AccountId = whitelisted_caller(); let validator_account: T::AccountId = whitelisted_caller(); let threshold_account: T::AccountId = whitelisted_caller(); @@ -101,7 +107,7 @@ benchmarks! { >::insert(&sig_req_account, RegisteringDetails:: { program_modification_account: sig_req_account.clone(), confirmations: vec![], - program: vec![], + program_pointer: program_hash, key_visibility: KeyVisibility::Public, verifying_key: None }); @@ -114,6 +120,9 @@ benchmarks! { confirm_register_failed_registering { let c in 0 .. SIG_PARTIES as u32; + let program = vec![0u8]; + let program_hash = T::Hashing::hash(&program); + let sig_req_account: T::AccountId = whitelisted_caller(); let validator_account: T::AccountId = whitelisted_caller(); let threshold_account: T::AccountId = whitelisted_caller(); @@ -129,7 +138,7 @@ benchmarks! { >::insert(&sig_req_account, RegisteringDetails:: { program_modification_account: sig_req_account.clone(), confirmations: confirmation, - program: vec![], + program_pointer: program_hash, key_visibility: KeyVisibility::Public, verifying_key: Some(BoundedVec::default()) }); @@ -143,6 +152,8 @@ benchmarks! { confirm_register_registered { let c in 0 .. SIG_PARTIES as u32; + let program = vec![0u8]; + let program_hash = T::Hashing::hash(&program); let sig_req_account: T::AccountId = whitelisted_caller(); let validator_account: T::AccountId = whitelisted_caller(); let threshold_account: T::AccountId = whitelisted_caller(); @@ -157,7 +168,7 @@ confirm_register_registered { >::insert(&sig_req_account, RegisteringDetails:: { program_modification_account: sig_req_account.clone(), confirmations: confirmation, - program: vec![], + program_pointer: program_hash, key_visibility: KeyVisibility::Public, verifying_key: None }); diff --git a/runtime/src/weights/frame_benchmarking.rs b/runtime/src/weights/frame_benchmarking.rs index 5b384c6cc..fba946838 100644 --- a/runtime/src/weights/frame_benchmarking.rs +++ b/runtime/src/weights/frame_benchmarking.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `frame_benchmarking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -41,7 +41,7 @@ impl frame_benchmarking::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(200_000, 0) + Weight::from_parts(400_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -50,7 +50,7 @@ impl frame_benchmarking::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(100_000, 0) + Weight::from_parts(400_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -59,7 +59,7 @@ impl frame_benchmarking::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(400_000, 0) + Weight::from_parts(200_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -68,15 +68,15 @@ impl frame_benchmarking::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(100_000, 0) + Weight::from_parts(600_000, 0) .saturating_add(Weight::from_parts(0, 0)) } fn hashing() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 23_829_000_000 picoseconds. - Weight::from_parts(23_965_000_000, 0) + // Minimum execution time: 25_891_000_000 picoseconds. + Weight::from_parts(26_047_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 100]`. @@ -85,9 +85,9 @@ impl frame_benchmarking::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(29_500_000, 0) + Weight::from_parts(0, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_037_694 - .saturating_add(Weight::from_parts(33_024_000, 0).saturating_mul(i.into())) + // Standard Error: 442_831 + .saturating_add(Weight::from_parts(33_446_000, 0).saturating_mul(i.into())) } } \ No newline at end of file diff --git a/runtime/src/weights/frame_election_provider_support.rs b/runtime/src/weights/frame_election_provider_support.rs index e9a2c698e..a8ce862f2 100644 --- a/runtime/src/weights/frame_election_provider_support.rs +++ b/runtime/src/weights/frame_election_provider_support.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `frame_election_provider_support` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -42,13 +42,13 @@ impl frame_election_provider_support::WeightInfo for We // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_293_000_000 picoseconds. - Weight::from_parts(5_293_000_000, 0) + // Minimum execution time: 5_452_000_000 picoseconds. + Weight::from_parts(5_452_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 739_372 - .saturating_add(Weight::from_parts(3_569_522, 0).saturating_mul(v.into())) - // Standard Error: 76_409_130 - .saturating_add(Weight::from_parts(874_128_510, 0).saturating_mul(d.into())) + // Standard Error: 754_860 + .saturating_add(Weight::from_parts(4_022_198, 0).saturating_mul(v.into())) + // Standard Error: 78_009_756 + .saturating_add(Weight::from_parts(870_614_043, 0).saturating_mul(d.into())) } /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. @@ -57,12 +57,12 @@ impl frame_election_provider_support::WeightInfo for We // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_511_000_000 picoseconds. - Weight::from_parts(3_511_000_000, 0) + // Minimum execution time: 3_751_000_000 picoseconds. + Weight::from_parts(3_751_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 619_301 - .saturating_add(Weight::from_parts(3_146_597, 0).saturating_mul(v.into())) - // Standard Error: 64_000_641 - .saturating_add(Weight::from_parts(789_853_976, 0).saturating_mul(d.into())) + // Standard Error: 622_715 + .saturating_add(Weight::from_parts(3_210_798, 0).saturating_mul(v.into())) + // Standard Error: 64_353_429 + .saturating_add(Weight::from_parts(799_276_137, 0).saturating_mul(d.into())) } } \ No newline at end of file diff --git a/runtime/src/weights/frame_system.rs b/runtime/src/weights/frame_system.rs index d52443cb9..311b27cae 100644 --- a/runtime/src/weights/frame_system.rs +++ b/runtime/src/weights/frame_system.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -43,8 +43,8 @@ impl frame_system::WeightInfo for WeightInfo { // Minimum execution time: 2_000_000 picoseconds. Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2 - .saturating_add(Weight::from_parts(189, 0).saturating_mul(b.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(204, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { @@ -54,8 +54,8 @@ impl frame_system::WeightInfo for WeightInfo { // Minimum execution time: 6_000_000 picoseconds. Weight::from_parts(6_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 4 - .saturating_add(Weight::from_parts(1_084, 0).saturating_mul(b.into())) + // Standard Error: 6 + .saturating_add(Weight::from_parts(1_182, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -65,8 +65,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(3_000_000, 0) + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(4_000_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -79,8 +79,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 73_138_000_000 picoseconds. - Weight::from_parts(73_626_000_000, 0) + // Minimum execution time: 77_870_000_000 picoseconds. + Weight::from_parts(77_964_000_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -95,8 +95,8 @@ impl frame_system::WeightInfo for WeightInfo { // Minimum execution time: 2_000_000 picoseconds. Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 5_661 - .saturating_add(Weight::from_parts(669_066, 0).saturating_mul(i.into())) + // Standard Error: 8_764 + .saturating_add(Weight::from_parts(732_933, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -109,8 +109,8 @@ impl frame_system::WeightInfo for WeightInfo { // Minimum execution time: 2_000_000 picoseconds. Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 9_205 - .saturating_add(Weight::from_parts(512_733, 0).saturating_mul(i.into())) + // Standard Error: 5_024 + .saturating_add(Weight::from_parts(523_466, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -121,10 +121,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `72 + p * (69 ±0)` // Estimated: `82 + p * (70 ±0)` // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(2_100_000, 0) + Weight::from_parts(4_000_000, 0) .saturating_add(Weight::from_parts(0, 82)) - // Standard Error: 29_033 - .saturating_add(Weight::from_parts(932_200, 0).saturating_mul(p.into())) + // Standard Error: 7_637 + .saturating_add(Weight::from_parts(977_866, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) diff --git a/runtime/src/weights/pallet_bags_list.rs b/runtime/src/weights/pallet_bags_list.rs index 166a12513..9c5ae5027 100644 --- a/runtime/src/weights/pallet_bags_list.rs +++ b/runtime/src/weights/pallet_bags_list.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_bags_list` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -47,8 +47,8 @@ impl pallet_bags_list::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1707` // Estimated: `11506` - // Minimum execution time: 47_000_000 picoseconds. - Weight::from_parts(48_000_000, 0) + // Minimum execution time: 53_000_000 picoseconds. + Weight::from_parts(57_000_000, 0) .saturating_add(Weight::from_parts(0, 11506)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) @@ -65,7 +65,7 @@ impl pallet_bags_list::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1604` // Estimated: `8877` - // Minimum execution time: 49_000_000 picoseconds. + // Minimum execution time: 50_000_000 picoseconds. Weight::from_parts(50_000_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(7)) diff --git a/runtime/src/weights/pallet_balances.rs b/runtime/src/weights/pallet_balances.rs index aebb4cd14..f3990c6e5 100644 --- a/runtime/src/weights/pallet_balances.rs +++ b/runtime/src/weights/pallet_balances.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -41,8 +41,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 50_000_000 picoseconds. - Weight::from_parts(61_000_000, 0) + // Minimum execution time: 54_000_000 picoseconds. + Weight::from_parts(56_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -54,7 +54,7 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `3593` // Minimum execution time: 41_000_000 picoseconds. - Weight::from_parts(51_000_000, 0) + Weight::from_parts(42_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -66,7 +66,7 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `207` // Estimated: `3593` // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + Weight::from_parts(14_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -89,8 +89,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6196` - // Minimum execution time: 50_000_000 picoseconds. - Weight::from_parts(51_000_000, 0) + // Minimum execution time: 55_000_000 picoseconds. + Weight::from_parts(56_000_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -101,8 +101,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 51_000_000 picoseconds. - Weight::from_parts(51_000_000, 0) + // Minimum execution time: 52_000_000 picoseconds. + Weight::from_parts(61_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -113,8 +113,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `207` // Estimated: `3593` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(21_000_000, 0) + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(24_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -126,11 +126,11 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + u * (135 ±0)` // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(27_532_098, 0) + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(17_000_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 54_038 - .saturating_add(Weight::from_parts(14_648_076, 0).saturating_mul(u.into())) + // Standard Error: 62_663 + .saturating_add(Weight::from_parts(15_291_658, 0).saturating_mul(u.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) diff --git a/runtime/src/weights/pallet_bounties.rs b/runtime/src/weights/pallet_bounties.rs index acc2f1a46..d52c553e8 100644 --- a/runtime/src/weights/pallet_bounties.rs +++ b/runtime/src/weights/pallet_bounties.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_bounties` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -48,11 +48,11 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `177` // Estimated: `3593` - // Minimum execution time: 26_000_000 picoseconds. - Weight::from_parts(27_800_000, 0) + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(25_900_000, 0) .saturating_add(Weight::from_parts(0, 3593)) - // Standard Error: 77 - .saturating_add(Weight::from_parts(207, 0).saturating_mul(d.into())) + // Standard Error: 148 + .saturating_add(Weight::from_parts(476, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -114,8 +114,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `369` // Estimated: `3642` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(28_000_000, 0) + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(31_000_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/runtime/src/weights/pallet_collective.rs b/runtime/src/weights/pallet_collective.rs index 7874cc8f2..7327e1da9 100644 --- a/runtime/src/weights/pallet_collective.rs +++ b/runtime/src/weights/pallet_collective.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -53,10 +53,10 @@ impl pallet_collective::WeightInfo for WeightInfo { // Minimum execution time: 13_000_000 picoseconds. Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 146076)) - // Standard Error: 463_384 - .saturating_add(Weight::from_parts(3_407_454, 0).saturating_mul(m.into())) - // Standard Error: 463_384 - .saturating_add(Weight::from_parts(4_926_121, 0).saturating_mul(p.into())) + // Standard Error: 519_212 + .saturating_add(Weight::from_parts(3_815_203, 0).saturating_mul(m.into())) + // Standard Error: 519_212 + .saturating_add(Weight::from_parts(5_157_203, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -68,15 +68,13 @@ impl pallet_collective::WeightInfo for WeightInfo { /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[1, 100]`. - fn execute(b: u32, m: u32, ) -> Weight { + fn execute(_b: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `102 + m * (32 ±0)` // Estimated: `1588 + m * (32 ±0)` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_451_023, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(14_688_304, 0) .saturating_add(Weight::from_parts(0, 1588)) - // Standard Error: 1_233 - .saturating_add(Weight::from_parts(924, 0).saturating_mul(b.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } @@ -86,15 +84,17 @@ impl pallet_collective::WeightInfo for WeightInfo { /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[1, 100]`. - fn propose_execute(_b: u32, m: u32, ) -> Weight { + fn propose_execute(b: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `102 + m * (32 ±0)` // Estimated: `3568 + m * (32 ±0)` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(14_494_462, 0) + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(16_582_775, 0) .saturating_add(Weight::from_parts(0, 3568)) - // Standard Error: 16_930 - .saturating_add(Weight::from_parts(13_399, 0).saturating_mul(m.into())) + // Standard Error: 586 + .saturating_add(Weight::from_parts(299, 0).saturating_mul(b.into())) + // Standard Error: 6_033 + .saturating_add(Weight::from_parts(400, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } @@ -115,15 +115,15 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `307 + m * (32 ±0) + p * (37 ±0)` // Estimated: `3580 + m * (33 ±0) + p * (38 ±0)` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(17_777_027, 0) + // Minimum execution time: 21_000_000 picoseconds. + Weight::from_parts(21_083_054, 0) .saturating_add(Weight::from_parts(0, 3580)) - // Standard Error: 805 - .saturating_add(Weight::from_parts(1_651, 0).saturating_mul(b.into())) - // Standard Error: 8_385 - .saturating_add(Weight::from_parts(16_564, 0).saturating_mul(m.into())) - // Standard Error: 8_284 - .saturating_add(Weight::from_parts(176_417, 0).saturating_mul(p.into())) + // Standard Error: 1_884 + .saturating_add(Weight::from_parts(280, 0).saturating_mul(b.into())) + // Standard Error: 19_612 + .saturating_add(Weight::from_parts(17_206, 0).saturating_mul(m.into())) + // Standard Error: 19_376 + .saturating_add(Weight::from_parts(181_733, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 33).saturating_mul(m.into())) @@ -138,11 +138,11 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `968 + m * (64 ±0)` // Estimated: `4433 + m * (64 ±0)` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(18_278_597, 0) + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(19_542_984, 0) .saturating_add(Weight::from_parts(0, 4433)) - // Standard Error: 22_316 - .saturating_add(Weight::from_parts(25_314, 0).saturating_mul(m.into())) + // Standard Error: 18_133 + .saturating_add(Weight::from_parts(12_586, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) @@ -161,13 +161,13 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `487 + m * (64 ±0) + p * (36 ±0)` // Estimated: `3756 + m * (65 ±0) + p * (39 ±0)` - // Minimum execution time: 21_000_000 picoseconds. - Weight::from_parts(23_252_450, 0) + // Minimum execution time: 22_000_000 picoseconds. + Weight::from_parts(17_454_168, 0) .saturating_add(Weight::from_parts(0, 3756)) - // Standard Error: 29_439 - .saturating_add(Weight::from_parts(15_404, 0).saturating_mul(m.into())) - // Standard Error: 28_435 - .saturating_add(Weight::from_parts(130_662, 0).saturating_mul(p.into())) + // Standard Error: 19_989 + .saturating_add(Weight::from_parts(56_170, 0).saturating_mul(m.into())) + // Standard Error: 19_307 + .saturating_add(Weight::from_parts(190_230, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) @@ -189,14 +189,14 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `523 + b * (1 ±0) + m * (64 ±0) + p * (42 ±0)` // Estimated: `3694 + b * (1 ±0) + m * (64 ±1) + p * (44 ±1)` // Minimum execution time: 32_000_000 picoseconds. - Weight::from_parts(28_327_353, 0) + Weight::from_parts(28_059_775, 0) .saturating_add(Weight::from_parts(0, 3694)) - // Standard Error: 1_664 - .saturating_add(Weight::from_parts(1_265, 0).saturating_mul(b.into())) - // Standard Error: 17_725 - .saturating_add(Weight::from_parts(32_231, 0).saturating_mul(m.into())) - // Standard Error: 17_118 - .saturating_add(Weight::from_parts(191_240, 0).saturating_mul(p.into())) + // Standard Error: 1_388 + .saturating_add(Weight::from_parts(2_545, 0).saturating_mul(b.into())) + // Standard Error: 14_781 + .saturating_add(Weight::from_parts(31_268, 0).saturating_mul(m.into())) + // Standard Error: 14_274 + .saturating_add(Weight::from_parts(187_578, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) @@ -219,13 +219,13 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `507 + m * (64 ±0) + p * (36 ±0)` // Estimated: `3776 + m * (65 ±0) + p * (39 ±0)` - // Minimum execution time: 24_000_000 picoseconds. - Weight::from_parts(22_559_043, 0) + // Minimum execution time: 25_000_000 picoseconds. + Weight::from_parts(24_331_849, 0) .saturating_add(Weight::from_parts(0, 3776)) - // Standard Error: 17_070 - .saturating_add(Weight::from_parts(29_105, 0).saturating_mul(m.into())) - // Standard Error: 16_488 - .saturating_add(Weight::from_parts(164_759, 0).saturating_mul(p.into())) + // Standard Error: 16_639 + .saturating_add(Weight::from_parts(26_826, 0).saturating_mul(m.into())) + // Standard Error: 16_072 + .saturating_add(Weight::from_parts(147_170, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) @@ -249,12 +249,14 @@ impl pallet_collective::WeightInfo for WeightInfo { // Measured: `543 + b * (1 ±0) + m * (64 ±0) + p * (42 ±0)` // Estimated: `3714 + b * (1 ±0) + m * (64 ±1) + p * (44 ±1)` // Minimum execution time: 33_000_000 picoseconds. - Weight::from_parts(36_613_114, 0) + Weight::from_parts(32_617_096, 0) .saturating_add(Weight::from_parts(0, 3714)) - // Standard Error: 16_757 - .saturating_add(Weight::from_parts(24_392, 0).saturating_mul(m.into())) - // Standard Error: 16_183 - .saturating_add(Weight::from_parts(159_481, 0).saturating_mul(p.into())) + // Standard Error: 2_145 + .saturating_add(Weight::from_parts(1_754, 0).saturating_mul(b.into())) + // Standard Error: 22_845 + .saturating_add(Weight::from_parts(24_933, 0).saturating_mul(m.into())) + // Standard Error: 22_062 + .saturating_add(Weight::from_parts(181_378, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) @@ -272,11 +274,11 @@ impl pallet_collective::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `258 + p * (32 ±0)` // Estimated: `1744 + p * (32 ±0)` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(12_317_113, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(14_729_059, 0) .saturating_add(Weight::from_parts(0, 1744)) - // Standard Error: 16_931 - .saturating_add(Weight::from_parts(151_053, 0).saturating_mul(p.into())) + // Standard Error: 17_750 + .saturating_add(Weight::from_parts(122_927, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) diff --git a/runtime/src/weights/pallet_democracy.rs b/runtime/src/weights/pallet_democracy.rs index 530652dea..57385c252 100644 --- a/runtime/src/weights/pallet_democracy.rs +++ b/runtime/src/weights/pallet_democracy.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_democracy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -47,8 +47,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `4734` // Estimated: `18187` - // Minimum execution time: 35_000_000 picoseconds. - Weight::from_parts(35_000_000, 0) + // Minimum execution time: 34_000_000 picoseconds. + Weight::from_parts(37_000_000, 0) .saturating_add(Weight::from_parts(0, 18187)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -59,7 +59,7 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3489` // Estimated: `6695` - // Minimum execution time: 32_000_000 picoseconds. + // Minimum execution time: 31_000_000 picoseconds. Weight::from_parts(32_000_000, 0) .saturating_add(Weight::from_parts(0, 6695)) .saturating_add(T::DbWeight::get().reads(1)) @@ -77,8 +77,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3437` // Estimated: `7260` - // Minimum execution time: 44_000_000 picoseconds. - Weight::from_parts(46_000_000, 0) + // Minimum execution time: 50_000_000 picoseconds. + Weight::from_parts(51_000_000, 0) .saturating_add(Weight::from_parts(0, 7260)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -111,8 +111,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `299` // Estimated: `3666` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(21_000_000, 0) + // Minimum execution time: 22_000_000 picoseconds. + Weight::from_parts(23_000_000, 0) .saturating_add(Weight::from_parts(0, 3666)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -135,8 +135,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `5843` // Estimated: `18187` - // Minimum execution time: 89_000_000 picoseconds. - Weight::from_parts(94_000_000, 0) + // Minimum execution time: 96_000_000 picoseconds. + Weight::from_parts(99_000_000, 0) .saturating_add(Weight::from_parts(0, 18187)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(7)) @@ -149,8 +149,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3349` // Estimated: `6703` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(22_000_000, 0) + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 6703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -161,7 +161,7 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. + // Minimum execution time: 3_000_000 picoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) @@ -172,7 +172,7 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. + // Minimum execution time: 3_000_000 picoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) @@ -189,8 +189,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `219` // Estimated: `3518` - // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(31_000_000, 0) + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(24_000_000, 0) .saturating_add(Weight::from_parts(0, 3518)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(5)) @@ -205,8 +205,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3452` // Estimated: `6703` - // Minimum execution time: 24_000_000 picoseconds. - Weight::from_parts(24_000_000, 0) + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(27_000_000, 0) .saturating_add(Weight::from_parts(0, 6703)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -237,8 +237,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `204` // Estimated: `3518` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) .saturating_add(Weight::from_parts(0, 3518)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -255,10 +255,10 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Measured: `158 + r * (86 ±0)` // Estimated: `1489 + r * (2676 ±0)` // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(6_822_917, 0) + Weight::from_parts(2_260_649, 0) .saturating_add(Weight::from_parts(0, 1489)) - // Standard Error: 40_599 - .saturating_add(Weight::from_parts(2_580_835, 0).saturating_mul(r.into())) + // Standard Error: 81_694 + .saturating_add(Weight::from_parts(2_726_409, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -281,11 +281,11 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `158 + r * (86 ±0)` // Estimated: `18187 + r * (2676 ±0)` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(6_828_932, 0) + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(8_367_009, 0) .saturating_add(Weight::from_parts(0, 18187)) - // Standard Error: 63_326 - .saturating_add(Weight::from_parts(2_645_753, 0).saturating_mul(r.into())) + // Standard Error: 55_507 + .saturating_add(Weight::from_parts(2_720_182, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -304,11 +304,11 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `797 + r * (108 ±0)` // Estimated: `19800 + r * (2676 ±0)` - // Minimum execution time: 33_000_000 picoseconds. - Weight::from_parts(30_415_848, 0) + // Minimum execution time: 37_000_000 picoseconds. + Weight::from_parts(41_808_317, 0) .saturating_add(Weight::from_parts(0, 19800)) - // Standard Error: 140_940 - .saturating_add(Weight::from_parts(3_851_303, 0).saturating_mul(r.into())) + // Standard Error: 98_612 + .saturating_add(Weight::from_parts(3_924_627, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4)) @@ -324,11 +324,11 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `408 + r * (108 ±0)` // Estimated: `13530 + r * (2676 ±0)` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(15_079_729, 0) + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(15_946_543, 0) .saturating_add(Weight::from_parts(0, 13530)) - // Standard Error: 62_079 - .saturating_add(Weight::from_parts(3_707_729, 0).saturating_mul(r.into())) + // Standard Error: 42_466 + .saturating_add(Weight::from_parts(3_897_427, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -341,8 +341,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(3_000_000, 0) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -359,11 +359,11 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `533` // Estimated: `7260` - // Minimum execution time: 21_000_000 picoseconds. - Weight::from_parts(25_589_711, 0) + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(27_179_944, 0) .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 40_903 - .saturating_add(Weight::from_parts(142_485, 0).saturating_mul(r.into())) + // Standard Error: 31_975 + .saturating_add(Weight::from_parts(116_261, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -380,11 +380,11 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `533 + r * (22 ±0)` // Estimated: `7260` - // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(30_732_425, 0) + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(33_302_659, 0) .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 28_465 - .saturating_add(Weight::from_parts(66_414, 0).saturating_mul(r.into())) + // Standard Error: 20_615 + .saturating_add(Weight::from_parts(40_596, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -397,11 +397,11 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `550 + r * (28 ±0)` // Estimated: `7260` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(13_162_141, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(12_624_162, 0) .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 20_322 - .saturating_add(Weight::from_parts(86_411, 0).saturating_mul(r.into())) + // Standard Error: 31_783 + .saturating_add(Weight::from_parts(123_024, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -414,11 +414,11 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `550 + r * (28 ±0)` // Estimated: `7260` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_251_658, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(14_356_815, 0) .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 15_639 - .saturating_add(Weight::from_parts(98_572, 0).saturating_mul(r.into())) + // Standard Error: 21_266 + .saturating_add(Weight::from_parts(84_525, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -432,7 +432,7 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `356` // Estimated: `3556` - // Minimum execution time: 14_000_000 picoseconds. + // Minimum execution time: 15_000_000 picoseconds. Weight::from_parts(15_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(2)) @@ -446,8 +446,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `219` // Estimated: `3518` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(14_000_000, 0) .saturating_add(Weight::from_parts(0, 3518)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -462,8 +462,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `4888` // Estimated: `18187` - // Minimum execution time: 32_000_000 picoseconds. - Weight::from_parts(35_000_000, 0) + // Minimum execution time: 33_000_000 picoseconds. + Weight::from_parts(38_000_000, 0) .saturating_add(Weight::from_parts(0, 18187)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -477,7 +477,7 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Measured: `4755` // Estimated: `18187` // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(33_000_000, 0) + Weight::from_parts(31_000_000, 0) .saturating_add(Weight::from_parts(0, 18187)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -490,8 +490,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `211` // Estimated: `3556` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(12_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -505,7 +505,7 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Measured: `235` // Estimated: `3666` // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + Weight::from_parts(15_000_000, 0) .saturating_add(Weight::from_parts(0, 3666)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/src/weights/pallet_election_provider_multi_phase.rs b/runtime/src/weights/pallet_election_provider_multi_phase.rs index aed8f33b1..43d6137b9 100644 --- a/runtime/src/weights/pallet_election_provider_multi_phase.rs +++ b/runtime/src/weights/pallet_election_provider_multi_phase.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_election_provider_multi_phase` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -55,8 +55,8 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `880` // Estimated: `3481` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + // Minimum execution time: 18_000_000 picoseconds. + Weight::from_parts(20_000_000, 0) .saturating_add(Weight::from_parts(0, 3481)) .saturating_add(T::DbWeight::get().reads(8)) } @@ -82,7 +82,7 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `80` // Estimated: `1565` - // Minimum execution time: 11_000_000 picoseconds. + // Minimum execution time: 12_000_000 picoseconds. Weight::from_parts(12_000_000, 0) .saturating_add(Weight::from_parts(0, 1565)) .saturating_add(T::DbWeight::get().reads(2)) @@ -96,8 +96,8 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `207` // Estimated: `3593` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(35_000_000, 0) + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(31_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -109,7 +109,7 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Measured: `207` // Estimated: `3593` // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(24_000_000, 0) + Weight::from_parts(20_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -126,11 +126,11 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 162_000_000 picoseconds. - Weight::from_parts(162_000_000, 0) + // Minimum execution time: 213_000_000 picoseconds. + Weight::from_parts(213_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 16_416 - .saturating_add(Weight::from_parts(149_529, 0).saturating_mul(v.into())) + // Standard Error: 20_498 + .saturating_add(Weight::from_parts(125_375, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `ElectionProviderMultiPhase::SignedSubmissionIndices` (r:1 w:1) @@ -157,13 +157,11 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `289 + a * (768 ±0) + d * (48 ±0)` // Estimated: `3910 + a * (768 ±0) + d * (49 ±0)` - // Minimum execution time: 237_000_000 picoseconds. - Weight::from_parts(237_000_000, 0) + // Minimum execution time: 267_000_000 picoseconds. + Weight::from_parts(117_250_793, 0) .saturating_add(Weight::from_parts(0, 3910)) - // Standard Error: 49_240 - .saturating_add(Weight::from_parts(95_294, 0).saturating_mul(a.into())) - // Standard Error: 101_405 - .saturating_add(Weight::from_parts(33_549, 0).saturating_mul(d.into())) + // Standard Error: 114_022 + .saturating_add(Weight::from_parts(365_460, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(8)) .saturating_add(Weight::from_parts(0, 768).saturating_mul(a.into())) @@ -185,8 +183,8 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `858` // Estimated: `2343` - // Minimum execution time: 42_000_000 picoseconds. - Weight::from_parts(43_000_000, 0) + // Minimum execution time: 43_000_000 picoseconds. + Weight::from_parts(56_000_000, 0) .saturating_add(Weight::from_parts(0, 2343)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -213,13 +211,11 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `185 + t * (32 ±0) + v * (553 ±0)` // Estimated: `1670 + t * (32 ±0) + v * (553 ±0)` - // Minimum execution time: 3_815_000_000 picoseconds. - Weight::from_parts(3_815_000_000, 0) + // Minimum execution time: 4_023_000_000 picoseconds. + Weight::from_parts(4_023_000_000, 0) .saturating_add(Weight::from_parts(0, 1670)) - // Standard Error: 100_208 - .saturating_add(Weight::from_parts(41_609, 0).saturating_mul(v.into())) - // Standard Error: 297_039 - .saturating_add(Weight::from_parts(3_518_500, 0).saturating_mul(a.into())) + // Standard Error: 312_300 + .saturating_add(Weight::from_parts(3_592_457, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(t.into())) @@ -241,13 +237,13 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `160 + t * (32 ±0) + v * (553 ±0)` // Estimated: `1645 + t * (32 ±0) + v * (553 ±0)` - // Minimum execution time: 3_312_000_000 picoseconds. - Weight::from_parts(3_312_000_000, 0) + // Minimum execution time: 3_347_000_000 picoseconds. + Weight::from_parts(3_347_000_000, 0) .saturating_add(Weight::from_parts(0, 1645)) - // Standard Error: 84_533 - .saturating_add(Weight::from_parts(104_027, 0).saturating_mul(v.into())) - // Standard Error: 250_574 - .saturating_add(Weight::from_parts(2_749_153, 0).saturating_mul(a.into())) + // Standard Error: 99_314 + .saturating_add(Weight::from_parts(199_489, 0).saturating_mul(v.into())) + // Standard Error: 294_390 + .saturating_add(Weight::from_parts(2_604_710, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(t.into())) .saturating_add(Weight::from_parts(0, 553).saturating_mul(v.into())) diff --git a/runtime/src/weights/pallet_elections_phragmen.rs b/runtime/src/weights/pallet_elections_phragmen.rs index b33c1c546..1fbfd4752 100644 --- a/runtime/src/weights/pallet_elections_phragmen.rs +++ b/runtime/src/weights/pallet_elections_phragmen.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_elections_phragmen` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -52,9 +52,11 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `503 + v * (80 ±0)` // Estimated: `4764 + v * (80 ±0)` - // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(29_852_900, 0) + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(27_285_220, 0) .saturating_add(Weight::from_parts(0, 4764)) + // Standard Error: 192_528 + .saturating_add(Weight::from_parts(416_436, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 80).saturating_mul(v.into())) @@ -77,10 +79,10 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Measured: `471 + v * (80 ±0)` // Estimated: `4764 + v * (80 ±0)` // Minimum execution time: 39_000_000 picoseconds. - Weight::from_parts(39_910_423, 0) + Weight::from_parts(38_708_469, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 91_394 - .saturating_add(Weight::from_parts(135_179, 0).saturating_mul(v.into())) + // Standard Error: 91_140 + .saturating_add(Weight::from_parts(203_583, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 80).saturating_mul(v.into())) @@ -103,10 +105,10 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Measured: `503 + v * (80 ±0)` // Estimated: `4764 + v * (80 ±0)` // Minimum execution time: 39_000_000 picoseconds. - Weight::from_parts(39_286_644, 0) + Weight::from_parts(39_065_146, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 174_734 - .saturating_add(Weight::from_parts(217_426, 0).saturating_mul(v.into())) + // Standard Error: 156_507 + .saturating_add(Weight::from_parts(219_869, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 80).saturating_mul(v.into())) @@ -121,8 +123,8 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `1025` // Estimated: `4764` - // Minimum execution time: 44_000_000 picoseconds. - Weight::from_parts(44_000_000, 0) + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(43_000_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -139,10 +141,10 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Measured: `1635 + c * (48 ±0)` // Estimated: `3120 + c * (48 ±0)` // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(29_485_741, 0) + Weight::from_parts(29_062_840, 0) .saturating_add(Weight::from_parts(0, 3120)) - // Standard Error: 7_783 - .saturating_add(Weight::from_parts(34_604, 0).saturating_mul(c.into())) + // Standard Error: 26_029 + .saturating_add(Weight::from_parts(53_949, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into())) @@ -154,11 +156,11 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `350 + c * (48 ±0)` // Estimated: `1835 + c * (48 ±0)` - // Minimum execution time: 26_000_000 picoseconds. - Weight::from_parts(25_986_823, 0) + // Minimum execution time: 25_000_000 picoseconds. + Weight::from_parts(25_066_605, 0) .saturating_add(Weight::from_parts(0, 1835)) - // Standard Error: 13_838 - .saturating_add(Weight::from_parts(22_148, 0).saturating_mul(c.into())) + // Standard Error: 18_091 + .saturating_add(Weight::from_parts(47_620, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into())) @@ -177,8 +179,8 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `1901` // Estimated: `3386` - // Minimum execution time: 39_000_000 picoseconds. - Weight::from_parts(39_000_000, 0) + // Minimum execution time: 38_000_000 picoseconds. + Weight::from_parts(38_000_000, 0) .saturating_add(Weight::from_parts(0, 3386)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -189,8 +191,8 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `1012` // Estimated: `2497` - // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(26_000_000, 0) + // Minimum execution time: 24_000_000 picoseconds. + Weight::from_parts(25_000_000, 0) .saturating_add(Weight::from_parts(0, 2497)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -221,8 +223,8 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `1901` // Estimated: `3593` - // Minimum execution time: 43_000_000 picoseconds. - Weight::from_parts(45_000_000, 0) + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(44_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -247,11 +249,11 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `1434 + v * (811 ±0)` // Estimated: `4890 + v * (3774 ±0)` - // Minimum execution time: 17_611_000_000 picoseconds. - Weight::from_parts(17_611_000_000, 0) + // Minimum execution time: 17_233_000_000 picoseconds. + Weight::from_parts(301_061_904, 0) .saturating_add(Weight::from_parts(0, 4890)) - // Standard Error: 2_288_829 - .saturating_add(Weight::from_parts(40_356_571, 0).saturating_mul(v.into())) + // Standard Error: 987_380 + .saturating_add(Weight::from_parts(68_499_255, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(v.into()))) .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(v.into()))) @@ -282,13 +284,13 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `0 + e * (29 ±0) + v * (605 ±0)` // Estimated: `179058 + c * (1754 ±88) + e * (10 ±4) + v * (2545 ±63)` - // Minimum execution time: 1_134_000_000 picoseconds. - Weight::from_parts(1_134_000_000, 0) + // Minimum execution time: 1_124_000_000 picoseconds. + Weight::from_parts(1_124_000_000, 0) .saturating_add(Weight::from_parts(0, 179058)) - // Standard Error: 3_236_975 - .saturating_add(Weight::from_parts(11_803_000, 0).saturating_mul(v.into())) - // Standard Error: 207_654 - .saturating_add(Weight::from_parts(439_738, 0).saturating_mul(e.into())) + // Standard Error: 3_236_665 + .saturating_add(Weight::from_parts(11_915_363, 0).saturating_mul(v.into())) + // Standard Error: 207_634 + .saturating_add(Weight::from_parts(450_942, 0).saturating_mul(e.into())) .saturating_add(T::DbWeight::get().reads(53)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) diff --git a/runtime/src/weights/pallet_free_tx.rs b/runtime/src/weights/pallet_free_tx.rs index a3d0022f7..d6c3c550c 100644 --- a/runtime/src/weights/pallet_free_tx.rs +++ b/runtime/src/weights/pallet_free_tx.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_free_tx` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -45,8 +45,8 @@ impl pallet_free_tx::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `748` // Estimated: `3529` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(19_000_000, 0) + // Minimum execution time: 19_000_000 picoseconds. + Weight::from_parts(20_000_000, 0) .saturating_add(Weight::from_parts(0, 3529)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -57,8 +57,8 @@ impl pallet_free_tx::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(3_000_000, 0) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/src/weights/pallet_identity.rs b/runtime/src/weights/pallet_identity.rs index e7c0ebbad..2cce65fa6 100644 --- a/runtime/src/weights/pallet_identity.rs +++ b/runtime/src/weights/pallet_identity.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_identity` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -43,10 +43,10 @@ impl pallet_identity::WeightInfo for WeightInfo { // Measured: `32 + r * (57 ±0)` // Estimated: `2626` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(10_779_585, 0) + Weight::from_parts(10_347_633, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 29_655 - .saturating_add(Weight::from_parts(42_899, 0).saturating_mul(r.into())) + // Standard Error: 26_054 + .saturating_add(Weight::from_parts(66_568, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -54,17 +54,15 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[0, 100]`. - fn set_identity(r: u32, x: u32, ) -> Weight { + fn set_identity(_r: u32, x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `442 + r * (5 ±0)` // Estimated: `11003` - // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(28_663_472, 0) + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(31_247_338, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 98_098 - .saturating_add(Weight::from_parts(69_205, 0).saturating_mul(r.into())) - // Standard Error: 19_029 - .saturating_add(Weight::from_parts(526_096, 0).saturating_mul(x.into())) + // Standard Error: 27_330 + .saturating_add(Weight::from_parts(549_524, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -80,10 +78,10 @@ impl pallet_identity::WeightInfo for WeightInfo { // Measured: `101` // Estimated: `11003 + s * (2589 ±0)` // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(13_900_000, 0) + Weight::from_parts(14_500_000, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 70_110 - .saturating_add(Weight::from_parts(3_358_000, 0).saturating_mul(s.into())) + // Standard Error: 56_634 + .saturating_add(Weight::from_parts(3_230_000, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(s.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -102,10 +100,10 @@ impl pallet_identity::WeightInfo for WeightInfo { // Measured: `192 + p * (32 ±0)` // Estimated: `11003` // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(15_100_000, 0) + Weight::from_parts(13_700_000, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 60_592 - .saturating_add(Weight::from_parts(1_370_000, 0).saturating_mul(p.into())) + // Standard Error: 55_344 + .saturating_add(Weight::from_parts(1_396_000, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) @@ -119,17 +117,19 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. /// The range of component `x` is `[0, 100]`. - fn clear_identity(_r: u32, s: u32, x: u32, ) -> Weight { + fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `467 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` // Estimated: `11003` // Minimum execution time: 54_000_000 picoseconds. - Weight::from_parts(24_295_805, 0) + Weight::from_parts(7_818_224, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 42_130 - .saturating_add(Weight::from_parts(1_344_197, 0).saturating_mul(s.into())) - // Standard Error: 42_130 - .saturating_add(Weight::from_parts(317_531, 0).saturating_mul(x.into())) + // Standard Error: 380_415 + .saturating_add(Weight::from_parts(641_604, 0).saturating_mul(r.into())) + // Standard Error: 73_857 + .saturating_add(Weight::from_parts(1_373_464, 0).saturating_mul(s.into())) + // Standard Error: 73_857 + .saturating_add(Weight::from_parts(358_130, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -144,13 +144,13 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `365 + r * (57 ±0) + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(23_654_115, 0) + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(24_875_143, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 102_040 - .saturating_add(Weight::from_parts(244_164, 0).saturating_mul(r.into())) - // Standard Error: 19_793 - .saturating_add(Weight::from_parts(552_503, 0).saturating_mul(x.into())) + // Standard Error: 152_798 + .saturating_add(Weight::from_parts(149_672, 0).saturating_mul(r.into())) + // Standard Error: 29_639 + .saturating_add(Weight::from_parts(569_256, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -163,12 +163,12 @@ impl pallet_identity::WeightInfo for WeightInfo { // Measured: `396 + x * (66 ±0)` // Estimated: `11003` // Minimum execution time: 26_000_000 picoseconds. - Weight::from_parts(28_161_425, 0) + Weight::from_parts(28_996_396, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 129_475 - .saturating_add(Weight::from_parts(2_457, 0).saturating_mul(r.into())) - // Standard Error: 25_115 - .saturating_add(Weight::from_parts(519_577, 0).saturating_mul(x.into())) + // Standard Error: 126_680 + .saturating_add(Weight::from_parts(22_522, 0).saturating_mul(r.into())) + // Standard Error: 24_573 + .saturating_add(Weight::from_parts(510_126, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -179,24 +179,26 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `89 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(6_319_033, 0) + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(6_752_465, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 25_049 - .saturating_add(Weight::from_parts(100_098, 0).saturating_mul(r.into())) + // Standard Error: 13_925 + .saturating_add(Weight::from_parts(66_074, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Identity::Registrars` (r:1 w:1) /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. - fn set_account_id(_r: u32, ) -> Weight { + fn set_account_id(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `89 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(8_196_252, 0) + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(6_507_889, 0) .saturating_add(Weight::from_parts(0, 2626)) + // Standard Error: 20_494 + .saturating_add(Weight::from_parts(111_439, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -208,10 +210,10 @@ impl pallet_identity::WeightInfo for WeightInfo { // Measured: `89 + r * (57 ±0)` // Estimated: `2626` // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(6_438_362, 0) + Weight::from_parts(6_387_080, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 27_727 - .saturating_add(Weight::from_parts(98_126, 0).saturating_mul(r.into())) + // Standard Error: 35_921 + .saturating_add(Weight::from_parts(123_767, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -225,13 +227,13 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `443 + r * (57 ±0) + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(11_989_473, 0) + // Minimum execution time: 19_000_000 picoseconds. + Weight::from_parts(20_859_198, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 260_189 - .saturating_add(Weight::from_parts(447_368, 0).saturating_mul(r.into())) - // Standard Error: 47_344 - .saturating_add(Weight::from_parts(896_421, 0).saturating_mul(x.into())) + // Standard Error: 148_680 + .saturating_add(Weight::from_parts(8_383, 0).saturating_mul(r.into())) + // Standard Error: 27_054 + .saturating_add(Weight::from_parts(887_260, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -246,19 +248,17 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. /// The range of component `x` is `[0, 100]`. - fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { + fn kill_identity(_r: u32, s: u32, x: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `707 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 69_000_000 picoseconds. - Weight::from_parts(37_041_106, 0) + // Minimum execution time: 68_000_000 picoseconds. + Weight::from_parts(53_957_838, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 187_991 - .saturating_add(Weight::from_parts(212_110, 0).saturating_mul(r.into())) - // Standard Error: 36_498 - .saturating_add(Weight::from_parts(1_339_200, 0).saturating_mul(s.into())) - // Standard Error: 36_498 - .saturating_add(Weight::from_parts(299_866, 0).saturating_mul(x.into())) + // Standard Error: 54_626 + .saturating_add(Weight::from_parts(1_249_198, 0).saturating_mul(s.into())) + // Standard Error: 54_626 + .saturating_add(Weight::from_parts(295_198, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -275,10 +275,10 @@ impl pallet_identity::WeightInfo for WeightInfo { // Measured: `263 + s * (39 ±0)` // Estimated: `11003` // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(27_936_333, 0) + Weight::from_parts(27_140_437, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 14_642 - .saturating_add(Weight::from_parts(52_107, 0).saturating_mul(s.into())) + // Standard Error: 13_946 + .saturating_add(Weight::from_parts(68_283, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -291,11 +291,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `450 + s * (5 ±0)` // Estimated: `11003` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(10_395_314, 0) + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(10_799_310, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 7_457 - .saturating_add(Weight::from_parts(20_013, 0).saturating_mul(s.into())) + // Standard Error: 6_865 + .saturating_add(Weight::from_parts(11_965, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -311,10 +311,10 @@ impl pallet_identity::WeightInfo for WeightInfo { // Measured: `499 + s * (37 ±0)` // Estimated: `11003` // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(30_197_762, 0) + Weight::from_parts(30_489_643, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 13_783 - .saturating_add(Weight::from_parts(19_964, 0).saturating_mul(s.into())) + // Standard Error: 7_091 + .saturating_add(Weight::from_parts(24_110, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -330,10 +330,10 @@ impl pallet_identity::WeightInfo for WeightInfo { // Measured: `670 + s * (38 ±0)` // Estimated: `6723` // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(21_023_444, 0) + Weight::from_parts(23_332_899, 0) .saturating_add(Weight::from_parts(0, 6723)) - // Standard Error: 8_436 - .saturating_add(Weight::from_parts(38_141, 0).saturating_mul(s.into())) + // Standard Error: 39_546 + .saturating_add(Weight::from_parts(15_591, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/src/weights/pallet_im_online.rs b/runtime/src/weights/pallet_im_online.rs index 814de49b9..78c47d9b4 100644 --- a/runtime/src/weights/pallet_im_online.rs +++ b/runtime/src/weights/pallet_im_online.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_im_online` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -50,11 +50,11 @@ impl pallet_im_online::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `457 + k * (32 ±0)` // Estimated: `321487 + k * (32 ±0)` - // Minimum execution time: 61_000_000 picoseconds. - Weight::from_parts(57_263_459, 0) + // Minimum execution time: 56_000_000 picoseconds. + Weight::from_parts(59_772_476, 0) .saturating_add(Weight::from_parts(0, 321487)) - // Standard Error: 8_738 - .saturating_add(Weight::from_parts(50_652, 0).saturating_mul(k.into())) + // Standard Error: 7_229 + .saturating_add(Weight::from_parts(49_635, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(k.into())) diff --git a/runtime/src/weights/pallet_indices.rs b/runtime/src/weights/pallet_indices.rs index dd1eee455..9ce5f79c2 100644 --- a/runtime/src/weights/pallet_indices.rs +++ b/runtime/src/weights/pallet_indices.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_indices` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -41,8 +41,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3534` - // Minimum execution time: 23_000_000 picoseconds. - Weight::from_parts(26_000_000, 0) + // Minimum execution time: 22_000_000 picoseconds. + Weight::from_parts(23_000_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -55,8 +55,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `275` // Estimated: `3593` - // Minimum execution time: 34_000_000 picoseconds. - Weight::from_parts(36_000_000, 0) + // Minimum execution time: 33_000_000 picoseconds. + Weight::from_parts(34_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -67,8 +67,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `172` // Estimated: `3534` - // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(22_000_000, 0) + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(27_000_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -81,8 +81,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `275` // Estimated: `3593` - // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(26_000_000, 0) + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(28_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -93,8 +93,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `172` // Estimated: `3534` - // Minimum execution time: 24_000_000 picoseconds. - Weight::from_parts(25_000_000, 0) + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(26_000_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/src/weights/pallet_membership.rs b/runtime/src/weights/pallet_membership.rs index bb5c5688d..ab7bd774b 100644 --- a/runtime/src/weights/pallet_membership.rs +++ b/runtime/src/weights/pallet_membership.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_membership` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -49,10 +49,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Measured: `137 + m * (64 ±0)` // Estimated: `4687 + m * (64 ±0)` // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(14_186_213, 0) + Weight::from_parts(14_186_596, 0) .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 2_550 - .saturating_add(Weight::from_parts(20_357, 0).saturating_mul(m.into())) + // Standard Error: 2_994 + .saturating_add(Weight::from_parts(18_341, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) @@ -73,10 +73,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Measured: `243 + m * (64 ±0)` // Estimated: `4687 + m * (64 ±0)` // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(17_150_762, 0) + Weight::from_parts(16_165_855, 0) .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 25_398 - .saturating_add(Weight::from_parts(22_622, 0).saturating_mul(m.into())) + // Standard Error: 6_939 + .saturating_add(Weight::from_parts(20_357, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) @@ -96,11 +96,11 @@ impl pallet_membership::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `243 + m * (64 ±0)` // Estimated: `4687 + m * (64 ±0)` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_050_476, 0) + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(16_341_307, 0) .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 7_379 - .saturating_add(Weight::from_parts(30_502, 0).saturating_mul(m.into())) + // Standard Error: 5_772 + .saturating_add(Weight::from_parts(32_651, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) @@ -121,10 +121,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Measured: `241 + m * (64 ±0)` // Estimated: `4687 + m * (64 ±0)` // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_036_320, 0) + Weight::from_parts(16_035_117, 0) .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 9_792 - .saturating_add(Weight::from_parts(114_814, 0).saturating_mul(m.into())) + // Standard Error: 11_489 + .saturating_add(Weight::from_parts(116_830, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) @@ -145,10 +145,10 @@ impl pallet_membership::WeightInfo for WeightInfo { // Measured: `241 + m * (64 ±0)` // Estimated: `4687 + m * (64 ±0)` // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(17_090_459, 0) + Weight::from_parts(16_375_593, 0) .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 9_540 - .saturating_add(Weight::from_parts(24_094, 0).saturating_mul(m.into())) + // Standard Error: 6_153 + .saturating_add(Weight::from_parts(46_302, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) @@ -164,11 +164,9 @@ impl pallet_membership::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `30 + m * (32 ±0)` // Estimated: `4687 + m * (32 ±0)` - // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(5_800_042, 0) + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(6_500_000, 0) .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 4_282 - .saturating_add(Weight::from_parts(3_983, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) @@ -178,15 +176,13 @@ impl pallet_membership::WeightInfo for WeightInfo { /// Storage: `TechnicalCommittee::Prime` (r:0 w:1) /// Proof: `TechnicalCommittee::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `m` is `[1, 100]`. - fn clear_prime(m: u32, ) -> Weight { + fn clear_prime(_m: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(2_699_226, 0) + Weight::from_parts(3_205_241, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_673 - .saturating_add(Weight::from_parts(3_999, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().writes(2)) } } \ No newline at end of file diff --git a/runtime/src/weights/pallet_multisig.rs b/runtime/src/weights/pallet_multisig.rs index 21ee6b6d9..b120dc1c5 100644 --- a/runtime/src/weights/pallet_multisig.rs +++ b/runtime/src/weights/pallet_multisig.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -40,27 +40,25 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(10_000_000, 0) + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(10_600_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 157 - .saturating_add(Weight::from_parts(380, 0).saturating_mul(z.into())) + // Standard Error: 188 + .saturating_add(Weight::from_parts(340, 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`) /// 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 { + fn as_multi_create(_s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `344 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 34_000_000 picoseconds. - Weight::from_parts(28_460_354, 0) + // Minimum execution time: 35_000_000 picoseconds. + Weight::from_parts(37_856_527, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 18_515 - .saturating_add(Weight::from_parts(69_102, 0).saturating_mul(s.into())) - // Standard Error: 181 - .saturating_add(Weight::from_parts(1_371, 0).saturating_mul(z.into())) + // Standard Error: 213 + .saturating_add(Weight::from_parts(905, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -73,12 +71,12 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `348` // Estimated: `6811` // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(16_030_896, 0) + Weight::from_parts(16_213_973, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 8_409 - .saturating_add(Weight::from_parts(52_301, 0).saturating_mul(s.into())) - // Standard Error: 81 - .saturating_add(Weight::from_parts(1_175, 0).saturating_mul(z.into())) + // Standard Error: 9_782 + .saturating_add(Weight::from_parts(53_375, 0).saturating_mul(s.into())) + // Standard Error: 95 + .saturating_add(Weight::from_parts(1_139, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -92,13 +90,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `487 + s * (33 ±0)` // Estimated: `6811` - // Minimum execution time: 42_000_000 picoseconds. - Weight::from_parts(35_256_768, 0) + // Minimum execution time: 38_000_000 picoseconds. + Weight::from_parts(35_402_249, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 24_779 - .saturating_add(Weight::from_parts(102_844, 0).saturating_mul(s.into())) - // Standard Error: 243 - .saturating_add(Weight::from_parts(783, 0).saturating_mul(z.into())) + // Standard Error: 27_775 + .saturating_add(Weight::from_parts(31_840, 0).saturating_mul(s.into())) + // Standard Error: 272 + .saturating_add(Weight::from_parts(1_185, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -109,11 +107,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `344 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(25_469_014, 0) + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(27_956_087, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 49_880 - .saturating_add(Weight::from_parts(171_869, 0).saturating_mul(s.into())) + // Standard Error: 31_002 + .saturating_add(Weight::from_parts(85_510, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -125,10 +123,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `348` // Estimated: `6811` // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(18_564_303, 0) + Weight::from_parts(14_924_235, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 29_591 - .saturating_add(Weight::from_parts(22_356, 0).saturating_mul(s.into())) + // Standard Error: 3_021 + .saturating_add(Weight::from_parts(42_830, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -139,11 +137,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `519 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(34_142_300, 0) + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(29_621_976, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 65_325 - .saturating_add(Weight::from_parts(22_789, 0).saturating_mul(s.into())) + // Standard Error: 16_980 + .saturating_add(Weight::from_parts(46_811, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/src/weights/pallet_nomination_pools.rs b/runtime/src/weights/pallet_nomination_pools.rs index 736a79942..0da0d05c4 100644 --- a/runtime/src/weights/pallet_nomination_pools.rs +++ b/runtime/src/weights/pallet_nomination_pools.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_nomination_pools` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -69,8 +69,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `3426` // Estimated: `8877` - // Minimum execution time: 169_000_000 picoseconds. - Weight::from_parts(171_000_000, 0) + // Minimum execution time: 163_000_000 picoseconds. + Weight::from_parts(168_000_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(19)) .saturating_add(T::DbWeight::get().writes(12)) @@ -101,8 +101,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `3440` // Estimated: `8877` - // Minimum execution time: 166_000_000 picoseconds. - Weight::from_parts(173_000_000, 0) + // Minimum execution time: 161_000_000 picoseconds. + Weight::from_parts(164_000_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(16)) .saturating_add(T::DbWeight::get().writes(12)) @@ -135,8 +135,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `3348` // Estimated: `8799` - // Minimum execution time: 197_000_000 picoseconds. - Weight::from_parts(198_000_000, 0) + // Minimum execution time: 192_000_000 picoseconds. + Weight::from_parts(194_000_000, 0) .saturating_add(Weight::from_parts(0, 8799)) .saturating_add(T::DbWeight::get().reads(16)) .saturating_add(T::DbWeight::get().writes(12)) @@ -158,7 +158,7 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Measured: `1270` // Estimated: `3702` // Minimum execution time: 69_000_000 picoseconds. - Weight::from_parts(69_000_000, 0) + Weight::from_parts(82_000_000, 0) .saturating_add(Weight::from_parts(0, 3702)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) @@ -199,8 +199,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `3705` // Estimated: `27847` - // Minimum execution time: 146_000_000 picoseconds. - Weight::from_parts(147_000_000, 0) + // Minimum execution time: 143_000_000 picoseconds. + Weight::from_parts(144_000_000, 0) .saturating_add(Weight::from_parts(0, 27847)) .saturating_add(T::DbWeight::get().reads(20)) .saturating_add(T::DbWeight::get().writes(13)) @@ -218,15 +218,13 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Storage: `Balances::Freezes` (r:1 w:0) /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 100]`. - fn pool_withdraw_unbonded(s: u32, ) -> Weight { + fn pool_withdraw_unbonded(_s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1807` // Estimated: `4764` // Minimum execution time: 51_000_000 picoseconds. - Weight::from_parts(51_600_000, 0) + Weight::from_parts(53_800_000, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 12_509 - .saturating_add(Weight::from_parts(14_000, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -258,7 +256,7 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Measured: `2234` // Estimated: `27847` // Minimum execution time: 115_000_000 picoseconds. - Weight::from_parts(119_800_000, 0) + Weight::from_parts(120_000_000, 0) .saturating_add(Weight::from_parts(0, 27847)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(8)) @@ -313,7 +311,7 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Measured: `2684` // Estimated: `27847` // Minimum execution time: 201_000_000 picoseconds. - Weight::from_parts(213_300_000, 0) + Weight::from_parts(211_600_000, 0) .saturating_add(Weight::from_parts(0, 27847)) .saturating_add(T::DbWeight::get().reads(21)) .saturating_add(T::DbWeight::get().writes(18)) @@ -367,7 +365,7 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Measured: `1300` // Estimated: `6196` // Minimum execution time: 178_000_000 picoseconds. - Weight::from_parts(183_000_000, 0) + Weight::from_parts(179_000_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(22)) .saturating_add(T::DbWeight::get().writes(15)) @@ -401,11 +399,11 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `2022` // Estimated: `4556 + n * (2520 ±0)` - // Minimum execution time: 56_000_000 picoseconds. - Weight::from_parts(53_796_961, 0) + // Minimum execution time: 55_000_000 picoseconds. + Weight::from_parts(52_828_729, 0) .saturating_add(Weight::from_parts(0, 4556)) - // Standard Error: 159_061 - .saturating_add(Weight::from_parts(1_805_248, 0).saturating_mul(n.into())) + // Standard Error: 104_262 + .saturating_add(Weight::from_parts(1_886_740, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(5)) @@ -421,8 +419,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `1490` // Estimated: `4556` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(29_000_000, 0) + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(30_000_000, 0) .saturating_add(Weight::from_parts(0, 4556)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -438,11 +436,11 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `597` // Estimated: `3735` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(11_497_653, 0) + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(11_999_061, 0) .saturating_add(Weight::from_parts(0, 3735)) - // Standard Error: 2_700 - .saturating_add(Weight::from_parts(3_918, 0).saturating_mul(n.into())) + // Standard Error: 1_466 + .saturating_add(Weight::from_parts(1_567, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -462,7 +460,7 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_000_000 picoseconds. + // Minimum execution time: 5_000_000 picoseconds. Weight::from_parts(6_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(6)) @@ -474,7 +472,7 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Measured: `597` // Estimated: `3685` // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(19_000_000, 0) + Weight::from_parts(15_000_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -501,8 +499,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `2191` // Estimated: `4556` - // Minimum execution time: 52_000_000 picoseconds. - Weight::from_parts(53_000_000, 0) + // Minimum execution time: 53_000_000 picoseconds. + Weight::from_parts(54_000_000, 0) .saturating_add(Weight::from_parts(0, 4556)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(5)) @@ -533,8 +531,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `637` // Estimated: `3685` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(23_000_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -545,7 +543,7 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `597` // Estimated: `3685` - // Minimum execution time: 16_000_000 picoseconds. + // Minimum execution time: 15_000_000 picoseconds. Weight::from_parts(16_000_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(1)) @@ -577,8 +575,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `1067` // Estimated: `3685` - // Minimum execution time: 62_000_000 picoseconds. - Weight::from_parts(66_000_000, 0) + // Minimum execution time: 57_000_000 picoseconds. + Weight::from_parts(58_000_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/runtime/src/weights/pallet_preimage.rs b/runtime/src/weights/pallet_preimage.rs index bca6a90e7..dccd5607f 100644 --- a/runtime/src/weights/pallet_preimage.rs +++ b/runtime/src/weights/pallet_preimage.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_preimage` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -44,10 +44,10 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `210` // Estimated: `3556` - // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(46_500_000, 0) + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(16_200_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 25 + // Standard Error: 16 .saturating_add(Weight::from_parts(1_427, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -64,8 +64,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Minimum execution time: 13_000_000 picoseconds. Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 20 - .saturating_add(Weight::from_parts(1_479, 0).saturating_mul(s.into())) + // Standard Error: 14 + .saturating_add(Weight::from_parts(1_418, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -78,11 +78,11 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `173` // Estimated: `3556` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 13 - .saturating_add(Weight::from_parts(1_427, 0).saturating_mul(s.into())) + // Standard Error: 17 + .saturating_add(Weight::from_parts(1_400, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -94,8 +94,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `356` // Estimated: `3556` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(33_000_000, 0) + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(32_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -108,8 +108,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `211` // Estimated: `3556` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(18_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -133,7 +133,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Measured: `211` // Estimated: `3556` // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + Weight::from_parts(8_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -145,7 +145,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Measured: `109` // Estimated: `3556` // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(10_000_000, 0) + Weight::from_parts(12_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -157,7 +157,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Measured: `173` // Estimated: `3556` // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(10_000_000, 0) + Weight::from_parts(7_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -170,8 +170,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `211` // Estimated: `3556` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(18_000_000, 0) + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(20_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -182,8 +182,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `173` // Estimated: `3556` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -195,7 +195,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Measured: `173` // Estimated: `3556` // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(7_000_000, 0) + Weight::from_parts(15_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/src/weights/pallet_programs.rs b/runtime/src/weights/pallet_programs.rs index f8275a33c..aee76b7da 100644 --- a/runtime/src/weights/pallet_programs.rs +++ b/runtime/src/weights/pallet_programs.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_programs` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -35,18 +35,36 @@ use core::marker::PhantomData; /// Weight functions for `pallet_programs`. pub struct WeightInfo(PhantomData); impl pallet_programs::WeightInfo for WeightInfo { - /// Storage: `Programs::AllowedToModifyProgram` (r:1 w:0) - /// Proof: `Programs::AllowedToModifyProgram` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Programs::Bytecode` (r:1 w:1) /// Proof: `Programs::Bytecode` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn update_program() -> Weight { + /// Storage: `Programs::OwnedPrograms` (r:1 w:1) + /// Proof: `Programs::OwnedPrograms` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn set_program() -> Weight { // Proof Size summary in bytes: - // Measured: `336` - // Estimated: `3801` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(34_000_000, 0) - .saturating_add(Weight::from_parts(0, 3801)) + // Measured: `142` + // Estimated: `3607` + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(27_000_000, 0) + .saturating_add(Weight::from_parts(0, 3607)) .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Programs::Bytecode` (r:1 w:1) + /// Proof: `Programs::Bytecode` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Programs::OwnedPrograms` (r:1 w:1) + /// Proof: `Programs::OwnedPrograms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[0, 25]`. + fn remove_program(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `326 + p * (32 ±0)` + // Estimated: `3809 + p * (31 ±0)` + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(26_938_669, 0) + .saturating_add(Weight::from_parts(0, 3809)) + // Standard Error: 47_904 + .saturating_add(Weight::from_parts(136_174, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 31).saturating_mul(p.into())) } } \ No newline at end of file diff --git a/runtime/src/weights/pallet_proxy.rs b/runtime/src/weights/pallet_proxy.rs index 0920c97df..7b823b646 100644 --- a/runtime/src/weights/pallet_proxy.rs +++ b/runtime/src/weights/pallet_proxy.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -38,15 +38,13 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// Storage: `Proxy::Proxies` (r:1 w:0) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn proxy(p: u32, ) -> Weight { + fn proxy(_p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `161 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(13_987_206, 0) + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(13_421_108, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 100_509 - .saturating_add(Weight::from_parts(76_759, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `Proxy::Proxies` (r:1 w:0) @@ -57,13 +55,17 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn proxy_announced(_a: u32, _p: u32, ) -> Weight { + fn proxy_announced(a: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `533 + a * (68 ±0) + p * (35 ±0)` // Estimated: `5698` - // Minimum execution time: 34_000_000 picoseconds. - Weight::from_parts(43_820_750, 0) + // Minimum execution time: 33_000_000 picoseconds. + Weight::from_parts(30_328_362, 0) .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 76_846 + .saturating_add(Weight::from_parts(201_151, 0).saturating_mul(a.into())) + // Standard Error: 79_903 + .saturating_add(Weight::from_parts(92_681, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -73,17 +75,15 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn remove_announcement(a: u32, p: u32, ) -> Weight { + fn remove_announcement(a: u32, _p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `448 + a * (68 ±0)` // Estimated: `5698` // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(21_568_030, 0) + Weight::from_parts(23_403_295, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 27_650 - .saturating_add(Weight::from_parts(122_335, 0).saturating_mul(a.into())) - // Standard Error: 28_750 - .saturating_add(Weight::from_parts(11_924, 0).saturating_mul(p.into())) + // Standard Error: 34_445 + .saturating_add(Weight::from_parts(88_306, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -93,17 +93,15 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn reject_announcement(a: u32, p: u32, ) -> Weight { + fn reject_announcement(a: u32, _p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `448 + a * (68 ±0)` // Estimated: `5698` // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(20_396_307, 0) + Weight::from_parts(22_964_195, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 41_454 - .saturating_add(Weight::from_parts(190_715, 0).saturating_mul(a.into())) - // Standard Error: 43_103 - .saturating_add(Weight::from_parts(23_596, 0).saturating_mul(p.into())) + // Standard Error: 16_035 + .saturating_add(Weight::from_parts(112_136, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -120,49 +118,55 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Measured: `465 + a * (68 ±0) + p * (35 ±0)` // Estimated: `5698` // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(31_581_155, 0) + Weight::from_parts(31_353_707, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 28_400 - .saturating_add(Weight::from_parts(145_748, 0).saturating_mul(a.into())) + // Standard Error: 70_347 + .saturating_add(Weight::from_parts(168_777, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Proxy::Proxies` (r:1 w:1) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn add_proxy(_p: u32, ) -> Weight { + fn add_proxy(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `161 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(24_451_314, 0) + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(23_077_825, 0) .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 11_401 + .saturating_add(Weight::from_parts(33_049, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Proxy::Proxies` (r:1 w:1) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn remove_proxy(_p: u32, ) -> Weight { + fn remove_proxy(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `161 + p * (37 ±0)` // Estimated: `4706` // Minimum execution time: 23_000_000 picoseconds. - Weight::from_parts(25_922_174, 0) + Weight::from_parts(23_177_149, 0) .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 15_014 + .saturating_add(Weight::from_parts(20_433, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Proxy::Proxies` (r:1 w:1) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn remove_proxies(_p: u32, ) -> Weight { + fn remove_proxies(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `161 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(23_839_907, 0) + // Minimum execution time: 20_000_000 picoseconds. + Weight::from_parts(20_379_175, 0) .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 61_696 + .saturating_add(Weight::from_parts(58_280, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -173,8 +177,8 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `173` // Estimated: `4706` - // Minimum execution time: 24_000_000 picoseconds. - Weight::from_parts(27_049_573, 0) + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(26_169_331, 0) .saturating_add(Weight::from_parts(0, 4706)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -182,13 +186,15 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// Storage: `Proxy::Proxies` (r:1 w:1) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[0, 30]`. - fn kill_pure(_p: u32, ) -> Weight { + fn kill_pure(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `198 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(24_009_950, 0) + // Minimum execution time: 21_000_000 picoseconds. + Weight::from_parts(21_305_614, 0) .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 16_133 + .saturating_add(Weight::from_parts(33_404, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/src/weights/pallet_recovery.rs b/runtime/src/weights/pallet_recovery.rs index c65736c48..9c3569308 100644 --- a/runtime/src/weights/pallet_recovery.rs +++ b/runtime/src/weights/pallet_recovery.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_recovery` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -65,10 +65,10 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Measured: `76` // Estimated: `3816` // Minimum execution time: 23_000_000 picoseconds. - Weight::from_parts(22_800_000, 0) + Weight::from_parts(27_400_000, 0) .saturating_add(Weight::from_parts(0, 3816)) - // Standard Error: 209_538 - .saturating_add(Weight::from_parts(500_000, 0).saturating_mul(n.into())) + // Standard Error: 668_603 + .saturating_add(Weight::from_parts(100_000, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -80,8 +80,8 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `173` // Estimated: `3854` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(30_000_000, 0) + // Minimum execution time: 25_000_000 picoseconds. + Weight::from_parts(26_000_000, 0) .saturating_add(Weight::from_parts(0, 3854)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -96,10 +96,10 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Measured: `261 + n * (64 ±0)` // Estimated: `3854` // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + Weight::from_parts(16_600_000, 0) .saturating_add(Weight::from_parts(0, 3854)) - // Standard Error: 51_538 - .saturating_add(Weight::from_parts(100_000, 0).saturating_mul(n.into())) + // Standard Error: 154_110 + .saturating_add(Weight::from_parts(200_000, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -115,7 +115,7 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Measured: `293 + n * (64 ±0)` // Estimated: `3854` // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(20_300_000, 0) + Weight::from_parts(21_800_000, 0) .saturating_add(Weight::from_parts(0, 3854)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -129,8 +129,8 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `447 + n * (32 ±0)` // Estimated: `3854` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(32_475_000, 0) + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(31_600_000, 0) .saturating_add(Weight::from_parts(0, 3854)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -140,15 +140,13 @@ impl pallet_recovery::WeightInfo for WeightInfo { /// Storage: `Recovery::Recoverable` (r:1 w:1) /// Proof: `Recovery::Recoverable` (`max_values`: None, `max_size`: Some(351), added: 2826, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. - fn remove_recovery(n: u32, ) -> Weight { + fn remove_recovery(_n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `170 + n * (32 ±0)` // Estimated: `3854` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(27_950_000, 0) + Weight::from_parts(28_500_000, 0) .saturating_add(Weight::from_parts(0, 3854)) - // Standard Error: 91_855 - .saturating_add(Weight::from_parts(50_000, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/src/weights/pallet_relayer.rs b/runtime/src/weights/pallet_relayer.rs index 7f6a45d8c..664cbf932 100644 --- a/runtime/src/weights/pallet_relayer.rs +++ b/runtime/src/weights/pallet_relayer.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_relayer` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -42,15 +42,13 @@ impl pallet_relayer::WeightInfo for WeightInfo { /// Storage: `Relayer::Dkg` (r:1 w:1) /// Proof: `Relayer::Dkg` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `p` is `[0, 1000000]`. - fn register(p: u32, ) -> Weight { + fn register(_p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `133` // Estimated: `3598` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(13_800_000, 0) + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(17_800_000, 0) .saturating_add(Weight::from_parts(0, 3598)) - // Standard Error: 60 - .saturating_add(Weight::from_parts(584, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -58,11 +56,11 @@ impl pallet_relayer::WeightInfo for WeightInfo { /// Proof: `Relayer::Registering` (`max_values`: None, `max_size`: None, mode: `Measured`) fn prune_registration() -> Weight { // Proof Size summary in bytes: - // Measured: `167` - // Estimated: `3632` + // Measured: `199` + // Estimated: `3664` // Minimum execution time: 11_000_000 picoseconds. Weight::from_parts(12_000_000, 0) - .saturating_add(Weight::from_parts(0, 3632)) + .saturating_add(Weight::from_parts(0, 3664)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -73,15 +71,13 @@ impl pallet_relayer::WeightInfo for WeightInfo { /// Storage: `StakingExtension::SigningGroups` (r:1 w:0) /// Proof: `StakingExtension::SigningGroups` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `c` is `[0, 2]`. - fn confirm_register_registering(c: u32, ) -> Weight { + fn confirm_register_registering(_c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `16502` - // Estimated: `19967` - // Minimum execution time: 26_000_000 picoseconds. - Weight::from_parts(30_416_666, 0) - .saturating_add(Weight::from_parts(0, 19967)) - // Standard Error: 2_964_196 - .saturating_add(Weight::from_parts(1_750_000, 0).saturating_mul(c.into())) + // Measured: `16534` + // Estimated: `19999` + // Minimum execution time: 25_000_000 picoseconds. + Weight::from_parts(29_416_666, 0) + .saturating_add(Weight::from_parts(0, 19999)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -92,15 +88,13 @@ impl pallet_relayer::WeightInfo for WeightInfo { /// Storage: `StakingExtension::SigningGroups` (r:1 w:0) /// Proof: `StakingExtension::SigningGroups` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `c` is `[0, 2]`. - fn confirm_register_failed_registering(c: u32, ) -> Weight { + fn confirm_register_failed_registering(_c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `16504` - // Estimated: `19969` - // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(33_000_000, 0) - .saturating_add(Weight::from_parts(0, 19969)) - // Standard Error: 2_715_695 - .saturating_add(Weight::from_parts(2_000_000, 0).saturating_mul(c.into())) + // Measured: `16536` + // Estimated: `20001` + // Minimum execution time: 24_000_000 picoseconds. + Weight::from_parts(28_583_333, 0) + .saturating_add(Weight::from_parts(0, 20001)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -112,19 +106,17 @@ impl pallet_relayer::WeightInfo for WeightInfo { /// Proof: `StakingExtension::SigningGroups` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Relayer::Registered` (r:0 w:1) /// Proof: `Relayer::Registered` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Programs::AllowedToModifyProgram` (r:0 w:1) - /// Proof: `Programs::AllowedToModifyProgram` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Programs::Bytecode` (r:0 w:1) - /// Proof: `Programs::Bytecode` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `c` is `[0, 2]`. - fn confirm_register_registered(_c: u32, ) -> Weight { + fn confirm_register_registered(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `16503` - // Estimated: `19968` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(32_500_000, 0) - .saturating_add(Weight::from_parts(0, 19968)) + // Measured: `16535` + // Estimated: `20000` + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(28_250_000, 0) + .saturating_add(Weight::from_parts(0, 20000)) + // Standard Error: 450_693 + .saturating_add(Weight::from_parts(250_000, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes(2)) } } \ No newline at end of file diff --git a/runtime/src/weights/pallet_scheduler.rs b/runtime/src/weights/pallet_scheduler.rs index 34dfc7ba0..7115b929a 100644 --- a/runtime/src/weights/pallet_scheduler.rs +++ b/runtime/src/weights/pallet_scheduler.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -54,11 +54,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `80 + s * (177 ±0)` // Estimated: `110487` - // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(4_100_000, 0) + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_100_000, 0) .saturating_add(Weight::from_parts(0, 110487)) - // Standard Error: 6_809 - .saturating_add(Weight::from_parts(394_921, 0).saturating_mul(s.into())) + // Standard Error: 18_874 + .saturating_add(Weight::from_parts(441_406, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -67,7 +67,7 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(6_000_000, 0) + Weight::from_parts(5_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Preimage::PreimageFor` (r:1 w:1) @@ -79,11 +79,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `246 + s * (1 ±0)` // Estimated: `3708 + s * (1 ±0)` - // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) .saturating_add(Weight::from_parts(0, 3708)) - // Standard Error: 12 - .saturating_add(Weight::from_parts(756, 0).saturating_mul(s.into())) + // Standard Error: 39 + .saturating_add(Weight::from_parts(685, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into())) @@ -94,7 +94,7 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_000_000 picoseconds. + // Minimum execution time: 6_000_000 picoseconds. Weight::from_parts(6_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) @@ -104,7 +104,7 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(5_000_000, 0) + Weight::from_parts(4_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) } fn execute_dispatch_signed() -> Weight { @@ -131,10 +131,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `80 + s * (177 ±0)` // Estimated: `110487` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(9_865_052, 0) + Weight::from_parts(13_173_659, 0) .saturating_add(Weight::from_parts(0, 110487)) - // Standard Error: 11_309 - .saturating_add(Weight::from_parts(417_064, 0).saturating_mul(s.into())) + // Standard Error: 8_843 + .saturating_add(Weight::from_parts(427_611, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -147,11 +147,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `80 + s * (177 ±0)` // Estimated: `110487` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(6_129_013, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(3_418_059, 0) .saturating_add(Weight::from_parts(0, 110487)) - // Standard Error: 27_790 - .saturating_add(Weight::from_parts(766_475, 0).saturating_mul(s.into())) + // Standard Error: 21_611 + .saturating_add(Weight::from_parts(779_008, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -165,10 +165,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `480 + s * (178 ±0)` // Estimated: `110487` // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(11_781_042, 0) + Weight::from_parts(11_676_497, 0) .saturating_add(Weight::from_parts(0, 110487)) - // Standard Error: 23_020 - .saturating_add(Weight::from_parts(459_321, 0).saturating_mul(s.into())) + // Standard Error: 8_828 + .saturating_add(Weight::from_parts(448_367, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -182,10 +182,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `546 + s * (178 ±0)` // Estimated: `110487` // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(13_177_036, 0) + Weight::from_parts(10_142_161, 0) .saturating_add(Weight::from_parts(0, 110487)) - // Standard Error: 10_946 - .saturating_add(Weight::from_parts(700_714, 0).saturating_mul(s.into())) + // Standard Error: 18_636 + .saturating_add(Weight::from_parts(752_372, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/src/weights/pallet_session.rs b/runtime/src/weights/pallet_session.rs index 142047d2f..1f148bcd6 100644 --- a/runtime/src/weights/pallet_session.rs +++ b/runtime/src/weights/pallet_session.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -45,7 +45,7 @@ impl pallet_session::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1971` // Estimated: `12861` - // Minimum execution time: 40_000_000 picoseconds. + // Minimum execution time: 41_000_000 picoseconds. Weight::from_parts(42_000_000, 0) .saturating_add(Weight::from_parts(0, 12861)) .saturating_add(T::DbWeight::get().reads(6)) @@ -61,7 +61,7 @@ impl pallet_session::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1744` // Estimated: `5209` - // Minimum execution time: 28_000_000 picoseconds. + // Minimum execution time: 30_000_000 picoseconds. Weight::from_parts(30_000_000, 0) .saturating_add(Weight::from_parts(0, 5209)) .saturating_add(T::DbWeight::get().reads(2)) diff --git a/runtime/src/weights/pallet_staking.rs b/runtime/src/weights/pallet_staking.rs index a4407ca69..f80b1f627 100644 --- a/runtime/src/weights/pallet_staking.rs +++ b/runtime/src/weights/pallet_staking.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_staking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -51,8 +51,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `973` // Estimated: `4764` - // Minimum execution time: 46_000_000 picoseconds. - Weight::from_parts(57_000_000, 0) + // Minimum execution time: 47_000_000 picoseconds. + Weight::from_parts(52_000_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -73,8 +73,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2042` // Estimated: `8877` - // Minimum execution time: 84_000_000 picoseconds. - Weight::from_parts(86_000_000, 0) + // Minimum execution time: 79_000_000 picoseconds. + Weight::from_parts(81_000_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) @@ -102,7 +102,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Measured: `2247` // Estimated: `8877` // Minimum execution time: 80_000_000 picoseconds. - Weight::from_parts(85_000_000, 0) + Weight::from_parts(82_000_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(7)) @@ -116,15 +116,13 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Storage: `Balances::Freezes` (r:1 w:0) /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 100]`. - fn withdraw_unbonded_update(s: u32, ) -> Weight { + fn withdraw_unbonded_update(_s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1009` // Estimated: `4764` // Minimum execution time: 36_000_000 picoseconds. - Weight::from_parts(36_900_000, 0) + Weight::from_parts(38_500_000, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 16_941 - .saturating_add(Weight::from_parts(4_000, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -161,11 +159,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2314 + s * (4 ±0)` // Estimated: `6248 + s * (5 ±0)` - // Minimum execution time: 76_000_000 picoseconds. - Weight::from_parts(76_100_000, 0) + // Minimum execution time: 79_000_000 picoseconds. + Weight::from_parts(84_000_000, 0) .saturating_add(Weight::from_parts(0, 6248)) - // Standard Error: 66_629 - .saturating_add(Weight::from_parts(1_538_000, 0).saturating_mul(s.into())) + // Standard Error: 55_031 + .saturating_add(Weight::from_parts(1_402_000, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(13)) .saturating_add(T::DbWeight::get().writes(10)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -197,8 +195,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1431` // Estimated: `4556` - // Minimum execution time: 45_000_000 picoseconds. - Weight::from_parts(46_000_000, 0) + // Minimum execution time: 46_000_000 picoseconds. + Weight::from_parts(47_000_000, 0) .saturating_add(Weight::from_parts(0, 4556)) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(5)) @@ -213,10 +211,10 @@ impl pallet_staking::WeightInfo for WeightInfo { // Measured: `1140 + k * (570 ±0)` // Estimated: `4556 + k * (3033 ±0)` // Minimum execution time: 21_000_000 picoseconds. - Weight::from_parts(15_571_177, 0) + Weight::from_parts(18_847_500, 0) .saturating_add(Weight::from_parts(0, 4556)) - // Standard Error: 133_305 - .saturating_add(Weight::from_parts(7_738_766, 0).saturating_mul(k.into())) + // Standard Error: 69_998 + .saturating_add(Weight::from_parts(7_639_447, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) @@ -249,11 +247,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1901 + n * (97 ±0)` // Estimated: `6248 + n * (2520 ±0)` - // Minimum execution time: 55_000_000 picoseconds. - Weight::from_parts(52_448_895, 0) + // Minimum execution time: 54_000_000 picoseconds. + Weight::from_parts(50_738_950, 0) .saturating_add(Weight::from_parts(0, 6248)) - // Standard Error: 224_789 - .saturating_add(Weight::from_parts(3_042_817, 0).saturating_mul(n.into())) + // Standard Error: 166_732 + .saturating_add(Weight::from_parts(3_178_176, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(6)) @@ -277,8 +275,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1703` // Estimated: `6248` - // Minimum execution time: 46_000_000 picoseconds. - Weight::from_parts(55_000_000, 0) + // Minimum execution time: 47_000_000 picoseconds. + Weight::from_parts(54_000_000, 0) .saturating_add(Weight::from_parts(0, 6248)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) @@ -305,8 +303,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `895` // Estimated: `8122` - // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(20_000_000, 0) + // Minimum execution time: 18_000_000 picoseconds. + Weight::from_parts(19_000_000, 0) .saturating_add(Weight::from_parts(0, 8122)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -328,7 +326,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 9_000_000 picoseconds. + // Minimum execution time: 8_000_000 picoseconds. Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) @@ -339,7 +337,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_000_000 picoseconds. + // Minimum execution time: 9_000_000 picoseconds. Weight::from_parts(9_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) @@ -350,7 +348,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_000_000 picoseconds. + // Minimum execution time: 9_000_000 picoseconds. Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) @@ -365,8 +363,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Minimum execution time: 3_000_000 picoseconds. Weight::from_parts(3_200_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 452 - .saturating_add(Weight::from_parts(6_600, 0).saturating_mul(v.into())) + // Standard Error: 346 + .saturating_add(Weight::from_parts(6_400, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Staking::Bonded` (r:1 w:1) @@ -402,11 +400,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2005 + s * (4 ±0)` // Estimated: `6248 + s * (5 ±0)` - // Minimum execution time: 70_000_000 picoseconds. - Weight::from_parts(71_600_000, 0) + // Minimum execution time: 72_000_000 picoseconds. + Weight::from_parts(72_900_000, 0) .saturating_add(Weight::from_parts(0, 6248)) - // Standard Error: 58_689 - .saturating_add(Weight::from_parts(1_486_000, 0).saturating_mul(s.into())) + // Standard Error: 9_772 + .saturating_add(Weight::from_parts(1_398_000, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(11)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -419,11 +417,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `66559` // Estimated: `70024` - // Minimum execution time: 142_000_000 picoseconds. - Weight::from_parts(544_525_502, 0) + // Minimum execution time: 144_000_000 picoseconds. + Weight::from_parts(547_643_111, 0) .saturating_add(Weight::from_parts(0, 70024)) - // Standard Error: 335_309 - .saturating_add(Weight::from_parts(3_318_621, 0).saturating_mul(s.into())) + // Standard Error: 331_661 + .saturating_add(Weight::from_parts(3_293_396, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -449,12 +447,12 @@ impl pallet_staking::WeightInfo for WeightInfo { fn payout_stakers_dead_controller(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `18657 + n * (150 ±0)` - // Estimated: `14733 + n * (2603 ±0)` - // Minimum execution time: 65_000_000 picoseconds. - Weight::from_parts(86_300_000, 0) + // Estimated: `14733 + n * (2603 ±19)` + // Minimum execution time: 66_000_000 picoseconds. + Weight::from_parts(99_000_000, 0) .saturating_add(Weight::from_parts(0, 14733)) - // Standard Error: 150_503 - .saturating_add(Weight::from_parts(28_482_812, 0).saturating_mul(n.into())) + // Standard Error: 178_189 + .saturating_add(Weight::from_parts(28_192_187, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -488,11 +486,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `31047 + n * (387 ±0)` // Estimated: `21124 + n * (3774 ±0)` - // Minimum execution time: 89_000_000 picoseconds. - Weight::from_parts(84_800_000, 0) + // Minimum execution time: 88_000_000 picoseconds. + Weight::from_parts(108_600_000, 0) .saturating_add(Weight::from_parts(0, 21124)) - // Standard Error: 307_990 - .saturating_add(Weight::from_parts(44_999_218, 0).saturating_mul(n.into())) + // Standard Error: 229_372 + .saturating_add(Weight::from_parts(44_316_406, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -516,11 +514,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2043 + l * (7 ±0)` // Estimated: `8877` - // Minimum execution time: 72_000_000 picoseconds. - Weight::from_parts(74_152_266, 0) + // Minimum execution time: 73_000_000 picoseconds. + Weight::from_parts(73_099_375, 0) .saturating_add(Weight::from_parts(0, 8877)) - // Standard Error: 73_278 - .saturating_add(Weight::from_parts(46_156, 0).saturating_mul(l.into())) + // Standard Error: 63_785 + .saturating_add(Weight::from_parts(135_840, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -555,11 +553,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2314 + s * (4 ±0)` // Estimated: `6248 + s * (4 ±0)` - // Minimum execution time: 88_000_000 picoseconds. - Weight::from_parts(89_522_371, 0) + // Minimum execution time: 83_000_000 picoseconds. + Weight::from_parts(81_020_712, 0) .saturating_add(Weight::from_parts(0, 6248)) - // Standard Error: 41_886 - .saturating_add(Weight::from_parts(1_300_351, 0).saturating_mul(s.into())) + // Standard Error: 28_741 + .saturating_add(Weight::from_parts(1_451_778, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(11)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -604,14 +602,14 @@ impl pallet_staking::WeightInfo for WeightInfo { fn new_era(v: u32, n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + n * (718 ±0) + v * (3598 ±0)` - // Estimated: `512390 + n * (3566 ±0) + v * (3566 ±0)` - // Minimum execution time: 506_000_000 picoseconds. - Weight::from_parts(506_000_000, 0) + // Estimated: `512390 + n * (3566 ±32) + v * (3566 ±321)` + // Minimum execution time: 511_000_000 picoseconds. + Weight::from_parts(511_000_000, 0) .saturating_add(Weight::from_parts(0, 512390)) - // Standard Error: 13_611_930 - .saturating_add(Weight::from_parts(46_934_500, 0).saturating_mul(v.into())) - // Standard Error: 1_357_132 - .saturating_add(Weight::from_parts(15_133_720, 0).saturating_mul(n.into())) + // Standard Error: 12_712_196 + .saturating_add(Weight::from_parts(45_000_392, 0).saturating_mul(v.into())) + // Standard Error: 1_267_427 + .saturating_add(Weight::from_parts(14_739_334, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(206)) .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into()))) .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into()))) @@ -642,13 +640,13 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3248 + n * (911 ±0) + v * (394 ±0)` // Estimated: `512390 + n * (3566 ±0) + v * (3566 ±0)` - // Minimum execution time: 27_629_000_000 picoseconds. - Weight::from_parts(1_332_499_999, 0) + // Minimum execution time: 27_071_000_000 picoseconds. + Weight::from_parts(27_071_000_000, 0) .saturating_add(Weight::from_parts(0, 512390)) - // Standard Error: 792_759 - .saturating_add(Weight::from_parts(16_835_200, 0).saturating_mul(v.into())) - // Standard Error: 792_759 - .saturating_add(Weight::from_parts(18_942_800, 0).saturating_mul(n.into())) + // Standard Error: 2_197_282 + .saturating_add(Weight::from_parts(5_300_438, 0).saturating_mul(v.into())) + // Standard Error: 2_197_282 + .saturating_add(Weight::from_parts(1_534_972, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(201)) .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into()))) .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into()))) @@ -665,11 +663,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `891 + v * (50 ±0)` // Estimated: `3510 + v * (2520 ±0)` - // Minimum execution time: 2_005_000_000 picoseconds. - Weight::from_parts(2_005_000_000, 0) + // Minimum execution time: 2_063_000_000 picoseconds. + Weight::from_parts(158_800_000, 0) .saturating_add(Weight::from_parts(0, 3510)) - // Standard Error: 204_834 - .saturating_add(Weight::from_parts(1_562_694, 0).saturating_mul(v.into())) + // Standard Error: 484_140 + .saturating_add(Weight::from_parts(4_098_000, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) .saturating_add(Weight::from_parts(0, 2520).saturating_mul(v.into())) @@ -691,7 +689,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(6_000_000, 0) + Weight::from_parts(8_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(6)) } @@ -711,7 +709,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_000_000 picoseconds. + // Minimum execution time: 5_000_000 picoseconds. Weight::from_parts(6_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(6)) @@ -741,7 +739,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Measured: `1839` // Estimated: `6248` // Minimum execution time: 58_000_000 picoseconds. - Weight::from_parts(63_000_000, 0) + Weight::from_parts(58_000_000, 0) .saturating_add(Weight::from_parts(0, 6248)) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(6)) @@ -755,7 +753,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Measured: `613` // Estimated: `3510` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + Weight::from_parts(14_000_000, 0) .saturating_add(Weight::from_parts(0, 3510)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -766,8 +764,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(3_000_000, 0) + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(4_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/src/weights/pallet_staking_extension.rs b/runtime/src/weights/pallet_staking_extension.rs index 06b7d3074..a48535852 100644 --- a/runtime/src/weights/pallet_staking_extension.rs +++ b/runtime/src/weights/pallet_staking_extension.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_staking_extension` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -43,8 +43,8 @@ impl pallet_staking_extension::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `1122` // Estimated: `4587` - // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(24_000_000, 0) + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(23_000_000, 0) .saturating_add(Weight::from_parts(0, 4587)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -59,8 +59,8 @@ impl pallet_staking_extension::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `1122` // Estimated: `4587` - // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(23_000_000, 0) + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(25_000_000, 0) .saturating_add(Weight::from_parts(0, 4587)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -79,8 +79,8 @@ impl pallet_staking_extension::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `1039` // Estimated: `4764` - // Minimum execution time: 40_000_000 picoseconds. - Weight::from_parts(44_000_000, 0) + // Minimum execution time: 39_000_000 picoseconds. + Weight::from_parts(49_000_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -130,7 +130,7 @@ impl pallet_staking_extension::WeightInfo for WeightInf // Measured: `289` // Estimated: `3754` // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + Weight::from_parts(16_000_000, 0) .saturating_add(Weight::from_parts(0, 3754)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -143,13 +143,13 @@ impl pallet_staking_extension::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `222 + c * (32 ±0)` // Estimated: `6154 + c * (32 ±0)` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(20_000_000, 0) + // Minimum execution time: 21_000_000 picoseconds. + Weight::from_parts(21_000_000, 0) .saturating_add(Weight::from_parts(0, 6154)) - // Standard Error: 199_598 - .saturating_add(Weight::from_parts(734_739, 0).saturating_mul(c.into())) - // Standard Error: 199_598 - .saturating_add(Weight::from_parts(752_539, 0).saturating_mul(n.into())) + // Standard Error: 201_006 + .saturating_add(Weight::from_parts(739_423, 0).saturating_mul(c.into())) + // Standard Error: 201_006 + .saturating_add(Weight::from_parts(755_690, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(c.into())) diff --git a/runtime/src/weights/pallet_sudo.rs b/runtime/src/weights/pallet_sudo.rs index 22fe8054d..f3b10acf4 100644 --- a/runtime/src/weights/pallet_sudo.rs +++ b/runtime/src/weights/pallet_sudo.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_sudo` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -42,7 +42,7 @@ impl pallet_sudo::WeightInfo for WeightInfo { // Measured: `136` // Estimated: `1517` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + Weight::from_parts(12_000_000, 0) .saturating_add(Weight::from_parts(0, 1517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -54,7 +54,7 @@ impl pallet_sudo::WeightInfo for WeightInfo { // Measured: `136` // Estimated: `1517` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + Weight::from_parts(12_000_000, 0) .saturating_add(Weight::from_parts(0, 1517)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -64,8 +64,8 @@ impl pallet_sudo::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `136` // Estimated: `1517` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(18_000_000, 0) .saturating_add(Weight::from_parts(0, 1517)) .saturating_add(T::DbWeight::get().reads(1)) } diff --git a/runtime/src/weights/pallet_timestamp.rs b/runtime/src/weights/pallet_timestamp.rs index eac4668bb..0a2c7ef11 100644 --- a/runtime/src/weights/pallet_timestamp.rs +++ b/runtime/src/weights/pallet_timestamp.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -43,8 +43,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `245` // Estimated: `1493` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -53,7 +53,7 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `94` // Estimated: `0` - // Minimum execution time: 4_000_000 picoseconds. + // Minimum execution time: 3_000_000 picoseconds. Weight::from_parts(4_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) } diff --git a/runtime/src/weights/pallet_tips.rs b/runtime/src/weights/pallet_tips.rs index 50e529bbf..46413b011 100644 --- a/runtime/src/weights/pallet_tips.rs +++ b/runtime/src/weights/pallet_tips.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_tips` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -45,10 +45,10 @@ impl pallet_tips::WeightInfo for WeightInfo { // Measured: `4` // Estimated: `3469` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(27_900_000, 0) + Weight::from_parts(32_300_000, 0) .saturating_add(Weight::from_parts(0, 3469)) - // Standard Error: 153 - .saturating_add(Weight::from_parts(1_318, 0).saturating_mul(r.into())) + // Standard Error: 274 + .saturating_add(Weight::from_parts(1_013, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -78,13 +78,11 @@ impl pallet_tips::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `848 + t * (64 ±0)` // Estimated: `4313 + t * (64 ±0)` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(13_576_984, 0) + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(18_782_539, 0) .saturating_add(Weight::from_parts(0, 4313)) - // Standard Error: 154 - .saturating_add(Weight::from_parts(1_381, 0).saturating_mul(r.into())) - // Standard Error: 210_373 - .saturating_add(Weight::from_parts(208_730, 0).saturating_mul(t.into())) + // Standard Error: 161 + .saturating_add(Weight::from_parts(1_263, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(t.into())) @@ -98,9 +96,11 @@ impl pallet_tips::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1069 + t * (112 ±0)` // Estimated: `4534 + t * (112 ±0)` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_783_333, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(13_266_666, 0) .saturating_add(Weight::from_parts(0, 4534)) + // Standard Error: 102_401 + .saturating_add(Weight::from_parts(233_333, 0).saturating_mul(t.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 112).saturating_mul(t.into())) @@ -118,8 +118,8 @@ impl pallet_tips::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1141 + t * (112 ±0)` // Estimated: `4617 + t * (108 ±1)` - // Minimum execution time: 58_000_000 picoseconds. - Weight::from_parts(62_683_333, 0) + // Minimum execution time: 57_000_000 picoseconds. + Weight::from_parts(58_300_000, 0) .saturating_add(Weight::from_parts(0, 4617)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -135,7 +135,7 @@ impl pallet_tips::WeightInfo for WeightInfo { // Measured: `269` // Estimated: `3734` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(11_433_333, 0) + Weight::from_parts(11_550_000, 0) .saturating_add(Weight::from_parts(0, 3734)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/runtime/src/weights/pallet_transaction_pause.rs b/runtime/src/weights/pallet_transaction_pause.rs index 8d09d5ed8..ec41c9317 100644 --- a/runtime/src/weights/pallet_transaction_pause.rs +++ b/runtime/src/weights/pallet_transaction_pause.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_transaction_pause` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -42,7 +42,7 @@ impl pallet_transaction_pause::WeightInfo for WeightInf // Measured: `109` // Estimated: `3574` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 3574)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -54,7 +54,7 @@ impl pallet_transaction_pause::WeightInfo for WeightInf // Measured: `160` // Estimated: `3625` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + Weight::from_parts(20_000_000, 0) .saturating_add(Weight::from_parts(0, 3625)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/src/weights/pallet_transaction_storage.rs b/runtime/src/weights/pallet_transaction_storage.rs index c7597774d..b6c46849d 100644 --- a/runtime/src/weights/pallet_transaction_storage.rs +++ b/runtime/src/weights/pallet_transaction_storage.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_transaction_storage` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -46,11 +46,11 @@ impl pallet_transaction_storage::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `142` // Estimated: `38351` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(31_000_000, 0) + // Minimum execution time: 33_000_000 picoseconds. + Weight::from_parts(33_000_000, 0) .saturating_add(Weight::from_parts(0, 38351)) - // Standard Error: 58 - .saturating_add(Weight::from_parts(4_884, 0).saturating_mul(l.into())) + // Standard Error: 45 + .saturating_add(Weight::from_parts(4_956, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -67,7 +67,7 @@ impl pallet_transaction_storage::WeightInfo for WeightI // Measured: `292` // Estimated: `40351` // Minimum execution time: 38_000_000 picoseconds. - Weight::from_parts(40_000_000, 0) + Weight::from_parts(38_000_000, 0) .saturating_add(Weight::from_parts(0, 40351)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) @@ -86,8 +86,8 @@ impl pallet_transaction_storage::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `37111` // Estimated: `40351` - // Minimum execution time: 116_000_000 picoseconds. - Weight::from_parts(122_000_000, 0) + // Minimum execution time: 73_000_000 picoseconds. + Weight::from_parts(112_000_000, 0) .saturating_add(Weight::from_parts(0, 40351)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/src/weights/pallet_treasury.rs b/runtime/src/weights/pallet_treasury.rs index 733691972..18a2bec83 100644 --- a/runtime/src/weights/pallet_treasury.rs +++ b/runtime/src/weights/pallet_treasury.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -65,7 +65,7 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `265` // Estimated: `3593` - // Minimum execution time: 26_000_000 picoseconds. + // Minimum execution time: 25_000_000 picoseconds. Weight::from_parts(26_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) @@ -80,11 +80,11 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `314 + p * (11 ±0)` // Estimated: `3573` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(8_212_167, 0) + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(8_021_070, 0) .saturating_add(Weight::from_parts(0, 3573)) - // Standard Error: 4_587 - .saturating_add(Weight::from_parts(26_175, 0).saturating_mul(p.into())) + // Standard Error: 11_465 + .saturating_add(Weight::from_parts(42_254, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -94,7 +94,7 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `90` // Estimated: `1887` - // Minimum execution time: 6_000_000 picoseconds. + // Minimum execution time: 5_000_000 picoseconds. Weight::from_parts(6_000_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(1)) @@ -115,11 +115,11 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `521 + p * (252 ±0)` // Estimated: `1887 + p * (5206 ±0)` - // Minimum execution time: 40_000_000 picoseconds. - Weight::from_parts(31_200_000, 0) + // Minimum execution time: 39_000_000 picoseconds. + Weight::from_parts(61_900_000, 0) .saturating_add(Weight::from_parts(0, 1887)) - // Standard Error: 259_662 - .saturating_add(Weight::from_parts(39_934_000, 0).saturating_mul(p.into())) + // Standard Error: 401_097 + .saturating_add(Weight::from_parts(39_340_000, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/runtime/src/weights/pallet_utility.rs b/runtime/src/weights/pallet_utility.rs index e32a3720c..3835d2b79 100644 --- a/runtime/src/weights/pallet_utility.rs +++ b/runtime/src/weights/pallet_utility.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -41,17 +41,17 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(21_400_000, 0) + Weight::from_parts(30_100_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 50_624 - .saturating_add(Weight::from_parts(4_476_000, 0).saturating_mul(c.into())) + // Standard Error: 53_463 + .saturating_add(Weight::from_parts(4_368_400, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(5_000_000, 0) + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(6_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -59,18 +59,18 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(2_200_000, 0) + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(26_600_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 30_938 - .saturating_add(Weight::from_parts(4_716_000, 0).saturating_mul(c.into())) + // Standard Error: 30_578 + .saturating_add(Weight::from_parts(4_506_600, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(8_000_000, 0) + Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `c` is `[0, 1000]`. @@ -79,9 +79,9 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(2_300_000, 0) + Weight::from_parts(6_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 24_976 - .saturating_add(Weight::from_parts(4_511_200, 0).saturating_mul(c.into())) + // Standard Error: 28_056 + .saturating_add(Weight::from_parts(4_354_333, 0).saturating_mul(c.into())) } } \ No newline at end of file diff --git a/runtime/src/weights/pallet_vesting.rs b/runtime/src/weights/pallet_vesting.rs index 08bdb8592..eb024a50f 100644 --- a/runtime/src/weights/pallet_vesting.rs +++ b/runtime/src/weights/pallet_vesting.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_vesting` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -48,12 +48,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Measured: `348 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(30_544_451, 0) + Weight::from_parts(28_060_725, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 31_628 - .saturating_add(Weight::from_parts(6_944, 0).saturating_mul(l.into())) - // Standard Error: 56_780 - .saturating_add(Weight::from_parts(116_932, 0).saturating_mul(s.into())) + // Standard Error: 67_283 + .saturating_add(Weight::from_parts(28_896, 0).saturating_mul(l.into())) + // Standard Error: 120_791 + .saturating_add(Weight::from_parts(258_432, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -65,15 +65,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. - fn vest_unlocked(l: u32, _s: u32, ) -> Weight { + fn vest_unlocked(_l: u32, _s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `348 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 33_000_000 picoseconds. - Weight::from_parts(35_843_368, 0) + // Minimum execution time: 34_000_000 picoseconds. + Weight::from_parts(40_822_710, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 34_826 - .saturating_add(Weight::from_parts(5_753, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -91,13 +89,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `488 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 32_000_000 picoseconds. - Weight::from_parts(31_169_276, 0) + // Minimum execution time: 33_000_000 picoseconds. + Weight::from_parts(31_043_766, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 16_887 - .saturating_add(Weight::from_parts(29_947, 0).saturating_mul(l.into())) - // Standard Error: 30_317 - .saturating_add(Weight::from_parts(90_071, 0).saturating_mul(s.into())) + // Standard Error: 60_060 + .saturating_add(Weight::from_parts(76_877, 0).saturating_mul(l.into())) + // Standard Error: 107_823 + .saturating_add(Weight::from_parts(129_704, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -111,17 +109,15 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. - fn vest_other_unlocked(l: u32, s: u32, ) -> Weight { + fn vest_other_unlocked(_l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `488 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` // Minimum execution time: 35_000_000 picoseconds. - Weight::from_parts(32_660_024, 0) + Weight::from_parts(37_444_876, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 35_849 - .saturating_add(Weight::from_parts(59_786, 0).saturating_mul(l.into())) - // Standard Error: 64_358 - .saturating_add(Weight::from_parts(156_324, 0).saturating_mul(s.into())) + // Standard Error: 100_665 + .saturating_add(Weight::from_parts(115_793, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -135,17 +131,15 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[0, 27]`. - fn vested_transfer(l: u32, s: u32, ) -> Weight { + fn vested_transfer(_l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `555 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 70_000_000 picoseconds. - Weight::from_parts(70_928_865, 0) + // Minimum execution time: 68_000_000 picoseconds. + Weight::from_parts(72_867_902, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 74_344 - .saturating_add(Weight::from_parts(31_144, 0).saturating_mul(l.into())) - // Standard Error: 133_467 - .saturating_add(Weight::from_parts(110_731, 0).saturating_mul(s.into())) + // Standard Error: 59_572 + .saturating_add(Weight::from_parts(74_638, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -159,17 +153,15 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[0, 27]`. - fn force_vested_transfer(l: u32, s: u32, ) -> Weight { + fn force_vested_transfer(_l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `658 + l * (25 ±0) + s * (36 ±0)` // Estimated: `6196` - // Minimum execution time: 71_000_000 picoseconds. - Weight::from_parts(71_301_727, 0) + // Minimum execution time: 69_000_000 picoseconds. + Weight::from_parts(70_591_638, 0) .saturating_add(Weight::from_parts(0, 6196)) - // Standard Error: 42_139 - .saturating_add(Weight::from_parts(19_364, 0).saturating_mul(l.into())) - // Standard Error: 75_651 - .saturating_add(Weight::from_parts(84_171, 0).saturating_mul(s.into())) + // Standard Error: 93_165 + .saturating_add(Weight::from_parts(165_030, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -187,13 +179,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `449 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 32_000_000 picoseconds. - Weight::from_parts(33_434_015, 0) + // Minimum execution time: 33_000_000 picoseconds. + Weight::from_parts(30_995_188, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 37_647 - .saturating_add(Weight::from_parts(8_452, 0).saturating_mul(l.into())) - // Standard Error: 70_687 - .saturating_add(Weight::from_parts(55_991, 0).saturating_mul(s.into())) + // Standard Error: 32_138 + .saturating_add(Weight::from_parts(35_989, 0).saturating_mul(l.into())) + // Standard Error: 60_342 + .saturating_add(Weight::from_parts(119_003, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -212,12 +204,12 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Measured: `449 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` // Minimum execution time: 36_000_000 picoseconds. - Weight::from_parts(34_408_605, 0) + Weight::from_parts(35_212_372, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 10_601 - .saturating_add(Weight::from_parts(40_486, 0).saturating_mul(l.into())) - // Standard Error: 19_904 - .saturating_add(Weight::from_parts(91_335, 0).saturating_mul(s.into())) + // Standard Error: 23_743 + .saturating_add(Weight::from_parts(25_005, 0).saturating_mul(l.into())) + // Standard Error: 44_580 + .saturating_add(Weight::from_parts(92_269, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } From 79d2e66da8fd173db511fc1bd9ca19d65b07c681 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Fri, 1 Dec 2023 15:45:06 -0500 Subject: [PATCH 10/48] add change pointer benchmark --- pallets/relayer/src/benchmarking.rs | 20 ++++++++++++++++ pallets/relayer/src/lib.rs | 2 +- pallets/relayer/src/weights.rs | 25 ++++++++++++++++++++ runtime/src/weights/pallet_relayer.rs | 34 ++++++++++++++++++--------- 4 files changed, 69 insertions(+), 12 deletions(-) diff --git a/pallets/relayer/src/benchmarking.rs b/pallets/relayer/src/benchmarking.rs index e70e05e2b..5d9c1b1dd 100644 --- a/pallets/relayer/src/benchmarking.rs +++ b/pallets/relayer/src/benchmarking.rs @@ -90,6 +90,26 @@ benchmarks! { assert_last_event::(Event::RegistrationCancelled(sig_req_account.clone()).into()); } + change_program_pointer { + let program_modification_account: T::AccountId = whitelisted_caller(); + let program = vec![0u8]; + let program_hash = T::Hashing::hash(&program); + let new_program = vec![1u8]; + let new_program_hash = T::Hashing::hash(&new_program); + let sig_req_account: T::AccountId = whitelisted_caller(); + let balance = ::Currency::minimum_balance() * 100u32.into(); + let _ = ::Currency::make_free_balance_be(&sig_req_account, balance); + >::insert(&sig_req_account, RegisteredInfo { + program_modification_account: sig_req_account.clone(), + program_pointer: program_hash, + verifying_key: BoundedVec::default(), + key_visibility: KeyVisibility::Public, + }); + }: _(RawOrigin::Signed(sig_req_account.clone()), sig_req_account.clone(), new_program_hash.clone()) + verify { + assert_last_event::(Event::ProgramPointerChanged(sig_req_account.clone(), new_program_hash).into()); + } + confirm_register_registering { let c in 0 .. SIG_PARTIES as u32; let program = vec![0u8]; diff --git a/pallets/relayer/src/lib.rs b/pallets/relayer/src/lib.rs index 09281ed69..1d1fc0901 100644 --- a/pallets/relayer/src/lib.rs +++ b/pallets/relayer/src/lib.rs @@ -255,7 +255,7 @@ pub mod pallet { #[pallet::call_index(2)] // TODO fix bench #[pallet::weight({ - ::WeightInfo::prune_registration() + ::WeightInfo::change_program_pointer() })] pub fn change_program_pointer( origin: OriginFor, diff --git a/pallets/relayer/src/weights.rs b/pallets/relayer/src/weights.rs index cc82c72d8..539a356f8 100644 --- a/pallets/relayer/src/weights.rs +++ b/pallets/relayer/src/weights.rs @@ -39,6 +39,7 @@ use core::marker::PhantomData; pub trait WeightInfo { fn register(p: u32, ) -> Weight; fn prune_registration() -> Weight; + fn change_program_pointer() -> Weight; fn confirm_register_registering(c: u32, ) -> Weight; fn confirm_register_failed_registering(c: u32, ) -> Weight; fn confirm_register_registered(c: u32, ) -> Weight; @@ -76,6 +77,18 @@ impl WeightInfo for SubstrateWeight { .saturating_add(T::DbWeight::get().reads(1_u64)) .saturating_add(T::DbWeight::get().writes(1_u64)) } + /// Storage: `Relayer::Registered` (r:1 w:1) + /// Proof: `Relayer::Registered` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn change_program_pointer() -> Weight { + // Proof Size summary in bytes: + // Measured: `255` + // Estimated: `3720` + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(12_000_000, 0) + .saturating_add(Weight::from_parts(0, 3720)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } /// Storage: `StakingExtension::ThresholdToStash` (r:1 w:0) /// Proof: `StakingExtension::ThresholdToStash` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Relayer::Registering` (r:1 w:1) @@ -169,6 +182,18 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(1_u64)) .saturating_add(RocksDbWeight::get().writes(1_u64)) } + /// Storage: `Relayer::Registered` (r:1 w:1) + /// Proof: `Relayer::Registered` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn change_program_pointer() -> Weight { + // Proof Size summary in bytes: + // Measured: `255` + // Estimated: `3720` + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(12_000_000, 0) + .saturating_add(Weight::from_parts(0, 3720)) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(1)) + } /// Storage: `StakingExtension::ThresholdToStash` (r:1 w:0) /// Proof: `StakingExtension::ThresholdToStash` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Relayer::Registering` (r:1 w:1) diff --git a/runtime/src/weights/pallet_relayer.rs b/runtime/src/weights/pallet_relayer.rs index 664cbf932..8e922251f 100644 --- a/runtime/src/weights/pallet_relayer.rs +++ b/runtime/src/weights/pallet_relayer.rs @@ -47,7 +47,7 @@ impl pallet_relayer::WeightInfo for WeightInfo { // Measured: `133` // Estimated: `3598` // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(17_800_000, 0) + Weight::from_parts(16_600_000, 0) .saturating_add(Weight::from_parts(0, 3598)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -58,9 +58,21 @@ impl pallet_relayer::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `199` // Estimated: `3664` + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(11_000_000, 0) + .saturating_add(Weight::from_parts(0, 3664)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Relayer::Registered` (r:1 w:1) + /// Proof: `Relayer::Registered` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn change_program_pointer() -> Weight { + // Proof Size summary in bytes: + // Measured: `255` + // Estimated: `3720` // Minimum execution time: 11_000_000 picoseconds. Weight::from_parts(12_000_000, 0) - .saturating_add(Weight::from_parts(0, 3664)) + .saturating_add(Weight::from_parts(0, 3720)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -71,13 +83,15 @@ impl pallet_relayer::WeightInfo for WeightInfo { /// Storage: `StakingExtension::SigningGroups` (r:1 w:0) /// Proof: `StakingExtension::SigningGroups` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `c` is `[0, 2]`. - fn confirm_register_registering(_c: u32, ) -> Weight { + fn confirm_register_registering(c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `16534` // Estimated: `19999` - // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(29_416_666, 0) + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(27_750_000, 0) .saturating_add(Weight::from_parts(0, 19999)) + // Standard Error: 1_165_922 + .saturating_add(Weight::from_parts(250_000, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -93,7 +107,7 @@ impl pallet_relayer::WeightInfo for WeightInfo { // Measured: `16536` // Estimated: `20001` // Minimum execution time: 24_000_000 picoseconds. - Weight::from_parts(28_583_333, 0) + Weight::from_parts(24_916_666, 0) .saturating_add(Weight::from_parts(0, 20001)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -107,15 +121,13 @@ impl pallet_relayer::WeightInfo for WeightInfo { /// Storage: `Relayer::Registered` (r:0 w:1) /// Proof: `Relayer::Registered` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `c` is `[0, 2]`. - fn confirm_register_registered(c: u32, ) -> Weight { + fn confirm_register_registered(_c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `16535` // Estimated: `20000` - // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(28_250_000, 0) + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(27_916_666, 0) .saturating_add(Weight::from_parts(0, 20000)) - // Standard Error: 450_693 - .saturating_add(Weight::from_parts(250_000, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } From a1588e74715094d75fb59ced01d2294eff66c92f Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Fri, 1 Dec 2023 18:29:51 -0500 Subject: [PATCH 11/48] fix test --- pallets/transaction-pause/src/mock.rs | 2 ++ pallets/transaction-pause/src/tests.rs | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pallets/transaction-pause/src/mock.rs b/pallets/transaction-pause/src/mock.rs index 65bb24fe4..576376b32 100644 --- a/pallets/transaction-pause/src/mock.rs +++ b/pallets/transaction-pause/src/mock.rs @@ -83,12 +83,14 @@ impl pallet_balances::Config for Runtime { parameter_types! { pub const MaxBytecodeLength: u32 = 3; pub const ProgramDepositPerByte: u32 = 5; + pub const MaxOwnedPrograms: u32 = 5; } impl pallet_programs::Config for Runtime { type Currency = (); type MaxBytecodeLength = MaxBytecodeLength; type ProgramDepositPerByte = ProgramDepositPerByte; + type MaxOwnedPrograms = MaxOwnedPrograms; type RuntimeEvent = RuntimeEvent; type WeightInfo = (); } diff --git a/pallets/transaction-pause/src/tests.rs b/pallets/transaction-pause/src/tests.rs index dd6364231..97e75d9d7 100644 --- a/pallets/transaction-pause/src/tests.rs +++ b/pallets/transaction-pause/src/tests.rs @@ -133,8 +133,7 @@ fn unpause_transaction_work() { fn paused_transaction_filter_work() { ExtBuilder.build().execute_with(|| { let whitelist_address_call = - &mock::RuntimeCall::ProgramsPallet(pallet_programs::Call::update_program { - sig_req_account: ALICE, + &mock::RuntimeCall::ProgramsPallet(pallet_programs::Call::set_program { new_program: vec![], }); assert!(!PausedTransactionFilter::::contains(BALANCE_TRANSFER)); @@ -147,7 +146,7 @@ fn paused_transaction_filter_work() { assert_ok!(TransactionPause::pause_transaction( RuntimeOrigin::signed(1), b"ProgramsPallet".to_vec(), - b"update_program".to_vec() + b"set_program".to_vec() )); assert!(PausedTransactionFilter::::contains(BALANCE_TRANSFER)); @@ -160,7 +159,7 @@ fn paused_transaction_filter_work() { assert_ok!(TransactionPause::unpause_transaction( RuntimeOrigin::signed(1), b"ProgramsPallet".to_vec(), - b"update_program".to_vec() + b"set_program".to_vec() )); assert!(!PausedTransactionFilter::::contains(BALANCE_TRANSFER)); From 9412b49efba6fdbc11ae28e2cfe8b735e2845260 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Fri, 1 Dec 2023 18:39:32 -0500 Subject: [PATCH 12/48] fix bench --- pallets/programs/src/lib.rs | 11 +++++++--- pallets/relayer/src/benchmarking.rs | 5 +---- pallets/relayer/src/lib.rs | 3 +-- pallets/relayer/src/weights.rs | 30 ++++++++++++--------------- runtime/src/weights/pallet_relayer.rs | 29 +++++++++++++------------- 5 files changed, 38 insertions(+), 40 deletions(-) diff --git a/pallets/programs/src/lib.rs b/pallets/programs/src/lib.rs index c3ac8ffaa..b144a7389 100644 --- a/pallets/programs/src/lib.rs +++ b/pallets/programs/src/lib.rs @@ -126,16 +126,19 @@ pub mod pallet { NotAuthorized, /// The program length is too long. ProgramLengthExceeded, + /// No program defined at hash. NoProgramDefined, + /// Program already set at hash. ProgramAlreadySet, + /// User owns too many programs. TooManyProgramsOwned, } #[pallet::call] impl Pallet { - /// Sets or clears the program for a given signature-request account. + /// Sets the program and uses hash as key. /// - /// Note that the call must be sent from a program-modification account. + /// Note that the call becomes the program-modification account. #[pallet::call_index(0)] #[pallet::weight({::WeightInfo::set_program()})] pub fn set_program(origin: OriginFor, new_program: Vec) -> DispatchResult { @@ -173,8 +176,10 @@ pub mod pallet { Ok(()) } + /// Removes a program at a specific hash + /// + /// Caller must be the program modification account for said program. #[pallet::call_index(1)] - // TODO remove program bench #[pallet::weight({::WeightInfo::remove_program( ::MaxOwnedPrograms::get())})] pub fn remove_program( origin: OriginFor, diff --git a/pallets/relayer/src/benchmarking.rs b/pallets/relayer/src/benchmarking.rs index 5d9c1b1dd..85988241a 100644 --- a/pallets/relayer/src/benchmarking.rs +++ b/pallets/relayer/src/benchmarking.rs @@ -55,10 +55,7 @@ pub fn add_non_syncing_validators( benchmarks! { register { - // Since we're usually using `steps >> 1` when running benches this shouldn't take too long to - // run - let p in 0..::MaxBytecodeLength::get(); - let program = vec![0u8; p as usize]; + let program = vec![0u8]; let program_hash = T::Hashing::hash(&program); let program_modification_account: T::AccountId = whitelisted_caller(); diff --git a/pallets/relayer/src/lib.rs b/pallets/relayer/src/lib.rs index 1d1fc0901..622cd397c 100644 --- a/pallets/relayer/src/lib.rs +++ b/pallets/relayer/src/lib.rs @@ -196,7 +196,7 @@ pub mod pallet { #[pallet::call_index(0)] //TODO fix #[pallet::weight({ - ::WeightInfo::register(0u32) + ::WeightInfo::register() })] pub fn register( origin: OriginFor, @@ -253,7 +253,6 @@ pub mod pallet { } /// Allows a user's program modification account to change their program pointer #[pallet::call_index(2)] - // TODO fix bench #[pallet::weight({ ::WeightInfo::change_program_pointer() })] diff --git a/pallets/relayer/src/weights.rs b/pallets/relayer/src/weights.rs index 539a356f8..7f6b0d00c 100644 --- a/pallets/relayer/src/weights.rs +++ b/pallets/relayer/src/weights.rs @@ -37,7 +37,7 @@ use core::marker::PhantomData; /// Weight functions needed for pallet_relayer. pub trait WeightInfo { - fn register(p: u32, ) -> Weight; + fn register() -> Weight; fn prune_registration() -> Weight; fn change_program_pointer() -> Weight; fn confirm_register_registering(c: u32, ) -> Weight; @@ -54,17 +54,15 @@ impl WeightInfo for SubstrateWeight { /// Proof: `Relayer::Registering` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Relayer::Dkg` (r:1 w:1) /// Proof: `Relayer::Dkg` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `p` is `[0, 1000000]`. - fn register(p: u32, ) -> Weight { + fn register() -> Weight { // Proof Size summary in bytes: // Measured: `133` // Estimated: `3598` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(36_561_014, 3598) - // Standard Error: 1 - .saturating_add(Weight::from_parts(615, 0).saturating_mul(p.into())) - .saturating_add(T::DbWeight::get().reads(3_u64)) - .saturating_add(T::DbWeight::get().writes(2_u64)) + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(17_000_000, 0) + .saturating_add(Weight::from_parts(0, 3598)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Relayer::Registering` (r:1 w:1) /// Proof: `Relayer::Registering` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -159,17 +157,15 @@ impl WeightInfo for () { /// Proof: `Relayer::Registering` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Relayer::Dkg` (r:1 w:1) /// Proof: `Relayer::Dkg` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `p` is `[0, 1000000]`. - fn register(p: u32, ) -> Weight { + fn register() -> Weight { // Proof Size summary in bytes: // Measured: `133` // Estimated: `3598` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(36_561_014, 3598) - // Standard Error: 1 - .saturating_add(Weight::from_parts(615, 0).saturating_mul(p.into())) - .saturating_add(RocksDbWeight::get().reads(3_u64)) - .saturating_add(RocksDbWeight::get().writes(2_u64)) + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(17_000_000, 0) + .saturating_add(Weight::from_parts(0, 3598)) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(2)) } /// Storage: `Relayer::Registering` (r:1 w:1) /// Proof: `Relayer::Registering` (`max_values`: None, `max_size`: None, mode: `Measured`) diff --git a/runtime/src/weights/pallet_relayer.rs b/runtime/src/weights/pallet_relayer.rs index 8e922251f..e45c745aa 100644 --- a/runtime/src/weights/pallet_relayer.rs +++ b/runtime/src/weights/pallet_relayer.rs @@ -41,13 +41,12 @@ impl pallet_relayer::WeightInfo for WeightInfo { /// Proof: `Relayer::Registering` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Relayer::Dkg` (r:1 w:1) /// Proof: `Relayer::Dkg` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `p` is `[0, 1000000]`. - fn register(_p: u32, ) -> Weight { + fn register() -> Weight { // Proof Size summary in bytes: // Measured: `133` // Estimated: `3598` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_600_000, 0) + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(17_000_000, 0) .saturating_add(Weight::from_parts(0, 3598)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -58,7 +57,7 @@ impl pallet_relayer::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `199` // Estimated: `3664` - // Minimum execution time: 10_000_000 picoseconds. + // Minimum execution time: 11_000_000 picoseconds. Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 3664)) .saturating_add(T::DbWeight::get().reads(1)) @@ -70,8 +69,8 @@ impl pallet_relayer::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `255` // Estimated: `3720` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 3720)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -87,11 +86,11 @@ impl pallet_relayer::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `16534` // Estimated: `19999` - // Minimum execution time: 26_000_000 picoseconds. - Weight::from_parts(27_750_000, 0) + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(26_166_666, 0) .saturating_add(Weight::from_parts(0, 19999)) - // Standard Error: 1_165_922 - .saturating_add(Weight::from_parts(250_000, 0).saturating_mul(c.into())) + // Standard Error: 3_664_298 + .saturating_add(Weight::from_parts(9_000_000, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -107,7 +106,7 @@ impl pallet_relayer::WeightInfo for WeightInfo { // Measured: `16536` // Estimated: `20001` // Minimum execution time: 24_000_000 picoseconds. - Weight::from_parts(24_916_666, 0) + Weight::from_parts(27_333_333, 0) .saturating_add(Weight::from_parts(0, 20001)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -121,13 +120,15 @@ impl pallet_relayer::WeightInfo for WeightInfo { /// Storage: `Relayer::Registered` (r:0 w:1) /// Proof: `Relayer::Registered` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `c` is `[0, 2]`. - fn confirm_register_registered(_c: u32, ) -> Weight { + fn confirm_register_registered(c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `16535` // Estimated: `20000` // Minimum execution time: 26_000_000 picoseconds. - Weight::from_parts(27_916_666, 0) + Weight::from_parts(28_333_333, 0) .saturating_add(Weight::from_parts(0, 20000)) + // Standard Error: 603_807 + .saturating_add(Weight::from_parts(500_000, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } From 78acd5f8174e3573f027a9b6ebc805594f29a5ce Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Fri, 1 Dec 2023 18:41:19 -0500 Subject: [PATCH 13/48] clean --- pallets/relayer/src/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pallets/relayer/src/lib.rs b/pallets/relayer/src/lib.rs index 622cd397c..574ee1405 100644 --- a/pallets/relayer/src/lib.rs +++ b/pallets/relayer/src/lib.rs @@ -187,14 +187,12 @@ pub mod pallet { impl Pallet { /// Allows a user to signal that they want to register an account with the Entropy network. /// - /// The caller provides an initial program, if any, an account which is able to modify a - /// the program, and the program's permission level on the network. + /// The caller provides an initial program pointer. /// /// Note that a user needs to be confirmed by validators through the /// [`Self::confirm_register`] extrinsic before they can be considered as registered on the /// network. #[pallet::call_index(0)] - //TODO fix #[pallet::weight({ ::WeightInfo::register() })] From 238b25f3cd5f11074a11601f4e60e74703c516dc Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Mon, 4 Dec 2023 12:56:38 -0800 Subject: [PATCH 14/48] merge master --- crypto/server/tests/protocol_wasm.rs | 2 - crypto/server/tests/sign.rs | 2 - crypto/test-cli/src/main.rs | 2 +- crypto/testing-utils/src/test_client/mod.rs | 1 - pallets/programs/src/weights.rs | 2 +- pallets/relayer/src/weights.rs | 2 +- runtime/src/weights/pallet_programs.rs | 38 +++++++--- runtime/src/weights/pallet_relayer.rs | 77 +++++++++++---------- 8 files changed, 72 insertions(+), 54 deletions(-) diff --git a/crypto/server/tests/protocol_wasm.rs b/crypto/server/tests/protocol_wasm.rs index b1eb91eb8..90fa62d01 100644 --- a/crypto/server/tests/protocol_wasm.rs +++ b/crypto/server/tests/protocol_wasm.rs @@ -12,8 +12,6 @@ use serde::{Deserialize, Serialize}; use serial_test::serial; use sp_core::{ crypto::{AccountId32, Pair, Ss58Codec}, - sr25519::Signature, - Bytes, }; use sp_keyring::{AccountKeyring, Sr25519Keyring}; use std::{ diff --git a/crypto/server/tests/sign.rs b/crypto/server/tests/sign.rs index 6b0889118..e79cd5a1d 100644 --- a/crypto/server/tests/sign.rs +++ b/crypto/server/tests/sign.rs @@ -33,7 +33,6 @@ async fn integration_test_sign() { test_client::update_program( &api, - SubxtAccountId32(pre_registered_user.into()), &pre_registered_user.pair(), TEST_PROGRAM_WASM_BYTECODE.to_owned(), ) @@ -77,7 +76,6 @@ async fn integration_test_sign_private() { test_client::update_program( &api, - SubxtAccountId32(pre_registered_user.into()), &pre_registered_user.pair(), TEST_PROGRAM_WASM_BYTECODE.to_owned(), ) diff --git a/crypto/test-cli/src/main.rs b/crypto/test-cli/src/main.rs index 0412ba6a7..6515fe46a 100644 --- a/crypto/test-cli/src/main.rs +++ b/crypto/test-cli/src/main.rs @@ -228,7 +228,7 @@ async fn run_command() -> anyhow::Result { let program_keypair: sr25519::Pair = SeedString::new(program_account_name).try_into()?; - update_program(&api, sig_req_account, &program_keypair, program).await?; + update_program(&api, &program_keypair, program).await?; Ok("Program updated".to_string()) }, CliCommand::Status => { diff --git a/crypto/testing-utils/src/test_client/mod.rs b/crypto/testing-utils/src/test_client/mod.rs index 4066847e2..5aa99139c 100644 --- a/crypto/testing-utils/src/test_client/mod.rs +++ b/crypto/testing-utils/src/test_client/mod.rs @@ -246,7 +246,6 @@ pub async fn sign( )] pub async fn update_program( api: &OnlineClient, - signature_request_account: SubxtAccountId32, program_modification_keypair: &sr25519::Pair, program: Vec, ) -> anyhow::Result<()> { diff --git a/pallets/programs/src/weights.rs b/pallets/programs/src/weights.rs index b859c2ca5..dd5b04ac0 100644 --- a/pallets/programs/src/weights.rs +++ b/pallets/programs/src/weights.rs @@ -112,4 +112,4 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 31).saturating_mul(p.into())) } -} +} \ No newline at end of file diff --git a/pallets/relayer/src/weights.rs b/pallets/relayer/src/weights.rs index 7f6b0d00c..707c936a7 100644 --- a/pallets/relayer/src/weights.rs +++ b/pallets/relayer/src/weights.rs @@ -250,4 +250,4 @@ impl WeightInfo for () { .saturating_add(RocksDbWeight::get().reads(3_u64)) .saturating_add(RocksDbWeight::get().writes(4_u64)) } -} +} \ No newline at end of file diff --git a/runtime/src/weights/pallet_programs.rs b/runtime/src/weights/pallet_programs.rs index f8275a33c..aee76b7da 100644 --- a/runtime/src/weights/pallet_programs.rs +++ b/runtime/src/weights/pallet_programs.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_programs` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -35,18 +35,36 @@ use core::marker::PhantomData; /// Weight functions for `pallet_programs`. pub struct WeightInfo(PhantomData); impl pallet_programs::WeightInfo for WeightInfo { - /// Storage: `Programs::AllowedToModifyProgram` (r:1 w:0) - /// Proof: `Programs::AllowedToModifyProgram` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Programs::Bytecode` (r:1 w:1) /// Proof: `Programs::Bytecode` (`max_values`: None, `max_size`: None, mode: `Measured`) - fn update_program() -> Weight { + /// Storage: `Programs::OwnedPrograms` (r:1 w:1) + /// Proof: `Programs::OwnedPrograms` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn set_program() -> Weight { // Proof Size summary in bytes: - // Measured: `336` - // Estimated: `3801` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(34_000_000, 0) - .saturating_add(Weight::from_parts(0, 3801)) + // Measured: `142` + // Estimated: `3607` + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(27_000_000, 0) + .saturating_add(Weight::from_parts(0, 3607)) .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes(2)) + } + /// Storage: `Programs::Bytecode` (r:1 w:1) + /// Proof: `Programs::Bytecode` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// Storage: `Programs::OwnedPrograms` (r:1 w:1) + /// Proof: `Programs::OwnedPrograms` (`max_values`: None, `max_size`: None, mode: `Measured`) + /// The range of component `p` is `[0, 25]`. + fn remove_program(p: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `326 + p * (32 ±0)` + // Estimated: `3809 + p * (31 ±0)` + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(26_938_669, 0) + .saturating_add(Weight::from_parts(0, 3809)) + // Standard Error: 47_904 + .saturating_add(Weight::from_parts(136_174, 0).saturating_mul(p.into())) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(Weight::from_parts(0, 31).saturating_mul(p.into())) } } \ No newline at end of file diff --git a/runtime/src/weights/pallet_relayer.rs b/runtime/src/weights/pallet_relayer.rs index 7f6a45d8c..e45c745aa 100644 --- a/runtime/src/weights/pallet_relayer.rs +++ b/runtime/src/weights/pallet_relayer.rs @@ -3,7 +3,7 @@ //! Autogenerated weights for `pallet_relayer` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-12-01, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` //! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 @@ -41,16 +41,13 @@ impl pallet_relayer::WeightInfo for WeightInfo { /// Proof: `Relayer::Registering` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Relayer::Dkg` (r:1 w:1) /// Proof: `Relayer::Dkg` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// The range of component `p` is `[0, 1000000]`. - fn register(p: u32, ) -> Weight { + fn register() -> Weight { // Proof Size summary in bytes: // Measured: `133` // Estimated: `3598` // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(13_800_000, 0) + Weight::from_parts(17_000_000, 0) .saturating_add(Weight::from_parts(0, 3598)) - // Standard Error: 60 - .saturating_add(Weight::from_parts(584, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -58,11 +55,23 @@ impl pallet_relayer::WeightInfo for WeightInfo { /// Proof: `Relayer::Registering` (`max_values`: None, `max_size`: None, mode: `Measured`) fn prune_registration() -> Weight { // Proof Size summary in bytes: - // Measured: `167` - // Estimated: `3632` + // Measured: `199` + // Estimated: `3664` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) - .saturating_add(Weight::from_parts(0, 3632)) + Weight::from_parts(11_000_000, 0) + .saturating_add(Weight::from_parts(0, 3664)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: `Relayer::Registered` (r:1 w:1) + /// Proof: `Relayer::Registered` (`max_values`: None, `max_size`: None, mode: `Measured`) + fn change_program_pointer() -> Weight { + // Proof Size summary in bytes: + // Measured: `255` + // Estimated: `3720` + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) + .saturating_add(Weight::from_parts(0, 3720)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -75,13 +84,13 @@ impl pallet_relayer::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 2]`. fn confirm_register_registering(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `16502` - // Estimated: `19967` - // Minimum execution time: 26_000_000 picoseconds. - Weight::from_parts(30_416_666, 0) - .saturating_add(Weight::from_parts(0, 19967)) - // Standard Error: 2_964_196 - .saturating_add(Weight::from_parts(1_750_000, 0).saturating_mul(c.into())) + // Measured: `16534` + // Estimated: `19999` + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(26_166_666, 0) + .saturating_add(Weight::from_parts(0, 19999)) + // Standard Error: 3_664_298 + .saturating_add(Weight::from_parts(9_000_000, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -92,15 +101,13 @@ impl pallet_relayer::WeightInfo for WeightInfo { /// Storage: `StakingExtension::SigningGroups` (r:1 w:0) /// Proof: `StakingExtension::SigningGroups` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `c` is `[0, 2]`. - fn confirm_register_failed_registering(c: u32, ) -> Weight { + fn confirm_register_failed_registering(_c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `16504` - // Estimated: `19969` - // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(33_000_000, 0) - .saturating_add(Weight::from_parts(0, 19969)) - // Standard Error: 2_715_695 - .saturating_add(Weight::from_parts(2_000_000, 0).saturating_mul(c.into())) + // Measured: `16536` + // Estimated: `20001` + // Minimum execution time: 24_000_000 picoseconds. + Weight::from_parts(27_333_333, 0) + .saturating_add(Weight::from_parts(0, 20001)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -112,19 +119,17 @@ impl pallet_relayer::WeightInfo for WeightInfo { /// Proof: `StakingExtension::SigningGroups` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Relayer::Registered` (r:0 w:1) /// Proof: `Relayer::Registered` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Programs::AllowedToModifyProgram` (r:0 w:1) - /// Proof: `Programs::AllowedToModifyProgram` (`max_values`: None, `max_size`: None, mode: `Measured`) - /// Storage: `Programs::Bytecode` (r:0 w:1) - /// Proof: `Programs::Bytecode` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `c` is `[0, 2]`. - fn confirm_register_registered(_c: u32, ) -> Weight { + fn confirm_register_registered(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `16503` - // Estimated: `19968` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(32_500_000, 0) - .saturating_add(Weight::from_parts(0, 19968)) + // Measured: `16535` + // Estimated: `20000` + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(28_333_333, 0) + .saturating_add(Weight::from_parts(0, 20000)) + // Standard Error: 603_807 + .saturating_add(Weight::from_parts(500_000, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(4)) + .saturating_add(T::DbWeight::get().writes(2)) } } \ No newline at end of file From 2565300f75a7cac4d28359bbfb98a1b18fb2d499 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Mon, 4 Dec 2023 17:10:17 -0800 Subject: [PATCH 15/48] clean --- crypto/server/tests/protocol_wasm.rs | 13 ++++++++----- crypto/server/tests/sign.rs | 1 - crypto/test-cli/src/main.rs | 21 ++++++++++++--------- crypto/testing-utils/src/test_client/mod.rs | 16 ++++++---------- pallets/programs/src/tests.rs | 1 - pallets/relayer/src/tests.rs | 3 --- 6 files changed, 26 insertions(+), 29 deletions(-) diff --git a/crypto/server/tests/protocol_wasm.rs b/crypto/server/tests/protocol_wasm.rs index 90fa62d01..9bdfa5ca7 100644 --- a/crypto/server/tests/protocol_wasm.rs +++ b/crypto/server/tests/protocol_wasm.rs @@ -10,13 +10,12 @@ use kvdb::clean_tests; use parity_scale_codec::Encode; use serde::{Deserialize, Serialize}; use serial_test::serial; -use sp_core::{ - crypto::{AccountId32, Pair, Ss58Codec}, -}; +use sp_core::crypto::{AccountId32, Pair, Ss58Codec}; use sp_keyring::{AccountKeyring, Sr25519Keyring}; use std::{ thread, time::{Duration, SystemTime}, + str::FromStr }; use subxt::{ backend::legacy::LegacyRpcMethods, @@ -61,7 +60,7 @@ async fn test_wasm_sign_tx_user_participates() { let substrate_context = test_context_stationary().await; let entropy_api = get_api(&substrate_context.node_proc.ws_url).await.unwrap(); - update_program(&entropy_api, &one.pair(), TEST_PROGRAM_WASM_BYTECODE.to_owned()).await; + update_program(&entropy_api, &one.pair(), TEST_PROGRAM_WASM_BYTECODE.to_owned()).await.unwrap(); let validators_info = vec![ ValidatorInfo { @@ -182,12 +181,16 @@ async fn test_wasm_register_with_private_key_visibility() { let one_x25519_sk = derive_static_secret(&one.pair()); let x25519_public_key = PublicKey::from(&one_x25519_sk).to_bytes(); + let empty_program_hash: H256 = + H256::from_str("0x0e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8") + .unwrap(); + put_register_request_on_chain( &api, one.pair(), program_modification_account.to_account_id().into(), KeyVisibility::Private(x25519_public_key), - Vec::new(), + empty_program_hash ) .await .unwrap(); diff --git a/crypto/server/tests/sign.rs b/crypto/server/tests/sign.rs index e79cd5a1d..ba3a31c9c 100644 --- a/crypto/server/tests/sign.rs +++ b/crypto/server/tests/sign.rs @@ -2,7 +2,6 @@ use kvdb::clean_tests; use serial_test::serial; use sp_core::crypto::Ss58Codec; use sp_keyring::AccountKeyring; -use subxt::utils::AccountId32 as SubxtAccountId32; use synedrion::k256::ecdsa::VerifyingKey; use testing_utils::{ constants::{ diff --git a/crypto/test-cli/src/main.rs b/crypto/test-cli/src/main.rs index 6515fe46a..bf0a518f7 100644 --- a/crypto/test-cli/src/main.rs +++ b/crypto/test-cli/src/main.rs @@ -3,13 +3,14 @@ use std::{ fmt::{self, Display}, fs, path::PathBuf, + str::FromStr, time::Instant, }; use clap::{Parser, Subcommand}; use colored::Colorize; use sp_core::{sr25519, Pair}; -use subxt::utils::AccountId32 as SubxtAccountId32; +use subxt::utils::{AccountId32 as SubxtAccountId32, H256}; use testing_utils::{ constants::{AUXILARY_DATA_SHOULD_SUCCEED, TEST_PROGRAM_WASM_BYTECODE}, test_client::{ @@ -53,7 +54,7 @@ enum CliCommand { #[arg(value_enum, default_value_t = Default::default())] key_visibility: Visibility, /// The path to a .wasm file containing the initial program for the account (defaults to test program) - program_file: Option, + program_hash: Option, }, /// Ask the network to sign a given message Sign { @@ -140,7 +141,7 @@ async fn run_command() -> anyhow::Result { signature_request_account_name, program_account_name, key_visibility, - program_file, + program_hash, } => { let signature_request_keypair: sr25519::Pair = SeedString::new(signature_request_account_name).try_into()?; @@ -160,11 +161,14 @@ async fn run_command() -> anyhow::Result { }, Visibility::Public => KeyVisibility::Public, }; - - let program = match program_file { - Some(file_name) => fs::read(file_name)?, + let empty_program_hash: H256 = H256::from_str( + "0x0e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8", + ) + .unwrap(); + let program_hash_to_send = match program_hash { + Some(program_hash) => program_hash, // This is temporary - if empty programs are allowed it can be None - None => TEST_PROGRAM_WASM_BYTECODE.to_owned(), + None => empty_program_hash, }; let (registered_info, keyshare_option) = register( @@ -173,7 +177,7 @@ async fn run_command() -> anyhow::Result { signature_request_keypair.clone(), program_account, key_visibility_converted, - program, + program_hash_to_send, ) .await?; @@ -219,7 +223,6 @@ async fn run_command() -> anyhow::Result { let signature_request_keypair: sr25519::Pair = SeedString::new(signature_request_account_name).try_into()?; println!("Signature request account: {:?}", signature_request_keypair.public()); - let sig_req_account = SubxtAccountId32(signature_request_keypair.public().0); let program = match program_file { Some(file_name) => fs::read(file_name)?, diff --git a/crypto/testing-utils/src/test_client/mod.rs b/crypto/testing-utils/src/test_client/mod.rs index 5aa99139c..f8b0e3565 100644 --- a/crypto/testing-utils/src/test_client/mod.rs +++ b/crypto/testing-utils/src/test_client/mod.rs @@ -8,7 +8,6 @@ pub use x25519_chacha20poly1305::derive_static_secret; use std::{ thread, time::{Duration, SystemTime}, - str::FromStr, }; use anyhow::{anyhow, ensure}; @@ -42,6 +41,7 @@ use x25519_chacha20poly1305::SignedMessage; /// If successful, returns registration info including verfiying key. /// /// If registering in private mode, a keyshare is also returned. +#[allow(clippy::type_complexity)] #[tracing::instrument( skip_all, fields( @@ -56,7 +56,7 @@ pub async fn register( signature_request_keypair: sr25519::Pair, program_account: SubxtAccountId32, key_visibility: KeyVisibility, - initial_program: Vec, + program_hash: H256, ) -> anyhow::Result<(RegisteredInfo, Option>)> { // Check if user is already registered let account_id32: AccountId32 = signature_request_keypair.public().into(); @@ -74,7 +74,7 @@ pub async fn register( signature_request_keypair.clone(), program_account, key_visibility, - initial_program, + program_hash, ) .await?; @@ -249,8 +249,7 @@ pub async fn update_program( program_modification_keypair: &sr25519::Pair, program: Vec, ) -> anyhow::Result<()> { - let update_program_tx = - entropy::tx().programs().set_program(program); + let update_program_tx = entropy::tx().programs().set_program(program); let program_modification_account = PairSigner::::new(program_modification_keypair.clone()); @@ -291,18 +290,15 @@ pub async fn put_register_request_on_chain( signature_request_keypair: sr25519::Pair, program_modification_account: SubxtAccountId32, key_visibility: KeyVisibility, - initial_program: Vec, + program_hash: H256, ) -> anyhow::Result<()> { let signature_request_pair_signer = PairSigner::::new(signature_request_keypair); - let empty_program_hash: H256 = - H256::from_str("0x0e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8") - .unwrap(); let registering_tx = entropy::tx().relayer().register( program_modification_account, Static(key_visibility), - empty_program_hash, + program_hash, ); api.tx() diff --git a/pallets/programs/src/tests.rs b/pallets/programs/src/tests.rs index f867a8ca3..0d86217b4 100644 --- a/pallets/programs/src/tests.rs +++ b/pallets/programs/src/tests.rs @@ -6,7 +6,6 @@ use crate::{mock::*, Error, ProgramInfo}; /// consts used for testing const PROGRAM_MODIFICATION_ACCOUNT: u64 = 1u64; -const SIG_REQ_ACCOUNT: u64 = 2u64; #[test] fn set_program() { diff --git a/pallets/relayer/src/tests.rs b/pallets/relayer/src/tests.rs index 0616de5aa..f3f9c2057 100644 --- a/pallets/relayer/src/tests.rs +++ b/pallets/relayer/src/tests.rs @@ -17,9 +17,6 @@ use crate::{ mock::*, Error, Registered, RegisteredInfo, RegisteringDetails, ValidateConfirmRegistered, }; -/// consts used for testing -const PROGRAM_MODIFICATION_ACCOUNT: u64 = 1u64; -const SIG_REQ_ACCOUNT: u64 = 2u64; #[test] fn it_tests_get_validator_rotation() { From 515fdb8ae72cbd0537b7ff8cdd5ca6d83b2686c7 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Mon, 4 Dec 2023 17:12:19 -0800 Subject: [PATCH 16/48] lint --- crypto/server/tests/protocol_wasm.rs | 8 ++++---- pallets/relayer/src/tests.rs | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/crypto/server/tests/protocol_wasm.rs b/crypto/server/tests/protocol_wasm.rs index 9bdfa5ca7..d1e2236bf 100644 --- a/crypto/server/tests/protocol_wasm.rs +++ b/crypto/server/tests/protocol_wasm.rs @@ -13,9 +13,9 @@ use serial_test::serial; use sp_core::crypto::{AccountId32, Pair, Ss58Codec}; use sp_keyring::{AccountKeyring, Sr25519Keyring}; use std::{ + str::FromStr, thread, time::{Duration, SystemTime}, - str::FromStr }; use subxt::{ backend::legacy::LegacyRpcMethods, @@ -182,15 +182,15 @@ async fn test_wasm_register_with_private_key_visibility() { let x25519_public_key = PublicKey::from(&one_x25519_sk).to_bytes(); let empty_program_hash: H256 = - H256::from_str("0x0e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8") - .unwrap(); + H256::from_str("0x0e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8") + .unwrap(); put_register_request_on_chain( &api, one.pair(), program_modification_account.to_account_id().into(), KeyVisibility::Private(x25519_public_key), - empty_program_hash + empty_program_hash, ) .await .unwrap(); diff --git a/pallets/relayer/src/tests.rs b/pallets/relayer/src/tests.rs index f3f9c2057..f61329d9b 100644 --- a/pallets/relayer/src/tests.rs +++ b/pallets/relayer/src/tests.rs @@ -17,7 +17,6 @@ use crate::{ mock::*, Error, Registered, RegisteredInfo, RegisteringDetails, ValidateConfirmRegistered, }; - #[test] fn it_tests_get_validator_rotation() { new_test_ext().execute_with(|| { From e0777118e7c768758654fe24f341a7ff5ec333be Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Mon, 4 Dec 2023 17:39:44 -0800 Subject: [PATCH 17/48] docs --- pallets/programs/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pallets/programs/src/lib.rs b/pallets/programs/src/lib.rs index b144a7389..37af5a0f2 100644 --- a/pallets/programs/src/lib.rs +++ b/pallets/programs/src/lib.rs @@ -76,6 +76,7 @@ pub mod pallet { #[pallet::without_storage_info] pub struct Pallet(_); + /// Information on the program, they bytecode and the account allowed to modify it #[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, TypeInfo)] pub struct ProgramInfo { /// The bytecode of the program. @@ -90,6 +91,7 @@ pub mod pallet { pub type Bytecode = StorageMap<_, Blake2_128Concat, T::Hash, ProgramInfo, OptionQuery>; + /// Maps an account to all the programs it owns #[pallet::storage] #[pallet::getter(fn owned_programs)] pub type OwnedPrograms = StorageMap< From ccd9c4d4f3d530e679aa948da80f5095b73cf262 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Mon, 4 Dec 2023 18:05:13 -0800 Subject: [PATCH 18/48] fix weight changes --- runtime/src/weights/frame_benchmarking.rs | 26 +-- .../frame_election_provider_support.rs | 32 +-- runtime/src/weights/frame_system.rs | 44 ++-- runtime/src/weights/pallet_bags_list.rs | 20 +- runtime/src/weights/pallet_balances.rs | 42 ++-- runtime/src/weights/pallet_bounties.rs | 26 +-- runtime/src/weights/pallet_collective.rs | 200 ++++++++--------- runtime/src/weights/pallet_democracy.rs | 156 ++++++------- .../pallet_election_provider_multi_phase.rs | 84 +++---- .../src/weights/pallet_elections_phragmen.rs | 112 +++++----- runtime/src/weights/pallet_free_tx.rs | 12 +- runtime/src/weights/pallet_identity.rs | 184 ++++++++-------- runtime/src/weights/pallet_im_online.rs | 24 +- runtime/src/weights/pallet_indices.rs | 28 +-- runtime/src/weights/pallet_membership.rs | 72 +++--- runtime/src/weights/pallet_multisig.rs | 80 +++---- .../src/weights/pallet_nomination_pools.rs | 88 ++++---- runtime/src/weights/pallet_preimage.rs | 50 ++--- runtime/src/weights/pallet_proxy.rs | 94 ++++---- runtime/src/weights/pallet_recovery.rs | 56 ++--- runtime/src/weights/pallet_scheduler.rs | 64 +++--- runtime/src/weights/pallet_session.rs | 16 +- runtime/src/weights/pallet_staking.rs | 206 +++++++++--------- .../src/weights/pallet_staking_extension.rs | 34 +-- runtime/src/weights/pallet_sudo.rs | 12 +- runtime/src/weights/pallet_timestamp.rs | 14 +- runtime/src/weights/pallet_tips.rs | 54 +++-- .../src/weights/pallet_transaction_pause.rs | 10 +- .../src/weights/pallet_transaction_storage.rs | 24 +- runtime/src/weights/pallet_treasury.rs | 36 +-- runtime/src/weights/pallet_utility.rs | 30 +-- runtime/src/weights/pallet_vesting.rs | 104 ++++----- 32 files changed, 1030 insertions(+), 1004 deletions(-) diff --git a/runtime/src/weights/frame_benchmarking.rs b/runtime/src/weights/frame_benchmarking.rs index 5b384c6cc..4ec8a0bd6 100644 --- a/runtime/src/weights/frame_benchmarking.rs +++ b/runtime/src/weights/frame_benchmarking.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `frame_benchmarking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=frame_benchmarking // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -41,7 +41,7 @@ impl frame_benchmarking::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(200_000, 0) + Weight::from_parts(115_294, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -50,7 +50,7 @@ impl frame_benchmarking::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(100_000, 0) + Weight::from_parts(134_823, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -59,7 +59,7 @@ impl frame_benchmarking::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(400_000, 0) + Weight::from_parts(108_941, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 1000000]`. @@ -68,15 +68,15 @@ impl frame_benchmarking::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(100_000, 0) + Weight::from_parts(57_647, 0) .saturating_add(Weight::from_parts(0, 0)) } fn hashing() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 23_829_000_000 picoseconds. - Weight::from_parts(23_965_000_000, 0) + // Minimum execution time: 28_049_000_000 picoseconds. + Weight::from_parts(28_121_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// The range of component `i` is `[0, 100]`. @@ -85,9 +85,9 @@ impl frame_benchmarking::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(29_500_000, 0) + Weight::from_parts(4_023_128, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 1_037_694 - .saturating_add(Weight::from_parts(33_024_000, 0).saturating_mul(i.into())) + // Standard Error: 14_581 + .saturating_add(Weight::from_parts(37_641_738, 0).saturating_mul(i.into())) } } \ No newline at end of file diff --git a/runtime/src/weights/frame_election_provider_support.rs b/runtime/src/weights/frame_election_provider_support.rs index e9a2c698e..95746767e 100644 --- a/runtime/src/weights/frame_election_provider_support.rs +++ b/runtime/src/weights/frame_election_provider_support.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `frame_election_provider_support` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=frame_election_provider_support // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -42,13 +42,13 @@ impl frame_election_provider_support::WeightInfo for We // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_293_000_000 picoseconds. - Weight::from_parts(5_293_000_000, 0) + // Minimum execution time: 5_780_000_000 picoseconds. + Weight::from_parts(5_921_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 739_372 - .saturating_add(Weight::from_parts(3_569_522, 0).saturating_mul(v.into())) - // Standard Error: 76_409_130 - .saturating_add(Weight::from_parts(874_128_510, 0).saturating_mul(d.into())) + // Standard Error: 97_886 + .saturating_add(Weight::from_parts(4_370_803, 0).saturating_mul(v.into())) + // Standard Error: 10_007_542 + .saturating_add(Weight::from_parts(940_706_722, 0).saturating_mul(d.into())) } /// The range of component `v` is `[1000, 2000]`. /// The range of component `t` is `[500, 1000]`. @@ -57,12 +57,12 @@ impl frame_election_provider_support::WeightInfo for We // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_511_000_000 picoseconds. - Weight::from_parts(3_511_000_000, 0) + // Minimum execution time: 3_949_000_000 picoseconds. + Weight::from_parts(4_000_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 619_301 - .saturating_add(Weight::from_parts(3_146_597, 0).saturating_mul(v.into())) - // Standard Error: 64_000_641 - .saturating_add(Weight::from_parts(789_853_976, 0).saturating_mul(d.into())) + // Standard Error: 81_420 + .saturating_add(Weight::from_parts(3_463_655, 0).saturating_mul(v.into())) + // Standard Error: 8_324_160 + .saturating_add(Weight::from_parts(897_617_441, 0).saturating_mul(d.into())) } } \ No newline at end of file diff --git a/runtime/src/weights/frame_system.rs b/runtime/src/weights/frame_system.rs index d52443cb9..53f86729d 100644 --- a/runtime/src/weights/frame_system.rs +++ b/runtime/src/weights/frame_system.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `frame_system` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=frame_system // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -41,10 +41,10 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(2_000_000, 0) + Weight::from_parts(2_457_728, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2 - .saturating_add(Weight::from_parts(189, 0).saturating_mul(b.into())) + // Standard Error: 0 + .saturating_add(Weight::from_parts(209, 0).saturating_mul(b.into())) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(b: u32, ) -> Weight { @@ -54,8 +54,8 @@ impl frame_system::WeightInfo for WeightInfo { // Minimum execution time: 6_000_000 picoseconds. Weight::from_parts(6_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 4 - .saturating_add(Weight::from_parts(1_084, 0).saturating_mul(b.into())) + // Standard Error: 2 + .saturating_add(Weight::from_parts(1_275, 0).saturating_mul(b.into())) } /// Storage: `System::Digest` (r:1 w:1) /// Proof: `System::Digest` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -66,7 +66,7 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `1485` // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(3_000_000, 0) + Weight::from_parts(4_000_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -79,8 +79,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `1485` - // Minimum execution time: 73_138_000_000 picoseconds. - Weight::from_parts(73_626_000_000, 0) + // Minimum execution time: 78_837_000_000 picoseconds. + Weight::from_parts(81_388_000_000, 0) .saturating_add(Weight::from_parts(0, 1485)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -95,8 +95,8 @@ impl frame_system::WeightInfo for WeightInfo { // Minimum execution time: 2_000_000 picoseconds. Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 5_661 - .saturating_add(Weight::from_parts(669_066, 0).saturating_mul(i.into())) + // Standard Error: 1_357 + .saturating_add(Weight::from_parts(814_555, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -109,8 +109,8 @@ impl frame_system::WeightInfo for WeightInfo { // Minimum execution time: 2_000_000 picoseconds. Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 9_205 - .saturating_add(Weight::from_parts(512_733, 0).saturating_mul(i.into())) + // Standard Error: 716 + .saturating_add(Weight::from_parts(584_416, 0).saturating_mul(i.into())) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(i.into()))) } /// Storage: `Skipped::Metadata` (r:0 w:0) @@ -118,13 +118,13 @@ impl frame_system::WeightInfo for WeightInfo { /// The range of component `p` is `[0, 1000]`. fn kill_prefix(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `72 + p * (69 ±0)` - // Estimated: `82 + p * (70 ±0)` + // Measured: `104 + p * (69 ±0)` + // Estimated: `92 + p * (70 ±0)` // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(2_100_000, 0) - .saturating_add(Weight::from_parts(0, 82)) - // Standard Error: 29_033 - .saturating_add(Weight::from_parts(932_200, 0).saturating_mul(p.into())) + Weight::from_parts(4_000_000, 0) + .saturating_add(Weight::from_parts(0, 92)) + // Standard Error: 892 + .saturating_add(Weight::from_parts(1_035_745, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) .saturating_add(Weight::from_parts(0, 70).saturating_mul(p.into())) diff --git a/runtime/src/weights/pallet_bags_list.rs b/runtime/src/weights/pallet_bags_list.rs index 166a12513..3542e487e 100644 --- a/runtime/src/weights/pallet_bags_list.rs +++ b/runtime/src/weights/pallet_bags_list.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_bags_list` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_bags_list // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -47,8 +47,8 @@ impl pallet_bags_list::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1707` // Estimated: `11506` - // Minimum execution time: 47_000_000 picoseconds. - Weight::from_parts(48_000_000, 0) + // Minimum execution time: 54_000_000 picoseconds. + Weight::from_parts(55_000_000, 0) .saturating_add(Weight::from_parts(0, 11506)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) @@ -65,8 +65,8 @@ impl pallet_bags_list::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1604` // Estimated: `8877` - // Minimum execution time: 49_000_000 picoseconds. - Weight::from_parts(50_000_000, 0) + // Minimum execution time: 53_000_000 picoseconds. + Weight::from_parts(54_000_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(5)) @@ -85,8 +85,8 @@ impl pallet_bags_list::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1913` // Estimated: `11506` - // Minimum execution time: 56_000_000 picoseconds. - Weight::from_parts(58_000_000, 0) + // Minimum execution time: 60_000_000 picoseconds. + Weight::from_parts(61_000_000, 0) .saturating_add(Weight::from_parts(0, 11506)) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(6)) diff --git a/runtime/src/weights/pallet_balances.rs b/runtime/src/weights/pallet_balances.rs index aebb4cd14..fafa98b49 100644 --- a/runtime/src/weights/pallet_balances.rs +++ b/runtime/src/weights/pallet_balances.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_balances` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_balances // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -41,8 +41,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 50_000_000 picoseconds. - Weight::from_parts(61_000_000, 0) + // Minimum execution time: 59_000_000 picoseconds. + Weight::from_parts(60_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -53,8 +53,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 41_000_000 picoseconds. - Weight::from_parts(51_000_000, 0) + // Minimum execution time: 45_000_000 picoseconds. + Weight::from_parts(46_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -65,7 +65,7 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `207` // Estimated: `3593` - // Minimum execution time: 14_000_000 picoseconds. + // Minimum execution time: 15_000_000 picoseconds. Weight::from_parts(15_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) @@ -77,8 +77,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `207` // Estimated: `3593` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(21_000_000, 0) + // Minimum execution time: 22_000_000 picoseconds. + Weight::from_parts(22_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -89,8 +89,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `6196` - // Minimum execution time: 50_000_000 picoseconds. - Weight::from_parts(51_000_000, 0) + // Minimum execution time: 61_000_000 picoseconds. + Weight::from_parts(61_000_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -101,8 +101,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `3593` - // Minimum execution time: 51_000_000 picoseconds. - Weight::from_parts(51_000_000, 0) + // Minimum execution time: 57_000_000 picoseconds. + Weight::from_parts(57_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -114,23 +114,23 @@ impl pallet_balances::WeightInfo for WeightInfo { // Measured: `207` // Estimated: `3593` // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(21_000_000, 0) + Weight::from_parts(19_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: `System::Account` (r:1000 w:1000) + /// Storage: `System::Account` (r:999 w:999) /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `u` is `[1, 1000]`. fn upgrade_accounts(u: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + u * (135 ±0)` // Estimated: `990 + u * (2603 ±0)` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(27_532_098, 0) + // Minimum execution time: 18_000_000 picoseconds. + Weight::from_parts(18_000_000, 0) .saturating_add(Weight::from_parts(0, 990)) - // Standard Error: 54_038 - .saturating_add(Weight::from_parts(14_648_076, 0).saturating_mul(u.into())) + // Standard Error: 19_569 + .saturating_add(Weight::from_parts(17_044_522, 0).saturating_mul(u.into())) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(u.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(u.into()))) .saturating_add(Weight::from_parts(0, 2603).saturating_mul(u.into())) diff --git a/runtime/src/weights/pallet_bounties.rs b/runtime/src/weights/pallet_bounties.rs index acc2f1a46..e812bc1c7 100644 --- a/runtime/src/weights/pallet_bounties.rs +++ b/runtime/src/weights/pallet_bounties.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_bounties` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_bounties // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -48,11 +48,11 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `177` // Estimated: `3593` - // Minimum execution time: 26_000_000 picoseconds. - Weight::from_parts(27_800_000, 0) + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(27_809_128, 0) .saturating_add(Weight::from_parts(0, 3593)) - // Standard Error: 77 - .saturating_add(Weight::from_parts(207, 0).saturating_mul(d.into())) + // Standard Error: 4 + .saturating_add(Weight::from_parts(404, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -114,8 +114,8 @@ impl pallet_bounties::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `369` // Estimated: `3642` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(28_000_000, 0) + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(30_000_000, 0) .saturating_add(Weight::from_parts(0, 3642)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) @@ -141,12 +141,10 @@ impl pallet_bounties::WeightInfo for WeightInfo { /// The range of component `b` is `[0, 100]`. fn spend_funds(_b: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `76` + // Measured: `0` // Estimated: `1887` // Minimum execution time: 0_000 picoseconds. - Weight::from_parts(3_000_000, 0) + Weight::from_parts(1_819_424, 0) .saturating_add(Weight::from_parts(0, 1887)) - .saturating_add(T::DbWeight::get().reads(1)) - .saturating_add(T::DbWeight::get().writes(1)) } } \ No newline at end of file diff --git a/runtime/src/weights/pallet_collective.rs b/runtime/src/weights/pallet_collective.rs index 7874cc8f2..bc1f8150d 100644 --- a/runtime/src/weights/pallet_collective.rs +++ b/runtime/src/weights/pallet_collective.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_collective` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_collective // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -49,20 +49,20 @@ impl pallet_collective::WeightInfo for WeightInfo { fn set_members(m: u32, _n: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0 + m * (3232 ±0) + p * (3190 ±0)` - // Estimated: `146076 + m * (1956 ±197) + p * (3643 ±197)` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) - .saturating_add(Weight::from_parts(0, 146076)) - // Standard Error: 463_384 - .saturating_add(Weight::from_parts(3_407_454, 0).saturating_mul(m.into())) - // Standard Error: 463_384 - .saturating_add(Weight::from_parts(4_926_121, 0).saturating_mul(p.into())) + // Estimated: `15762 + m * (1967 ±23) + p * (4332 ±23)` + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(14_000_000, 0) + .saturating_add(Weight::from_parts(0, 15762)) + // Standard Error: 41_267 + .saturating_add(Weight::from_parts(3_065_012, 0).saturating_mul(m.into())) + // Standard Error: 41_267 + .saturating_add(Weight::from_parts(6_137_438, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) - .saturating_add(Weight::from_parts(0, 1956).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 3643).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 1967).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 4332).saturating_mul(p.into())) } /// Storage: `Council::Members` (r:1 w:0) /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -70,13 +70,15 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[1, 100]`. fn execute(b: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `102 + m * (32 ±0)` - // Estimated: `1588 + m * (32 ±0)` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_451_023, 0) - .saturating_add(Weight::from_parts(0, 1588)) - // Standard Error: 1_233 - .saturating_add(Weight::from_parts(924, 0).saturating_mul(b.into())) + // Measured: `103 + m * (32 ±0)` + // Estimated: `1589 + m * (32 ±0)` + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(12_631_203, 0) + .saturating_add(Weight::from_parts(0, 1589)) + // Standard Error: 48 + .saturating_add(Weight::from_parts(1_443, 0).saturating_mul(b.into())) + // Standard Error: 498 + .saturating_add(Weight::from_parts(7_851, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } @@ -86,15 +88,17 @@ impl pallet_collective::WeightInfo for WeightInfo { /// Proof: `Council::ProposalOf` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `b` is `[2, 1024]`. /// The range of component `m` is `[1, 100]`. - fn propose_execute(_b: u32, m: u32, ) -> Weight { + fn propose_execute(b: u32, m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `102 + m * (32 ±0)` - // Estimated: `3568 + m * (32 ±0)` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(14_494_462, 0) - .saturating_add(Weight::from_parts(0, 3568)) - // Standard Error: 16_930 - .saturating_add(Weight::from_parts(13_399, 0).saturating_mul(m.into())) + // Measured: `103 + m * (32 ±0)` + // Estimated: `3569 + m * (32 ±0)` + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(15_419_091, 0) + .saturating_add(Weight::from_parts(0, 3569)) + // Standard Error: 47 + .saturating_add(Weight::from_parts(1_197, 0).saturating_mul(b.into())) + // Standard Error: 485 + .saturating_add(Weight::from_parts(8_770, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) } @@ -113,21 +117,21 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `p` is `[1, 100]`. fn propose_proposed(b: u32, m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `307 + m * (32 ±0) + p * (37 ±0)` - // Estimated: `3580 + m * (33 ±0) + p * (38 ±0)` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(17_777_027, 0) - .saturating_add(Weight::from_parts(0, 3580)) - // Standard Error: 805 - .saturating_add(Weight::from_parts(1_651, 0).saturating_mul(b.into())) - // Standard Error: 8_385 - .saturating_add(Weight::from_parts(16_564, 0).saturating_mul(m.into())) - // Standard Error: 8_284 - .saturating_add(Weight::from_parts(176_417, 0).saturating_mul(p.into())) + // Measured: `368 + m * (32 ±0) + p * (36 ±0)` + // Estimated: `3806 + m * (33 ±0) + p * (37 ±0)` + // Minimum execution time: 22_000_000 picoseconds. + Weight::from_parts(23_030_024, 0) + .saturating_add(Weight::from_parts(0, 3806)) + // Standard Error: 144 + .saturating_add(Weight::from_parts(2_833, 0).saturating_mul(b.into())) + // Standard Error: 1_511 + .saturating_add(Weight::from_parts(9_220, 0).saturating_mul(m.into())) + // Standard Error: 1_492 + .saturating_add(Weight::from_parts(160_279, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 33).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 38).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 37).saturating_mul(p.into())) } /// Storage: `Council::Members` (r:1 w:0) /// Proof: `Council::Members` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -136,13 +140,13 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `m` is `[5, 100]`. fn vote(m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `968 + m * (64 ±0)` + // Measured: `969 + m * (64 ±0)` // Estimated: `4433 + m * (64 ±0)` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(18_278_597, 0) + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(18_853_371, 0) .saturating_add(Weight::from_parts(0, 4433)) - // Standard Error: 22_316 - .saturating_add(Weight::from_parts(25_314, 0).saturating_mul(m.into())) + // Standard Error: 1_036 + .saturating_add(Weight::from_parts(23_233, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) @@ -159,19 +163,19 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `p` is `[1, 100]`. fn close_early_disapproved(m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `487 + m * (64 ±0) + p * (36 ±0)` - // Estimated: `3756 + m * (65 ±0) + p * (39 ±0)` - // Minimum execution time: 21_000_000 picoseconds. - Weight::from_parts(23_252_450, 0) - .saturating_add(Weight::from_parts(0, 3756)) - // Standard Error: 29_439 - .saturating_add(Weight::from_parts(15_404, 0).saturating_mul(m.into())) - // Standard Error: 28_435 - .saturating_add(Weight::from_parts(130_662, 0).saturating_mul(p.into())) + // Measured: `459 + m * (64 ±0) + p * (37 ±0)` + // Estimated: `3902 + m * (64 ±0) + p * (37 ±0)` + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(24_925_556, 0) + .saturating_add(Weight::from_parts(0, 3902)) + // Standard Error: 1_340 + .saturating_add(Weight::from_parts(11_298, 0).saturating_mul(m.into())) + // Standard Error: 1_306 + .saturating_add(Weight::from_parts(156_172, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 39).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 37).saturating_mul(p.into())) } /// Storage: `Council::Voting` (r:1 w:1) /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -186,22 +190,18 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `p` is `[1, 100]`. fn close_early_approved(b: u32, m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `523 + b * (1 ±0) + m * (64 ±0) + p * (42 ±0)` - // Estimated: `3694 + b * (1 ±0) + m * (64 ±1) + p * (44 ±1)` - // Minimum execution time: 32_000_000 picoseconds. - Weight::from_parts(28_327_353, 0) - .saturating_add(Weight::from_parts(0, 3694)) - // Standard Error: 1_664 - .saturating_add(Weight::from_parts(1_265, 0).saturating_mul(b.into())) - // Standard Error: 17_725 - .saturating_add(Weight::from_parts(32_231, 0).saturating_mul(m.into())) - // Standard Error: 17_118 - .saturating_add(Weight::from_parts(191_240, 0).saturating_mul(p.into())) + // Measured: `499 + b * (1 ±0) + m * (64 ±0) + p * (42 ±0)` + // Estimated: `4059 + b * (1 ±0) + m * (63 ±0) + p * (42 ±0)` + // Minimum execution time: 33_000_000 picoseconds. + Weight::from_parts(40_975_187, 0) + .saturating_add(Weight::from_parts(0, 4059)) + // Standard Error: 5_285 + .saturating_add(Weight::from_parts(214_621, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 44).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 63).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 42).saturating_mul(p.into())) } /// Storage: `Council::Voting` (r:1 w:1) /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -217,19 +217,19 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `p` is `[1, 100]`. fn close_disapproved(m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `507 + m * (64 ±0) + p * (36 ±0)` - // Estimated: `3776 + m * (65 ±0) + p * (39 ±0)` - // Minimum execution time: 24_000_000 picoseconds. - Weight::from_parts(22_559_043, 0) - .saturating_add(Weight::from_parts(0, 3776)) - // Standard Error: 17_070 - .saturating_add(Weight::from_parts(29_105, 0).saturating_mul(m.into())) - // Standard Error: 16_488 - .saturating_add(Weight::from_parts(164_759, 0).saturating_mul(p.into())) + // Measured: `479 + m * (64 ±0) + p * (37 ±0)` + // Estimated: `3922 + m * (64 ±0) + p * (37 ±0)` + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(27_692_183, 0) + .saturating_add(Weight::from_parts(0, 3922)) + // Standard Error: 3_125 + .saturating_add(Weight::from_parts(14_841, 0).saturating_mul(m.into())) + // Standard Error: 3_047 + .saturating_add(Weight::from_parts(162_370, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 65).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 39).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 37).saturating_mul(p.into())) } /// Storage: `Council::Voting` (r:1 w:1) /// Proof: `Council::Voting` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -246,20 +246,22 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `p` is `[1, 100]`. fn close_approved(b: u32, m: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `543 + b * (1 ±0) + m * (64 ±0) + p * (42 ±0)` - // Estimated: `3714 + b * (1 ±0) + m * (64 ±1) + p * (44 ±1)` - // Minimum execution time: 33_000_000 picoseconds. - Weight::from_parts(36_613_114, 0) - .saturating_add(Weight::from_parts(0, 3714)) - // Standard Error: 16_757 - .saturating_add(Weight::from_parts(24_392, 0).saturating_mul(m.into())) - // Standard Error: 16_183 - .saturating_add(Weight::from_parts(159_481, 0).saturating_mul(p.into())) + // Measured: `519 + b * (1 ±0) + m * (64 ±0) + p * (42 ±0)` + // Estimated: `4079 + b * (1 ±0) + m * (63 ±0) + p * (42 ±0)` + // Minimum execution time: 36_000_000 picoseconds. + Weight::from_parts(36_775_605, 0) + .saturating_add(Weight::from_parts(0, 4079)) + // Standard Error: 525 + .saturating_add(Weight::from_parts(1_466, 0).saturating_mul(b.into())) + // Standard Error: 5_551 + .saturating_add(Weight::from_parts(23_881, 0).saturating_mul(m.into())) + // Standard Error: 5_411 + .saturating_add(Weight::from_parts(217_311, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(b.into())) - .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) - .saturating_add(Weight::from_parts(0, 44).saturating_mul(p.into())) + .saturating_add(Weight::from_parts(0, 63).saturating_mul(m.into())) + .saturating_add(Weight::from_parts(0, 42).saturating_mul(p.into())) } /// Storage: `Council::Proposals` (r:1 w:1) /// Proof: `Council::Proposals` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) @@ -270,13 +272,13 @@ impl pallet_collective::WeightInfo for WeightInfo { /// The range of component `p` is `[1, 100]`. fn disapprove_proposal(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `258 + p * (32 ±0)` - // Estimated: `1744 + p * (32 ±0)` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(12_317_113, 0) - .saturating_add(Weight::from_parts(0, 1744)) - // Standard Error: 16_931 - .saturating_add(Weight::from_parts(151_053, 0).saturating_mul(p.into())) + // Measured: `260 + p * (32 ±0)` + // Estimated: `1745 + p * (32 ±0)` + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(14_366_369, 0) + .saturating_add(Weight::from_parts(0, 1745)) + // Standard Error: 841 + .saturating_add(Weight::from_parts(145_894, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(p.into())) diff --git a/runtime/src/weights/pallet_democracy.rs b/runtime/src/weights/pallet_democracy.rs index 530652dea..fcfffffd5 100644 --- a/runtime/src/weights/pallet_democracy.rs +++ b/runtime/src/weights/pallet_democracy.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_democracy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_democracy // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -47,8 +47,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `4734` // Estimated: `18187` - // Minimum execution time: 35_000_000 picoseconds. - Weight::from_parts(35_000_000, 0) + // Minimum execution time: 37_000_000 picoseconds. + Weight::from_parts(39_000_000, 0) .saturating_add(Weight::from_parts(0, 18187)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -59,8 +59,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3489` // Estimated: `6695` - // Minimum execution time: 32_000_000 picoseconds. - Weight::from_parts(32_000_000, 0) + // Minimum execution time: 34_000_000 picoseconds. + Weight::from_parts(35_000_000, 0) .saturating_add(Weight::from_parts(0, 6695)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -77,8 +77,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3437` // Estimated: `7260` - // Minimum execution time: 44_000_000 picoseconds. - Weight::from_parts(46_000_000, 0) + // Minimum execution time: 48_000_000 picoseconds. + Weight::from_parts(49_000_000, 0) .saturating_add(Weight::from_parts(0, 7260)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -95,8 +95,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3459` // Estimated: `7260` - // Minimum execution time: 47_000_000 picoseconds. - Weight::from_parts(50_000_000, 0) + // Minimum execution time: 53_000_000 picoseconds. + Weight::from_parts(67_000_000, 0) .saturating_add(Weight::from_parts(0, 7260)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) @@ -111,8 +111,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `299` // Estimated: `3666` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(21_000_000, 0) + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(24_000_000, 0) .saturating_add(Weight::from_parts(0, 3666)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -135,8 +135,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `5843` // Estimated: `18187` - // Minimum execution time: 89_000_000 picoseconds. - Weight::from_parts(94_000_000, 0) + // Minimum execution time: 101_000_000 picoseconds. + Weight::from_parts(112_000_000, 0) .saturating_add(Weight::from_parts(0, 18187)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(7)) @@ -149,8 +149,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3349` // Estimated: `6703` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(22_000_000, 0) + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 6703)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -161,7 +161,7 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. + // Minimum execution time: 3_000_000 picoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) @@ -172,7 +172,7 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 2_000_000 picoseconds. + // Minimum execution time: 3_000_000 picoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) @@ -189,8 +189,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `219` // Estimated: `3518` - // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(31_000_000, 0) + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(27_000_000, 0) .saturating_add(Weight::from_parts(0, 3518)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(5)) @@ -205,8 +205,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `3452` // Estimated: `6703` - // Minimum execution time: 24_000_000 picoseconds. - Weight::from_parts(24_000_000, 0) + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(29_000_000, 0) .saturating_add(Weight::from_parts(0, 6703)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) @@ -223,8 +223,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `5754` // Estimated: `18187` - // Minimum execution time: 75_000_000 picoseconds. - Weight::from_parts(80_000_000, 0) + // Minimum execution time: 85_000_000 picoseconds. + Weight::from_parts(94_000_000, 0) .saturating_add(Weight::from_parts(0, 18187)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -237,8 +237,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `204` // Estimated: `3518` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(17_000_000, 0) .saturating_add(Weight::from_parts(0, 3518)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -252,13 +252,13 @@ impl pallet_democracy::WeightInfo for WeightInfo { /// The range of component `r` is `[0, 99]`. fn on_initialize_base(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `158 + r * (86 ±0)` + // Measured: `177 + r * (86 ±0)` // Estimated: `1489 + r * (2676 ±0)` // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(6_822_917, 0) + Weight::from_parts(7_748_177, 0) .saturating_add(Weight::from_parts(0, 1489)) - // Standard Error: 40_599 - .saturating_add(Weight::from_parts(2_580_835, 0).saturating_mul(r.into())) + // Standard Error: 14_541 + .saturating_add(Weight::from_parts(2_941_244, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -279,13 +279,13 @@ impl pallet_democracy::WeightInfo for WeightInfo { /// The range of component `r` is `[0, 99]`. fn on_initialize_base_with_launch_period(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `158 + r * (86 ±0)` + // Measured: `177 + r * (86 ±0)` // Estimated: `18187 + r * (2676 ±0)` // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(6_828_932, 0) + Weight::from_parts(13_660_633, 0) .saturating_add(Weight::from_parts(0, 18187)) - // Standard Error: 63_326 - .saturating_add(Weight::from_parts(2_645_753, 0).saturating_mul(r.into())) + // Standard Error: 12_533 + .saturating_add(Weight::from_parts(2_873_875, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -302,13 +302,13 @@ impl pallet_democracy::WeightInfo for WeightInfo { /// The range of component `r` is `[0, 99]`. fn delegate(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `797 + r * (108 ±0)` + // Measured: `796 + r * (108 ±0)` // Estimated: `19800 + r * (2676 ±0)` - // Minimum execution time: 33_000_000 picoseconds. - Weight::from_parts(30_415_848, 0) + // Minimum execution time: 39_000_000 picoseconds. + Weight::from_parts(46_473_833, 0) .saturating_add(Weight::from_parts(0, 19800)) - // Standard Error: 140_940 - .saturating_add(Weight::from_parts(3_851_303, 0).saturating_mul(r.into())) + // Standard Error: 17_403 + .saturating_add(Weight::from_parts(4_263_242, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(4)) @@ -322,13 +322,13 @@ impl pallet_democracy::WeightInfo for WeightInfo { /// The range of component `r` is `[0, 99]`. fn undelegate(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `408 + r * (108 ±0)` + // Measured: `426 + r * (108 ±0)` // Estimated: `13530 + r * (2676 ±0)` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(15_079_729, 0) + // Minimum execution time: 18_000_000 picoseconds. + Weight::from_parts(21_246_599, 0) .saturating_add(Weight::from_parts(0, 13530)) - // Standard Error: 62_079 - .saturating_add(Weight::from_parts(3_707_729, 0).saturating_mul(r.into())) + // Standard Error: 13_653 + .saturating_add(Weight::from_parts(4_150_864, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(r.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -341,7 +341,7 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_000_000 picoseconds. + // Minimum execution time: 2_000_000 picoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) @@ -359,11 +359,11 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `533` // Estimated: `7260` - // Minimum execution time: 21_000_000 picoseconds. - Weight::from_parts(25_589_711, 0) + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(35_142_691, 0) .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 40_903 - .saturating_add(Weight::from_parts(142_485, 0).saturating_mul(r.into())) + // Standard Error: 2_682 + .saturating_add(Weight::from_parts(39_275, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -378,13 +378,13 @@ impl pallet_democracy::WeightInfo for WeightInfo { /// The range of component `r` is `[0, 99]`. fn unlock_set(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `533 + r * (22 ±0)` + // Measured: `534 + r * (22 ±0)` // Estimated: `7260` - // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(30_732_425, 0) + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(32_755_510, 0) .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 28_465 - .saturating_add(Weight::from_parts(66_414, 0).saturating_mul(r.into())) + // Standard Error: 1_298 + .saturating_add(Weight::from_parts(76_550, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -395,13 +395,13 @@ impl pallet_democracy::WeightInfo for WeightInfo { /// The range of component `r` is `[1, 100]`. fn remove_vote(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `550 + r * (28 ±0)` + // Measured: `661 + r * (26 ±0)` // Estimated: `7260` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(13_162_141, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(15_515_302, 0) .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 20_322 - .saturating_add(Weight::from_parts(86_411, 0).saturating_mul(r.into())) + // Standard Error: 1_397 + .saturating_add(Weight::from_parts(87_059, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -412,13 +412,13 @@ impl pallet_democracy::WeightInfo for WeightInfo { /// The range of component `r` is `[1, 100]`. fn remove_other_vote(r: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `550 + r * (28 ±0)` + // Measured: `661 + r * (26 ±0)` // Estimated: `7260` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_251_658, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(15_304_082, 0) .saturating_add(Weight::from_parts(0, 7260)) - // Standard Error: 15_639 - .saturating_add(Weight::from_parts(98_572, 0).saturating_mul(r.into())) + // Standard Error: 2_607 + .saturating_add(Weight::from_parts(106_035, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -432,8 +432,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `356` // Estimated: `3556` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -446,8 +446,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `219` // Estimated: `3518` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(14_000_000, 0) .saturating_add(Weight::from_parts(0, 3518)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -462,8 +462,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `4888` // Estimated: `18187` - // Minimum execution time: 32_000_000 picoseconds. - Weight::from_parts(35_000_000, 0) + // Minimum execution time: 36_000_000 picoseconds. + Weight::from_parts(39_000_000, 0) .saturating_add(Weight::from_parts(0, 18187)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -476,8 +476,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `4755` // Estimated: `18187` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(33_000_000, 0) + // Minimum execution time: 33_000_000 picoseconds. + Weight::from_parts(34_000_000, 0) .saturating_add(Weight::from_parts(0, 18187)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -490,8 +490,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `211` // Estimated: `3556` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(12_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -504,8 +504,8 @@ impl pallet_democracy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `235` // Estimated: `3666` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(14_000_000, 0) + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) .saturating_add(Weight::from_parts(0, 3666)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/src/weights/pallet_election_provider_multi_phase.rs b/runtime/src/weights/pallet_election_provider_multi_phase.rs index aed8f33b1..438e79147 100644 --- a/runtime/src/weights/pallet_election_provider_multi_phase.rs +++ b/runtime/src/weights/pallet_election_provider_multi_phase.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_election_provider_multi_phase` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_election_provider_multi_phase // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -55,8 +55,8 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `880` // Estimated: `3481` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) + // Minimum execution time: 18_000_000 picoseconds. + Weight::from_parts(18_000_000, 0) .saturating_add(Weight::from_parts(0, 3481)) .saturating_add(T::DbWeight::get().reads(8)) } @@ -69,7 +69,7 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Measured: `80` // Estimated: `1565` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 1565)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -82,8 +82,8 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `80` // Estimated: `1565` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 1565)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -96,8 +96,8 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `207` // Estimated: `3593` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(35_000_000, 0) + // Minimum execution time: 32_000_000 picoseconds. + Weight::from_parts(33_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -108,8 +108,8 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `207` // Estimated: `3593` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(24_000_000, 0) + // Minimum execution time: 21_000_000 picoseconds. + Weight::from_parts(21_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -126,11 +126,11 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 162_000_000 picoseconds. - Weight::from_parts(162_000_000, 0) + // Minimum execution time: 198_000_000 picoseconds. + Weight::from_parts(230_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 16_416 - .saturating_add(Weight::from_parts(149_529, 0).saturating_mul(v.into())) + // Standard Error: 2_163 + .saturating_add(Weight::from_parts(88_514, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().writes(3)) } /// Storage: `ElectionProviderMultiPhase::SignedSubmissionIndices` (r:1 w:1) @@ -155,15 +155,15 @@ impl pallet_election_provider_multi_phase::WeightInfo f /// The range of component `d` is `[200, 400]`. fn elect_queued(a: u32, d: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `289 + a * (768 ±0) + d * (48 ±0)` - // Estimated: `3910 + a * (768 ±0) + d * (49 ±0)` - // Minimum execution time: 237_000_000 picoseconds. - Weight::from_parts(237_000_000, 0) - .saturating_add(Weight::from_parts(0, 3910)) - // Standard Error: 49_240 - .saturating_add(Weight::from_parts(95_294, 0).saturating_mul(a.into())) - // Standard Error: 101_405 - .saturating_add(Weight::from_parts(33_549, 0).saturating_mul(d.into())) + // Measured: `303 + a * (768 ±0) + d * (48 ±0)` + // Estimated: `3855 + a * (768 ±0) + d * (49 ±0)` + // Minimum execution time: 244_000_000 picoseconds. + Weight::from_parts(92_643_021, 0) + .saturating_add(Weight::from_parts(0, 3855)) + // Standard Error: 8_823 + .saturating_add(Weight::from_parts(257_414, 0).saturating_mul(a.into())) + // Standard Error: 13_226 + .saturating_add(Weight::from_parts(131_898, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(8)) .saturating_add(Weight::from_parts(0, 768).saturating_mul(a.into())) @@ -185,8 +185,8 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `858` // Estimated: `2343` - // Minimum execution time: 42_000_000 picoseconds. - Weight::from_parts(43_000_000, 0) + // Minimum execution time: 45_000_000 picoseconds. + Weight::from_parts(46_000_000, 0) .saturating_add(Weight::from_parts(0, 2343)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -209,17 +209,19 @@ impl pallet_election_provider_multi_phase::WeightInfo f /// The range of component `t` is `[500, 1000]`. /// The range of component `a` is `[500, 800]`. /// The range of component `d` is `[200, 400]`. - fn submit_unsigned(v: u32, t: u32, a: u32, _d: u32, ) -> Weight { + fn submit_unsigned(v: u32, t: u32, a: u32, d: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `185 + t * (32 ±0) + v * (553 ±0)` // Estimated: `1670 + t * (32 ±0) + v * (553 ±0)` - // Minimum execution time: 3_815_000_000 picoseconds. - Weight::from_parts(3_815_000_000, 0) + // Minimum execution time: 4_717_000_000 picoseconds. + Weight::from_parts(1_907_938_722, 0) .saturating_add(Weight::from_parts(0, 1670)) - // Standard Error: 100_208 - .saturating_add(Weight::from_parts(41_609, 0).saturating_mul(v.into())) - // Standard Error: 297_039 - .saturating_add(Weight::from_parts(3_518_500, 0).saturating_mul(a.into())) + // Standard Error: 19_453 + .saturating_add(Weight::from_parts(415_175, 0).saturating_mul(v.into())) + // Standard Error: 64_755 + .saturating_add(Weight::from_parts(3_344_077, 0).saturating_mul(a.into())) + // Standard Error: 97_057 + .saturating_add(Weight::from_parts(1_679_815, 0).saturating_mul(d.into())) .saturating_add(T::DbWeight::get().reads(7)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(t.into())) @@ -241,13 +243,13 @@ impl pallet_election_provider_multi_phase::WeightInfo f // Proof Size summary in bytes: // Measured: `160 + t * (32 ±0) + v * (553 ±0)` // Estimated: `1645 + t * (32 ±0) + v * (553 ±0)` - // Minimum execution time: 3_312_000_000 picoseconds. - Weight::from_parts(3_312_000_000, 0) + // Minimum execution time: 3_478_000_000 picoseconds. + Weight::from_parts(3_511_000_000, 0) .saturating_add(Weight::from_parts(0, 1645)) - // Standard Error: 84_533 - .saturating_add(Weight::from_parts(104_027, 0).saturating_mul(v.into())) - // Standard Error: 250_574 - .saturating_add(Weight::from_parts(2_749_153, 0).saturating_mul(a.into())) + // Standard Error: 9_843 + .saturating_add(Weight::from_parts(48_987, 0).saturating_mul(v.into())) + // Standard Error: 29_171 + .saturating_add(Weight::from_parts(3_051_762, 0).saturating_mul(a.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(t.into())) .saturating_add(Weight::from_parts(0, 553).saturating_mul(v.into())) diff --git a/runtime/src/weights/pallet_elections_phragmen.rs b/runtime/src/weights/pallet_elections_phragmen.rs index b33c1c546..a2ecc1d00 100644 --- a/runtime/src/weights/pallet_elections_phragmen.rs +++ b/runtime/src/weights/pallet_elections_phragmen.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_elections_phragmen` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_elections_phragmen // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -53,8 +53,10 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Measured: `503 + v * (80 ±0)` // Estimated: `4764 + v * (80 ±0)` // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(29_852_900, 0) + Weight::from_parts(30_276_168, 0) .saturating_add(Weight::from_parts(0, 4764)) + // Standard Error: 4_322 + .saturating_add(Weight::from_parts(137_385, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 80).saturating_mul(v.into())) @@ -76,11 +78,11 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `471 + v * (80 ±0)` // Estimated: `4764 + v * (80 ±0)` - // Minimum execution time: 39_000_000 picoseconds. - Weight::from_parts(39_910_423, 0) + // Minimum execution time: 41_000_000 picoseconds. + Weight::from_parts(42_331_774, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 91_394 - .saturating_add(Weight::from_parts(135_179, 0).saturating_mul(v.into())) + // Standard Error: 5_609 + .saturating_add(Weight::from_parts(170_189, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 80).saturating_mul(v.into())) @@ -102,11 +104,11 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `503 + v * (80 ±0)` // Estimated: `4764 + v * (80 ±0)` - // Minimum execution time: 39_000_000 picoseconds. - Weight::from_parts(39_286_644, 0) + // Minimum execution time: 41_000_000 picoseconds. + Weight::from_parts(42_233_823, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 174_734 - .saturating_add(Weight::from_parts(217_426, 0).saturating_mul(v.into())) + // Standard Error: 5_899 + .saturating_add(Weight::from_parts(168_318, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 80).saturating_mul(v.into())) @@ -121,8 +123,8 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `1025` // Estimated: `4764` - // Minimum execution time: 44_000_000 picoseconds. - Weight::from_parts(44_000_000, 0) + // Minimum execution time: 46_000_000 picoseconds. + Weight::from_parts(47_000_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) @@ -136,13 +138,13 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn /// The range of component `c` is `[1, 64]`. fn submit_candidacy(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1635 + c * (48 ±0)` - // Estimated: `3120 + c * (48 ±0)` - // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(29_485_741, 0) - .saturating_add(Weight::from_parts(0, 3120)) - // Standard Error: 7_783 - .saturating_add(Weight::from_parts(34_604, 0).saturating_mul(c.into())) + // Measured: `1636 + c * (48 ±0)` + // Estimated: `3121 + c * (48 ±0)` + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(32_090_057, 0) + .saturating_add(Weight::from_parts(0, 3121)) + // Standard Error: 1_448 + .saturating_add(Weight::from_parts(36_781, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into())) @@ -152,13 +154,13 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn /// The range of component `c` is `[1, 64]`. fn renounce_candidacy_candidate(c: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `350 + c * (48 ±0)` - // Estimated: `1835 + c * (48 ±0)` - // Minimum execution time: 26_000_000 picoseconds. - Weight::from_parts(25_986_823, 0) - .saturating_add(Weight::from_parts(0, 1835)) - // Standard Error: 13_838 - .saturating_add(Weight::from_parts(22_148, 0).saturating_mul(c.into())) + // Measured: `351 + c * (48 ±0)` + // Estimated: `1836 + c * (48 ±0)` + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(27_823_233, 0) + .saturating_add(Weight::from_parts(0, 1836)) + // Standard Error: 2_694 + .saturating_add(Weight::from_parts(26_021, 0).saturating_mul(c.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 48).saturating_mul(c.into())) @@ -177,8 +179,8 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `1901` // Estimated: `3386` - // Minimum execution time: 39_000_000 picoseconds. - Weight::from_parts(39_000_000, 0) + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(42_000_000, 0) .saturating_add(Weight::from_parts(0, 3386)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(4)) @@ -189,8 +191,8 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `1012` // Estimated: `2497` - // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(26_000_000, 0) + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(28_000_000, 0) .saturating_add(Weight::from_parts(0, 2497)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -221,8 +223,8 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn // Proof Size summary in bytes: // Measured: `1901` // Estimated: `3593` - // Minimum execution time: 43_000_000 picoseconds. - Weight::from_parts(45_000_000, 0) + // Minimum execution time: 46_000_000 picoseconds. + Weight::from_parts(47_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(5)) @@ -245,13 +247,13 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn /// The range of component `d` is `[0, 256]`. fn clean_defunct_voters(v: u32, _d: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1434 + v * (811 ±0)` - // Estimated: `4890 + v * (3774 ±0)` - // Minimum execution time: 17_611_000_000 picoseconds. - Weight::from_parts(17_611_000_000, 0) - .saturating_add(Weight::from_parts(0, 4890)) - // Standard Error: 2_288_829 - .saturating_add(Weight::from_parts(40_356_571, 0).saturating_mul(v.into())) + // Measured: `1380 + v * (811 ±0)` + // Estimated: `4850 + v * (3774 ±0)` + // Minimum execution time: 18_937_000_000 picoseconds. + Weight::from_parts(19_152_000_000, 0) + .saturating_add(Weight::from_parts(0, 4850)) + // Standard Error: 357_747 + .saturating_add(Weight::from_parts(47_089_666, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(v.into()))) .saturating_add(T::DbWeight::get().writes((3_u64).saturating_mul(v.into()))) @@ -280,22 +282,22 @@ impl pallet_elections_phragmen::WeightInfo for WeightIn /// The range of component `e` is `[512, 8192]`. fn election_phragmen(c: u32, v: u32, e: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + e * (29 ±0) + v * (605 ±0)` - // Estimated: `179058 + c * (1754 ±88) + e * (10 ±4) + v * (2545 ±63)` - // Minimum execution time: 1_134_000_000 picoseconds. - Weight::from_parts(1_134_000_000, 0) + // Measured: `0 + e * (28 ±0) + v * (606 ±0)` + // Estimated: `179058 + c * (2135 ±7) + e * (12 ±0) + v * (2653 ±6)` + // Minimum execution time: 1_201_000_000 picoseconds. + Weight::from_parts(1_206_000_000, 0) .saturating_add(Weight::from_parts(0, 179058)) - // Standard Error: 3_236_975 - .saturating_add(Weight::from_parts(11_803_000, 0).saturating_mul(v.into())) - // Standard Error: 207_654 - .saturating_add(Weight::from_parts(439_738, 0).saturating_mul(e.into())) - .saturating_add(T::DbWeight::get().reads(53)) + // Standard Error: 479_457 + .saturating_add(Weight::from_parts(14_543_968, 0).saturating_mul(v.into())) + // Standard Error: 30_762 + .saturating_add(Weight::from_parts(656_268, 0).saturating_mul(e.into())) + .saturating_add(T::DbWeight::get().reads(21)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(c.into()))) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) - .saturating_add(T::DbWeight::get().writes(3)) + .saturating_add(T::DbWeight::get().writes(6)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(c.into()))) - .saturating_add(Weight::from_parts(0, 1754).saturating_mul(c.into())) - .saturating_add(Weight::from_parts(0, 10).saturating_mul(e.into())) - .saturating_add(Weight::from_parts(0, 2545).saturating_mul(v.into())) + .saturating_add(Weight::from_parts(0, 2135).saturating_mul(c.into())) + .saturating_add(Weight::from_parts(0, 12).saturating_mul(e.into())) + .saturating_add(Weight::from_parts(0, 2653).saturating_mul(v.into())) } } \ No newline at end of file diff --git a/runtime/src/weights/pallet_free_tx.rs b/runtime/src/weights/pallet_free_tx.rs index a3d0022f7..6050604b7 100644 --- a/runtime/src/weights/pallet_free_tx.rs +++ b/runtime/src/weights/pallet_free_tx.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_free_tx` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_free_tx // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -57,7 +57,7 @@ impl pallet_free_tx::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_000_000 picoseconds. + // Minimum execution time: 2_000_000 picoseconds. Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) @@ -68,7 +68,7 @@ impl pallet_free_tx::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `142` // Estimated: `3529` - // Minimum execution time: 5_000_000 picoseconds. + // Minimum execution time: 4_000_000 picoseconds. Weight::from_parts(5_000_000, 0) .saturating_add(Weight::from_parts(0, 3529)) .saturating_add(T::DbWeight::get().reads(1)) diff --git a/runtime/src/weights/pallet_identity.rs b/runtime/src/weights/pallet_identity.rs index e7c0ebbad..0aaa2118a 100644 --- a/runtime/src/weights/pallet_identity.rs +++ b/runtime/src/weights/pallet_identity.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_identity` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_identity // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -43,10 +43,10 @@ impl pallet_identity::WeightInfo for WeightInfo { // Measured: `32 + r * (57 ±0)` // Estimated: `2626` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(10_779_585, 0) + Weight::from_parts(10_764_851, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 29_655 - .saturating_add(Weight::from_parts(42_899, 0).saturating_mul(r.into())) + // Standard Error: 4_003 + .saturating_add(Weight::from_parts(107_263, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -58,13 +58,13 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `442 + r * (5 ±0)` // Estimated: `11003` - // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(28_663_472, 0) + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(28_900_687, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 98_098 - .saturating_add(Weight::from_parts(69_205, 0).saturating_mul(r.into())) - // Standard Error: 19_029 - .saturating_add(Weight::from_parts(526_096, 0).saturating_mul(x.into())) + // Standard Error: 15_968 + .saturating_add(Weight::from_parts(150_561, 0).saturating_mul(r.into())) + // Standard Error: 3_115 + .saturating_add(Weight::from_parts(606_572, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -79,11 +79,11 @@ impl pallet_identity::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `101` // Estimated: `11003 + s * (2589 ±0)` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(13_900_000, 0) + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(21_230_703, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 70_110 - .saturating_add(Weight::from_parts(3_358_000, 0).saturating_mul(s.into())) + // Standard Error: 5_291 + .saturating_add(Weight::from_parts(3_521_512, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(s.into()))) .saturating_add(T::DbWeight::get().writes(1)) @@ -99,13 +99,13 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `p` is `[0, 100]`. fn set_subs_old(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `192 + p * (32 ±0)` + // Measured: `194 + p * (32 ±0)` // Estimated: `11003` // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(15_100_000, 0) + Weight::from_parts(20_195_041, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 60_592 - .saturating_add(Weight::from_parts(1_370_000, 0).saturating_mul(p.into())) + // Standard Error: 4_389 + .saturating_add(Weight::from_parts(1_472_515, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(p.into()))) @@ -119,19 +119,21 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `r` is `[1, 20]`. /// The range of component `s` is `[0, 100]`. /// The range of component `x` is `[0, 100]`. - fn clear_identity(_r: u32, s: u32, x: u32, ) -> Weight { + fn clear_identity(r: u32, s: u32, x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `467 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` + // Measured: `469 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 54_000_000 picoseconds. - Weight::from_parts(24_295_805, 0) + // Minimum execution time: 58_000_000 picoseconds. + Weight::from_parts(29_226_245, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 42_130 - .saturating_add(Weight::from_parts(1_344_197, 0).saturating_mul(s.into())) - // Standard Error: 42_130 - .saturating_add(Weight::from_parts(317_531, 0).saturating_mul(x.into())) + // Standard Error: 30_538 + .saturating_add(Weight::from_parts(156_364, 0).saturating_mul(r.into())) + // Standard Error: 5_963 + .saturating_add(Weight::from_parts(1_418_734, 0).saturating_mul(s.into())) + // Standard Error: 5_963 + .saturating_add(Weight::from_parts(341_051, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) + .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) } /// Storage: `Identity::Registrars` (r:1 w:0) @@ -140,17 +142,15 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 20]`. /// The range of component `x` is `[0, 100]`. - fn request_judgement(r: u32, x: u32, ) -> Weight { + fn request_judgement(_r: u32, x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `365 + r * (57 ±0) + x * (66 ±0)` + // Measured: `367 + r * (57 ±0) + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(23_654_115, 0) + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(31_959_026, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 102_040 - .saturating_add(Weight::from_parts(244_164, 0).saturating_mul(r.into())) - // Standard Error: 19_793 - .saturating_add(Weight::from_parts(552_503, 0).saturating_mul(x.into())) + // Standard Error: 1_822 + .saturating_add(Weight::from_parts(604_077, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -160,15 +160,15 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `x` is `[0, 100]`. fn cancel_request(r: u32, x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `396 + x * (66 ±0)` + // Measured: `398 + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 26_000_000 picoseconds. - Weight::from_parts(28_161_425, 0) + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(26_241_117, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 129_475 - .saturating_add(Weight::from_parts(2_457, 0).saturating_mul(r.into())) - // Standard Error: 25_115 - .saturating_add(Weight::from_parts(519_577, 0).saturating_mul(x.into())) + // Standard Error: 9_106 + .saturating_add(Weight::from_parts(86_588, 0).saturating_mul(r.into())) + // Standard Error: 1_776 + .saturating_add(Weight::from_parts(615_291, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -180,23 +180,25 @@ impl pallet_identity::WeightInfo for WeightInfo { // Measured: `89 + r * (57 ±0)` // Estimated: `2626` // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(6_319_033, 0) + Weight::from_parts(7_131_508, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 25_049 - .saturating_add(Weight::from_parts(100_098, 0).saturating_mul(r.into())) + // Standard Error: 2_914 + .saturating_add(Weight::from_parts(71_270, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Identity::Registrars` (r:1 w:1) /// Proof: `Identity::Registrars` (`max_values`: Some(1), `max_size`: Some(1141), added: 1636, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. - fn set_account_id(_r: u32, ) -> Weight { + fn set_account_id(r: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `89 + r * (57 ±0)` // Estimated: `2626` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(8_196_252, 0) + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(7_030_268, 0) .saturating_add(Weight::from_parts(0, 2626)) + // Standard Error: 3_754 + .saturating_add(Weight::from_parts(103_333, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -208,10 +210,10 @@ impl pallet_identity::WeightInfo for WeightInfo { // Measured: `89 + r * (57 ±0)` // Estimated: `2626` // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(6_438_362, 0) + Weight::from_parts(7_049_934, 0) .saturating_add(Weight::from_parts(0, 2626)) - // Standard Error: 27_727 - .saturating_add(Weight::from_parts(98_126, 0).saturating_mul(r.into())) + // Standard Error: 3_203 + .saturating_add(Weight::from_parts(71_645, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -221,17 +223,15 @@ impl pallet_identity::WeightInfo for WeightInfo { /// Proof: `Identity::IdentityOf` (`max_values`: None, `max_size`: Some(7538), added: 10013, mode: `MaxEncodedLen`) /// The range of component `r` is `[1, 19]`. /// The range of component `x` is `[0, 100]`. - fn provide_judgement(r: u32, x: u32, ) -> Weight { + fn provide_judgement(_r: u32, x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `443 + r * (57 ±0) + x * (66 ±0)` + // Measured: `445 + r * (57 ±0) + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 18_000_000 picoseconds. - Weight::from_parts(11_989_473, 0) + // Minimum execution time: 20_000_000 picoseconds. + Weight::from_parts(21_503_750, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 260_189 - .saturating_add(Weight::from_parts(447_368, 0).saturating_mul(r.into())) - // Standard Error: 47_344 - .saturating_add(Weight::from_parts(896_421, 0).saturating_mul(x.into())) + // Standard Error: 1_185 + .saturating_add(Weight::from_parts(956_828, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -248,19 +248,19 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `x` is `[0, 100]`. fn kill_identity(r: u32, s: u32, x: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `707 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` + // Measured: `709 + r * (5 ±0) + s * (32 ±0) + x * (66 ±0)` // Estimated: `11003` - // Minimum execution time: 69_000_000 picoseconds. - Weight::from_parts(37_041_106, 0) + // Minimum execution time: 76_000_000 picoseconds. + Weight::from_parts(43_660_931, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 187_991 - .saturating_add(Weight::from_parts(212_110, 0).saturating_mul(r.into())) - // Standard Error: 36_498 - .saturating_add(Weight::from_parts(1_339_200, 0).saturating_mul(s.into())) - // Standard Error: 36_498 - .saturating_add(Weight::from_parts(299_866, 0).saturating_mul(x.into())) + // Standard Error: 26_029 + .saturating_add(Weight::from_parts(225_081, 0).saturating_mul(r.into())) + // Standard Error: 5_083 + .saturating_add(Weight::from_parts(1_432_697, 0).saturating_mul(s.into())) + // Standard Error: 5_083 + .saturating_add(Weight::from_parts(314_010, 0).saturating_mul(x.into())) .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) } /// Storage: `Identity::IdentityOf` (r:1 w:0) @@ -272,13 +272,13 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 99]`. fn add_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `263 + s * (39 ±0)` + // Measured: `475 + s * (36 ±0)` // Estimated: `11003` - // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(27_936_333, 0) + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(32_168_886, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 14_642 - .saturating_add(Weight::from_parts(52_107, 0).saturating_mul(s.into())) + // Standard Error: 2_055 + .saturating_add(Weight::from_parts(43_392, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -289,13 +289,13 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `s` is `[1, 100]`. fn rename_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `450 + s * (5 ±0)` + // Measured: `591 + s * (3 ±0)` // Estimated: `11003` - // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(10_395_314, 0) + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(12_374_456, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 7_457 - .saturating_add(Weight::from_parts(20_013, 0).saturating_mul(s.into())) + // Standard Error: 800 + .saturating_add(Weight::from_parts(10_426, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -308,13 +308,13 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `s` is `[1, 100]`. fn remove_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `499 + s * (37 ±0)` + // Measured: `638 + s * (35 ±0)` // Estimated: `11003` - // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(30_197_762, 0) + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(32_797_141, 0) .saturating_add(Weight::from_parts(0, 11003)) - // Standard Error: 13_783 - .saturating_add(Weight::from_parts(19_964, 0).saturating_mul(s.into())) + // Standard Error: 1_218 + .saturating_add(Weight::from_parts(33_323, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -327,13 +327,13 @@ impl pallet_identity::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 99]`. fn quit_sub(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `670 + s * (38 ±0)` + // Measured: `771 + s * (37 ±0)` // Estimated: `6723` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(21_023_444, 0) + // Minimum execution time: 21_000_000 picoseconds. + Weight::from_parts(23_026_265, 0) .saturating_add(Weight::from_parts(0, 6723)) - // Standard Error: 8_436 - .saturating_add(Weight::from_parts(38_141, 0).saturating_mul(s.into())) + // Standard Error: 1_011 + .saturating_add(Weight::from_parts(41_977, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/src/weights/pallet_im_online.rs b/runtime/src/weights/pallet_im_online.rs index 814de49b9..778964d17 100644 --- a/runtime/src/weights/pallet_im_online.rs +++ b/runtime/src/weights/pallet_im_online.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_im_online` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_im_online // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -48,15 +48,15 @@ impl pallet_im_online::WeightInfo for WeightInfo { /// The range of component `k` is `[1, 1000]`. fn validate_unsigned_and_then_heartbeat(k: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `457 + k * (32 ±0)` - // Estimated: `321487 + k * (32 ±0)` - // Minimum execution time: 61_000_000 picoseconds. - Weight::from_parts(57_263_459, 0) + // Measured: `459 + k * (32 ±0)` + // Estimated: `321487 + k * (1761 ±0)` + // Minimum execution time: 58_000_000 picoseconds. + Weight::from_parts(71_834_720, 0) .saturating_add(Weight::from_parts(0, 321487)) - // Standard Error: 8_738 - .saturating_add(Weight::from_parts(50_652, 0).saturating_mul(k.into())) - .saturating_add(T::DbWeight::get().reads(5)) + // Standard Error: 2_496 + .saturating_add(Weight::from_parts(81_034, 0).saturating_mul(k.into())) + .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(Weight::from_parts(0, 32).saturating_mul(k.into())) + .saturating_add(Weight::from_parts(0, 1761).saturating_mul(k.into())) } } \ No newline at end of file diff --git a/runtime/src/weights/pallet_indices.rs b/runtime/src/weights/pallet_indices.rs index dd1eee455..afc7a897b 100644 --- a/runtime/src/weights/pallet_indices.rs +++ b/runtime/src/weights/pallet_indices.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_indices` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_indices // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -41,8 +41,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3534` - // Minimum execution time: 23_000_000 picoseconds. - Weight::from_parts(26_000_000, 0) + // Minimum execution time: 24_000_000 picoseconds. + Weight::from_parts(24_000_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -55,8 +55,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `275` // Estimated: `3593` - // Minimum execution time: 34_000_000 picoseconds. - Weight::from_parts(36_000_000, 0) + // Minimum execution time: 36_000_000 picoseconds. + Weight::from_parts(37_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -67,8 +67,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `172` // Estimated: `3534` - // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(22_000_000, 0) + // Minimum execution time: 24_000_000 picoseconds. + Weight::from_parts(25_000_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -81,8 +81,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `275` // Estimated: `3593` - // Minimum execution time: 25_000_000 picoseconds. - Weight::from_parts(26_000_000, 0) + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(27_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -93,8 +93,8 @@ impl pallet_indices::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `172` // Estimated: `3534` - // Minimum execution time: 24_000_000 picoseconds. - Weight::from_parts(25_000_000, 0) + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(27_000_000, 0) .saturating_add(Weight::from_parts(0, 3534)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/src/weights/pallet_membership.rs b/runtime/src/weights/pallet_membership.rs index bb5c5688d..8d6705acb 100644 --- a/runtime/src/weights/pallet_membership.rs +++ b/runtime/src/weights/pallet_membership.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_membership` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_membership // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -46,13 +46,13 @@ impl pallet_membership::WeightInfo for WeightInfo { /// The range of component `m` is `[1, 99]`. fn add_member(m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `137 + m * (64 ±0)` + // Measured: `140 + m * (64 ±0)` // Estimated: `4687 + m * (64 ±0)` // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(14_186_213, 0) + Weight::from_parts(14_752_564, 0) .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 2_550 - .saturating_add(Weight::from_parts(20_357, 0).saturating_mul(m.into())) + // Standard Error: 926 + .saturating_add(Weight::from_parts(29_788, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) @@ -70,13 +70,13 @@ impl pallet_membership::WeightInfo for WeightInfo { /// The range of component `m` is `[2, 100]`. fn remove_member(m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `243 + m * (64 ±0)` + // Measured: `244 + m * (64 ±0)` // Estimated: `4687 + m * (64 ±0)` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(17_150_762, 0) + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(17_331_428, 0) .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 25_398 - .saturating_add(Weight::from_parts(22_622, 0).saturating_mul(m.into())) + // Standard Error: 733 + .saturating_add(Weight::from_parts(22_403, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) @@ -94,13 +94,13 @@ impl pallet_membership::WeightInfo for WeightInfo { /// The range of component `m` is `[2, 100]`. fn swap_member(m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `243 + m * (64 ±0)` + // Measured: `244 + m * (64 ±0)` // Estimated: `4687 + m * (64 ±0)` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_050_476, 0) + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(18_100_000, 0) .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 7_379 - .saturating_add(Weight::from_parts(30_502, 0).saturating_mul(m.into())) + // Standard Error: 912 + .saturating_add(Weight::from_parts(27_294, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) @@ -118,13 +118,13 @@ impl pallet_membership::WeightInfo for WeightInfo { /// The range of component `m` is `[1, 100]`. fn reset_member(m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `241 + m * (64 ±0)` + // Measured: `244 + m * (64 ±0)` // Estimated: `4687 + m * (64 ±0)` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_036_320, 0) + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(17_961_467, 0) .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 9_792 - .saturating_add(Weight::from_parts(114_814, 0).saturating_mul(m.into())) + // Standard Error: 740 + .saturating_add(Weight::from_parts(97_651, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) @@ -142,13 +142,13 @@ impl pallet_membership::WeightInfo for WeightInfo { /// The range of component `m` is `[1, 100]`. fn change_key(m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `241 + m * (64 ±0)` + // Measured: `244 + m * (64 ±0)` // Estimated: `4687 + m * (64 ±0)` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(17_090_459, 0) + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(18_295_511, 0) .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 9_540 - .saturating_add(Weight::from_parts(24_094, 0).saturating_mul(m.into())) + // Standard Error: 720 + .saturating_add(Weight::from_parts(30_237, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(m.into())) @@ -162,13 +162,13 @@ impl pallet_membership::WeightInfo for WeightInfo { /// The range of component `m` is `[1, 100]`. fn set_prime(m: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `30 + m * (32 ±0)` + // Measured: `32 + m * (32 ±0)` // Estimated: `4687 + m * (32 ±0)` - // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(5_800_042, 0) + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(6_468_432, 0) .saturating_add(Weight::from_parts(0, 4687)) - // Standard Error: 4_282 - .saturating_add(Weight::from_parts(3_983, 0).saturating_mul(m.into())) + // Standard Error: 583 + .saturating_add(Weight::from_parts(6_268, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(m.into())) @@ -178,15 +178,13 @@ impl pallet_membership::WeightInfo for WeightInfo { /// Storage: `TechnicalCommittee::Prime` (r:0 w:1) /// Proof: `TechnicalCommittee::Prime` (`max_values`: Some(1), `max_size`: None, mode: `Measured`) /// The range of component `m` is `[1, 100]`. - fn clear_prime(m: u32, ) -> Weight { + fn clear_prime(_m: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(2_699_226, 0) + Weight::from_parts(3_017_456, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 2_673 - .saturating_add(Weight::from_parts(3_999, 0).saturating_mul(m.into())) .saturating_add(T::DbWeight::get().writes(2)) } } \ No newline at end of file diff --git a/runtime/src/weights/pallet_multisig.rs b/runtime/src/weights/pallet_multisig.rs index 21ee6b6d9..23b8b5749 100644 --- a/runtime/src/weights/pallet_multisig.rs +++ b/runtime/src/weights/pallet_multisig.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_multisig` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_multisig // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -41,10 +41,10 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(10_000_000, 0) + Weight::from_parts(10_083_884, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 157 - .saturating_add(Weight::from_parts(380, 0).saturating_mul(z.into())) + // Standard Error: 8 + .saturating_add(Weight::from_parts(298, 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`) @@ -52,15 +52,15 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `344 + s * (2 ±0)` + // Measured: `329 + s * (2 ±0)` // Estimated: `6811` - // Minimum execution time: 34_000_000 picoseconds. - Weight::from_parts(28_460_354, 0) + // Minimum execution time: 35_000_000 picoseconds. + Weight::from_parts(30_081_908, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 18_515 - .saturating_add(Weight::from_parts(69_102, 0).saturating_mul(s.into())) - // Standard Error: 181 - .saturating_add(Weight::from_parts(1_371, 0).saturating_mul(z.into())) + // Standard Error: 3_581 + .saturating_add(Weight::from_parts(81_133, 0).saturating_mul(s.into())) + // Standard Error: 35 + .saturating_add(Weight::from_parts(1_293, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -72,13 +72,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `348` // Estimated: `6811` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(16_030_896, 0) + // Minimum execution time: 21_000_000 picoseconds. + Weight::from_parts(16_169_516, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 8_409 - .saturating_add(Weight::from_parts(52_301, 0).saturating_mul(s.into())) - // Standard Error: 81 - .saturating_add(Weight::from_parts(1_175, 0).saturating_mul(z.into())) + // Standard Error: 2_375 + .saturating_add(Weight::from_parts(70_824, 0).saturating_mul(s.into())) + // Standard Error: 23 + .saturating_add(Weight::from_parts(1_283, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -90,15 +90,15 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `487 + s * (33 ±0)` + // Measured: `456 + s * (33 ±0)` // Estimated: `6811` - // Minimum execution time: 42_000_000 picoseconds. - Weight::from_parts(35_256_768, 0) + // Minimum execution time: 39_000_000 picoseconds. + Weight::from_parts(28_717_896, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 24_779 - .saturating_add(Weight::from_parts(102_844, 0).saturating_mul(s.into())) - // Standard Error: 243 - .saturating_add(Weight::from_parts(783, 0).saturating_mul(z.into())) + // Standard Error: 4_418 + .saturating_add(Weight::from_parts(129_394, 0).saturating_mul(s.into())) + // Standard Error: 43 + .saturating_add(Weight::from_parts(1_620, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -107,13 +107,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[2, 100]`. fn approve_as_multi_create(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `344 + s * (2 ±0)` + // Measured: `337 + s * (1 ±0)` // Estimated: `6811` - // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(25_469_014, 0) + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(29_696_326, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 49_880 - .saturating_add(Weight::from_parts(171_869, 0).saturating_mul(s.into())) + // Standard Error: 3_395 + .saturating_add(Weight::from_parts(83_130, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -124,11 +124,11 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `348` // Estimated: `6811` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(18_564_303, 0) + // Minimum execution time: 14_000_000 picoseconds. + Weight::from_parts(15_375_346, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 29_591 - .saturating_add(Weight::from_parts(22_356, 0).saturating_mul(s.into())) + // Standard Error: 1_293 + .saturating_add(Weight::from_parts(59_620, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -137,13 +137,13 @@ impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `s` is `[2, 100]`. fn cancel_as_multi(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `519 + s * (1 ±0)` + // Measured: `525 + s * (1 ±0)` // Estimated: `6811` // Minimum execution time: 29_000_000 picoseconds. - Weight::from_parts(34_142_300, 0) + Weight::from_parts(28_602_938, 0) .saturating_add(Weight::from_parts(0, 6811)) - // Standard Error: 65_325 - .saturating_add(Weight::from_parts(22_789, 0).saturating_mul(s.into())) + // Standard Error: 2_572 + .saturating_add(Weight::from_parts(105_118, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/runtime/src/weights/pallet_nomination_pools.rs b/runtime/src/weights/pallet_nomination_pools.rs index 736a79942..ab9aeb118 100644 --- a/runtime/src/weights/pallet_nomination_pools.rs +++ b/runtime/src/weights/pallet_nomination_pools.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_nomination_pools` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_nomination_pools // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -69,8 +69,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `3426` // Estimated: `8877` - // Minimum execution time: 169_000_000 picoseconds. - Weight::from_parts(171_000_000, 0) + // Minimum execution time: 177_000_000 picoseconds. + Weight::from_parts(180_000_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(19)) .saturating_add(T::DbWeight::get().writes(12)) @@ -101,8 +101,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `3440` // Estimated: `8877` - // Minimum execution time: 166_000_000 picoseconds. - Weight::from_parts(173_000_000, 0) + // Minimum execution time: 173_000_000 picoseconds. + Weight::from_parts(177_000_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(16)) .saturating_add(T::DbWeight::get().writes(12)) @@ -135,8 +135,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `3348` // Estimated: `8799` - // Minimum execution time: 197_000_000 picoseconds. - Weight::from_parts(198_000_000, 0) + // Minimum execution time: 206_000_000 picoseconds. + Weight::from_parts(214_000_000, 0) .saturating_add(Weight::from_parts(0, 8799)) .saturating_add(T::DbWeight::get().reads(16)) .saturating_add(T::DbWeight::get().writes(12)) @@ -157,8 +157,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `1270` // Estimated: `3702` - // Minimum execution time: 69_000_000 picoseconds. - Weight::from_parts(69_000_000, 0) + // Minimum execution time: 73_000_000 picoseconds. + Weight::from_parts(74_000_000, 0) .saturating_add(Weight::from_parts(0, 3702)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(4)) @@ -199,8 +199,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `3705` // Estimated: `27847` - // Minimum execution time: 146_000_000 picoseconds. - Weight::from_parts(147_000_000, 0) + // Minimum execution time: 153_000_000 picoseconds. + Weight::from_parts(156_000_000, 0) .saturating_add(Weight::from_parts(0, 27847)) .saturating_add(T::DbWeight::get().reads(20)) .saturating_add(T::DbWeight::get().writes(13)) @@ -222,11 +222,11 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `1807` // Estimated: `4764` - // Minimum execution time: 51_000_000 picoseconds. - Weight::from_parts(51_600_000, 0) + // Minimum execution time: 53_000_000 picoseconds. + Weight::from_parts(55_268_300, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 12_509 - .saturating_add(Weight::from_parts(14_000, 0).saturating_mul(s.into())) + // Standard Error: 1_782 + .saturating_add(Weight::from_parts(5_244, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -253,13 +253,15 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo /// Storage: `NominationPools::ClaimPermissions` (r:0 w:1) /// Proof: `NominationPools::ClaimPermissions` (`max_values`: None, `max_size`: Some(41), added: 2516, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 100]`. - fn withdraw_unbonded_update(_s: u32, ) -> Weight { + fn withdraw_unbonded_update(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `2234` // Estimated: `27847` - // Minimum execution time: 115_000_000 picoseconds. - Weight::from_parts(119_800_000, 0) + // Minimum execution time: 120_000_000 picoseconds. + Weight::from_parts(124_078_093, 0) .saturating_add(Weight::from_parts(0, 27847)) + // Standard Error: 2_352 + .saturating_add(Weight::from_parts(19_949, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(10)) .saturating_add(T::DbWeight::get().writes(8)) } @@ -312,8 +314,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `2684` // Estimated: `27847` - // Minimum execution time: 201_000_000 picoseconds. - Weight::from_parts(213_300_000, 0) + // Minimum execution time: 212_000_000 picoseconds. + Weight::from_parts(218_656_997, 0) .saturating_add(Weight::from_parts(0, 27847)) .saturating_add(T::DbWeight::get().reads(21)) .saturating_add(T::DbWeight::get().writes(18)) @@ -366,8 +368,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `1300` // Estimated: `6196` - // Minimum execution time: 178_000_000 picoseconds. - Weight::from_parts(183_000_000, 0) + // Minimum execution time: 186_000_000 picoseconds. + Weight::from_parts(195_000_000, 0) .saturating_add(Weight::from_parts(0, 6196)) .saturating_add(T::DbWeight::get().reads(22)) .saturating_add(T::DbWeight::get().writes(15)) @@ -401,11 +403,11 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `2022` // Estimated: `4556 + n * (2520 ±0)` - // Minimum execution time: 56_000_000 picoseconds. - Weight::from_parts(53_796_961, 0) + // Minimum execution time: 59_000_000 picoseconds. + Weight::from_parts(58_865_865, 0) .saturating_add(Weight::from_parts(0, 4556)) - // Standard Error: 159_061 - .saturating_add(Weight::from_parts(1_805_248, 0).saturating_mul(n.into())) + // Standard Error: 10_322 + .saturating_add(Weight::from_parts(1_466_600, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(5)) @@ -421,8 +423,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `1490` // Estimated: `4556` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(29_000_000, 0) + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(30_000_000, 0) .saturating_add(Weight::from_parts(0, 4556)) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) @@ -439,10 +441,10 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Measured: `597` // Estimated: `3735` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(11_497_653, 0) + Weight::from_parts(12_077_007, 0) .saturating_add(Weight::from_parts(0, 3735)) - // Standard Error: 2_700 - .saturating_add(Weight::from_parts(3_918, 0).saturating_mul(n.into())) + // Standard Error: 258 + .saturating_add(Weight::from_parts(1_570, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -462,7 +464,7 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_000_000 picoseconds. + // Minimum execution time: 5_000_000 picoseconds. Weight::from_parts(6_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(6)) @@ -474,7 +476,7 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Measured: `597` // Estimated: `3685` // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(19_000_000, 0) + Weight::from_parts(16_000_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -501,8 +503,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `2191` // Estimated: `4556` - // Minimum execution time: 52_000_000 picoseconds. - Weight::from_parts(53_000_000, 0) + // Minimum execution time: 54_000_000 picoseconds. + Weight::from_parts(55_000_000, 0) .saturating_add(Weight::from_parts(0, 4556)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(5)) @@ -519,7 +521,7 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `836` // Estimated: `3685` - // Minimum execution time: 28_000_000 picoseconds. + // Minimum execution time: 27_000_000 picoseconds. Weight::from_parts(28_000_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(4)) @@ -534,7 +536,7 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Measured: `637` // Estimated: `3685` // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + Weight::from_parts(16_000_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -545,7 +547,7 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `597` // Estimated: `3685` - // Minimum execution time: 16_000_000 picoseconds. + // Minimum execution time: 15_000_000 picoseconds. Weight::from_parts(16_000_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(1)) @@ -577,8 +579,8 @@ impl pallet_nomination_pools::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `1067` // Estimated: `3685` - // Minimum execution time: 62_000_000 picoseconds. - Weight::from_parts(66_000_000, 0) + // Minimum execution time: 60_000_000 picoseconds. + Weight::from_parts(61_000_000, 0) .saturating_add(Weight::from_parts(0, 3685)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) diff --git a/runtime/src/weights/pallet_preimage.rs b/runtime/src/weights/pallet_preimage.rs index bca6a90e7..ad0d3758c 100644 --- a/runtime/src/weights/pallet_preimage.rs +++ b/runtime/src/weights/pallet_preimage.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_preimage` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_preimage // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -45,10 +45,10 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Measured: `210` // Estimated: `3556` // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(46_500_000, 0) + Weight::from_parts(28_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 25 - .saturating_add(Weight::from_parts(1_427, 0).saturating_mul(s.into())) + // Standard Error: 1 + .saturating_add(Weight::from_parts(1_428, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -64,8 +64,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Minimum execution time: 13_000_000 picoseconds. Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 20 - .saturating_add(Weight::from_parts(1_479, 0).saturating_mul(s.into())) + // Standard Error: 2 + .saturating_add(Weight::from_parts(1_441, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -78,11 +78,11 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `173` // Estimated: `3556` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) - // Standard Error: 13 - .saturating_add(Weight::from_parts(1_427, 0).saturating_mul(s.into())) + // Standard Error: 2 + .saturating_add(Weight::from_parts(1_455, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -94,8 +94,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `356` // Estimated: `3556` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(33_000_000, 0) + // Minimum execution time: 35_000_000 picoseconds. + Weight::from_parts(37_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -108,8 +108,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `211` // Estimated: `3556` - // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + // Minimum execution time: 18_000_000 picoseconds. + Weight::from_parts(19_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) @@ -120,8 +120,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `255` // Estimated: `3556` - // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + // Minimum execution time: 16_000_000 picoseconds. + Weight::from_parts(17_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -132,8 +132,8 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `211` // Estimated: `3556` - // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -157,7 +157,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Measured: `173` // Estimated: `3556` // Minimum execution time: 7_000_000 picoseconds. - Weight::from_parts(10_000_000, 0) + Weight::from_parts(7_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -170,7 +170,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `211` // Estimated: `3556` - // Minimum execution time: 16_000_000 picoseconds. + // Minimum execution time: 17_000_000 picoseconds. Weight::from_parts(18_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(1)) @@ -182,7 +182,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `173` // Estimated: `3556` - // Minimum execution time: 7_000_000 picoseconds. + // Minimum execution time: 6_000_000 picoseconds. Weight::from_parts(7_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(1)) @@ -194,7 +194,7 @@ impl pallet_preimage::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `173` // Estimated: `3556` - // Minimum execution time: 7_000_000 picoseconds. + // Minimum execution time: 6_000_000 picoseconds. Weight::from_parts(7_000_000, 0) .saturating_add(Weight::from_parts(0, 3556)) .saturating_add(T::DbWeight::get().reads(1)) diff --git a/runtime/src/weights/pallet_proxy.rs b/runtime/src/weights/pallet_proxy.rs index 0920c97df..d1c734282 100644 --- a/runtime/src/weights/pallet_proxy.rs +++ b/runtime/src/weights/pallet_proxy.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_proxy` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_proxy // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -42,11 +42,11 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `161 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(13_987_206, 0) + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(12_909_008, 0) .saturating_add(Weight::from_parts(0, 4706)) - // Standard Error: 100_509 - .saturating_add(Weight::from_parts(76_759, 0).saturating_mul(p.into())) + // Standard Error: 2_082 + .saturating_add(Weight::from_parts(36_661, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) } /// Storage: `Proxy::Proxies` (r:1 w:0) @@ -57,13 +57,17 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn proxy_announced(_a: u32, _p: u32, ) -> Weight { + fn proxy_announced(a: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `533 + a * (68 ±0) + p * (35 ±0)` + // Measured: `488 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` // Minimum execution time: 34_000_000 picoseconds. - Weight::from_parts(43_820_750, 0) + Weight::from_parts(34_613_973, 0) .saturating_add(Weight::from_parts(0, 5698)) + // Standard Error: 3_142 + .saturating_add(Weight::from_parts(152_910, 0).saturating_mul(a.into())) + // Standard Error: 3_246 + .saturating_add(Weight::from_parts(20_746, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -75,15 +79,15 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `p` is `[1, 31]`. fn remove_announcement(a: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `448 + a * (68 ±0)` + // Measured: `403 + a * (68 ±0)` // Estimated: `5698` // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(21_568_030, 0) + Weight::from_parts(22_929_108, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 27_650 - .saturating_add(Weight::from_parts(122_335, 0).saturating_mul(a.into())) - // Standard Error: 28_750 - .saturating_add(Weight::from_parts(11_924, 0).saturating_mul(p.into())) + // Standard Error: 2_077 + .saturating_add(Weight::from_parts(163_445, 0).saturating_mul(a.into())) + // Standard Error: 2_146 + .saturating_add(Weight::from_parts(3_138, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -95,15 +99,15 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// The range of component `p` is `[1, 31]`. fn reject_announcement(a: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `448 + a * (68 ±0)` + // Measured: `403 + a * (68 ±0)` // Estimated: `5698` // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(20_396_307, 0) + Weight::from_parts(22_273_903, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 41_454 - .saturating_add(Weight::from_parts(190_715, 0).saturating_mul(a.into())) - // Standard Error: 43_103 - .saturating_add(Weight::from_parts(23_596, 0).saturating_mul(p.into())) + // Standard Error: 2_604 + .saturating_add(Weight::from_parts(184_731, 0).saturating_mul(a.into())) + // Standard Error: 2_691 + .saturating_add(Weight::from_parts(12_915, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -115,54 +119,62 @@ impl pallet_proxy::WeightInfo for WeightInfo { /// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`) /// The range of component `a` is `[0, 31]`. /// The range of component `p` is `[1, 31]`. - fn announce(a: u32, _p: u32, ) -> Weight { + fn announce(a: u32, p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `465 + a * (68 ±0) + p * (35 ±0)` + // Measured: `420 + a * (68 ±0) + p * (37 ±0)` // Estimated: `5698` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(31_581_155, 0) + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(31_601_792, 0) .saturating_add(Weight::from_parts(0, 5698)) - // Standard Error: 28_400 - .saturating_add(Weight::from_parts(145_748, 0).saturating_mul(a.into())) + // Standard Error: 3_423 + .saturating_add(Weight::from_parts(178_414, 0).saturating_mul(a.into())) + // Standard Error: 3_536 + .saturating_add(Weight::from_parts(28_069, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } /// Storage: `Proxy::Proxies` (r:1 w:1) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn add_proxy(_p: u32, ) -> Weight { + fn add_proxy(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `161 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(24_451_314, 0) + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(24_827_417, 0) .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 3_282 + .saturating_add(Weight::from_parts(49_393, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Proxy::Proxies` (r:1 w:1) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn remove_proxy(_p: u32, ) -> Weight { + fn remove_proxy(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `161 + p * (37 ±0)` // Estimated: `4706` // Minimum execution time: 23_000_000 picoseconds. - Weight::from_parts(25_922_174, 0) + Weight::from_parts(24_371_300, 0) .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 3_849 + .saturating_add(Weight::from_parts(72_467, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Proxy::Proxies` (r:1 w:1) /// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`) /// The range of component `p` is `[1, 31]`. - fn remove_proxies(_p: u32, ) -> Weight { + fn remove_proxies(p: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `161 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 19_000_000 picoseconds. - Weight::from_parts(23_839_907, 0) + // Minimum execution time: 21_000_000 picoseconds. + Weight::from_parts(22_000_988, 0) .saturating_add(Weight::from_parts(0, 4706)) + // Standard Error: 2_409 + .saturating_add(Weight::from_parts(14_369, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -173,8 +185,8 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `173` // Estimated: `4706` - // Minimum execution time: 24_000_000 picoseconds. - Weight::from_parts(27_049_573, 0) + // Minimum execution time: 25_000_000 picoseconds. + Weight::from_parts(27_025_613, 0) .saturating_add(Weight::from_parts(0, 4706)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -186,8 +198,8 @@ impl pallet_proxy::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `198 + p * (37 ±0)` // Estimated: `4706` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(24_009_950, 0) + // Minimum execution time: 22_000_000 picoseconds. + Weight::from_parts(23_237_111, 0) .saturating_add(Weight::from_parts(0, 4706)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/src/weights/pallet_recovery.rs b/runtime/src/weights/pallet_recovery.rs index c65736c48..0b10a36ec 100644 --- a/runtime/src/weights/pallet_recovery.rs +++ b/runtime/src/weights/pallet_recovery.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_recovery` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_recovery // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -42,7 +42,7 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Measured: `182` // Estimated: `3545` // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + Weight::from_parts(8_000_000, 0) .saturating_add(Weight::from_parts(0, 3545)) .saturating_add(T::DbWeight::get().reads(1)) } @@ -52,7 +52,7 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_000_000 picoseconds. + // Minimum execution time: 7_000_000 picoseconds. Weight::from_parts(8_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) @@ -64,11 +64,11 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `76` // Estimated: `3816` - // Minimum execution time: 23_000_000 picoseconds. - Weight::from_parts(22_800_000, 0) + // Minimum execution time: 24_000_000 picoseconds. + Weight::from_parts(24_495_556, 0) .saturating_add(Weight::from_parts(0, 3816)) - // Standard Error: 209_538 - .saturating_add(Weight::from_parts(500_000, 0).saturating_mul(n.into())) + // Standard Error: 6_635 + .saturating_add(Weight::from_parts(142_575, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -80,8 +80,8 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `173` // Estimated: `3854` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(30_000_000, 0) + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(28_000_000, 0) .saturating_add(Weight::from_parts(0, 3854)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -95,11 +95,11 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `261 + n * (64 ±0)` // Estimated: `3854` - // Minimum execution time: 16_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + // Minimum execution time: 15_000_000 picoseconds. + Weight::from_parts(16_751_701, 0) .saturating_add(Weight::from_parts(0, 3854)) - // Standard Error: 51_538 - .saturating_add(Weight::from_parts(100_000, 0).saturating_mul(n.into())) + // Standard Error: 8_228 + .saturating_add(Weight::from_parts(81_482, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -110,13 +110,15 @@ impl pallet_recovery::WeightInfo for WeightInfo { /// Storage: `Recovery::Proxy` (r:1 w:1) /// Proof: `Recovery::Proxy` (`max_values`: None, `max_size`: Some(80), added: 2555, mode: `MaxEncodedLen`) /// The range of component `n` is `[1, 9]`. - fn claim_recovery(_n: u32, ) -> Weight { + fn claim_recovery(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `293 + n * (64 ±0)` // Estimated: `3854` - // Minimum execution time: 20_000_000 picoseconds. - Weight::from_parts(20_300_000, 0) + // Minimum execution time: 19_000_000 picoseconds. + Weight::from_parts(20_578_332, 0) .saturating_add(Weight::from_parts(0, 3854)) + // Standard Error: 10_800 + .saturating_add(Weight::from_parts(18_068, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -125,13 +127,15 @@ impl pallet_recovery::WeightInfo for WeightInfo { /// 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 `n` is `[1, 9]`. - fn close_recovery(_n: u32, ) -> Weight { + fn close_recovery(n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `447 + n * (32 ±0)` // Estimated: `3854` // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(32_475_000, 0) + Weight::from_parts(32_158_858, 0) .saturating_add(Weight::from_parts(0, 3854)) + // Standard Error: 13_134 + .saturating_add(Weight::from_parts(106_889, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -144,11 +148,11 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `170 + n * (32 ±0)` // Estimated: `3854` - // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(27_950_000, 0) + // Minimum execution time: 28_000_000 picoseconds. + Weight::from_parts(28_866_310, 0) .saturating_add(Weight::from_parts(0, 3854)) - // Standard Error: 91_855 - .saturating_add(Weight::from_parts(50_000, 0).saturating_mul(n.into())) + // Standard Error: 12_971 + .saturating_add(Weight::from_parts(15_860, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -159,7 +163,7 @@ impl pallet_recovery::WeightInfo for WeightInfo { // Measured: `182` // Estimated: `3545` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 3545)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/src/weights/pallet_scheduler.rs b/runtime/src/weights/pallet_scheduler.rs index 34dfc7ba0..fa77c75e0 100644 --- a/runtime/src/weights/pallet_scheduler.rs +++ b/runtime/src/weights/pallet_scheduler.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_scheduler` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_scheduler // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -42,7 +42,7 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `30` // Estimated: `1489` // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(4_000_000, 0) + Weight::from_parts(3_000_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -54,11 +54,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `80 + s * (177 ±0)` // Estimated: `110487` - // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(4_100_000, 0) + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(1_551_953, 0) .saturating_add(Weight::from_parts(0, 110487)) - // Standard Error: 6_809 - .saturating_add(Weight::from_parts(394_921, 0).saturating_mul(s.into())) + // Standard Error: 1_963 + .saturating_add(Weight::from_parts(464_112, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -67,7 +67,7 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(6_000_000, 0) + Weight::from_parts(4_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) } /// Storage: `Preimage::PreimageFor` (r:1 w:1) @@ -78,12 +78,12 @@ impl pallet_scheduler::WeightInfo for WeightInfo { fn service_task_fetched(s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `246 + s * (1 ±0)` - // Estimated: `3708 + s * (1 ±0)` + // Estimated: `3711 + s * (1 ±0)` // Minimum execution time: 17_000_000 picoseconds. - Weight::from_parts(17_000_000, 0) - .saturating_add(Weight::from_parts(0, 3708)) - // Standard Error: 12 - .saturating_add(Weight::from_parts(756, 0).saturating_mul(s.into())) + Weight::from_parts(18_000_000, 0) + .saturating_add(Weight::from_parts(0, 3711)) + // Standard Error: 3 + .saturating_add(Weight::from_parts(856, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 1).saturating_mul(s.into())) @@ -94,7 +94,7 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_000_000 picoseconds. + // Minimum execution time: 6_000_000 picoseconds. Weight::from_parts(6_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) @@ -112,7 +112,7 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(3_000_000, 0) + Weight::from_parts(2_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) } fn execute_dispatch_unsigned() -> Weight { @@ -131,10 +131,10 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Measured: `80 + s * (177 ±0)` // Estimated: `110487` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(9_865_052, 0) + Weight::from_parts(9_525_897, 0) .saturating_add(Weight::from_parts(0, 110487)) - // Standard Error: 11_309 - .saturating_add(Weight::from_parts(417_064, 0).saturating_mul(s.into())) + // Standard Error: 2_757 + .saturating_add(Weight::from_parts(499_224, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -147,11 +147,11 @@ impl pallet_scheduler::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `80 + s * (177 ±0)` // Estimated: `110487` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(6_129_013, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(6_779_329, 0) .saturating_add(Weight::from_parts(0, 110487)) - // Standard Error: 27_790 - .saturating_add(Weight::from_parts(766_475, 0).saturating_mul(s.into())) + // Standard Error: 3_546 + .saturating_add(Weight::from_parts(802_400, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -162,13 +162,13 @@ impl pallet_scheduler::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 511]`. fn schedule_named(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `480 + s * (178 ±0)` + // Measured: `595 + s * (178 ±0)` // Estimated: `110487` // Minimum execution time: 13_000_000 picoseconds. - Weight::from_parts(11_781_042, 0) + Weight::from_parts(15_436_062, 0) .saturating_add(Weight::from_parts(0, 110487)) - // Standard Error: 23_020 - .saturating_add(Weight::from_parts(459_321, 0).saturating_mul(s.into())) + // Standard Error: 3_578 + .saturating_add(Weight::from_parts(481_495, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -179,13 +179,13 @@ impl pallet_scheduler::WeightInfo for WeightInfo { /// The range of component `s` is `[1, 512]`. fn cancel_named(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `546 + s * (178 ±0)` + // Measured: `708 + s * (177 ±0)` // Estimated: `110487` // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(13_177_036, 0) + Weight::from_parts(8_282_410, 0) .saturating_add(Weight::from_parts(0, 110487)) - // Standard Error: 10_946 - .saturating_add(Weight::from_parts(700_714, 0).saturating_mul(s.into())) + // Standard Error: 2_560 + .saturating_add(Weight::from_parts(783_300, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/src/weights/pallet_session.rs b/runtime/src/weights/pallet_session.rs index 142047d2f..91cf56709 100644 --- a/runtime/src/weights/pallet_session.rs +++ b/runtime/src/weights/pallet_session.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_session` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_session // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -45,8 +45,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1971` // Estimated: `12861` - // Minimum execution time: 40_000_000 picoseconds. - Weight::from_parts(42_000_000, 0) + // Minimum execution time: 43_000_000 picoseconds. + Weight::from_parts(44_000_000, 0) .saturating_add(Weight::from_parts(0, 12861)) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(5)) @@ -61,8 +61,8 @@ impl pallet_session::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1744` // Estimated: `5209` - // Minimum execution time: 28_000_000 picoseconds. - Weight::from_parts(30_000_000, 0) + // Minimum execution time: 31_000_000 picoseconds. + Weight::from_parts(32_000_000, 0) .saturating_add(Weight::from_parts(0, 5209)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(5)) diff --git a/runtime/src/weights/pallet_staking.rs b/runtime/src/weights/pallet_staking.rs index a4407ca69..8d8d0213a 100644 --- a/runtime/src/weights/pallet_staking.rs +++ b/runtime/src/weights/pallet_staking.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_staking` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_staking // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -51,8 +51,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `973` // Estimated: `4764` - // Minimum execution time: 46_000_000 picoseconds. - Weight::from_parts(57_000_000, 0) + // Minimum execution time: 50_000_000 picoseconds. + Weight::from_parts(50_000_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) @@ -73,8 +73,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2042` // Estimated: `8877` - // Minimum execution time: 84_000_000 picoseconds. - Weight::from_parts(86_000_000, 0) + // Minimum execution time: 86_000_000 picoseconds. + Weight::from_parts(87_000_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) @@ -101,8 +101,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2247` // Estimated: `8877` - // Minimum execution time: 80_000_000 picoseconds. - Weight::from_parts(85_000_000, 0) + // Minimum execution time: 89_000_000 picoseconds. + Weight::from_parts(90_000_000, 0) .saturating_add(Weight::from_parts(0, 8877)) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(7)) @@ -116,15 +116,13 @@ impl pallet_staking::WeightInfo for WeightInfo { /// Storage: `Balances::Freezes` (r:1 w:0) /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) /// The range of component `s` is `[0, 100]`. - fn withdraw_unbonded_update(s: u32, ) -> Weight { + fn withdraw_unbonded_update(_s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `1009` // Estimated: `4764` - // Minimum execution time: 36_000_000 picoseconds. - Weight::from_parts(36_900_000, 0) + // Minimum execution time: 38_000_000 picoseconds. + Weight::from_parts(39_927_845, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 16_941 - .saturating_add(Weight::from_parts(4_000, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -159,17 +157,17 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 100]`. fn withdraw_unbonded_kill(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2314 + s * (4 ±0)` - // Estimated: `6248 + s * (5 ±0)` - // Minimum execution time: 76_000_000 picoseconds. - Weight::from_parts(76_100_000, 0) + // Measured: `2315 + s * (4 ±0)` + // Estimated: `6248 + s * (4 ±0)` + // Minimum execution time: 82_000_000 picoseconds. + Weight::from_parts(86_036_816, 0) .saturating_add(Weight::from_parts(0, 6248)) - // Standard Error: 66_629 - .saturating_add(Weight::from_parts(1_538_000, 0).saturating_mul(s.into())) + // Standard Error: 3_711 + .saturating_add(Weight::from_parts(1_582_172, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(13)) - .saturating_add(T::DbWeight::get().writes(10)) + .saturating_add(T::DbWeight::get().writes(11)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) - .saturating_add(Weight::from_parts(0, 5).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(0, 4).saturating_mul(s.into())) } /// Storage: `Staking::Ledger` (r:1 w:0) /// Proof: `Staking::Ledger` (`max_values`: None, `max_size`: Some(1091), added: 3566, mode: `MaxEncodedLen`) @@ -197,8 +195,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1431` // Estimated: `4556` - // Minimum execution time: 45_000_000 picoseconds. - Weight::from_parts(46_000_000, 0) + // Minimum execution time: 49_000_000 picoseconds. + Weight::from_parts(50_000_000, 0) .saturating_add(Weight::from_parts(0, 4556)) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(5)) @@ -210,13 +208,13 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `k` is `[1, 128]`. fn kick(k: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1140 + k * (570 ±0)` + // Measured: `1205 + k * (569 ±0)` // Estimated: `4556 + k * (3033 ±0)` - // Minimum execution time: 21_000_000 picoseconds. - Weight::from_parts(15_571_177, 0) + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(24_954_814, 0) .saturating_add(Weight::from_parts(0, 4556)) - // Standard Error: 133_305 - .saturating_add(Weight::from_parts(7_738_766, 0).saturating_mul(k.into())) + // Standard Error: 8_914 + .saturating_add(Weight::from_parts(8_233_039, 0).saturating_mul(k.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(k.into()))) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(k.into()))) @@ -247,13 +245,13 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `n` is `[1, 16]`. fn nominate(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1901 + n * (97 ±0)` + // Measured: `1894 + n * (99 ±0)` // Estimated: `6248 + n * (2520 ±0)` - // Minimum execution time: 55_000_000 picoseconds. - Weight::from_parts(52_448_895, 0) + // Minimum execution time: 57_000_000 picoseconds. + Weight::from_parts(55_367_729, 0) .saturating_add(Weight::from_parts(0, 6248)) - // Standard Error: 224_789 - .saturating_add(Weight::from_parts(3_042_817, 0).saturating_mul(n.into())) + // Standard Error: 9_915 + .saturating_add(Weight::from_parts(3_273_849, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(6)) @@ -277,8 +275,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1703` // Estimated: `6248` - // Minimum execution time: 46_000_000 picoseconds. - Weight::from_parts(55_000_000, 0) + // Minimum execution time: 49_000_000 picoseconds. + Weight::from_parts(50_000_000, 0) .saturating_add(Weight::from_parts(0, 6248)) .saturating_add(T::DbWeight::get().reads(8)) .saturating_add(T::DbWeight::get().writes(6)) @@ -292,7 +290,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Measured: `762` // Estimated: `4556` // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(12_000_000, 0) + Weight::from_parts(13_000_000, 0) .saturating_add(Weight::from_parts(0, 4556)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -329,7 +327,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 9_000_000 picoseconds. - Weight::from_parts(10_000_000, 0) + Weight::from_parts(9_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -339,8 +337,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(9_000_000, 0) + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -350,7 +348,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_000_000 picoseconds. + // Minimum execution time: 9_000_000 picoseconds. Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(1)) @@ -362,11 +360,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(3_200_000, 0) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(3_201_854, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 452 - .saturating_add(Weight::from_parts(6_600, 0).saturating_mul(v.into())) + // Standard Error: 54 + .saturating_add(Weight::from_parts(6_650, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: `Staking::Bonded` (r:1 w:1) @@ -400,17 +398,17 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `s` is `[0, 100]`. fn force_unstake(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2005 + s * (4 ±0)` - // Estimated: `6248 + s * (5 ±0)` - // Minimum execution time: 70_000_000 picoseconds. - Weight::from_parts(71_600_000, 0) + // Measured: `2006 + s * (4 ±0)` + // Estimated: `6248 + s * (4 ±0)` + // Minimum execution time: 77_000_000 picoseconds. + Weight::from_parts(80_018_291, 0) .saturating_add(Weight::from_parts(0, 6248)) - // Standard Error: 58_689 - .saturating_add(Weight::from_parts(1_486_000, 0).saturating_mul(s.into())) + // Standard Error: 2_206 + .saturating_add(Weight::from_parts(1_538_483, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(12)) - .saturating_add(T::DbWeight::get().writes(11)) + .saturating_add(T::DbWeight::get().writes(12)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) - .saturating_add(Weight::from_parts(0, 5).saturating_mul(s.into())) + .saturating_add(Weight::from_parts(0, 4).saturating_mul(s.into())) } /// Storage: `Staking::UnappliedSlashes` (r:1 w:1) /// Proof: `Staking::UnappliedSlashes` (`max_values`: None, `max_size`: None, mode: `Measured`) @@ -419,11 +417,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `66559` // Estimated: `70024` - // Minimum execution time: 142_000_000 picoseconds. - Weight::from_parts(544_525_502, 0) + // Minimum execution time: 129_000_000 picoseconds. + Weight::from_parts(676_417_940, 0) .saturating_add(Weight::from_parts(0, 70024)) - // Standard Error: 335_309 - .saturating_add(Weight::from_parts(3_318_621, 0).saturating_mul(s.into())) + // Standard Error: 38_320 + .saturating_add(Weight::from_parts(3_475_104, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -448,13 +446,13 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `n` is `[0, 256]`. fn payout_stakers_dead_controller(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `18657 + n * (150 ±0)` - // Estimated: `14733 + n * (2603 ±0)` - // Minimum execution time: 65_000_000 picoseconds. - Weight::from_parts(86_300_000, 0) - .saturating_add(Weight::from_parts(0, 14733)) - // Standard Error: 150_503 - .saturating_add(Weight::from_parts(28_482_812, 0).saturating_mul(n.into())) + // Measured: `20321 + n * (143 ±0)` + // Estimated: `19915 + n * (2603 ±1)` + // Minimum execution time: 76_000_000 picoseconds. + Weight::from_parts(97_300_111, 0) + .saturating_add(Weight::from_parts(0, 19915)) + // Standard Error: 78_579 + .saturating_add(Weight::from_parts(32_522_991, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(2)) @@ -486,13 +484,13 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `n` is `[0, 256]`. fn payout_stakers_alive_staked(n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `31047 + n * (387 ±0)` - // Estimated: `21124 + n * (3774 ±0)` - // Minimum execution time: 89_000_000 picoseconds. - Weight::from_parts(84_800_000, 0) - .saturating_add(Weight::from_parts(0, 21124)) - // Standard Error: 307_990 - .saturating_add(Weight::from_parts(44_999_218, 0).saturating_mul(n.into())) + // Measured: `33334 + n * (377 ±0)` + // Estimated: `30950 + n * (3774 ±0)` + // Minimum execution time: 106_000_000 picoseconds. + Weight::from_parts(148_166_739, 0) + .saturating_add(Weight::from_parts(0, 30950)) + // Standard Error: 101_105 + .saturating_add(Weight::from_parts(50_121_057, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().reads((6_u64).saturating_mul(n.into()))) .saturating_add(T::DbWeight::get().writes(3)) @@ -516,11 +514,11 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `2043 + l * (7 ±0)` // Estimated: `8877` - // Minimum execution time: 72_000_000 picoseconds. - Weight::from_parts(74_152_266, 0) + // Minimum execution time: 79_000_000 picoseconds. + Weight::from_parts(80_269_512, 0) .saturating_add(Weight::from_parts(0, 8877)) - // Standard Error: 73_278 - .saturating_add(Weight::from_parts(46_156, 0).saturating_mul(l.into())) + // Standard Error: 4_478 + .saturating_add(Weight::from_parts(81_428, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(7)) } @@ -553,13 +551,13 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `s` is `[1, 100]`. fn reap_stash(s: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `2314 + s * (4 ±0)` + // Measured: `2315 + s * (4 ±0)` // Estimated: `6248 + s * (4 ±0)` - // Minimum execution time: 88_000_000 picoseconds. - Weight::from_parts(89_522_371, 0) + // Minimum execution time: 91_000_000 picoseconds. + Weight::from_parts(91_978_600, 0) .saturating_add(Weight::from_parts(0, 6248)) - // Standard Error: 41_886 - .saturating_add(Weight::from_parts(1_300_351, 0).saturating_mul(s.into())) + // Standard Error: 6_330 + .saturating_add(Weight::from_parts(1_564_162, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(12)) .saturating_add(T::DbWeight::get().writes(11)) .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(s.into()))) @@ -603,15 +601,15 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `n` is `[0, 100]`. fn new_era(v: u32, n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `0 + n * (718 ±0) + v * (3598 ±0)` + // Measured: `0 + n * (720 ±0) + v * (3598 ±0)` // Estimated: `512390 + n * (3566 ±0) + v * (3566 ±0)` - // Minimum execution time: 506_000_000 picoseconds. - Weight::from_parts(506_000_000, 0) + // Minimum execution time: 559_000_000 picoseconds. + Weight::from_parts(560_000_000, 0) .saturating_add(Weight::from_parts(0, 512390)) - // Standard Error: 13_611_930 - .saturating_add(Weight::from_parts(46_934_500, 0).saturating_mul(v.into())) - // Standard Error: 1_357_132 - .saturating_add(Weight::from_parts(15_133_720, 0).saturating_mul(n.into())) + // Standard Error: 1_767_591 + .saturating_add(Weight::from_parts(56_037_884, 0).saturating_mul(v.into())) + // Standard Error: 176_130 + .saturating_add(Weight::from_parts(16_077_940, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(206)) .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into()))) .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into()))) @@ -640,15 +638,15 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `n` is `[500, 1000]`. fn get_npos_voters(v: u32, n: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `3248 + n * (911 ±0) + v * (394 ±0)` + // Measured: `3206 + n * (911 ±0) + v * (395 ±0)` // Estimated: `512390 + n * (3566 ±0) + v * (3566 ±0)` - // Minimum execution time: 27_629_000_000 picoseconds. - Weight::from_parts(1_332_499_999, 0) + // Minimum execution time: 29_310_000_000 picoseconds. + Weight::from_parts(29_649_000_000, 0) .saturating_add(Weight::from_parts(0, 512390)) - // Standard Error: 792_759 - .saturating_add(Weight::from_parts(16_835_200, 0).saturating_mul(v.into())) - // Standard Error: 792_759 - .saturating_add(Weight::from_parts(18_942_800, 0).saturating_mul(n.into())) + // Standard Error: 312_722 + .saturating_add(Weight::from_parts(3_668_495, 0).saturating_mul(v.into())) + // Standard Error: 312_722 + .saturating_add(Weight::from_parts(2_875_682, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(201)) .saturating_add(T::DbWeight::get().reads((5_u64).saturating_mul(v.into()))) .saturating_add(T::DbWeight::get().reads((4_u64).saturating_mul(n.into()))) @@ -663,13 +661,13 @@ impl pallet_staking::WeightInfo for WeightInfo { /// The range of component `v` is `[500, 1000]`. fn get_npos_targets(v: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `891 + v * (50 ±0)` + // Measured: `903 + v * (50 ±0)` // Estimated: `3510 + v * (2520 ±0)` - // Minimum execution time: 2_005_000_000 picoseconds. - Weight::from_parts(2_005_000_000, 0) + // Minimum execution time: 2_150_000_000 picoseconds. + Weight::from_parts(55_518_884, 0) .saturating_add(Weight::from_parts(0, 3510)) - // Standard Error: 204_834 - .saturating_add(Weight::from_parts(1_562_694, 0).saturating_mul(v.into())) + // Standard Error: 5_887 + .saturating_add(Weight::from_parts(4_280_634, 0).saturating_mul(v.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(v.into()))) .saturating_add(Weight::from_parts(0, 2520).saturating_mul(v.into())) @@ -711,7 +709,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_000_000 picoseconds. + // Minimum execution time: 5_000_000 picoseconds. Weight::from_parts(6_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) .saturating_add(T::DbWeight::get().writes(6)) @@ -740,8 +738,8 @@ impl pallet_staking::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1839` // Estimated: `6248` - // Minimum execution time: 58_000_000 picoseconds. - Weight::from_parts(63_000_000, 0) + // Minimum execution time: 61_000_000 picoseconds. + Weight::from_parts(62_000_000, 0) .saturating_add(Weight::from_parts(0, 6248)) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(6)) @@ -755,7 +753,7 @@ impl pallet_staking::WeightInfo for WeightInfo { // Measured: `613` // Estimated: `3510` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(11_000_000, 0) + Weight::from_parts(12_000_000, 0) .saturating_add(Weight::from_parts(0, 3510)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/src/weights/pallet_staking_extension.rs b/runtime/src/weights/pallet_staking_extension.rs index 06b7d3074..d9c904022 100644 --- a/runtime/src/weights/pallet_staking_extension.rs +++ b/runtime/src/weights/pallet_staking_extension.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_staking_extension` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_staking_extension // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -43,7 +43,7 @@ impl pallet_staking_extension::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `1122` // Estimated: `4587` - // Minimum execution time: 22_000_000 picoseconds. + // Minimum execution time: 23_000_000 picoseconds. Weight::from_parts(24_000_000, 0) .saturating_add(Weight::from_parts(0, 4587)) .saturating_add(T::DbWeight::get().reads(2)) @@ -59,8 +59,8 @@ impl pallet_staking_extension::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `1122` // Estimated: `4587` - // Minimum execution time: 22_000_000 picoseconds. - Weight::from_parts(23_000_000, 0) + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(24_000_000, 0) .saturating_add(Weight::from_parts(0, 4587)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -80,7 +80,7 @@ impl pallet_staking_extension::WeightInfo for WeightInf // Measured: `1039` // Estimated: `4764` // Minimum execution time: 40_000_000 picoseconds. - Weight::from_parts(44_000_000, 0) + Weight::from_parts(42_000_000, 0) .saturating_add(Weight::from_parts(0, 4764)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(3)) @@ -115,8 +115,8 @@ impl pallet_staking_extension::WeightInfo for WeightInf // Proof Size summary in bytes: // Measured: `1431` // Estimated: `4556` - // Minimum execution time: 57_000_000 picoseconds. - Weight::from_parts(58_000_000, 0) + // Minimum execution time: 59_000_000 picoseconds. + Weight::from_parts(60_000_000, 0) .saturating_add(Weight::from_parts(0, 4556)) .saturating_add(T::DbWeight::get().reads(11)) .saturating_add(T::DbWeight::get().writes(7)) @@ -130,7 +130,7 @@ impl pallet_staking_extension::WeightInfo for WeightInf // Measured: `289` // Estimated: `3754` // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + Weight::from_parts(12_000_000, 0) .saturating_add(Weight::from_parts(0, 3754)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -142,14 +142,14 @@ impl pallet_staking_extension::WeightInfo for WeightInf fn new_session_handler_helper(c: u32, n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `222 + c * (32 ±0)` - // Estimated: `6154 + c * (32 ±0)` + // Estimated: `6160 + c * (32 ±0)` // Minimum execution time: 20_000_000 picoseconds. Weight::from_parts(20_000_000, 0) - .saturating_add(Weight::from_parts(0, 6154)) - // Standard Error: 199_598 - .saturating_add(Weight::from_parts(734_739, 0).saturating_mul(c.into())) - // Standard Error: 199_598 - .saturating_add(Weight::from_parts(752_539, 0).saturating_mul(n.into())) + .saturating_add(Weight::from_parts(0, 6160)) + // Standard Error: 24_829 + .saturating_add(Weight::from_parts(794_158, 0).saturating_mul(c.into())) + // Standard Error: 24_829 + .saturating_add(Weight::from_parts(821_702, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 32).saturating_mul(c.into())) diff --git a/runtime/src/weights/pallet_sudo.rs b/runtime/src/weights/pallet_sudo.rs index 22fe8054d..dd8f4f250 100644 --- a/runtime/src/weights/pallet_sudo.rs +++ b/runtime/src/weights/pallet_sudo.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_sudo` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_sudo // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -42,7 +42,7 @@ impl pallet_sudo::WeightInfo for WeightInfo { // Measured: `136` // Estimated: `1517` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(13_000_000, 0) + Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 1517)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) @@ -64,7 +64,7 @@ impl pallet_sudo::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `136` // Estimated: `1517` - // Minimum execution time: 10_000_000 picoseconds. + // Minimum execution time: 11_000_000 picoseconds. Weight::from_parts(11_000_000, 0) .saturating_add(Weight::from_parts(0, 1517)) .saturating_add(T::DbWeight::get().reads(1)) diff --git a/runtime/src/weights/pallet_timestamp.rs b/runtime/src/weights/pallet_timestamp.rs index eac4668bb..93cab8676 100644 --- a/runtime/src/weights/pallet_timestamp.rs +++ b/runtime/src/weights/pallet_timestamp.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_timestamp` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_timestamp // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -43,8 +43,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `245` // Estimated: `1493` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) @@ -53,7 +53,7 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `94` // Estimated: `0` - // Minimum execution time: 4_000_000 picoseconds. + // Minimum execution time: 3_000_000 picoseconds. Weight::from_parts(4_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) } diff --git a/runtime/src/weights/pallet_tips.rs b/runtime/src/weights/pallet_tips.rs index 50e529bbf..a09bac6d3 100644 --- a/runtime/src/weights/pallet_tips.rs +++ b/runtime/src/weights/pallet_tips.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_tips` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_tips // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -44,11 +44,11 @@ impl pallet_tips::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `4` // Estimated: `3469` - // Minimum execution time: 27_000_000 picoseconds. - Weight::from_parts(27_900_000, 0) + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(27_678_989, 0) .saturating_add(Weight::from_parts(0, 3469)) - // Standard Error: 153 - .saturating_add(Weight::from_parts(1_318, 0).saturating_mul(r.into())) + // Standard Error: 3 + .saturating_add(Weight::from_parts(1_344, 0).saturating_mul(r.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -60,7 +60,7 @@ impl pallet_tips::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `221` // Estimated: `3686` - // Minimum execution time: 25_000_000 picoseconds. + // Minimum execution time: 26_000_000 picoseconds. Weight::from_parts(26_000_000, 0) .saturating_add(Weight::from_parts(0, 3686)) .saturating_add(T::DbWeight::get().reads(1)) @@ -79,12 +79,12 @@ impl pallet_tips::WeightInfo for WeightInfo { // Measured: `848 + t * (64 ±0)` // Estimated: `4313 + t * (64 ±0)` // Minimum execution time: 15_000_000 picoseconds. - Weight::from_parts(13_576_984, 0) + Weight::from_parts(15_974_032, 0) .saturating_add(Weight::from_parts(0, 4313)) - // Standard Error: 154 - .saturating_add(Weight::from_parts(1_381, 0).saturating_mul(r.into())) - // Standard Error: 210_373 - .saturating_add(Weight::from_parts(208_730, 0).saturating_mul(t.into())) + // Standard Error: 2 + .saturating_add(Weight::from_parts(1_332, 0).saturating_mul(r.into())) + // Standard Error: 3_229 + .saturating_add(Weight::from_parts(37_862, 0).saturating_mul(t.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) .saturating_add(Weight::from_parts(0, 64).saturating_mul(t.into())) @@ -98,9 +98,11 @@ impl pallet_tips::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `1069 + t * (112 ±0)` // Estimated: `4534 + t * (112 ±0)` - // Minimum execution time: 14_000_000 picoseconds. - Weight::from_parts(15_783_333, 0) + // Minimum execution time: 13_000_000 picoseconds. + Weight::from_parts(14_266_770, 0) .saturating_add(Weight::from_parts(0, 4534)) + // Standard Error: 4_292 + .saturating_add(Weight::from_parts(89_759, 0).saturating_mul(t.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) .saturating_add(Weight::from_parts(0, 112).saturating_mul(t.into())) @@ -116,27 +118,31 @@ impl pallet_tips::WeightInfo for WeightInfo { /// The range of component `t` is `[1, 13]`. fn close_tip(t: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `1141 + t * (112 ±0)` - // Estimated: `4617 + t * (108 ±1)` - // Minimum execution time: 58_000_000 picoseconds. - Weight::from_parts(62_683_333, 0) - .saturating_add(Weight::from_parts(0, 4617)) + // Measured: `1121 + t * (112 ±0)` + // Estimated: `4581 + t * (112 ±0)` + // Minimum execution time: 60_000_000 picoseconds. + Weight::from_parts(61_238_946, 0) + .saturating_add(Weight::from_parts(0, 4581)) + // Standard Error: 6_925 + .saturating_add(Weight::from_parts(44_333, 0).saturating_mul(t.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) - .saturating_add(Weight::from_parts(0, 108).saturating_mul(t.into())) + .saturating_add(Weight::from_parts(0, 112).saturating_mul(t.into())) } /// Storage: `Tips::Tips` (r:1 w:1) /// Proof: `Tips::Tips` (`max_values`: None, `max_size`: None, mode: `Measured`) /// Storage: `Tips::Reasons` (r:0 w:1) /// Proof: `Tips::Reasons` (`max_values`: None, `max_size`: None, mode: `Measured`) /// The range of component `t` is `[1, 13]`. - fn slash_tip(_t: u32, ) -> Weight { + fn slash_tip(t: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `269` // Estimated: `3734` // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(11_433_333, 0) + Weight::from_parts(11_672_033, 0) .saturating_add(Weight::from_parts(0, 3734)) + // Standard Error: 4_977 + .saturating_add(Weight::from_parts(18_706, 0).saturating_mul(t.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/runtime/src/weights/pallet_transaction_pause.rs b/runtime/src/weights/pallet_transaction_pause.rs index 8d09d5ed8..f670c7a71 100644 --- a/runtime/src/weights/pallet_transaction_pause.rs +++ b/runtime/src/weights/pallet_transaction_pause.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_transaction_pause` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_transaction_pause // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -42,7 +42,7 @@ impl pallet_transaction_pause::WeightInfo for WeightInf // Measured: `109` // Estimated: `3574` // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(15_000_000, 0) + Weight::from_parts(10_000_000, 0) .saturating_add(Weight::from_parts(0, 3574)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/src/weights/pallet_transaction_storage.rs b/runtime/src/weights/pallet_transaction_storage.rs index c7597774d..1b05eadd7 100644 --- a/runtime/src/weights/pallet_transaction_storage.rs +++ b/runtime/src/weights/pallet_transaction_storage.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_transaction_storage` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_transaction_storage // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -46,11 +46,11 @@ impl pallet_transaction_storage::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `142` // Estimated: `38351` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(31_000_000, 0) + // Minimum execution time: 32_000_000 picoseconds. + Weight::from_parts(32_000_000, 0) .saturating_add(Weight::from_parts(0, 38351)) - // Standard Error: 58 - .saturating_add(Weight::from_parts(4_884, 0).saturating_mul(l.into())) + // Standard Error: 2 + .saturating_add(Weight::from_parts(5_071, 0).saturating_mul(l.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -66,8 +66,8 @@ impl pallet_transaction_storage::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `292` // Estimated: `40351` - // Minimum execution time: 38_000_000 picoseconds. - Weight::from_parts(40_000_000, 0) + // Minimum execution time: 42_000_000 picoseconds. + Weight::from_parts(44_000_000, 0) .saturating_add(Weight::from_parts(0, 40351)) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) @@ -86,8 +86,8 @@ impl pallet_transaction_storage::WeightInfo for WeightI // Proof Size summary in bytes: // Measured: `37111` // Estimated: `40351` - // Minimum execution time: 116_000_000 picoseconds. - Weight::from_parts(122_000_000, 0) + // Minimum execution time: 73_000_000 picoseconds. + Weight::from_parts(126_000_000, 0) .saturating_add(Weight::from_parts(0, 40351)) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(1)) diff --git a/runtime/src/weights/pallet_treasury.rs b/runtime/src/weights/pallet_treasury.rs index 733691972..4dd409238 100644 --- a/runtime/src/weights/pallet_treasury.rs +++ b/runtime/src/weights/pallet_treasury.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_treasury` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_treasury // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -51,7 +51,7 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `107` // Estimated: `1489` - // Minimum execution time: 24_000_000 picoseconds. + // Minimum execution time: 25_000_000 picoseconds. Weight::from_parts(26_000_000, 0) .saturating_add(Weight::from_parts(0, 1489)) .saturating_add(T::DbWeight::get().reads(1)) @@ -65,8 +65,8 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `265` // Estimated: `3593` - // Minimum execution time: 26_000_000 picoseconds. - Weight::from_parts(26_000_000, 0) + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(28_000_000, 0) .saturating_add(Weight::from_parts(0, 3593)) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) @@ -78,13 +78,13 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// The range of component `p` is `[0, 99]`. fn approve_proposal(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `314 + p * (11 ±0)` + // Measured: `433 + p * (8 ±0)` // Estimated: `3573` - // Minimum execution time: 8_000_000 picoseconds. - Weight::from_parts(8_212_167, 0) + // Minimum execution time: 7_000_000 picoseconds. + Weight::from_parts(8_868_927, 0) .saturating_add(Weight::from_parts(0, 3573)) - // Standard Error: 4_587 - .saturating_add(Weight::from_parts(26_175, 0).saturating_mul(p.into())) + // Standard Error: 1_000 + .saturating_add(Weight::from_parts(26_868, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -94,7 +94,7 @@ impl pallet_treasury::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `90` // Estimated: `1887` - // Minimum execution time: 6_000_000 picoseconds. + // Minimum execution time: 5_000_000 picoseconds. Weight::from_parts(6_000_000, 0) .saturating_add(Weight::from_parts(0, 1887)) .saturating_add(T::DbWeight::get().reads(1)) @@ -113,13 +113,13 @@ impl pallet_treasury::WeightInfo for WeightInfo { /// The range of component `p` is `[0, 100]`. fn on_initialize_proposals(p: u32, ) -> Weight { // Proof Size summary in bytes: - // Measured: `521 + p * (252 ±0)` + // Measured: `491 + p * (252 ±0)` // Estimated: `1887 + p * (5206 ±0)` - // Minimum execution time: 40_000_000 picoseconds. - Weight::from_parts(31_200_000, 0) + // Minimum execution time: 43_000_000 picoseconds. + Weight::from_parts(48_344_775, 0) .saturating_add(Weight::from_parts(0, 1887)) - // Standard Error: 259_662 - .saturating_add(Weight::from_parts(39_934_000, 0).saturating_mul(p.into())) + // Standard Error: 63_855 + .saturating_add(Weight::from_parts(43_499_499, 0).saturating_mul(p.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().reads((3_u64).saturating_mul(p.into()))) .saturating_add(T::DbWeight::get().writes(3)) diff --git a/runtime/src/weights/pallet_utility.rs b/runtime/src/weights/pallet_utility.rs index e32a3720c..7c2984a32 100644 --- a/runtime/src/weights/pallet_utility.rs +++ b/runtime/src/weights/pallet_utility.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_utility` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_utility // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -41,10 +41,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(21_400_000, 0) + Weight::from_parts(8_901_855, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 50_624 - .saturating_add(Weight::from_parts(4_476_000, 0).saturating_mul(c.into())) + // Standard Error: 4_530 + .saturating_add(Weight::from_parts(4_795_187, 0).saturating_mul(c.into())) } fn as_derivative() -> Weight { // Proof Size summary in bytes: @@ -60,16 +60,16 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(2_200_000, 0) + Weight::from_parts(6_827_260, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 30_938 - .saturating_add(Weight::from_parts(4_716_000, 0).saturating_mul(c.into())) + // Standard Error: 4_209 + .saturating_add(Weight::from_parts(5_054_882, 0).saturating_mul(c.into())) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 8_000_000 picoseconds. + // Minimum execution time: 7_000_000 picoseconds. Weight::from_parts(8_000_000, 0) .saturating_add(Weight::from_parts(0, 0)) } @@ -78,10 +78,10 @@ impl pallet_utility::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(2_300_000, 0) + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(9_637_926, 0) .saturating_add(Weight::from_parts(0, 0)) - // Standard Error: 24_976 - .saturating_add(Weight::from_parts(4_511_200, 0).saturating_mul(c.into())) + // Standard Error: 1_123 + .saturating_add(Weight::from_parts(4_765_038, 0).saturating_mul(c.into())) } } \ No newline at end of file diff --git a/runtime/src/weights/pallet_vesting.rs b/runtime/src/weights/pallet_vesting.rs index 08bdb8592..9a463f72d 100644 --- a/runtime/src/weights/pallet_vesting.rs +++ b/runtime/src/weights/pallet_vesting.rs @@ -3,9 +3,9 @@ //! Autogenerated weights for `pallet_vesting` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-11-27, STEPS: `5`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-11-30, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `Jesses-MacBook-Pro.local`, CPU: `` +//! HOSTNAME: `hcastano`, CPU: `` //! WASM-EXECUTION: `Compiled`, CHAIN: `Some("dev")`, DB CACHE: 1024 // Executed Command: @@ -17,8 +17,8 @@ // --wasm-execution=compiled // --pallet=pallet_vesting // --extrinsic=* -// --steps=5 -// --repeat=2 +// --steps=50 +// --repeat=20 // --header=./file_header.txt // --template // .maintain/frame-weight-template.hbs @@ -47,13 +47,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `348 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 30_000_000 picoseconds. - Weight::from_parts(30_544_451, 0) + // Minimum execution time: 32_000_000 picoseconds. + Weight::from_parts(30_474_407, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 31_628 - .saturating_add(Weight::from_parts(6_944, 0).saturating_mul(l.into())) - // Standard Error: 56_780 - .saturating_add(Weight::from_parts(116_932, 0).saturating_mul(s.into())) + // Standard Error: 1_184 + .saturating_add(Weight::from_parts(45_971, 0).saturating_mul(l.into())) + // Standard Error: 2_108 + .saturating_add(Weight::from_parts(86_862, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -65,15 +65,17 @@ impl pallet_vesting::WeightInfo for WeightInfo { /// Proof: `Balances::Freezes` (`max_values`: None, `max_size`: Some(49), added: 2524, mode: `MaxEncodedLen`) /// The range of component `l` is `[0, 49]`. /// The range of component `s` is `[1, 28]`. - fn vest_unlocked(l: u32, _s: u32, ) -> Weight { + fn vest_unlocked(l: u32, s: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `348 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 33_000_000 picoseconds. - Weight::from_parts(35_843_368, 0) + // Minimum execution time: 34_000_000 picoseconds. + Weight::from_parts(34_297_267, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 34_826 - .saturating_add(Weight::from_parts(5_753, 0).saturating_mul(l.into())) + // Standard Error: 2_387 + .saturating_add(Weight::from_parts(29_790, 0).saturating_mul(l.into())) + // Standard Error: 4_248 + .saturating_add(Weight::from_parts(66_806, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -91,13 +93,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `488 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 32_000_000 picoseconds. - Weight::from_parts(31_169_276, 0) + // Minimum execution time: 33_000_000 picoseconds. + Weight::from_parts(31_901_935, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 16_887 - .saturating_add(Weight::from_parts(29_947, 0).saturating_mul(l.into())) - // Standard Error: 30_317 - .saturating_add(Weight::from_parts(90_071, 0).saturating_mul(s.into())) + // Standard Error: 2_237 + .saturating_add(Weight::from_parts(51_362, 0).saturating_mul(l.into())) + // Standard Error: 3_981 + .saturating_add(Weight::from_parts(98_309, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -115,13 +117,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `488 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 35_000_000 picoseconds. - Weight::from_parts(32_660_024, 0) + // Minimum execution time: 36_000_000 picoseconds. + Weight::from_parts(35_894_725, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 35_849 - .saturating_add(Weight::from_parts(59_786, 0).saturating_mul(l.into())) - // Standard Error: 64_358 - .saturating_add(Weight::from_parts(156_324, 0).saturating_mul(s.into())) + // Standard Error: 1_369 + .saturating_add(Weight::from_parts(38_328, 0).saturating_mul(l.into())) + // Standard Error: 2_436 + .saturating_add(Weight::from_parts(48_700, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -139,13 +141,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `555 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 70_000_000 picoseconds. - Weight::from_parts(70_928_865, 0) + // Minimum execution time: 73_000_000 picoseconds. + Weight::from_parts(74_004_268, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 74_344 - .saturating_add(Weight::from_parts(31_144, 0).saturating_mul(l.into())) - // Standard Error: 133_467 - .saturating_add(Weight::from_parts(110_731, 0).saturating_mul(s.into())) + // Standard Error: 3_592 + .saturating_add(Weight::from_parts(38_789, 0).saturating_mul(l.into())) + // Standard Error: 6_392 + .saturating_add(Weight::from_parts(61_360, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -163,13 +165,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `658 + l * (25 ±0) + s * (36 ±0)` // Estimated: `6196` - // Minimum execution time: 71_000_000 picoseconds. - Weight::from_parts(71_301_727, 0) + // Minimum execution time: 73_000_000 picoseconds. + Weight::from_parts(73_872_828, 0) .saturating_add(Weight::from_parts(0, 6196)) - // Standard Error: 42_139 - .saturating_add(Weight::from_parts(19_364, 0).saturating_mul(l.into())) - // Standard Error: 75_651 - .saturating_add(Weight::from_parts(84_171, 0).saturating_mul(s.into())) + // Standard Error: 4_287 + .saturating_add(Weight::from_parts(36_846, 0).saturating_mul(l.into())) + // Standard Error: 7_628 + .saturating_add(Weight::from_parts(121_402, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(4)) } @@ -187,13 +189,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `449 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 32_000_000 picoseconds. - Weight::from_parts(33_434_015, 0) + // Minimum execution time: 34_000_000 picoseconds. + Weight::from_parts(32_981_241, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 37_647 - .saturating_add(Weight::from_parts(8_452, 0).saturating_mul(l.into())) - // Standard Error: 70_687 - .saturating_add(Weight::from_parts(55_991, 0).saturating_mul(s.into())) + // Standard Error: 1_128 + .saturating_add(Weight::from_parts(42_568, 0).saturating_mul(l.into())) + // Standard Error: 2_083 + .saturating_add(Weight::from_parts(86_470, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -211,13 +213,13 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `449 + l * (25 ±0) + s * (36 ±0)` // Estimated: `4764` - // Minimum execution time: 36_000_000 picoseconds. - Weight::from_parts(34_408_605, 0) + // Minimum execution time: 38_000_000 picoseconds. + Weight::from_parts(36_427_837, 0) .saturating_add(Weight::from_parts(0, 4764)) - // Standard Error: 10_601 - .saturating_add(Weight::from_parts(40_486, 0).saturating_mul(l.into())) - // Standard Error: 19_904 - .saturating_add(Weight::from_parts(91_335, 0).saturating_mul(s.into())) + // Standard Error: 1_239 + .saturating_add(Weight::from_parts(46_831, 0).saturating_mul(l.into())) + // Standard Error: 2_289 + .saturating_add(Weight::from_parts(96_901, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(3)) } From d2031f82777f5d6068785a4a72e91a4441544c4a Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Tue, 5 Dec 2023 13:25:31 -0800 Subject: [PATCH 19/48] wasm stuff --- crypto/server/tests/protocol_wasm.rs | 9 ++++-- crypto/testing-utils/src/test_client/mod.rs | 34 ++++++++++++++++++--- 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/crypto/server/tests/protocol_wasm.rs b/crypto/server/tests/protocol_wasm.rs index d1e2236bf..993ca555a 100644 --- a/crypto/server/tests/protocol_wasm.rs +++ b/crypto/server/tests/protocol_wasm.rs @@ -30,7 +30,7 @@ use testing_utils::{ TSS_ACCOUNTS, X25519_PUBLIC_KEYS, }, substrate_context::test_context_stationary, - test_client::{put_register_request_on_chain, update_program}, + test_client::{put_register_request_on_chain, update_pointer, update_program}, tss_server_process::spawn_testing_validators, }; use x25519_dalek::PublicKey; @@ -53,6 +53,7 @@ use server::{ async fn test_wasm_sign_tx_user_participates() { clean_tests(); let one = AccountKeyring::Eve; + let dave = AccountKeyring::Dave; let signing_address = one.clone().to_account_id().to_ss58check(); let (validator_ips, _validator_ids, users_keyshare_option) = @@ -60,7 +61,11 @@ async fn test_wasm_sign_tx_user_participates() { let substrate_context = test_context_stationary().await; let entropy_api = get_api(&substrate_context.node_proc.ws_url).await.unwrap(); - update_program(&entropy_api, &one.pair(), TEST_PROGRAM_WASM_BYTECODE.to_owned()).await.unwrap(); + let program_hash = + update_program(&entropy_api, &dave.pair(), TEST_PROGRAM_WASM_BYTECODE.to_owned()) + .await + .unwrap(); + update_pointer(&entropy_api, &one.pair(), &one.pair(), program_hash).await; let validators_info = vec![ ValidatorInfo { diff --git a/crypto/testing-utils/src/test_client/mod.rs b/crypto/testing-utils/src/test_client/mod.rs index f8b0e3565..d7605dc2e 100644 --- a/crypto/testing-utils/src/test_client/mod.rs +++ b/crypto/testing-utils/src/test_client/mod.rs @@ -248,22 +248,48 @@ pub async fn update_program( api: &OnlineClient, program_modification_keypair: &sr25519::Pair, program: Vec, -) -> anyhow::Result<()> { +) -> anyhow::Result<::Hash> { let update_program_tx = entropy::tx().programs().set_program(program); - let program_modification_account = PairSigner::::new(program_modification_keypair.clone()); - api.tx() + let in_block = api + .tx() .sign_and_submit_then_watch_default(&update_program_tx, &program_modification_account) .await? .wait_for_in_block() .await? .wait_for_success() .await?; - Ok(()) + + let result_event = in_block.find_first::().unwrap(); + Ok(result_event.unwrap().program_hash) } +/// Set or update pointer with a given entropy account +pub async fn update_pointer( + entropy_api: &OnlineClient, + signature_request_account: &sr25519::Pair, + pointer_modification_account: &sr25519::Pair, + program_hash: ::Hash, +) { + let update_pointer_tx = entropy::tx() + .relayer() + .change_program_pointer(signature_request_account.public().into(), program_hash); + let pointer_modification_account = + PairSigner::::new(pointer_modification_account.clone()); + entropy_api + .tx() + .sign_and_submit_then_watch_default(&update_pointer_tx, &pointer_modification_account) + .await + .unwrap() + .wait_for_in_block() + .await + .unwrap() + .wait_for_success() + .await + .unwrap(); +} /// Get info on all registered accounts pub async fn get_accounts( api: &OnlineClient, From e44453e496b6678a124aa799a0db7860f8ba0b3d Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Tue, 5 Dec 2023 14:56:13 -0800 Subject: [PATCH 20/48] add to changelog --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c16a02ae..481958257 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,13 @@ At the moment this project **does not** adhere to - Test CLI which calls the same code as in integration tests ([#417](https://github.com/entropyxyz/entropy-core/pull/417)) +### Added +- Pointer for Programs ([#536](https://github.com/entropyxyz/entropy-core/pull/536/)) + +### Breaking Changes + +- In [#536](https://github.com/entropyxyz/entropy-core/pull/536/), the registered struct no longer holds a program but rather a hash of a program that is set in the set_program function + ## [0.0.9](https://github.com/entropyxyz/entropy-core/compare/release/v0.0.8..release/v0.0.9) - 2023-11-30 Some of the noteworthy changes related to this release are related to better integration in Web From 195d7d5ca5c543b3af2ac507f2541520d2565144 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Tue, 5 Dec 2023 17:46:14 -0800 Subject: [PATCH 21/48] fix tests --- crypto/server/tests/sign.rs | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/crypto/server/tests/sign.rs b/crypto/server/tests/sign.rs index ba3a31c9c..8733312e2 100644 --- a/crypto/server/tests/sign.rs +++ b/crypto/server/tests/sign.rs @@ -22,6 +22,7 @@ use server::{ async fn integration_test_sign() { clean_tests(); let pre_registered_user = AccountKeyring::Dave; + let eve = AccountKeyring::Eve; let signing_address = pre_registered_user.clone().to_account_id().to_ss58check(); let (_validator_ips, _validator_ids, keyshare_option) = @@ -30,13 +31,18 @@ async fn integration_test_sign() { let api = get_api(&substrate_context.node_proc.ws_url).await.unwrap(); let rpc = get_rpc(&substrate_context.node_proc.ws_url).await.unwrap(); - test_client::update_program( + let program_hash = + test_client::update_program(&api, &eve.pair(), TEST_PROGRAM_WASM_BYTECODE.to_owned()) + .await + .unwrap(); + + test_client::update_pointer( &api, &pre_registered_user.pair(), - TEST_PROGRAM_WASM_BYTECODE.to_owned(), + &pre_registered_user.pair(), + program_hash, ) - .await - .unwrap(); + .await; let message_should_succeed_hash = Hasher::keccak(PREIMAGE_SHOULD_SUCCEED); @@ -65,6 +71,7 @@ async fn integration_test_sign() { async fn integration_test_sign_private() { clean_tests(); let pre_registered_user = AccountKeyring::Eve; + let dave = AccountKeyring::Dave; let signing_address = pre_registered_user.clone().to_account_id().to_ss58check(); let (_validator_ips, _validator_ids, keyshare_option) = @@ -73,13 +80,18 @@ async fn integration_test_sign_private() { let api = get_api(&substrate_context.node_proc.ws_url).await.unwrap(); let rpc = get_rpc(&substrate_context.node_proc.ws_url).await.unwrap(); - test_client::update_program( + let program_hash = + test_client::update_program(&api, &dave.pair(), TEST_PROGRAM_WASM_BYTECODE.to_owned()) + .await + .unwrap(); + + test_client::update_pointer( &api, &pre_registered_user.pair(), - TEST_PROGRAM_WASM_BYTECODE.to_owned(), + &pre_registered_user.pair(), + program_hash, ) - .await - .unwrap(); + .await; let message_should_succeed_hash = Hasher::keccak(PREIMAGE_SHOULD_SUCCEED); From 5b3e8cdd96d7068c68d1ca5c59c9136b4fdbec04 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Tue, 5 Dec 2023 18:18:35 -0800 Subject: [PATCH 22/48] add program does not exist check --- pallets/relayer/src/lib.rs | 6 +++- pallets/relayer/src/tests.rs | 62 ++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/pallets/relayer/src/lib.rs b/pallets/relayer/src/lib.rs index 574ee1405..5776acdfb 100644 --- a/pallets/relayer/src/lib.rs +++ b/pallets/relayer/src/lib.rs @@ -181,6 +181,7 @@ pub mod pallet { MaxProgramLengthExceeded, NoVerifyingKey, NotAuthorized, + ProgramDoesNotExist, } #[pallet::call] @@ -212,11 +213,14 @@ pub mod pallet { ); let block_number = >::block_number(); + // check program exists + pallet_programs::Pallet::::bytecode(program_pointer) + .ok_or(Error::::ProgramDoesNotExist)?; Dkg::::try_mutate(block_number, |messages| -> Result<_, DispatchError> { messages.push(sig_req_account.clone().encode()); Ok(()) })?; - // TODO validate program pointer exists? + // Put account into a registering state Registering::::insert( &sig_req_account, diff --git a/pallets/relayer/src/tests.rs b/pallets/relayer/src/tests.rs index f61329d9b..d9e5e96e9 100644 --- a/pallets/relayer/src/tests.rs +++ b/pallets/relayer/src/tests.rs @@ -6,6 +6,7 @@ use frame_support::{ traits::Currency, BoundedVec, }; +use pallet_programs::ProgramInfo; use pallet_relayer::Call as RelayerCall; use sp_runtime::{ traits::{Hash, SignedExtension}, @@ -56,6 +57,10 @@ fn it_registers_a_user() { new_test_ext().execute_with(|| { let empty_program = vec![]; let program_hash = ::Hashing::hash(&empty_program); + pallet_programs::Bytecode::::insert( + program_hash, + ProgramInfo { bytecode: empty_program, program_modification_account: 1 }, + ); assert_ok!(Relayer::register( RuntimeOrigin::signed(1), @@ -85,6 +90,10 @@ fn it_confirms_registers_a_user() { let empty_program = vec![]; let program_hash = ::Hashing::hash(&empty_program); + pallet_programs::Bytecode::::insert( + program_hash, + ProgramInfo { bytecode: empty_program, program_modification_account: 1 }, + ); assert_ok!(Relayer::register( RuntimeOrigin::signed(1), @@ -159,6 +168,10 @@ fn it_changes_a_program_pointer() { new_test_ext().execute_with(|| { let empty_program = vec![]; let program_hash = ::Hashing::hash(&empty_program); + pallet_programs::Bytecode::::insert( + program_hash, + ProgramInfo { bytecode: empty_program, program_modification_account: 1 }, + ); let new_program = vec![10]; let new_program_hash = ::Hashing::hash(&new_program); @@ -185,6 +198,11 @@ fn it_fails_on_non_matching_verifying_keys() { new_test_ext().execute_with(|| { let empty_program = vec![]; let program_hash = ::Hashing::hash(&empty_program); + pallet_programs::Bytecode::::insert( + program_hash, + ProgramInfo { bytecode: empty_program, program_modification_account: 1 }, + ); + let expected_verifying_key = BoundedVec::default(); let unexpected_verifying_key = vec![10]; assert_ok!(Relayer::register( @@ -222,6 +240,10 @@ fn it_doesnt_allow_double_registering() { // register a user let empty_program = vec![]; let program_hash = ::Hashing::hash(&empty_program); + pallet_programs::Bytecode::::insert( + program_hash, + ProgramInfo { bytecode: empty_program, program_modification_account: 1 }, + ); assert_ok!(Relayer::register( RuntimeOrigin::signed(1), @@ -243,11 +265,34 @@ fn it_doesnt_allow_double_registering() { }); } +#[test] +fn it_fails_no_program() { + new_test_ext().execute_with(|| { + // register a user + let non_existing_program = vec![10]; + let program_hash = ::Hashing::hash(&non_existing_program); + + assert_noop!( + Relayer::register( + RuntimeOrigin::signed(1), + 2, + KeyVisibility::Permissioned, + program_hash + ), + Error::::ProgramDoesNotExist + ); + }); +} + #[test] fn it_tests_prune_registration() { new_test_ext().execute_with(|| { let inital_program = vec![10]; let program_hash = ::Hashing::hash(&inital_program); + pallet_programs::Bytecode::::insert( + program_hash, + ProgramInfo { bytecode: inital_program, program_modification_account: 1 }, + ); Balances::make_free_balance_be(&2, 100); // register a user @@ -267,6 +312,11 @@ fn it_provides_free_txs_confirm_done() { new_test_ext().execute_with(|| { let empty_program = vec![]; let program_hash = ::Hashing::hash(&empty_program); + pallet_programs::Bytecode::::insert( + program_hash, + ProgramInfo { bytecode: empty_program, program_modification_account: 1 }, + ); + let expected_verifying_key = BoundedVec::default(); assert_ok!(Relayer::register( RuntimeOrigin::signed(5), @@ -330,6 +380,10 @@ fn it_provides_free_txs_confirm_done_fails_3() { new_test_ext().execute_with(|| { let empty_program = vec![]; let program_hash = ::Hashing::hash(&empty_program); + pallet_programs::Bytecode::::insert( + program_hash, + ProgramInfo { bytecode: empty_program, program_modification_account: 1 }, + ); let expected_verifying_key = BoundedVec::default(); assert_ok!(Relayer::register( @@ -364,6 +418,10 @@ fn it_provides_free_txs_confirm_done_fails_4() { new_test_ext().execute_with(|| { let empty_program = vec![]; let program_hash = ::Hashing::hash(&empty_program); + pallet_programs::Bytecode::::insert( + program_hash, + ProgramInfo { bytecode: empty_program, program_modification_account: 1 }, + ); let expected_verifying_key = BoundedVec::default(); assert_ok!(Relayer::register( @@ -391,6 +449,10 @@ fn it_provides_free_txs_confirm_done_fails_5() { new_test_ext().execute_with(|| { let empty_program = vec![]; let program_hash = ::Hashing::hash(&empty_program); + pallet_programs::Bytecode::::insert( + program_hash, + ProgramInfo { bytecode: empty_program, program_modification_account: 1 }, + ); let expected_verifying_key = BoundedVec::default(); assert_ok!(Relayer::register( From beac561e0d8a7decdfe415a2eee0ec971894ec93 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Tue, 5 Dec 2023 20:13:46 -0800 Subject: [PATCH 23/48] fix tests --- pallets/propagation/src/tests.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pallets/propagation/src/tests.rs b/pallets/propagation/src/tests.rs index 4476a64f8..24b5361d0 100644 --- a/pallets/propagation/src/tests.rs +++ b/pallets/propagation/src/tests.rs @@ -3,6 +3,7 @@ use std::sync::Arc; use codec::Encode; use entropy_shared::{KeyVisibility, ValidatorInfo}; use frame_support::{assert_ok, traits::OnInitialize}; +use pallet_programs::ProgramInfo; use pallet_staking_extension::RefreshInfo; use sp_core::offchain::{testing, OffchainDbExt, OffchainWorkerExt, TransactionPoolExt}; use sp_io::TestExternalities; @@ -60,6 +61,10 @@ fn knows_how_to_mock_several_http_calls() { Propagation::post_dkg(1).unwrap(); System::set_block_number(3); + pallet_programs::Bytecode::::insert( + ::Hash::default(), + ProgramInfo { bytecode: vec![], program_modification_account: 1 }, + ); assert_ok!(Relayer::register( RuntimeOrigin::signed(1), 2, From 1b7d512c1d50840d5fb28ad352b566cf0733cc3b Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Wed, 6 Dec 2023 17:54:39 -0800 Subject: [PATCH 24/48] fix tests --- crypto/server/src/user/tests.rs | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/crypto/server/src/user/tests.rs b/crypto/server/src/user/tests.rs index d4cbd39a4..b4233cc6d 100644 --- a/crypto/server/src/user/tests.rs +++ b/crypto/server/src/user/tests.rs @@ -442,6 +442,8 @@ async fn test_store_share() { let alice = AccountKeyring::Alice; let alice_program = AccountKeyring::Charlie; + let program_manager = AccountKeyring::Dave; + let signing_address = alice.to_account_id().to_ss58check(); let cxt = test_context_stationary().await; @@ -463,6 +465,8 @@ async fn test_store_share() { .unwrap(); let original_key_shard = response_key.text().await.unwrap(); + let program_hash = + update_programs(&api, &program_manager.pair(), TEST_PROGRAM_WASM_BYTECODE.to_owned()).await; let mut block_number = rpc.chain_get_header(None).await.unwrap().unwrap().number + 1; let validators_info = vec![ @@ -485,6 +489,7 @@ async fn test_store_share() { &alice, alice_program.to_account_id().into(), KeyVisibility::Public, + program_hash, ) .await; @@ -553,6 +558,7 @@ async fn test_store_share() { &alice_program, alice_program.to_account_id().into(), KeyVisibility::Public, + program_hash, ) .await; onchain_user_request.block_number = block_number; @@ -609,6 +615,7 @@ async fn test_send_and_receive_keys() { clean_tests(); let alice = AccountKeyring::Alice; + let program_manager = AccountKeyring::Dave; let cxt = test_context_stationary().await; setup_client().await; @@ -673,12 +680,14 @@ async fn test_send_and_receive_keys() { assert_eq!(response_already_in_storage.status(), StatusCode::INTERNAL_SERVER_ERROR); assert_eq!(response_already_in_storage.text().await.unwrap(), "User already registered"); - + let program_hash = + update_programs(&api, &program_manager.pair(), TEST_PROGRAM_WASM_BYTECODE.to_owned()).await; put_register_request_on_chain( &api, &alice.clone(), alice.to_account_id().into(), KeyVisibility::Public, + program_hash, ) .await; let block_number = rpc.chain_get_header(None).await.unwrap().unwrap().number; @@ -735,17 +744,15 @@ pub async fn put_register_request_on_chain( sig_req_keyring: &Sr25519Keyring, program_modification_account: subxtAccountId32, key_visibility: KeyVisibility, + program_hash: H256, ) { let sig_req_account = PairSigner::::new(sig_req_keyring.pair()); - let empty_program_hash: H256 = - H256::from_str("0x0e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8") - .unwrap(); let registering_tx = entropy::tx().relayer().register( program_modification_account, Static(key_visibility), - empty_program_hash, + program_hash, ); api.tx() @@ -1069,12 +1076,15 @@ async fn test_register_with_private_key_visibility() { let one = AccountKeyring::One; let program_modification_account = AccountKeyring::Charlie; + let program_manager = AccountKeyring::Dave; let (validator_ips, _validator_ids, _users_keyshare_option) = spawn_testing_validators(None, false).await; let substrate_context = test_context_stationary().await; let api = get_api(&substrate_context.node_proc.ws_url).await.unwrap(); let rpc = get_rpc(&substrate_context.node_proc.ws_url).await.unwrap(); + let program_hash = + update_programs(&api, &program_manager.pair(), TEST_PROGRAM_WASM_BYTECODE.to_owned()).await; let block_number = rpc.chain_get_header(None).await.unwrap().unwrap().number + 1; let one_x25519_sk = derive_static_secret(&one.pair()); @@ -1085,6 +1095,7 @@ async fn test_register_with_private_key_visibility() { &one, program_modification_account.to_account_id().into(), KeyVisibility::Private(x25519_public_key), + program_hash, ) .await; run_to_block(&rpc, block_number + 1).await; From 96bfd8dcf0ea41d91a54ac4efb0d7e9340058493 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Wed, 6 Dec 2023 22:14:56 -0800 Subject: [PATCH 25/48] wasm test --- crypto/server/tests/protocol_wasm.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crypto/server/tests/protocol_wasm.rs b/crypto/server/tests/protocol_wasm.rs index 993ca555a..b9ee3034d 100644 --- a/crypto/server/tests/protocol_wasm.rs +++ b/crypto/server/tests/protocol_wasm.rs @@ -175,27 +175,27 @@ async fn test_wasm_register_with_private_key_visibility() { let one = AccountKeyring::One; let program_modification_account = AccountKeyring::Charlie; + let dave = AccountKeyring::Dave; let (validator_ips, _validator_ids, _users_keyshare_option) = spawn_testing_validators(None, false).await; let substrate_context = test_context_stationary().await; let api = get_api(&substrate_context.node_proc.ws_url).await.unwrap(); let rpc = get_rpc(&substrate_context.node_proc.ws_url).await.unwrap(); + let program_hash = + update_program(&api, &dave.pair(), TEST_PROGRAM_WASM_BYTECODE.to_owned()).await.unwrap(); + let block_number = rpc.chain_get_header(None).await.unwrap().unwrap().number + 1; let one_x25519_sk = derive_static_secret(&one.pair()); let x25519_public_key = PublicKey::from(&one_x25519_sk).to_bytes(); - let empty_program_hash: H256 = - H256::from_str("0x0e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8") - .unwrap(); - put_register_request_on_chain( &api, one.pair(), program_modification_account.to_account_id().into(), KeyVisibility::Private(x25519_public_key), - empty_program_hash, + program_hash, ) .await .unwrap(); From 87b66cc7d37a83e6bee2be3dca485613e43374d9 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Thu, 7 Dec 2023 09:59:46 -0800 Subject: [PATCH 26/48] fix benchmarks --- pallets/relayer/src/benchmarking.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pallets/relayer/src/benchmarking.rs b/pallets/relayer/src/benchmarking.rs index 85988241a..ccda675fa 100644 --- a/pallets/relayer/src/benchmarking.rs +++ b/pallets/relayer/src/benchmarking.rs @@ -8,6 +8,7 @@ use frame_support::{ BoundedVec, }; use frame_system::{EventRecord, RawOrigin}; +use pallet_programs::{Bytecode, ProgramInfo}; use pallet_staking_extension::{ benchmarking::create_validators, IsValidatorSynced, ServerInfo, SigningGroups, ThresholdServers, ThresholdToStash, @@ -57,8 +58,8 @@ benchmarks! { register { let program = vec![0u8]; let program_hash = T::Hashing::hash(&program); - let program_modification_account: T::AccountId = whitelisted_caller(); + Bytecode::::insert(program_hash, ProgramInfo {bytecode: program, program_modification_account: program_modification_account.clone()}); let sig_req_account: T::AccountId = whitelisted_caller(); let balance = ::Currency::minimum_balance() * 100u32.into(); let _ = ::Currency::make_free_balance_be(&sig_req_account, balance); From e8cf7c903c519f2351d70f08cde2bf4bb84d34de Mon Sep 17 00:00:00 2001 From: JesseAbram <33698952+JesseAbram@users.noreply.github.com> Date: Fri, 8 Dec 2023 13:15:25 -0800 Subject: [PATCH 27/48] Update crypto/test-cli/src/main.rs Co-authored-by: peg --- crypto/test-cli/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/test-cli/src/main.rs b/crypto/test-cli/src/main.rs index bf0a518f7..e37c604c4 100644 --- a/crypto/test-cli/src/main.rs +++ b/crypto/test-cli/src/main.rs @@ -53,7 +53,7 @@ enum CliCommand { /// The access mode of the Entropy account #[arg(value_enum, default_value_t = Default::default())] key_visibility: Visibility, - /// The path to a .wasm file containing the initial program for the account (defaults to test program) + /// The hash of the initial program for the account program_hash: Option, }, /// Ask the network to sign a given message From b198537fb12eba931d0e262c2cc0881cf48c86d2 Mon Sep 17 00:00:00 2001 From: JesseAbram <33698952+JesseAbram@users.noreply.github.com> Date: Fri, 8 Dec 2023 13:15:48 -0800 Subject: [PATCH 28/48] Update pallets/programs/src/lib.rs Co-authored-by: peg --- pallets/programs/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/programs/src/lib.rs b/pallets/programs/src/lib.rs index 37af5a0f2..48d9c2768 100644 --- a/pallets/programs/src/lib.rs +++ b/pallets/programs/src/lib.rs @@ -110,7 +110,7 @@ pub mod pallet { /// The program modification account which updated the program. program_modification_account: T::AccountId, - /// The new program bytecode. + /// The new program hash. program_hash: T::Hash, }, ProgramRemoved { From b40a12d83daebd6fa6bd19891d8bae98776e6309 Mon Sep 17 00:00:00 2001 From: JesseAbram <33698952+JesseAbram@users.noreply.github.com> Date: Fri, 8 Dec 2023 13:16:05 -0800 Subject: [PATCH 29/48] Update crypto/testing-utils/src/test_client/mod.rs Co-authored-by: peg --- crypto/testing-utils/src/test_client/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/testing-utils/src/test_client/mod.rs b/crypto/testing-utils/src/test_client/mod.rs index d7605dc2e..551019134 100644 --- a/crypto/testing-utils/src/test_client/mod.rs +++ b/crypto/testing-utils/src/test_client/mod.rs @@ -262,7 +262,7 @@ pub async fn update_program( .wait_for_success() .await?; - let result_event = in_block.find_first::().unwrap(); + let result_event = in_block.find_first::()?; Ok(result_event.unwrap().program_hash) } From 1dd8ca2f52700a8fe10c8047be72b67117353c05 Mon Sep 17 00:00:00 2001 From: JesseAbram <33698952+JesseAbram@users.noreply.github.com> Date: Fri, 8 Dec 2023 13:16:20 -0800 Subject: [PATCH 30/48] Update crypto/testing-utils/src/test_client/mod.rs Co-authored-by: peg --- crypto/testing-utils/src/test_client/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/testing-utils/src/test_client/mod.rs b/crypto/testing-utils/src/test_client/mod.rs index 551019134..b087e6098 100644 --- a/crypto/testing-utils/src/test_client/mod.rs +++ b/crypto/testing-utils/src/test_client/mod.rs @@ -263,7 +263,7 @@ pub async fn update_program( .await?; let result_event = in_block.find_first::()?; - Ok(result_event.unwrap().program_hash) + Ok(result_event?.program_hash) } /// Set or update pointer with a given entropy account From f7d4ad2fd4130e7c685f1f42f7bfc418da98d0f2 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Fri, 8 Dec 2023 13:22:05 -0800 Subject: [PATCH 31/48] fix --- crypto/server/tests/protocol_wasm.rs | 1 - crypto/testing-utils/src/test_client/mod.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/crypto/server/tests/protocol_wasm.rs b/crypto/server/tests/protocol_wasm.rs index b9ee3034d..f49b28ffc 100644 --- a/crypto/server/tests/protocol_wasm.rs +++ b/crypto/server/tests/protocol_wasm.rs @@ -13,7 +13,6 @@ use serial_test::serial; use sp_core::crypto::{AccountId32, Pair, Ss58Codec}; use sp_keyring::{AccountKeyring, Sr25519Keyring}; use std::{ - str::FromStr, thread, time::{Duration, SystemTime}, }; diff --git a/crypto/testing-utils/src/test_client/mod.rs b/crypto/testing-utils/src/test_client/mod.rs index b087e6098..6fe117b2f 100644 --- a/crypto/testing-utils/src/test_client/mod.rs +++ b/crypto/testing-utils/src/test_client/mod.rs @@ -263,7 +263,7 @@ pub async fn update_program( .await?; let result_event = in_block.find_first::()?; - Ok(result_event?.program_hash) + Ok(result_event.ok_or(anyhow!("Error getting program created event"))?.program_hash) } /// Set or update pointer with a given entropy account From 4073ab45cea11119cadceb5b8ba38df1e30ad031 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Fri, 8 Dec 2023 15:18:48 -0800 Subject: [PATCH 32/48] remove unwraps --- crypto/testing-utils/src/test_client/mod.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/crypto/testing-utils/src/test_client/mod.rs b/crypto/testing-utils/src/test_client/mod.rs index 6fe117b2f..1b8727960 100644 --- a/crypto/testing-utils/src/test_client/mod.rs +++ b/crypto/testing-utils/src/test_client/mod.rs @@ -272,7 +272,7 @@ pub async fn update_pointer( signature_request_account: &sr25519::Pair, pointer_modification_account: &sr25519::Pair, program_hash: ::Hash, -) { +) -> anyhow::Result<()> { let update_pointer_tx = entropy::tx() .relayer() .change_program_pointer(signature_request_account.public().into(), program_hash); @@ -281,14 +281,12 @@ pub async fn update_pointer( entropy_api .tx() .sign_and_submit_then_watch_default(&update_pointer_tx, &pointer_modification_account) - .await - .unwrap() + .await? .wait_for_in_block() - .await - .unwrap() + .await? .wait_for_success() - .await - .unwrap(); + .await?; + Ok(()) } /// Get info on all registered accounts pub async fn get_accounts( From 560ad5bb74b9b126bcbfc46b02b25141513e7341 Mon Sep 17 00:00:00 2001 From: JesseAbram <33698952+JesseAbram@users.noreply.github.com> Date: Tue, 12 Dec 2023 09:56:54 -0800 Subject: [PATCH 33/48] Update pallets/programs/src/lib.rs Co-authored-by: Hernando Castano --- pallets/programs/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/programs/src/lib.rs b/pallets/programs/src/lib.rs index 48d9c2768..c5ba28803 100644 --- a/pallets/programs/src/lib.rs +++ b/pallets/programs/src/lib.rs @@ -88,7 +88,7 @@ pub mod pallet { /// Stores the program bytecode for a given signature-request account. #[pallet::storage] #[pallet::getter(fn bytecode)] - pub type Bytecode = + pub type Programs = StorageMap<_, Blake2_128Concat, T::Hash, ProgramInfo, OptionQuery>; /// Maps an account to all the programs it owns From d2d85c5b87f0984ec6fff27bc90ef6a954f978cb Mon Sep 17 00:00:00 2001 From: JesseAbram <33698952+JesseAbram@users.noreply.github.com> Date: Tue, 12 Dec 2023 09:57:06 -0800 Subject: [PATCH 34/48] Update pallets/programs/src/lib.rs Co-authored-by: Hernando Castano --- pallets/programs/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/programs/src/lib.rs b/pallets/programs/src/lib.rs index c5ba28803..414954b3a 100644 --- a/pallets/programs/src/lib.rs +++ b/pallets/programs/src/lib.rs @@ -117,7 +117,7 @@ pub mod pallet { /// The program modification account which removed the program. program_modification_account: T::AccountId, - /// The program bytecode removed. + /// The hash of the removed program. old_program_hash: T::Hash, }, } From 9d91d5cbb9ab167f70eca455cd404cedb101b766 Mon Sep 17 00:00:00 2001 From: JesseAbram <33698952+JesseAbram@users.noreply.github.com> Date: Tue, 12 Dec 2023 09:57:15 -0800 Subject: [PATCH 35/48] Update pallets/programs/src/lib.rs Co-authored-by: Hernando Castano --- pallets/programs/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/programs/src/lib.rs b/pallets/programs/src/lib.rs index 414954b3a..f744bef6c 100644 --- a/pallets/programs/src/lib.rs +++ b/pallets/programs/src/lib.rs @@ -140,7 +140,7 @@ pub mod pallet { impl Pallet { /// Sets the program and uses hash as key. /// - /// Note that the call becomes the program-modification account. + /// Note that the caller becomes the program-modification account. #[pallet::call_index(0)] #[pallet::weight({::WeightInfo::set_program()})] pub fn set_program(origin: OriginFor, new_program: Vec) -> DispatchResult { From ee05fb5648f752bfb6aadcc6fba693248f79b7fe Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Tue, 12 Dec 2023 14:03:42 -0500 Subject: [PATCH 36/48] refactors --- CHANGELOG.md | 7 ++++--- Cargo.lock | 2 +- crypto/server/entropy_metadata.scale | Bin 188171 -> 188441 bytes crypto/server/src/helpers/substrate.rs | 2 +- pallets/programs/src/benchmarking.rs | 2 +- pallets/programs/src/lib.rs | 4 ++-- pallets/propagation/src/tests.rs | 2 +- pallets/relayer/src/benchmarking.rs | 2 +- pallets/relayer/src/tests.rs | 20 ++++++++++---------- 9 files changed, 21 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 481958257..6ed78c488 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,13 +11,14 @@ At the moment this project **does not** adhere to - Test CLI which calls the same code as in integration tests ([#417](https://github.com/entropyxyz/entropy-core/pull/417)) -### Added -- Pointer for Programs ([#536](https://github.com/entropyxyz/entropy-core/pull/536/)) - ### Breaking Changes - In [#536](https://github.com/entropyxyz/entropy-core/pull/536/), the registered struct no longer holds a program but rather a hash of a program that is set in the set_program function +### Added +- Pointer for Programs ([#536](https://github.com/entropyxyz/entropy-core/pull/536/)) + + ## [0.0.9](https://github.com/entropyxyz/entropy-core/compare/release/v0.0.8..release/v0.0.9) - 2023-11-30 Some of the noteworthy changes related to this release are related to better integration in Web diff --git a/Cargo.lock b/Cargo.lock index ef6501cda..9803b1083 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12169,7 +12169,7 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "synedrion" version = "0.0.12" -source = "git+ssh://git@github.com/entropyxyz/synedrion.git?tag=release/v0.0.12#aef04ad5cf40db30981354da554e2a529b96af30" +source = "git+https://github.com/entropyxyz/synedrion.git?tag=release/v0.0.12#aef04ad5cf40db30981354da554e2a529b96af30" dependencies = [ "base64 0.21.2", "bincode", diff --git a/crypto/server/entropy_metadata.scale b/crypto/server/entropy_metadata.scale index f1701faf917790b346ba45395d72bcd44a3a6bc0..57f4775f697a131a49c007822dcd68c2f85e3294 100644 GIT binary patch delta 1768 zcmZWqeM}Tb6rVS@kU7NkC{Uz|EMF>O4K-8=exi`3v3yidT4N|(?*?w+Zui*T6E4*V zF-T2oBE8rNO^A}zq_nxz`-5!!Ko7NA{~!ngRm3K?nv^EAn(80Mm~`$As)S^-JM-S} z{r0`z%)I&X(xUG0qIeHAq&MCP#Vv>36j zZy=j}dmjAk&Hb<)_Ohf4kP9hn{RQ~(u;8v#=a@w&t(O)4C&`E=u(oWLvDB?m$?4xs z4P+6#vqn*hSw)>1|3_5YRkcD={IeLns)h3*LGbR;sV1r|iY^+eDtb61`d5LMuCr1* zQYI`Zn;5`44+03MyQ!2F4Mhr4ppNmQGf0$HxiJKfVj_B zyir{LUM=D?ge;{9A%gsTDC8a@?WBVoBVFVq=_Wm-m!Lx|BMfh|pDsfITNZ|;?Ac{l z2^|sZCO8&z8ev$GaGXG5xh5fW-25&KAsckXoZb;w11DL}2$Wd52??}ia*h#LhkIfr zZX1Pc+)DzX_B8hSC}hDI)-wvrp^sf0g$)p7PdOkpM4-5aIyRNJa-9@ic5Fc?$O>-5 zzNH?L60u6aYYV~ar_jtog=S(3J?G1GHknP_f$R8XY#h1^=U0REb%o=s z3lxsCMiq{;M&rMqgjGzs$F+Jo2_9I?MkXPLb=>0{D~Sc~!MgmUd4#D82~%T)sj<+4 zDR6T6PfS7H#*BHPSqnq6Vxf@_&a)!^aJh@h<59l(cnYTDdHkuSC`N{T2s9I8(- zczfWD#T{*Y-dI1=McIh94tOa*A0XIE0?j`pvm;@A9BR#^K`a1B?5!*K6OfsD1!r13 z#Lv2};N-)Hh^=^si#nR@tu<8B`6h2Cw!*08eX3Ah);maH3{jzKhUDfw<`^kl6-Dr4 z;GkWkZB2CcF_jx!#!1rl*$$VaHBh@IDZ1o{9Gq&&@8P?zo3y!VIE7O(XslRU z9#(i2FB5u6+Zk4U6<6}Zd+I8_2K~%=4VS?=v+o)Xf+a`>*xu`S*fK;ytl$Q2Oz0yv z&Ls_z`|Q*WJd^T(5Ti9nR_%AIj;6ZE9Z~qmJpBtkAXsL|6El4XS7Uf)HV)%Q0z7Bc zWB4$Re_>0UH5#-On~x{)?~orPiEgUctX5Rk?4z2$ puAb65C%?30w@wm$t;Q^1F?%tE8zJ4SzmG+L4A%J@ZnxxH(SIVAIphEU delta 1497 zcmZWpT})I*6rOMPN@o$$HH8YLz^b6qHZ8GK@dpYm+uEdp5ws;n&2@K#h5gaHcacpb zg)~ZxF)1N>>Vs*C@nO@@xM|D{wotZWDi5^^T@)2tjU?s4rY8E(2b#|A`XD8_xpVHB z?>lF{bI+MGqf1YWEY0vsQ-856mQi#p-_z78odJ2+dC&;97`orNKVnLE&?Ead9*aB8 zoQCuVJEZ4Luzr2-iqETit?FKESceL$V+a7%Hen@QxP%COcL~es&-KWnzVGqP z%dBpDI!mq3kh&+*C{1Q#DLii${WZO-=!Ic)Vh`1hAdkKr#+K!}K#j{M-KODnd(Fr; zX-b1JJ&mx9pbFAbXcyq6-XG!5_bY;QdqVoAO^x1`fNq8j$v9(v${t10+lK_4yTg^6 zo$KG(!`LCgn5~vECRkXRT1iB7i5_uOoD_ZHlsF^K3KpT_3A{p`qj()%X?tW8Yv|l4 z3QotB)LCUvRUE4`j|*hE44tv#mOqY|11FRC52$EDA-X5v#3>q>Km*Ru;|XlyXGMRk zXF1hPVg&~1z$A)ro{mmp1EMrMiIus70+qX@dyA`6=?{dw?rO%O^kfpd3%nvH>D8eQ zuCWTGVNfaHQNd!=_8ZD}T@+eg!$H#<3}{*tVgkZZ9}GwZbTkJ2Qe!cN2V+ADw?l@) zK2s>%5zU2Rg%u6$8atxEOer!nHk<|zQ!t?l$fl0FSXY*9fBwHMTO4g!I@+=%wHLY6JcH8B`3qQui&=$fR&wDh z>`XnX!WFIzR%#8+U@ikY>D)t9YRv*)_xBX%(vycMR>PGui@!18!-+OjJ z&>y3`!H#(iQ7}dBit_<9Tg5+d4Qhf*F7rsr%IU9~I?mQwY_`Zh2C4zmfX-M0#6V z%|6jhBNND1L*^Xgg=)yE$M~z-SS9l#RTGkal2wPMPQOnQ# zSKGK4q>Wd3TjqJ;@TeXe7t=I&l|Rav5yI?@inaTFL3jJURz1{Oe&70boOfupIq}F^ zbB%B3{IQ_e6n9x8*ZEf(p3>d~|4cQ=y#%jOOYs!{g3k*}LEf_2U{A3Mxb^QH{s3iB zk>!&C#}YfMI~0~iWZwZP_j%MU?e&F3R=CrA2C$R;9&bagW!~dXAfHbC&U::minimum_balance().saturating_mul(1_000_000_000u32.into()); let _ = CurrencyOf::::make_free_balance_be(&program_modification_account, value); - >::insert(program_hash.clone(), ProgramInfo {bytecode: program, program_modification_account: program_modification_account.clone()}); + >::insert(program_hash.clone(), ProgramInfo {bytecode: program, program_modification_account: program_modification_account.clone()}); let mut program_hashes = vec![program_hash.clone()]; for _ in 1..p { program_hashes.push(random_hash); diff --git a/pallets/programs/src/lib.rs b/pallets/programs/src/lib.rs index f744bef6c..0846eb12b 100644 --- a/pallets/programs/src/lib.rs +++ b/pallets/programs/src/lib.rs @@ -155,7 +155,7 @@ pub mod pallet { Self::reserve_program_deposit(&program_modification_account, new_program_length)?; - Bytecode::::insert( + Programs::::insert( program_hash, &ProgramInfo { bytecode: new_program.clone(), @@ -211,7 +211,7 @@ pub mod pallet { Ok(()) }, )?; - Bytecode::::remove(program_hash); + Programs::::remove(program_hash); Self::deposit_event(Event::ProgramRemoved { program_modification_account, old_program_hash: program_hash, diff --git a/pallets/propagation/src/tests.rs b/pallets/propagation/src/tests.rs index 24b5361d0..12cfed2ba 100644 --- a/pallets/propagation/src/tests.rs +++ b/pallets/propagation/src/tests.rs @@ -61,7 +61,7 @@ fn knows_how_to_mock_several_http_calls() { Propagation::post_dkg(1).unwrap(); System::set_block_number(3); - pallet_programs::Bytecode::::insert( + pallet_programs::Programs::::insert( ::Hash::default(), ProgramInfo { bytecode: vec![], program_modification_account: 1 }, ); diff --git a/pallets/relayer/src/benchmarking.rs b/pallets/relayer/src/benchmarking.rs index ccda675fa..18f702b13 100644 --- a/pallets/relayer/src/benchmarking.rs +++ b/pallets/relayer/src/benchmarking.rs @@ -59,7 +59,7 @@ benchmarks! { let program = vec![0u8]; let program_hash = T::Hashing::hash(&program); let program_modification_account: T::AccountId = whitelisted_caller(); - Bytecode::::insert(program_hash, ProgramInfo {bytecode: program, program_modification_account: program_modification_account.clone()}); + Programs::::insert(program_hash, ProgramInfo {bytecode: program, program_modification_account: program_modification_account.clone()}); let sig_req_account: T::AccountId = whitelisted_caller(); let balance = ::Currency::minimum_balance() * 100u32.into(); let _ = ::Currency::make_free_balance_be(&sig_req_account, balance); diff --git a/pallets/relayer/src/tests.rs b/pallets/relayer/src/tests.rs index d9e5e96e9..af961b6cd 100644 --- a/pallets/relayer/src/tests.rs +++ b/pallets/relayer/src/tests.rs @@ -57,7 +57,7 @@ fn it_registers_a_user() { new_test_ext().execute_with(|| { let empty_program = vec![]; let program_hash = ::Hashing::hash(&empty_program); - pallet_programs::Bytecode::::insert( + pallet_programs::Programs::::insert( program_hash, ProgramInfo { bytecode: empty_program, program_modification_account: 1 }, ); @@ -90,7 +90,7 @@ fn it_confirms_registers_a_user() { let empty_program = vec![]; let program_hash = ::Hashing::hash(&empty_program); - pallet_programs::Bytecode::::insert( + pallet_programs::Programs::::insert( program_hash, ProgramInfo { bytecode: empty_program, program_modification_account: 1 }, ); @@ -168,7 +168,7 @@ fn it_changes_a_program_pointer() { new_test_ext().execute_with(|| { let empty_program = vec![]; let program_hash = ::Hashing::hash(&empty_program); - pallet_programs::Bytecode::::insert( + pallet_programs::Programs::::insert( program_hash, ProgramInfo { bytecode: empty_program, program_modification_account: 1 }, ); @@ -198,7 +198,7 @@ fn it_fails_on_non_matching_verifying_keys() { new_test_ext().execute_with(|| { let empty_program = vec![]; let program_hash = ::Hashing::hash(&empty_program); - pallet_programs::Bytecode::::insert( + pallet_programs::Programs::::insert( program_hash, ProgramInfo { bytecode: empty_program, program_modification_account: 1 }, ); @@ -240,7 +240,7 @@ fn it_doesnt_allow_double_registering() { // register a user let empty_program = vec![]; let program_hash = ::Hashing::hash(&empty_program); - pallet_programs::Bytecode::::insert( + pallet_programs::Programs::::insert( program_hash, ProgramInfo { bytecode: empty_program, program_modification_account: 1 }, ); @@ -289,7 +289,7 @@ fn it_tests_prune_registration() { new_test_ext().execute_with(|| { let inital_program = vec![10]; let program_hash = ::Hashing::hash(&inital_program); - pallet_programs::Bytecode::::insert( + pallet_programs::Programs::::insert( program_hash, ProgramInfo { bytecode: inital_program, program_modification_account: 1 }, ); @@ -312,7 +312,7 @@ fn it_provides_free_txs_confirm_done() { new_test_ext().execute_with(|| { let empty_program = vec![]; let program_hash = ::Hashing::hash(&empty_program); - pallet_programs::Bytecode::::insert( + pallet_programs::Programs::::insert( program_hash, ProgramInfo { bytecode: empty_program, program_modification_account: 1 }, ); @@ -380,7 +380,7 @@ fn it_provides_free_txs_confirm_done_fails_3() { new_test_ext().execute_with(|| { let empty_program = vec![]; let program_hash = ::Hashing::hash(&empty_program); - pallet_programs::Bytecode::::insert( + pallet_programs::Programs::::insert( program_hash, ProgramInfo { bytecode: empty_program, program_modification_account: 1 }, ); @@ -418,7 +418,7 @@ fn it_provides_free_txs_confirm_done_fails_4() { new_test_ext().execute_with(|| { let empty_program = vec![]; let program_hash = ::Hashing::hash(&empty_program); - pallet_programs::Bytecode::::insert( + pallet_programs::Programs::::insert( program_hash, ProgramInfo { bytecode: empty_program, program_modification_account: 1 }, ); @@ -449,7 +449,7 @@ fn it_provides_free_txs_confirm_done_fails_5() { new_test_ext().execute_with(|| { let empty_program = vec![]; let program_hash = ::Hashing::hash(&empty_program); - pallet_programs::Bytecode::::insert( + pallet_programs::Programs::::insert( program_hash, ProgramInfo { bytecode: empty_program, program_modification_account: 1 }, ); From ce5ec15df33995f191166c196b4edeb0160e4984 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Tue, 12 Dec 2023 14:32:43 -0500 Subject: [PATCH 37/48] refactor --- pallets/programs/src/benchmarking.rs | 9 +++++---- pallets/programs/src/lib.rs | 9 +++++---- pallets/programs/src/tests.rs | 16 +++++++++++++--- pallets/relayer/src/lib.rs | 2 +- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/pallets/programs/src/benchmarking.rs b/pallets/programs/src/benchmarking.rs index 4a99abb8a..012310c77 100644 --- a/pallets/programs/src/benchmarking.rs +++ b/pallets/programs/src/benchmarking.rs @@ -54,10 +54,11 @@ benchmarks! { let value = CurrencyOf::::minimum_balance().saturating_mul(1_000_000_000u32.into()); let _ = CurrencyOf::::make_free_balance_be(&program_modification_account, value); >::insert(program_hash.clone(), ProgramInfo {bytecode: program, program_modification_account: program_modification_account.clone()}); - let mut program_hashes = vec![program_hash.clone()]; - for _ in 1..p { - program_hashes.push(random_hash); - } + let mut program_hashes = vec![random_hash.clone(); p as usize]; + // remove one to make room for the targetted removal program hash + program_hashes.pop(); + program_hashes.push(program_hash); + let bounded_program_hashes: BoundedVec = BoundedVec::try_from(program_hashes).unwrap(); >::insert(program_modification_account.clone(), bounded_program_hashes); }: _(RawOrigin::Signed(program_modification_account.clone()), program_hash.clone()) diff --git a/pallets/programs/src/lib.rs b/pallets/programs/src/lib.rs index 0846eb12b..45e38d0a9 100644 --- a/pallets/programs/src/lib.rs +++ b/pallets/programs/src/lib.rs @@ -87,7 +87,7 @@ pub mod pallet { /// Stores the program bytecode for a given signature-request account. #[pallet::storage] - #[pallet::getter(fn bytecode)] + #[pallet::getter(fn programs)] pub type Programs = StorageMap<_, Blake2_128Concat, T::Hash, ProgramInfo, OptionQuery>; @@ -105,7 +105,7 @@ pub mod pallet { #[pallet::event] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { - /// The bytecode of a program was updated. + /// The bytecode of a program was created. ProgramCreated { /// The program modification account which updated the program. program_modification_account: T::AccountId, @@ -113,6 +113,7 @@ pub mod pallet { /// The new program hash. program_hash: T::Hash, }, + /// The bytecode of a program was removed. ProgramRemoved { /// The program modification account which removed the program. program_modification_account: T::AccountId, @@ -151,7 +152,7 @@ pub mod pallet { new_program_length as u32 <= T::MaxBytecodeLength::get(), Error::::ProgramLengthExceeded ); - ensure!(Self::bytecode(program_hash).is_none(), Error::::ProgramAlreadySet); + ensure!(!Programs::::contains_key(program_hash), Error::::ProgramAlreadySet); Self::reserve_program_deposit(&program_modification_account, new_program_length)?; @@ -189,7 +190,7 @@ pub mod pallet { ) -> DispatchResultWithPostInfo { let program_modification_account = ensure_signed(origin)?; let old_program_info = - Self::bytecode(program_hash).ok_or(Error::::NoProgramDefined)?; + Self::programs(program_hash).ok_or(Error::::NoProgramDefined)?; ensure!( old_program_info.program_modification_account == program_modification_account, Error::::NotAuthorized diff --git a/pallets/programs/src/tests.rs b/pallets/programs/src/tests.rs index 0d86217b4..26b47d5ae 100644 --- a/pallets/programs/src/tests.rs +++ b/pallets/programs/src/tests.rs @@ -34,7 +34,7 @@ fn set_program() { program_modification_account: PROGRAM_MODIFICATION_ACCOUNT, }; assert_eq!( - ProgramsPallet::bytecode(program_hash).unwrap(), + ProgramsPallet::programs(program_hash).unwrap(), program_result, "Program gets set" ); @@ -100,7 +100,17 @@ fn remove_program() { vec![program_hash], "Program gets set to owner" ); - assert!(ProgramsPallet::bytecode(program_hash).is_some(), "Program gets set"); + assert!(ProgramsPallet::programs(program_hash).is_some(), "Program gets set"); + assert_eq!( + ProgramsPallet::programs(program_hash).unwrap().bytecode, + program, + "Program bytecode gets set" + ); + assert_eq!( + ProgramsPallet::programs(program_hash).unwrap().program_modification_account, + PROGRAM_MODIFICATION_ACCOUNT, + "Program modification account gets set" + ); assert_eq!(Balances::free_balance(PROGRAM_MODIFICATION_ACCOUNT), 90, "Deposit charged"); // not authorized @@ -113,7 +123,7 @@ fn remove_program() { RuntimeOrigin::signed(PROGRAM_MODIFICATION_ACCOUNT), program_hash.clone() )); - assert!(ProgramsPallet::bytecode(program_hash).is_none(), "Program removed"); + assert!(ProgramsPallet::programs(program_hash).is_none(), "Program removed"); assert_eq!( ProgramsPallet::owned_programs(PROGRAM_MODIFICATION_ACCOUNT), vec![], diff --git a/pallets/relayer/src/lib.rs b/pallets/relayer/src/lib.rs index 5776acdfb..b7474ef02 100644 --- a/pallets/relayer/src/lib.rs +++ b/pallets/relayer/src/lib.rs @@ -214,7 +214,7 @@ pub mod pallet { let block_number = >::block_number(); // check program exists - pallet_programs::Pallet::::bytecode(program_pointer) + pallet_programs::Pallet::::programs(program_pointer) .ok_or(Error::::ProgramDoesNotExist)?; Dkg::::try_mutate(block_number, |messages| -> Result<_, DispatchError> { messages.push(sig_req_account.clone().encode()); From e1524bd97c944ebf2f3af3f294023322cb8890cb Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Tue, 12 Dec 2023 15:21:11 -0500 Subject: [PATCH 38/48] refactor --- crypto/server/src/helpers/substrate.rs | 6 +++--- crypto/server/tests/sign.rs | 4 ++-- crypto/test-cli/src/main.rs | 7 ++----- crypto/testing-utils/src/constants.rs | 2 ++ 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/crypto/server/src/helpers/substrate.rs b/crypto/server/src/helpers/substrate.rs index 18c4f1163..cef855fa6 100644 --- a/crypto/server/src/helpers/substrate.rs +++ b/crypto/server/src/helpers/substrate.rs @@ -17,6 +17,8 @@ use subxt::{ utils::{AccountId32, H256}, Config, OnlineClient, }; +#[cfg(test)] +use testing_utils::constants::EMPTY_PROGRAM_HASH; /// gets the subgroup of the working validator pub async fn get_subgroup( @@ -117,9 +119,7 @@ pub async fn make_register( assert!(is_registering_1.is_none()); // register the user - let empty_program_hash: H256 = - H256::from_str("0x0e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8") - .unwrap(); + let empty_program_hash: H256 = H256::from_str(EMPTY_PROGRAM_HASH).unwrap(); let registering_tx = entropy::tx().relayer().register( program_modification_account.clone(), Static(key_visibility), diff --git a/crypto/server/tests/sign.rs b/crypto/server/tests/sign.rs index 8733312e2..519e9b9dd 100644 --- a/crypto/server/tests/sign.rs +++ b/crypto/server/tests/sign.rs @@ -36,7 +36,7 @@ async fn integration_test_sign() { .await .unwrap(); - test_client::update_pointer( + let _ = test_client::update_pointer( &api, &pre_registered_user.pair(), &pre_registered_user.pair(), @@ -85,7 +85,7 @@ async fn integration_test_sign_private() { .await .unwrap(); - test_client::update_pointer( + let _ = test_client::update_pointer( &api, &pre_registered_user.pair(), &pre_registered_user.pair(), diff --git a/crypto/test-cli/src/main.rs b/crypto/test-cli/src/main.rs index e37c604c4..0c431e966 100644 --- a/crypto/test-cli/src/main.rs +++ b/crypto/test-cli/src/main.rs @@ -12,7 +12,7 @@ use colored::Colorize; use sp_core::{sr25519, Pair}; use subxt::utils::{AccountId32 as SubxtAccountId32, H256}; use testing_utils::{ - constants::{AUXILARY_DATA_SHOULD_SUCCEED, TEST_PROGRAM_WASM_BYTECODE}, + constants::{AUXILARY_DATA_SHOULD_SUCCEED, EMPTY_PROGRAM_HASH, TEST_PROGRAM_WASM_BYTECODE}, test_client::{ derive_static_secret, get_accounts, get_api, get_rpc, register, sign, update_program, KeyParams, KeyShare, KeyVisibility, @@ -161,10 +161,7 @@ async fn run_command() -> anyhow::Result { }, Visibility::Public => KeyVisibility::Public, }; - let empty_program_hash: H256 = H256::from_str( - "0x0e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8", - ) - .unwrap(); + let empty_program_hash: H256 = H256::from_str(EMPTY_PROGRAM_HASH).unwrap(); let program_hash_to_send = match program_hash { Some(program_hash) => program_hash, // This is temporary - if empty programs are allowed it can be None diff --git a/crypto/testing-utils/src/constants.rs b/crypto/testing-utils/src/constants.rs index 60aa34098..466027ffb 100644 --- a/crypto/testing-utils/src/constants.rs +++ b/crypto/testing-utils/src/constants.rs @@ -36,3 +36,5 @@ pub const PREIMAGE_SHOULD_SUCCEED: &[u8] = "asdfasdfasdfasdf".as_bytes(); pub const PREIMAGE_SHOULD_FAIL: &[u8] = "asdf".as_bytes(); pub const AUXILARY_DATA_SHOULD_SUCCEED: &[u8] = "fdsafdsa".as_bytes(); pub const AUXILARY_DATA_SHOULD_FAIL: Option<&[u8]> = None; +pub const EMPTY_PROGRAM_HASH: &str = + "0x0e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8"; From 0def29cf14547639f4895a46921d25caa661f9ba Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Tue, 12 Dec 2023 18:14:13 -0500 Subject: [PATCH 39/48] refactor --- crypto/server/src/helpers/substrate.rs | 44 -------------------------- crypto/server/src/user/tests.rs | 2 +- pallets/relayer/src/lib.rs | 7 ++-- 3 files changed, 6 insertions(+), 47 deletions(-) diff --git a/crypto/server/src/helpers/substrate.rs b/crypto/server/src/helpers/substrate.rs index cef855fa6..11913f321 100644 --- a/crypto/server/src/helpers/substrate.rs +++ b/crypto/server/src/helpers/substrate.rs @@ -99,50 +99,6 @@ pub async fn get_program( .bytecode) } -/// Puts a user in the Registering state on-chain and waits for that transaction to be included in a -/// block -#[cfg(test)] -pub async fn make_register( - api: &OnlineClient, - rpc: &LegacyRpcMethods, - sig_req_keyring: sr25519::Pair, - program_modification_account: &AccountId32, - key_visibility: KeyVisibility, -) { - use subxt::utils::Static; - - let sig_req_account = PairSigner::::new(sig_req_keyring); - - let registering_query = entropy::storage().relayer().registering(sig_req_account.account_id()); - let block_hash = rpc.chain_get_block_hash(None).await.unwrap().unwrap(); - let is_registering_1 = api.storage().at(block_hash).fetch(®istering_query).await.unwrap(); - assert!(is_registering_1.is_none()); - - // register the user - let empty_program_hash: H256 = H256::from_str(EMPTY_PROGRAM_HASH).unwrap(); - let registering_tx = entropy::tx().relayer().register( - program_modification_account.clone(), - Static(key_visibility), - empty_program_hash, - ); - - api.tx() - .sign_and_submit_then_watch_default(®istering_tx, &sig_req_account) - .await - .unwrap() - .wait_for_in_block() - .await - .unwrap() - .wait_for_success() - .await - .unwrap(); - - let block_hash_2 = rpc.chain_get_block_hash(None).await.unwrap().unwrap(); - - let query_registering_status = api.storage().at(block_hash_2).fetch(®istering_query).await; - assert!(query_registering_status.unwrap().is_some()); -} - /// Returns a registered user's key visibility pub async fn get_registered_details( api: &OnlineClient, diff --git a/crypto/server/src/user/tests.rs b/crypto/server/src/user/tests.rs index d5b42e4c8..78bee3839 100644 --- a/crypto/server/src/user/tests.rs +++ b/crypto/server/src/user/tests.rs @@ -71,7 +71,7 @@ use crate::{ DEFAULT_CHARLIE_MNEMONIC, DEFAULT_ENDPOINT, DEFAULT_MNEMONIC, }, signing::{create_unique_tx_id, Hasher}, - substrate::{get_subgroup, make_register, return_all_addresses_of_subgroup}, + substrate::{get_subgroup, return_all_addresses_of_subgroup}, tests::{ check_if_confirmation, create_clients, initialize_test_logger, run_to_block, setup_client, spawn_testing_validators, update_pointer, update_programs, diff --git a/pallets/relayer/src/lib.rs b/pallets/relayer/src/lib.rs index b7474ef02..72684c2af 100644 --- a/pallets/relayer/src/lib.rs +++ b/pallets/relayer/src/lib.rs @@ -214,8 +214,11 @@ pub mod pallet { let block_number = >::block_number(); // check program exists - pallet_programs::Pallet::::programs(program_pointer) - .ok_or(Error::::ProgramDoesNotExist)?; + ensure!( + pallet_programs::Programs::::contains_key(program_pointer), + Error::::ProgramDoesNotExist + ); + Dkg::::try_mutate(block_number, |messages| -> Result<_, DispatchError> { messages.push(sig_req_account.clone().encode()); Ok(()) From bd469f0c769b7663447d15c391a19b4dc86f4ec3 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Tue, 12 Dec 2023 18:17:16 -0500 Subject: [PATCH 40/48] refactors --- crypto/server/src/helpers/substrate.rs | 2 -- crypto/test-cli/src/main.rs | 13 +++---------- crypto/testing-utils/src/constants.rs | 2 -- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/crypto/server/src/helpers/substrate.rs b/crypto/server/src/helpers/substrate.rs index 11913f321..fac853bbf 100644 --- a/crypto/server/src/helpers/substrate.rs +++ b/crypto/server/src/helpers/substrate.rs @@ -17,8 +17,6 @@ use subxt::{ utils::{AccountId32, H256}, Config, OnlineClient, }; -#[cfg(test)] -use testing_utils::constants::EMPTY_PROGRAM_HASH; /// gets the subgroup of the working validator pub async fn get_subgroup( diff --git a/crypto/test-cli/src/main.rs b/crypto/test-cli/src/main.rs index 0c431e966..6c52401ce 100644 --- a/crypto/test-cli/src/main.rs +++ b/crypto/test-cli/src/main.rs @@ -3,7 +3,6 @@ use std::{ fmt::{self, Display}, fs, path::PathBuf, - str::FromStr, time::Instant, }; @@ -12,7 +11,7 @@ use colored::Colorize; use sp_core::{sr25519, Pair}; use subxt::utils::{AccountId32 as SubxtAccountId32, H256}; use testing_utils::{ - constants::{AUXILARY_DATA_SHOULD_SUCCEED, EMPTY_PROGRAM_HASH, TEST_PROGRAM_WASM_BYTECODE}, + constants::{AUXILARY_DATA_SHOULD_SUCCEED, TEST_PROGRAM_WASM_BYTECODE}, test_client::{ derive_static_secret, get_accounts, get_api, get_rpc, register, sign, update_program, KeyParams, KeyShare, KeyVisibility, @@ -54,7 +53,7 @@ enum CliCommand { #[arg(value_enum, default_value_t = Default::default())] key_visibility: Visibility, /// The hash of the initial program for the account - program_hash: Option, + program_hash: H256, }, /// Ask the network to sign a given message Sign { @@ -161,12 +160,6 @@ async fn run_command() -> anyhow::Result { }, Visibility::Public => KeyVisibility::Public, }; - let empty_program_hash: H256 = H256::from_str(EMPTY_PROGRAM_HASH).unwrap(); - let program_hash_to_send = match program_hash { - Some(program_hash) => program_hash, - // This is temporary - if empty programs are allowed it can be None - None => empty_program_hash, - }; let (registered_info, keyshare_option) = register( &api, @@ -174,7 +167,7 @@ async fn run_command() -> anyhow::Result { signature_request_keypair.clone(), program_account, key_visibility_converted, - program_hash_to_send, + program_hash, ) .await?; diff --git a/crypto/testing-utils/src/constants.rs b/crypto/testing-utils/src/constants.rs index 466027ffb..60aa34098 100644 --- a/crypto/testing-utils/src/constants.rs +++ b/crypto/testing-utils/src/constants.rs @@ -36,5 +36,3 @@ pub const PREIMAGE_SHOULD_SUCCEED: &[u8] = "asdfasdfasdfasdf".as_bytes(); pub const PREIMAGE_SHOULD_FAIL: &[u8] = "asdf".as_bytes(); pub const AUXILARY_DATA_SHOULD_SUCCEED: &[u8] = "fdsafdsa".as_bytes(); pub const AUXILARY_DATA_SHOULD_FAIL: Option<&[u8]> = None; -pub const EMPTY_PROGRAM_HASH: &str = - "0x0e5751c026e543b2e8ab2eb06099daa1d1e5df47778f7787faab45cdf12fe3a8"; From 3b19fcce5860f144644318421705c8aa33838878 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Tue, 12 Dec 2023 18:21:35 -0500 Subject: [PATCH 41/48] clean --- crypto/server/src/helpers/substrate.rs | 4 ---- crypto/server/tests/protocol_wasm.rs | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/crypto/server/src/helpers/substrate.rs b/crypto/server/src/helpers/substrate.rs index fac853bbf..f28041907 100644 --- a/crypto/server/src/helpers/substrate.rs +++ b/crypto/server/src/helpers/substrate.rs @@ -5,11 +5,7 @@ use crate::{ }, user::UserErr, }; -#[cfg(test)] -use entropy_shared::KeyVisibility; use entropy_shared::SIGNING_PARTY_SIZE; -#[cfg(test)] -use std::str::FromStr; use subxt::{ backend::legacy::LegacyRpcMethods, ext::sp_core::sr25519, diff --git a/crypto/server/tests/protocol_wasm.rs b/crypto/server/tests/protocol_wasm.rs index cc3968da2..654faf318 100644 --- a/crypto/server/tests/protocol_wasm.rs +++ b/crypto/server/tests/protocol_wasm.rs @@ -64,7 +64,7 @@ async fn test_wasm_sign_tx_user_participates() { update_program(&entropy_api, &dave.pair(), TEST_PROGRAM_WASM_BYTECODE.to_owned()) .await .unwrap(); - update_pointer(&entropy_api, &one.pair(), &one.pair(), program_hash).await; + let _ = update_pointer(&entropy_api, &one.pair(), &one.pair(), program_hash).await; let validators_info = vec![ ValidatorInfo { From e7038fdcfe96421fd007ee7799053049ef5df7d6 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Tue, 12 Dec 2023 18:23:02 -0500 Subject: [PATCH 42/48] change runtime value --- 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 7a084be81..d5fbfaffd 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -1285,7 +1285,7 @@ parameter_types! { // 1mb max pub const MaxBytecodeLength: u32 = 1_000_000; pub const ProgramDepositPerByte: Balance = MILLICENTS; - pub const MaxOwnedPrograms: u32 = 25; + pub const MaxOwnedPrograms: u32 = 250; } impl pallet_programs::Config for Runtime { From 6d42057e864f431c31c18fff339c714fc4794b56 Mon Sep 17 00:00:00 2001 From: JesseAbram <33698952+JesseAbram@users.noreply.github.com> Date: Tue, 12 Dec 2023 15:25:05 -0800 Subject: [PATCH 43/48] Update pallets/relayer/src/benchmarking.rs Co-authored-by: Hernando Castano --- pallets/relayer/src/benchmarking.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pallets/relayer/src/benchmarking.rs b/pallets/relayer/src/benchmarking.rs index 18f702b13..61094ff21 100644 --- a/pallets/relayer/src/benchmarking.rs +++ b/pallets/relayer/src/benchmarking.rs @@ -97,12 +97,15 @@ benchmarks! { let sig_req_account: T::AccountId = whitelisted_caller(); let balance = ::Currency::minimum_balance() * 100u32.into(); let _ = ::Currency::make_free_balance_be(&sig_req_account, balance); - >::insert(&sig_req_account, RegisteredInfo { - program_modification_account: sig_req_account.clone(), - program_pointer: program_hash, - verifying_key: BoundedVec::default(), - key_visibility: KeyVisibility::Public, - }); + >::insert( + &sig_req_account, + RegisteredInfo { + program_modification_account: sig_req_account.clone(), + program_pointer: program_hash, + verifying_key: BoundedVec::default(), + key_visibility: KeyVisibility::Public, + }, + ); }: _(RawOrigin::Signed(sig_req_account.clone()), sig_req_account.clone(), new_program_hash.clone()) verify { assert_last_event::(Event::ProgramPointerChanged(sig_req_account.clone(), new_program_hash).into()); From 38ebc819644ac21799c7b5e5d98ec7adc1f598d2 Mon Sep 17 00:00:00 2001 From: JesseAbram <33698952+JesseAbram@users.noreply.github.com> Date: Tue, 12 Dec 2023 15:26:20 -0800 Subject: [PATCH 44/48] Apply suggestions from code review Co-authored-by: Hernando Castano --- pallets/relayer/src/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pallets/relayer/src/lib.rs b/pallets/relayer/src/lib.rs index 72684c2af..fb25b6957 100644 --- a/pallets/relayer/src/lib.rs +++ b/pallets/relayer/src/lib.rs @@ -256,18 +256,19 @@ pub mod pallet { Self::deposit_event(Event::RegistrationCancelled(who)); Ok(()) } + /// Allows a user's program modification account to change their program pointer #[pallet::call_index(2)] #[pallet::weight({ - ::WeightInfo::change_program_pointer() - })] + ::WeightInfo::change_program_pointer() + })] pub fn change_program_pointer( origin: OriginFor, sig_request_account: T::AccountId, new_program_pointer: T::Hash, ) -> DispatchResult { let who = ensure_signed(origin)?; - Registered::::try_mutate(&sig_request_account, |maybe_registerd_details| { + Registered::::try_mutate(&sig_request_account, |maybe_registered_details| { if let Some(registerd_details) = maybe_registerd_details { ensure!( who == registerd_details.program_modification_account, From b601ed38c5caa6a533d9746e114dcccd100cc4f1 Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Tue, 12 Dec 2023 18:27:30 -0500 Subject: [PATCH 45/48] fix --- pallets/relayer/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/relayer/src/lib.rs b/pallets/relayer/src/lib.rs index fb25b6957..3281c6e62 100644 --- a/pallets/relayer/src/lib.rs +++ b/pallets/relayer/src/lib.rs @@ -269,7 +269,7 @@ pub mod pallet { ) -> DispatchResult { let who = ensure_signed(origin)?; Registered::::try_mutate(&sig_request_account, |maybe_registered_details| { - if let Some(registerd_details) = maybe_registerd_details { + if let Some(registerd_details) = maybe_registered_details { ensure!( who == registerd_details.program_modification_account, Error::::NotAuthorized From 9e3eb90f4e56c25287e7dc63bb47134b135ec97e Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Wed, 13 Dec 2023 10:47:58 -0500 Subject: [PATCH 46/48] remove duplicate update_pointer --- crypto/server/src/helpers/tests.rs | 24 ------------------------ crypto/server/src/user/tests.rs | 7 ++++--- crypto/server/tests/protocol_wasm.rs | 2 +- crypto/server/tests/sign.rs | 10 ++++++---- 4 files changed, 11 insertions(+), 32 deletions(-) diff --git a/crypto/server/src/helpers/tests.rs b/crypto/server/src/helpers/tests.rs index 06ad0e740..3aa889259 100644 --- a/crypto/server/src/helpers/tests.rs +++ b/crypto/server/src/helpers/tests.rs @@ -189,30 +189,6 @@ pub async fn update_programs( result_event.unwrap().program_hash } -pub async fn update_pointer( - entropy_api: &OnlineClient, - sig_req_keyring: &sr25519::Pair, - pointer_modification_account: &sr25519::Pair, - program_hash: ::Hash, -) { - let update_pointer_tx = entropy::tx() - .relayer() - .change_program_pointer(sig_req_keyring.public().into(), program_hash); - let pointer_modification_account = - PairSigner::::new(pointer_modification_account.clone()); - entropy_api - .tx() - .sign_and_submit_then_watch_default(&update_pointer_tx, &pointer_modification_account) - .await - .unwrap() - .wait_for_in_block() - .await - .unwrap() - .wait_for_success() - .await - .unwrap(); -} - /// Verify that a Registering account has all confirmation, and that it is registered. pub async fn check_if_confirmation( api: &OnlineClient, diff --git a/crypto/server/src/user/tests.rs b/crypto/server/src/user/tests.rs index 78bee3839..c391606c7 100644 --- a/crypto/server/src/user/tests.rs +++ b/crypto/server/src/user/tests.rs @@ -53,6 +53,7 @@ use testing_utils::{ substrate_context::{ test_context_stationary, test_node_process_testing_state, SubstrateTestingContext, }, + test_client::update_pointer, }; use tokio::{ io::{AsyncRead, AsyncReadExt}, @@ -74,7 +75,7 @@ use crate::{ substrate::{get_subgroup, return_all_addresses_of_subgroup}, tests::{ check_if_confirmation, create_clients, initialize_test_logger, run_to_block, - setup_client, spawn_testing_validators, update_pointer, update_programs, + setup_client, spawn_testing_validators, update_programs, }, user::send_key, }, @@ -183,7 +184,7 @@ async fn test_sign_tx_no_chain() { assert_eq!(res.unwrap().text().await.unwrap(), "No program set"); } - update_pointer(&entropy_api, &one.pair(), &one.pair(), program_hash).await; + update_pointer(&entropy_api, &one.pair(), &one.pair(), program_hash).await.unwrap(); generic_msg.timestamp = SystemTime::now(); let test_user_res = submit_transaction_requests(validator_ips_and_keys.clone(), generic_msg.clone(), one).await; @@ -784,7 +785,7 @@ async fn test_sign_tx_user_participates() { let program_hash = update_programs(&entropy_api, &two.pair(), TEST_PROGRAM_WASM_BYTECODE.to_owned()).await; - update_pointer(&entropy_api, &one.pair(), &one.pair(), program_hash).await; + update_pointer(&entropy_api, &one.pair(), &one.pair(), program_hash).await.unwrap(); let validators_info = vec![ ValidatorInfo { diff --git a/crypto/server/tests/protocol_wasm.rs b/crypto/server/tests/protocol_wasm.rs index 654faf318..87124289d 100644 --- a/crypto/server/tests/protocol_wasm.rs +++ b/crypto/server/tests/protocol_wasm.rs @@ -64,7 +64,7 @@ async fn test_wasm_sign_tx_user_participates() { update_program(&entropy_api, &dave.pair(), TEST_PROGRAM_WASM_BYTECODE.to_owned()) .await .unwrap(); - let _ = update_pointer(&entropy_api, &one.pair(), &one.pair(), program_hash).await; + update_pointer(&entropy_api, &one.pair(), &one.pair(), program_hash).await.unwrap(); let validators_info = vec![ ValidatorInfo { diff --git a/crypto/server/tests/sign.rs b/crypto/server/tests/sign.rs index 519e9b9dd..a4fbb42b3 100644 --- a/crypto/server/tests/sign.rs +++ b/crypto/server/tests/sign.rs @@ -36,13 +36,14 @@ async fn integration_test_sign() { .await .unwrap(); - let _ = test_client::update_pointer( + test_client::update_pointer( &api, &pre_registered_user.pair(), &pre_registered_user.pair(), program_hash, ) - .await; + .await + .unwrap(); let message_should_succeed_hash = Hasher::keccak(PREIMAGE_SHOULD_SUCCEED); @@ -85,13 +86,14 @@ async fn integration_test_sign_private() { .await .unwrap(); - let _ = test_client::update_pointer( + test_client::update_pointer( &api, &pre_registered_user.pair(), &pre_registered_user.pair(), program_hash, ) - .await; + .await + .unwrap(); let message_should_succeed_hash = Hasher::keccak(PREIMAGE_SHOULD_SUCCEED); From 886412fc9d00c73dfdfae0467336373ca854c21f Mon Sep 17 00:00:00 2001 From: Jesse Abramowitz Date: Wed, 13 Dec 2023 13:05:11 -0500 Subject: [PATCH 47/48] fix benchmarks --- pallets/relayer/src/benchmarking.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pallets/relayer/src/benchmarking.rs b/pallets/relayer/src/benchmarking.rs index 61094ff21..22ddeba72 100644 --- a/pallets/relayer/src/benchmarking.rs +++ b/pallets/relayer/src/benchmarking.rs @@ -8,7 +8,7 @@ use frame_support::{ BoundedVec, }; use frame_system::{EventRecord, RawOrigin}; -use pallet_programs::{Bytecode, ProgramInfo}; +use pallet_programs::{ProgramInfo, Programs}; use pallet_staking_extension::{ benchmarking::create_validators, IsValidatorSynced, ServerInfo, SigningGroups, ThresholdServers, ThresholdToStash, From dca6cc259d524fcd769ef85604a84bde46fce1b6 Mon Sep 17 00:00:00 2001 From: JesseAbram <33698952+JesseAbram@users.noreply.github.com> Date: Wed, 13 Dec 2023 10:10:58 -0800 Subject: [PATCH 48/48] Update CHANGELOG.md Co-authored-by: Hernando Castano --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ed78c488..e0960d955 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,6 @@ At the moment this project **does not** adhere to ### Added - Pointer for Programs ([#536](https://github.com/entropyxyz/entropy-core/pull/536/)) - ## [0.0.9](https://github.com/entropyxyz/entropy-core/compare/release/v0.0.8..release/v0.0.9) - 2023-11-30 Some of the noteworthy changes related to this release are related to better integration in Web