From 2e942c88e6ccff2c478ee508a8193733d8e6d43a Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Tue, 26 Dec 2023 18:41:15 +0300 Subject: [PATCH 01/56] [substrate-apply] bioauth-keys: Keystore overhaul (#13615) --- crates/bioauth-keys/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/bioauth-keys/src/lib.rs b/crates/bioauth-keys/src/lib.rs index 13f230632..cb87fc887 100644 --- a/crates/bioauth-keys/src/lib.rs +++ b/crates/bioauth-keys/src/lib.rs @@ -3,7 +3,7 @@ use std::marker::PhantomData; use sp_application_crypto::{AppKey, CryptoTypePublicPair}; -use sp_keystore::SyncCryptoStorePtr; +use sp_keystore::KeystorePtr; pub mod traits; @@ -19,7 +19,7 @@ pub trait KeySelector { /// Extracts a public key of a certain type from the keystore. pub struct KeyExtractor { /// Keystore to extract author. - keystore: SyncCryptoStorePtr, + keystore: KeystorePtr, /// The validator key selector. selector: Selector, /// The identity type. @@ -42,7 +42,7 @@ pub enum KeyExtractorError { impl KeyExtractor { /// Create a new [`KeyExtractor`]. - pub fn new(keystore: SyncCryptoStorePtr, selector: Selector) -> Self { + pub fn new(keystore: KeystorePtr, selector: Selector) -> Self { Self { keystore, selector, @@ -62,7 +62,7 @@ where fn extract_key(&self) -> Result, Self::Error> { let keystore_ref = self.keystore.as_ref(); - let crypto_type_public_pairs = sp_keystore::SyncCryptoStore::keys(keystore_ref, Id::ID) + let crypto_type_public_pairs = sp_keystore::KeystorePtr::keys(keystore_ref, Id::ID) .map_err(KeyExtractorError::Keystore)?; let matching_crypto_public_keys = crypto_type_public_pairs.into_iter().filter_map( From 91226d82cfa9ee52dbec0cfe05a72e1a60ac59f9 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Thu, 28 Dec 2023 17:24:12 +0300 Subject: [PATCH 02/56] [substrate-apply] bioauth-keys: Keystore overhaul (final) #13683 --- crates/bioauth-keys/src/lib.rs | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/crates/bioauth-keys/src/lib.rs b/crates/bioauth-keys/src/lib.rs index cb87fc887..44e2c5934 100644 --- a/crates/bioauth-keys/src/lib.rs +++ b/crates/bioauth-keys/src/lib.rs @@ -2,7 +2,7 @@ use std::marker::PhantomData; -use sp_application_crypto::{AppKey, CryptoTypePublicPair}; +use sp_application_crypto::AppCrypto; use sp_keystore::KeystorePtr; pub mod traits; @@ -53,34 +53,23 @@ impl KeyExtractor { impl traits::KeyExtractor for KeyExtractor where - Id: for<'a> TryFrom<&'a [u8]> + AppKey, + Id: for<'a> TryFrom<&'a [u8]> + AppCrypto, Selector: KeySelector, { type Error = KeyExtractorError; type PublicKeyType = Id; fn extract_key(&self) -> Result, Self::Error> { - let keystore_ref = self.keystore.as_ref(); - - let crypto_type_public_pairs = sp_keystore::KeystorePtr::keys(keystore_ref, Id::ID) - .map_err(KeyExtractorError::Keystore)?; - - let matching_crypto_public_keys = crypto_type_public_pairs.into_iter().filter_map( - |CryptoTypePublicPair(crypto_type_id, public_key)| { - if crypto_type_id == Id::CRYPTO_ID { - Some(public_key) - } else { - None - } - }, - ); - - let matching_keys = - matching_crypto_public_keys.filter_map(|bytes| Id::try_from(&bytes).ok()); + let public_keys = self + .keystore + .keys(Id::ID) + .map_err(KeyExtractorError::Keystore)? + .into_iter() + .filter_map(|bytes| Id::try_from(&bytes).ok()); let key = self .selector - .select_key(matching_keys) + .select_key(public_keys) .map_err(KeyExtractorError::Selector)?; Ok(key) From 949f8564034dcfba2e21baedbabe5a583ac32f4c Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Thu, 28 Dec 2023 17:46:19 +0300 Subject: [PATCH 03/56] [substrate-apply] precompile-currency-swap Deprecate Currency; introduce holds and freezing into fungible traits #12951 --- crates/precompile-currency-swap/src/lib.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/precompile-currency-swap/src/lib.rs b/crates/precompile-currency-swap/src/lib.rs index cd500d8a9..ecb6ab715 100644 --- a/crates/precompile-currency-swap/src/lib.rs +++ b/crates/precompile-currency-swap/src/lib.rs @@ -5,7 +5,10 @@ use frame_support::{ sp_runtime, sp_std::{marker::PhantomData, prelude::*}, - traits::{fungible::Inspect, tokens::currency::Currency}, + traits::{ + fungible::Inspect, + tokens::{currency::Currency, Provenance}, + }, }; use pallet_evm::{ ExitError, ExitRevert, Precompile, PrecompileFailure, PrecompileHandle, PrecompileOutput, @@ -124,7 +127,7 @@ where } let estimated_swapped_balance = CurrencySwapT::estimate_swapped_balance(value); - CurrencySwapT::To::can_deposit(&to, estimated_swapped_balance, false) + CurrencySwapT::To::can_deposit(&to, estimated_swapped_balance, Provenance::Extant) .into_result() .map_err(|error| match error { sp_runtime::DispatchError::Token(sp_runtime::TokenError::BelowMinimum) => { @@ -144,7 +147,7 @@ where frame_support::traits::ExistenceRequirement::AllowDeath, ) .map_err(|error| match error { - sp_runtime::DispatchError::Token(sp_runtime::TokenError::NoFunds) => { + sp_runtime::DispatchError::Token(sp_runtime::TokenError::FundsUnavailable) => { PrecompileFailure::Error { exit_status: ExitError::OutOfFund, } From 7f5eaef811d7e6c62e4f30f6dbf2eee3df5425f8 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Thu, 28 Dec 2023 17:49:25 +0300 Subject: [PATCH 04/56] [substrate-apply] precompile-native-currency Deprecate Currency; introduce holds and freezing into fungible traits #12951 --- crates/precompile-native-currency/src/lib.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/precompile-native-currency/src/lib.rs b/crates/precompile-native-currency/src/lib.rs index 98ba02956..ef998901c 100644 --- a/crates/precompile-native-currency/src/lib.rs +++ b/crates/precompile-native-currency/src/lib.rs @@ -411,9 +411,11 @@ fn process_dispatch_error( } } else { match error { - DispatchError::Token(sp_runtime::TokenError::NoFunds) => PrecompileFailure::Error { - exit_status: ExitError::OutOfFund, - }, + DispatchError::Token(sp_runtime::TokenError::FundsUnavailable) => { + PrecompileFailure::Error { + exit_status: ExitError::OutOfFund, + } + } _ => PrecompileFailure::Error { exit_status: ExitError::Other("unable to transfer funds".into()), }, From 5fbc8cbf04ea8a67c2b198ea0d2a1747d97edf6b Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Thu, 28 Dec 2023 17:51:10 +0300 Subject: [PATCH 05/56] [substrate-apply] pallet-currency-swap Deprecate Currency; introduce holds and freezing into fungible traits #12951 --- crates/pallet-currency-swap/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/pallet-currency-swap/src/lib.rs b/crates/pallet-currency-swap/src/lib.rs index a7fa25ccc..338364464 100644 --- a/crates/pallet-currency-swap/src/lib.rs +++ b/crates/pallet-currency-swap/src/lib.rs @@ -2,7 +2,7 @@ #![cfg_attr(not(feature = "std"), no_std)] -use frame_support::traits::{fungible::Inspect, Currency}; +use frame_support::traits::{fungible::Inspect, tokens::Provenance, Currency}; pub use pallet::*; use primitives_currency_swap::CurrencySwap as CurrencySwapT; pub use weights::*; @@ -140,7 +140,8 @@ pub mod pallet { existence_requirement: ExistenceRequirement, ) -> DispatchResult { let estimated_swapped_balance = T::CurrencySwap::estimate_swapped_balance(amount); - ToCurrencyOf::::can_deposit(&to, estimated_swapped_balance, false).into_result()?; + ToCurrencyOf::::can_deposit(&to, estimated_swapped_balance, Provenance::Extant) + .into_result()?; let withdrawed_imbalance = FromCurrencyOf::::withdraw( &who, From 0001ff748074ac52581c0e041f7057e62f5c9e5a Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Thu, 28 Dec 2023 18:04:06 +0300 Subject: [PATCH 06/56] [substrate-apply] humanode-runtime: Keystore overhaul (final) (#13683) --- crates/humanode-runtime/src/lib.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/humanode-runtime/src/lib.rs b/crates/humanode-runtime/src/lib.rs index 8cd02a947..75fa2a3c6 100644 --- a/crates/humanode-runtime/src/lib.rs +++ b/crates/humanode-runtime/src/lib.rs @@ -1121,7 +1121,9 @@ impl_runtime_apis! { session_keys: Vec ) -> Result<::Extrinsic, author_ext_api::CreateSignedSetKeysExtrinsicError> { let account_id = - AccountId::new(::UntypedGeneric::from(id.clone()).0); + AccountId::new( + <::Public as sp_application_crypto::AppPublic>::Generic::from(id.clone()).0 + ); let public_id = ::Public, ::Signature @@ -1145,7 +1147,9 @@ impl_runtime_apis! { impl bioauth_flow_api::BioauthFlowApi for Runtime { fn bioauth_status(id: &KeystoreBioauthAccountId) -> bioauth_flow_api::BioauthStatus { let id = - AccountId::new(::UntypedGeneric::from(id.clone()).0); + AccountId::new( + <::Public as sp_application_crypto::AppPublic>::Generic::from(id.clone()).0 + ); let active_authentications = Bioauth::active_authentications().into_inner(); let maybe_active_authentication = active_authentications .iter() From f21e2834fbc1a670b2839e5613eda8535cba2487 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Thu, 28 Dec 2023 18:10:11 +0300 Subject: [PATCH 07/56] [substrate-apply] humanode-runtime: Metadata V15: Expose API to fetch metadata for version (#13287) --- crates/humanode-runtime/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/humanode-runtime/src/lib.rs b/crates/humanode-runtime/src/lib.rs index 75fa2a3c6..9df3ac6c7 100644 --- a/crates/humanode-runtime/src/lib.rs +++ b/crates/humanode-runtime/src/lib.rs @@ -1075,6 +1075,14 @@ impl_runtime_apis! { fn metadata() -> OpaqueMetadata { OpaqueMetadata::new(Runtime::metadata().into()) } + + fn metadata_at_version(version: u32) -> Option { + Runtime::metadata_at_version(version) + } + + fn metadata_versions() -> sp_std::vec::Vec { + Runtime::metadata_versions() + } } impl sp_block_builder::BlockBuilder for Runtime { From 1c0fcdede51a49b72c5db2ddf295603387423a54 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Thu, 28 Dec 2023 18:19:13 +0300 Subject: [PATCH 08/56] Derive TypeInfo for EvaluationError at pallet-vesting --- crates/pallet-vesting/src/api.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/pallet-vesting/src/api.rs b/crates/pallet-vesting/src/api.rs index d6f5a2dbe..531667f22 100644 --- a/crates/pallet-vesting/src/api.rs +++ b/crates/pallet-vesting/src/api.rs @@ -2,9 +2,10 @@ use codec::{Decode, Encode}; use frame_support::sp_runtime::DispatchError; +use scale_info::TypeInfo; /// An error that can occur while evaluating the lock logic. -#[derive(Debug, Encode, Decode, PartialEq, Eq)] +#[derive(Debug, Encode, Decode, PartialEq, Eq, TypeInfo)] pub enum EvaluationError { /// No vesting is found for the given account. NoVesting, From a36da7dc456475a449a116d9413accebb77b0bf5 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Thu, 28 Dec 2023 18:26:22 +0300 Subject: [PATCH 09/56] [substrate-apply] humanode-runtime:weights:pallet_balances Deprecate Currency; introduce holds and freezing into fungible traits #12951 --- crates/humanode-runtime/src/weights/pallet_balances.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/humanode-runtime/src/weights/pallet_balances.rs b/crates/humanode-runtime/src/weights/pallet_balances.rs index 4ab57445a..d447b0bd5 100644 --- a/crates/humanode-runtime/src/weights/pallet_balances.rs +++ b/crates/humanode-runtime/src/weights/pallet_balances.rs @@ -11,7 +11,7 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_balances`. pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { - fn transfer() -> Weight { + fn transfer_allow_death() -> Weight { // Minimum execution time: 37_000 nanoseconds. Weight::from_parts(37_000_000, 0) .saturating_add(T::DbWeight::get().reads(2)) @@ -23,13 +23,13 @@ impl pallet_balances::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - fn set_balance_creating() -> Weight { + fn force_set_balance_creating() -> Weight { // Minimum execution time: 20_000 nanoseconds. Weight::from_parts(20_000_000, 0) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - fn set_balance_killing() -> Weight { + fn force_set_balance_killing() -> Weight { // Minimum execution time: 21_000 nanoseconds. Weight::from_parts(21_000_000, 0) .saturating_add(T::DbWeight::get().reads(1)) @@ -53,4 +53,7 @@ impl pallet_balances::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + fn upgrade_accounts(u: u32, ) -> Weight { + todo!() + } } From 5dd6b3291c1a9e051dc35fd7ae5d08fc6c49867e Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Fri, 29 Dec 2023 12:56:23 +0300 Subject: [PATCH 10/56] Draft addition of fungible related traits for currency type at pallet-pot --- crates/pallet-pot/src/lib.rs | 55 ++++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/crates/pallet-pot/src/lib.rs b/crates/pallet-pot/src/lib.rs index 55dd2f0d7..730f5d2fd 100644 --- a/crates/pallet-pot/src/lib.rs +++ b/crates/pallet-pot/src/lib.rs @@ -5,7 +5,10 @@ #![cfg_attr(not(feature = "std"), no_std)] -use frame_support::traits::{Imbalance, OnUnbalanced, StorageVersion}; +use frame_support::traits::{ + fungible::{Balanced, Credit, Inspect, Mutate, Unbalanced}, + Imbalance, OnUnbalanced, StorageVersion, +}; use frame_support::{pallet_prelude::*, traits::Currency, PalletId}; use frame_system::pallet_prelude::*; use sp_runtime::traits::{AccountIdConversion, CheckedSub, MaybeDisplay, Saturating}; @@ -17,11 +20,14 @@ const STORAGE_VERSION: StorageVersion = StorageVersion::new(0); /// The balance of accessor for the currency. pub type BalanceOf = - <>::Currency as Currency<>::AccountId>>::Balance; + <>::FungibleAsset as Currency<>::AccountId>>::Balance; /// The negative implanace accessor. pub type NegativeImbalanceOf = - <>::Currency as Currency<>::AccountId>>::NegativeImbalance; + <>::FungibleAsset as Currency<>::AccountId>>::NegativeImbalance; + +/// The credit accessor. +pub type CreditOf = Credit<>::AccountId, >::FungibleAsset>; /// The initial state of the pot, for use in genesis. #[cfg(feature = "std")] @@ -63,8 +69,12 @@ pub mod pallet { + Ord + MaxEncodedLen; - /// The currency to operate with. - type Currency: Currency<>::AccountId>; + /// The fungible asset to operate with. + type FungibleAsset: Currency<>::AccountId> + + Inspect<>::AccountId, Balance = BalanceOf> + + Balanced<>::AccountId, Balance = BalanceOf> + + Unbalanced<>::AccountId, Balance = BalanceOf> + + Mutate<>::AccountId, Balance = BalanceOf>; /// The pot's pallet id, used for deriving its sovereign account ID. #[pallet::constant] @@ -127,20 +137,20 @@ pub mod pallet { // Just pass though. } InitialState::Initialized => { - let current = T::Currency::free_balance(&account_id); - let min = T::Currency::minimum_balance(); + let current = T::FungibleAsset::balance(&account_id); + let min = >::minimum_balance(); assert!( current >= min, "the initial pot balance must be greater or equal than the existential balance" ); } InitialState::Balance { balance } => { - let min = T::Currency::minimum_balance(); + let min = >::minimum_balance(); assert!( balance >= min, "the configured initial pot balance must be greater or equal than the existential balance" ); - let _ = T::Currency::make_free_balance_be(&account_id, balance); + let _ = T::FungibleAsset::set_balance(&account_id, balance); } } } @@ -159,9 +169,9 @@ impl, I: 'static> Pallet { // The existential deposit (`minimum_balance`) is not part of // the pot so the pot account never gets killed. pub fn balance() -> BalanceOf { - T::Currency::free_balance(&Self::account_id()) + T::FungibleAsset::balance(&Self::account_id()) // Must never be less than 0 but better be safe. - .saturating_sub(T::Currency::minimum_balance()) + .saturating_sub(>::minimum_balance()) } /// Update the inactive supply for this pot. @@ -169,17 +179,17 @@ impl, I: 'static> Pallet { /// This function uses the whole balance of the account, unlike [`Self::balance`], /// which subtracts the existential balance. fn update_inactive() -> Weight { - let balance = T::Currency::free_balance(&Self::account_id()); + let balance = T::FungibleAsset::balance(&Self::account_id()); let current = Inactive::::get(); let mut weight = T::DbWeight::get().reads(2); if balance != current { if let Some(delta) = balance.checked_sub(¤t) { - T::Currency::deactivate(delta) + >::deactivate(delta) } if let Some(delta) = current.checked_sub(&balance) { - T::Currency::reactivate(delta) + >::reactivate(delta) } Inactive::::put(balance); @@ -195,10 +205,25 @@ impl, I: 'static> OnUnbalanced> for Palle let numeric_amount = amount.peek(); // Must resolve into existing but better to be safe. - T::Currency::resolve_creating(&Self::account_id(), amount); + T::FungibleAsset::resolve_creating(&Self::account_id(), amount); Self::deposit_event(Event::Deposit { value: numeric_amount, }); } } + +pub struct OnUnbalancedOverCredit(Pallet); + +impl, I: 'static> OnUnbalanced> for OnUnbalancedOverCredit { + fn on_nonzero_unbalanced(amount: CreditOf) { + let numeric_amount = amount.peek(); + + T::FungibleAsset::resolve(&Pallet::::account_id(), amount); + T::FungibleAsset::done_deposit(&Pallet::::account_id(), numeric_amount); + + Pallet::::deposit_event(Event::Deposit { + value: numeric_amount, + }); + } +} From a760c7c798ca4e5920eb6d684c8aa7c50ce3037e Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Mon, 8 Jan 2024 12:36:24 +0300 Subject: [PATCH 11/56] [substrate-apply] humanode-rpc: Keystore overhaul (#13615) --- crates/humanode-rpc/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/humanode-rpc/src/lib.rs b/crates/humanode-rpc/src/lib.rs index 512f1e2e4..fc38dda97 100644 --- a/crates/humanode-rpc/src/lib.rs +++ b/crates/humanode-rpc/src/lib.rs @@ -40,7 +40,7 @@ use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata}; use sp_consensus::SelectChain; use sp_consensus_babe::BabeApi; use sp_core::H256; -use sp_keystore::SyncCryptoStorePtr; +use sp_keystore::KeystorePtr; /// Extra dependencies for `AuthorExt`. pub struct AuthorExtDeps { @@ -65,7 +65,7 @@ pub struct BabeDeps { /// BABE pending epoch changes. pub babe_shared_epoch_changes: SharedEpochChanges, /// The keystore that manages the keys of the node. - pub keystore: SyncCryptoStorePtr, + pub keystore: KeystorePtr, } /// Extra dependencies for GRANDPA. From 6847379c72203405048b69d24bef5647d0d54fd7 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Mon, 8 Jan 2024 12:40:56 +0300 Subject: [PATCH 12/56] [substrate-apply] humanode-rpc: babe: replace usage of SharedEpochChanges with internal RPC (#13883) --- crates/humanode-rpc/src/lib.rs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/crates/humanode-rpc/src/lib.rs b/crates/humanode-rpc/src/lib.rs index fc38dda97..296423317 100644 --- a/crates/humanode-rpc/src/lib.rs +++ b/crates/humanode-rpc/src/lib.rs @@ -21,9 +21,8 @@ use sc_client_api::{ client::BlockchainEvents, BlockBackend, }; -use sc_consensus_babe::{BabeConfiguration, Epoch}; +use sc_consensus_babe::BabeWorkerHandle; use sc_consensus_babe_rpc::{Babe, BabeApiServer}; -use sc_consensus_epochs::SharedEpochChanges; use sc_consensus_grandpa::{ FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState, }; @@ -60,10 +59,8 @@ pub struct BioauthDeps { /// Extra dependencies for BABE. pub struct BabeDeps { - /// BABE protocol config. - pub babe_config: BabeConfiguration, - /// BABE pending epoch changes. - pub babe_shared_epoch_changes: SharedEpochChanges, + /// A handle to the BABE worker for issuing requests. + pub babe_worker_handle: BabeWorkerHandle, /// The keystore that manages the keys of the node. pub keystore: KeystorePtr, } @@ -218,8 +215,7 @@ where let BabeDeps { keystore, - babe_config, - babe_shared_epoch_changes, + babe_worker_handle, } = babe; let GrandpaDeps { @@ -259,9 +255,8 @@ where io.merge( Babe::new( Arc::clone(&client), - babe_shared_epoch_changes, + babe_worker_handle, keystore, - babe_config, select_chain, deny_unsafe, ) From 425f36d310c1845f40df1b8b7f46cbc25c5a194a Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Mon, 8 Jan 2024 13:07:03 +0300 Subject: [PATCH 13/56] [substrate-apply] humanode-peer: Keystore overhaul (#13615) --- .../src/cli/subcommand/bioauth/key/insert.rs | 15 +++++++-------- crates/humanode-peer/src/service/mod.rs | 18 +++++++++--------- crates/humanode-peer/src/validator_key.rs | 11 +++++------ 3 files changed, 21 insertions(+), 23 deletions(-) diff --git a/crates/humanode-peer/src/cli/subcommand/bioauth/key/insert.rs b/crates/humanode-peer/src/cli/subcommand/bioauth/key/insert.rs index 4c4cec456..8c8056cb4 100644 --- a/crates/humanode-peer/src/cli/subcommand/bioauth/key/insert.rs +++ b/crates/humanode-peer/src/cli/subcommand/bioauth/key/insert.rs @@ -4,9 +4,9 @@ use std::sync::Arc; use sc_cli::{utils, CliConfiguration, KeystoreParams, SharedParams}; use sc_service::KeystoreContainer; -use sp_application_crypto::{AppKey, AppPublic}; +use sp_application_crypto::{AppCrypto, AppPublic}; use sp_core::Pair; -use sp_keystore::CryptoStore; +use sp_keystore::Keystore; use super::KeystoreBioauthId; use crate::cli::CliConfigurationExt; @@ -40,7 +40,7 @@ pub enum InsertKeyError { /// A helper function to verify that there is no bioauth key at the keystore yet. pub async fn ensure_bioauth_key_absent( - keystore: Arc, + keystore: Arc, ) -> Result<(), InsertKeyError> { let mut current_keys = crate::validator_key::AppCryptoPublic::::list(keystore.as_ref()) .await @@ -55,15 +55,14 @@ pub async fn ensure_bioauth_key_absent( /// A helper function to insert bioauth key into the keystore. pub async fn insert_bioauth_key( suri: &str, - keystore: Arc, + keystore: Arc, ) -> sc_cli::Result<()> { // We don't use a password for keystore at the current moment. That's why None is passed. - let pair = utils::pair_from_suri::<::Pair>(suri, None)?; + let pair = utils::pair_from_suri::<::Pair>(suri, None)?; let public = pair.public().as_ref().to_vec(); keystore - .insert_unknown(PK::ID, suri, &public[..]) - .await - .map_err(|_| sc_cli::Error::KeyStoreOperation)?; + .insert(PK::ID, suri, &public[..]) + .map_err(|_| sc_cli::Error::KeystoreOperation)?; Ok(()) } diff --git a/crates/humanode-peer/src/service/mod.rs b/crates/humanode-peer/src/service/mod.rs index dd99185bf..a016ce3f7 100644 --- a/crates/humanode-peer/src/service/mod.rs +++ b/crates/humanode-peer/src/service/mod.rs @@ -273,7 +273,7 @@ pub async fn new_full(config: Configuration) -> Result = None; @@ -297,7 +297,7 @@ pub async fn new_full(config: Configuration) -> Result::new( - keystore_container.sync_keystore(), + keystore_container.keystore(), bioauth_keys::OneOfOneSelector, )); @@ -358,7 +358,7 @@ pub async fn new_full(config: Configuration) -> Result Result Result Result Result( +fn init_dev_bioauth_keystore_keys( keystore: &Keystore, seed: Option<&str>, ) -> Result<(), sp_keystore::Error> { if let Some(seed) = seed { - use sp_application_crypto::AppKey; - let _public = sp_keystore::SyncCryptoStore::sr25519_generate_new( + use sp_application_crypto::AppCrypto; + let _public = sp_keystore::Keystore::sr25519_generate_new( keystore, KeystoreBioauthId::ID, Some(seed), diff --git a/crates/humanode-peer/src/validator_key.rs b/crates/humanode-peer/src/validator_key.rs index 922a58247..f858798f7 100644 --- a/crates/humanode-peer/src/validator_key.rs +++ b/crates/humanode-peer/src/validator_key.rs @@ -4,7 +4,7 @@ use std::{fmt::Display, sync::Arc}; use bioauth_flow_rpc::Signer; use sp_application_crypto::{AppPublic, CryptoTypePublicPair}; -use sp_keystore::CryptoStore; +use sp_keystore::Keystore; /// The validator public key implementation using the app crypto public key. #[derive(Clone)] @@ -13,14 +13,14 @@ pub struct AppCryptoPublic(pub T); /// The validator signer implementation using the keystore and app crypto public key. pub struct AppCryptoSigner { /// The keystore to use for signing. - pub keystore: Arc, + pub keystore: Arc, /// The public key to provide the signature for. pub public_key: AppCryptoPublic, } impl AppCryptoSigner { /// Create a new [`AppCryptoSigner`]. - pub fn new(keystore: Arc, public_key: AppCryptoPublic) -> Self { + pub fn new(keystore: Arc, public_key: AppCryptoPublic) -> Self { Self { keystore, public_key, @@ -54,7 +54,6 @@ where let outcome = self .keystore .sign_with(PK::ID, &self.public_key.0.to_public_crypto_pair(), data) - .await .map_err(SignerError::Keystore)?; outcome.ok_or(SignerError::NoSignature) @@ -76,9 +75,9 @@ where { /// List all public keys in the keystore. pub async fn list( - keystore: &dyn CryptoStore, + keystore: &dyn Keystore, ) -> Result, sp_keystore::Error> { - let crypto_type_public_pairs = keystore.keys(T::ID).await?; + let crypto_type_public_pairs = keystore.keys(T::ID)?; let filtered = crypto_type_public_pairs.into_iter().filter_map( |CryptoTypePublicPair(crypto_type, public_key)| { if crypto_type == T::CRYPTO_ID { From 6c6df1a9da5dae543d07d14e359c66df8a42aa10 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Mon, 8 Jan 2024 13:13:10 +0300 Subject: [PATCH 14/56] [substrate-apply] humanode-peer: babe: replace usage of SharedEpochChanges with internal RPC (#13883) --- crates/humanode-peer/src/service/mod.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/crates/humanode-peer/src/service/mod.rs b/crates/humanode-peer/src/service/mod.rs index a016ce3f7..3d328b6ac 100644 --- a/crates/humanode-peer/src/service/mod.rs +++ b/crates/humanode-peer/src/service/mod.rs @@ -97,6 +97,7 @@ pub fn new_partial( sc_transaction_pool::FullPool, ( sc_consensus_grandpa::LinkHalf, + sc_consensus_babe::BabeWorkerHandle, sc_consensus_babe::BabeLink, EffectiveFullBlockImport, inherents::Creator, @@ -185,7 +186,7 @@ pub fn new_partial( time_warp: time_warp_config.clone(), }; - let import_queue = sc_consensus_babe::import_queue( + let (import_queue, babe_worker_handle) = sc_consensus_babe::import_queue( babe_link.clone(), frontier_block_import.clone(), Some(Box::new(grandpa_block_import)), @@ -206,6 +207,7 @@ pub fn new_partial( transaction_pool, other: ( grandpa_link, + babe_worker_handle, babe_link, frontier_block_import, inherent_data_providers_creator, @@ -229,6 +231,7 @@ pub async fn new_full(config: Configuration) -> Result Result Result Date: Mon, 8 Jan 2024 13:27:13 +0300 Subject: [PATCH 15/56] [substrate-apply]: humanode-peer: refactor(sc-executor): use wasm executor builder instead of old apis #13740 --- crates/humanode-peer/src/service/mod.rs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/crates/humanode-peer/src/service/mod.rs b/crates/humanode-peer/src/service/mod.rs index 3d328b6ac..eb55063fa 100644 --- a/crates/humanode-peer/src/service/mod.rs +++ b/crates/humanode-peer/src/service/mod.rs @@ -73,12 +73,7 @@ type FrontierBackend = fc_db::Backend; pub fn keystore_container( config: &Configuration, ) -> Result<(KeystoreContainer, TaskManager), ServiceError> { - let executor = Executor::new( - config.substrate.wasm_method, - config.substrate.default_heap_pages, - config.substrate.max_runtime_instances, - config.substrate.runtime_cache_size, - ); + let executor = sc_service::new_native_or_wasm_executor::(&config.substrate); let (_client, _backend, keystore_container, task_manager) = sc_service::new_full_parts::(&config.substrate, None, executor)?; @@ -125,12 +120,7 @@ pub fn new_partial( }) .transpose()?; - let executor = Executor::new( - config.wasm_method, - config.default_heap_pages, - config.max_runtime_instances, - config.runtime_cache_size, - ); + let executor = sc_service::new_native_or_wasm_executor(&config); let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts::( From 2e5c5a216622c1eee4125c1a35d0d23ab745e63d Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Mon, 8 Jan 2024 16:20:16 +0300 Subject: [PATCH 16/56] [substrate-apply] humanode-peer: Keystore overhaul (final) (#13683) --- crates/humanode-peer/src/validator_key.rs | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/crates/humanode-peer/src/validator_key.rs b/crates/humanode-peer/src/validator_key.rs index f858798f7..5818189d2 100644 --- a/crates/humanode-peer/src/validator_key.rs +++ b/crates/humanode-peer/src/validator_key.rs @@ -3,7 +3,7 @@ use std::{fmt::Display, sync::Arc}; use bioauth_flow_rpc::Signer; -use sp_application_crypto::{AppPublic, CryptoTypePublicPair}; +use sp_application_crypto::AppPublic; use sp_keystore::Keystore; /// The validator public key implementation using the app crypto public key. @@ -53,7 +53,7 @@ where let data = data.as_ref(); let outcome = self .keystore - .sign_with(PK::ID, &self.public_key.0.to_public_crypto_pair(), data) + .sign_with(PK::ID, PK::CRYPTO_ID, self.public_key.0.as_slice(), data) .map_err(SignerError::Keystore)?; outcome.ok_or(SignerError::NoSignature) @@ -78,18 +78,12 @@ where keystore: &dyn Keystore, ) -> Result, sp_keystore::Error> { let crypto_type_public_pairs = keystore.keys(T::ID)?; - let filtered = crypto_type_public_pairs.into_iter().filter_map( - |CryptoTypePublicPair(crypto_type, public_key)| { - if crypto_type == T::CRYPTO_ID { - match T::from_slice(&public_key) { - Ok(id) => Some(Self(id)), - Err(_) => None, - } - } else { - None - } - }, - ); + let filtered = crypto_type_public_pairs + .into_iter() + .filter_map(|public_key| match T::from_slice(&public_key) { + Ok(id) => Some(Self(id)), + Err(_) => None, + }); Ok(filtered) } } From af2fde7c5d36ff91e5531daf81dc59b2dcecf8fa Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Wed, 17 Jan 2024 16:17:41 +0300 Subject: [PATCH 17/56] Rename FungibleAsset back to Currency at pallet-pot --- crates/pallet-pot/src/lib.rs | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/crates/pallet-pot/src/lib.rs b/crates/pallet-pot/src/lib.rs index 730f5d2fd..7938e59fb 100644 --- a/crates/pallet-pot/src/lib.rs +++ b/crates/pallet-pot/src/lib.rs @@ -20,14 +20,14 @@ const STORAGE_VERSION: StorageVersion = StorageVersion::new(0); /// The balance of accessor for the currency. pub type BalanceOf = - <>::FungibleAsset as Currency<>::AccountId>>::Balance; + <>::Currency as Currency<>::AccountId>>::Balance; /// The negative implanace accessor. pub type NegativeImbalanceOf = - <>::FungibleAsset as Currency<>::AccountId>>::NegativeImbalance; + <>::Currency as Currency<>::AccountId>>::NegativeImbalance; /// The credit accessor. -pub type CreditOf = Credit<>::AccountId, >::FungibleAsset>; +pub type CreditOf = Credit<>::AccountId, >::Currency>; /// The initial state of the pot, for use in genesis. #[cfg(feature = "std")] @@ -70,7 +70,7 @@ pub mod pallet { + MaxEncodedLen; /// The fungible asset to operate with. - type FungibleAsset: Currency<>::AccountId> + type Currency: Currency<>::AccountId> + Inspect<>::AccountId, Balance = BalanceOf> + Balanced<>::AccountId, Balance = BalanceOf> + Unbalanced<>::AccountId, Balance = BalanceOf> @@ -137,20 +137,20 @@ pub mod pallet { // Just pass though. } InitialState::Initialized => { - let current = T::FungibleAsset::balance(&account_id); - let min = >::minimum_balance(); + let current = T::Currency::free_balance(&account_id); + let min = >::minimum_balance(); assert!( current >= min, "the initial pot balance must be greater or equal than the existential balance" ); } InitialState::Balance { balance } => { - let min = >::minimum_balance(); + let min = >::minimum_balance(); assert!( balance >= min, "the configured initial pot balance must be greater or equal than the existential balance" ); - let _ = T::FungibleAsset::set_balance(&account_id, balance); + let _ = T::Currency::make_free_balance_be(&account_id, balance); } } } @@ -169,9 +169,9 @@ impl, I: 'static> Pallet { // The existential deposit (`minimum_balance`) is not part of // the pot so the pot account never gets killed. pub fn balance() -> BalanceOf { - T::FungibleAsset::balance(&Self::account_id()) + T::Currency::balance(&Self::account_id()) // Must never be less than 0 but better be safe. - .saturating_sub(>::minimum_balance()) + .saturating_sub(>::minimum_balance()) } /// Update the inactive supply for this pot. @@ -179,17 +179,17 @@ impl, I: 'static> Pallet { /// This function uses the whole balance of the account, unlike [`Self::balance`], /// which subtracts the existential balance. fn update_inactive() -> Weight { - let balance = T::FungibleAsset::balance(&Self::account_id()); + let balance = T::Currency::free_balance(&Self::account_id()); let current = Inactive::::get(); let mut weight = T::DbWeight::get().reads(2); if balance != current { if let Some(delta) = balance.checked_sub(¤t) { - >::deactivate(delta) + >::deactivate(delta) } if let Some(delta) = current.checked_sub(&balance) { - >::reactivate(delta) + >::reactivate(delta) } Inactive::::put(balance); @@ -205,7 +205,7 @@ impl, I: 'static> OnUnbalanced> for Palle let numeric_amount = amount.peek(); // Must resolve into existing but better to be safe. - T::FungibleAsset::resolve_creating(&Self::account_id(), amount); + T::Currency::resolve_creating(&Self::account_id(), amount); Self::deposit_event(Event::Deposit { value: numeric_amount, @@ -219,8 +219,8 @@ impl, I: 'static> OnUnbalanced> for OnUnbalancedOver fn on_nonzero_unbalanced(amount: CreditOf) { let numeric_amount = amount.peek(); - T::FungibleAsset::resolve(&Pallet::::account_id(), amount); - T::FungibleAsset::done_deposit(&Pallet::::account_id(), numeric_amount); + T::Currency::resolve(&Pallet::::account_id(), amount); + T::Currency::done_deposit(&Pallet::::account_id(), numeric_amount); Pallet::::deposit_event(Event::Deposit { value: numeric_amount, From a2bbda892d7ecf8b10ddd4f6374d7d3d8b37e329 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Wed, 17 Jan 2024 16:28:53 +0300 Subject: [PATCH 18/56] Remove redundant trait deps at pallet-pot --- crates/pallet-pot/src/lib.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/crates/pallet-pot/src/lib.rs b/crates/pallet-pot/src/lib.rs index 7938e59fb..93b323dfd 100644 --- a/crates/pallet-pot/src/lib.rs +++ b/crates/pallet-pot/src/lib.rs @@ -6,7 +6,7 @@ #![cfg_attr(not(feature = "std"), no_std)] use frame_support::traits::{ - fungible::{Balanced, Credit, Inspect, Mutate, Unbalanced}, + fungible::{Balanced, Credit, Inspect}, Imbalance, OnUnbalanced, StorageVersion, }; use frame_support::{pallet_prelude::*, traits::Currency, PalletId}; @@ -71,10 +71,7 @@ pub mod pallet { /// The fungible asset to operate with. type Currency: Currency<>::AccountId> - + Inspect<>::AccountId, Balance = BalanceOf> - + Balanced<>::AccountId, Balance = BalanceOf> - + Unbalanced<>::AccountId, Balance = BalanceOf> - + Mutate<>::AccountId, Balance = BalanceOf>; + + Balanced<>::AccountId, Balance = BalanceOf>; /// The pot's pallet id, used for deriving its sovereign account ID. #[pallet::constant] From 3176d0b5879d2afe557af0fef766ff1d235870ad Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Wed, 17 Jan 2024 16:29:25 +0300 Subject: [PATCH 19/56] Fix partial index for extracting frontier backend --- crates/humanode-peer/src/cli/run.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/humanode-peer/src/cli/run.rs b/crates/humanode-peer/src/cli/run.rs index 5353507a1..24e2f506f 100644 --- a/crates/humanode-peer/src/cli/run.rs +++ b/crates/humanode-peer/src/cli/run.rs @@ -233,7 +233,7 @@ pub async fn run() -> sc_cli::Result<()> { let runner = root.create_humanode_runner(cmd)?; runner.sync_run(|config| { let partial = service::new_partial(&config)?; - let frontier_backend = match partial.other.4 { + let frontier_backend = match partial.other.5 { fc_db::Backend::KeyValue(kv_fb) => Arc::new(kv_fb), _ => { panic!("Only fc_db::Backend::KeyValue supported for FrontierDb command") From b31811cfcec3afe9ec34aa75dc9f946717c94e45 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Wed, 17 Jan 2024 16:32:35 +0300 Subject: [PATCH 20/56] Properly handle resolve operation --- crates/pallet-pot/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/pallet-pot/src/lib.rs b/crates/pallet-pot/src/lib.rs index 93b323dfd..325f2153d 100644 --- a/crates/pallet-pot/src/lib.rs +++ b/crates/pallet-pot/src/lib.rs @@ -216,7 +216,8 @@ impl, I: 'static> OnUnbalanced> for OnUnbalancedOver fn on_nonzero_unbalanced(amount: CreditOf) { let numeric_amount = amount.peek(); - T::Currency::resolve(&Pallet::::account_id(), amount); + // Pot account already exists. + let _ = T::Currency::resolve(&Pallet::::account_id(), amount); T::Currency::done_deposit(&Pallet::::account_id(), numeric_amount); Pallet::::deposit_event(Event::Deposit { From 733d1765cce4ffd73d2b778b64389f981375f84f Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Wed, 17 Jan 2024 16:37:02 +0300 Subject: [PATCH 21/56] Add docs for OnUnbalancedOverCredit at pallet-pot --- crates/pallet-pot/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/pallet-pot/src/lib.rs b/crates/pallet-pot/src/lib.rs index 325f2153d..0a8f626bd 100644 --- a/crates/pallet-pot/src/lib.rs +++ b/crates/pallet-pot/src/lib.rs @@ -210,6 +210,8 @@ impl, I: 'static> OnUnbalanced> for Palle } } +/// A helper to handle `OnUnbalanced` implementation over `CreditOf` +/// to avoid conflicting implmentation. pub struct OnUnbalancedOverCredit(Pallet); impl, I: 'static> OnUnbalanced> for OnUnbalancedOverCredit { From 4bbc61c8243180ad0678a7342047e5b40e5fbe84 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Wed, 17 Jan 2024 16:39:49 +0300 Subject: [PATCH 22/56] Mark unused variable --- crates/humanode-runtime/src/weights/pallet_balances.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/humanode-runtime/src/weights/pallet_balances.rs b/crates/humanode-runtime/src/weights/pallet_balances.rs index d447b0bd5..0115c02d0 100644 --- a/crates/humanode-runtime/src/weights/pallet_balances.rs +++ b/crates/humanode-runtime/src/weights/pallet_balances.rs @@ -53,7 +53,7 @@ impl pallet_balances::WeightInfo for WeightInfo { .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - fn upgrade_accounts(u: u32, ) -> Weight { + fn upgrade_accounts(_u: u32, ) -> Weight { todo!() } } From 0920dd9ca58336251add0f27d41ec933b8c534ff Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Wed, 7 Feb 2024 14:50:08 +0300 Subject: [PATCH 23/56] Fix mock and test at pallet-currency-swap --- crates/pallet-currency-swap/src/mock.rs | 4 ++ crates/pallet-currency-swap/src/tests.rs | 70 +++++++++++++++------ crates/precompile-currency-swap/src/mock.rs | 4 ++ 3 files changed, 58 insertions(+), 20 deletions(-) diff --git a/crates/pallet-currency-swap/src/mock.rs b/crates/pallet-currency-swap/src/mock.rs index d0f5b63ce..e76cf0a2e 100644 --- a/crates/pallet-currency-swap/src/mock.rs +++ b/crates/pallet-currency-swap/src/mock.rs @@ -75,7 +75,11 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ConstU64; type AccountStore = System; type MaxLocks = (); + type HoldIdentifier = (); + type FreezeIdentifier = (); type MaxReserves = (); + type MaxHolds = ConstU32<0>; + type MaxFreezes = ConstU32<0>; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); } diff --git a/crates/pallet-currency-swap/src/tests.rs b/crates/pallet-currency-swap/src/tests.rs index f7aba7d6d..2a97623b0 100644 --- a/crates/pallet-currency-swap/src/tests.rs +++ b/crates/pallet-currency-swap/src/tests.rs @@ -22,8 +22,11 @@ fn swap_works() { Balances::make_free_balance_be(&alice, alice_balance); // Check test preconditions. - assert_eq!(Balances::total_balance(&alice), alice_balance); - assert_eq!(EvmBalances::total_balance(&alice_evm), 0); + assert_eq!( + >::total_balance(&alice), + alice_balance + ); + assert_eq!(>::total_balance(&alice_evm), 0); // Set block number to enable events. System::set_block_number(1); @@ -55,10 +58,13 @@ fn swap_works() { // Assert state changes. assert_eq!( - Balances::total_balance(&alice), + >::total_balance(&alice), alice_balance - swap_balance ); - assert_eq!(EvmBalances::total_balance(&alice_evm), swap_balance); + assert_eq!( + >::total_balance(&alice_evm), + swap_balance + ); System::assert_has_event(RuntimeEvent::CurrencySwap(Event::BalancesSwapped { from: alice, withdrawed_amount: swap_balance, @@ -86,8 +92,11 @@ fn swap_works_kill_origin() { Balances::make_free_balance_be(&alice, alice_balance); // Check test preconditions. - assert_eq!(Balances::total_balance(&alice), alice_balance); - assert_eq!(EvmBalances::total_balance(&alice_evm), 0); + assert_eq!( + >::total_balance(&alice), + alice_balance + ); + assert_eq!(>::total_balance(&alice_evm), 0); // Set block number to enable events. System::set_block_number(1); @@ -119,7 +128,10 @@ fn swap_works_kill_origin() { // Assert state changes. assert!(!System::account_exists(&alice)); - assert_eq!(EvmBalances::total_balance(&alice_evm), swap_balance); + assert_eq!( + >::total_balance(&alice_evm), + swap_balance + ); System::assert_has_event(RuntimeEvent::CurrencySwap(Event::BalancesSwapped { from: alice, withdrawed_amount: swap_balance, @@ -146,8 +158,11 @@ fn swap_keep_alive_works() { Balances::make_free_balance_be(&alice, alice_balance); // Check test preconditions. - assert_eq!(Balances::total_balance(&alice), alice_balance); - assert_eq!(EvmBalances::total_balance(&alice_evm), 0); + assert_eq!( + >::total_balance(&alice), + alice_balance + ); + assert_eq!(>::total_balance(&alice_evm), 0); // Set block number to enable events. System::set_block_number(1); @@ -179,10 +194,13 @@ fn swap_keep_alive_works() { // Assert state changes. assert_eq!( - Balances::total_balance(&alice), + >::total_balance(&alice), alice_balance - swap_balance ); - assert_eq!(EvmBalances::total_balance(&alice_evm), swap_balance); + assert_eq!( + >::total_balance(&alice_evm), + swap_balance + ); System::assert_has_event(RuntimeEvent::CurrencySwap(Event::BalancesSwapped { from: alice, withdrawed_amount: swap_balance, @@ -236,8 +254,11 @@ fn swap_fails() { ); // Assert state changes. - assert_eq!(Balances::total_balance(&alice), alice_balance); - assert_eq!(EvmBalances::total_balance(&alice_evm), 0); + assert_eq!( + >::total_balance(&alice), + alice_balance + ); + assert_eq!(>::total_balance(&alice_evm), 0); // Assert mock invocations. estimate_swapped_balance_ctx.checkpoint(); @@ -275,8 +296,11 @@ fn swap_below_ed_fails() { ); // Assert state changes. - assert_eq!(Balances::total_balance(&alice), alice_balance); - assert_eq!(EvmBalances::total_balance(&alice_evm), 0); + assert_eq!( + >::total_balance(&alice), + alice_balance + ); + assert_eq!(>::total_balance(&alice_evm), 0); // Assert mock invocations. estimate_swapped_balance_ctx.checkpoint(); @@ -310,12 +334,15 @@ fn swap_keep_alive_fails() { // Invoke the function under test. assert_noop!( CurrencySwap::swap_keep_alive(RuntimeOrigin::signed(alice), alice_evm, swap_balance), - pallet_balances::Error::::KeepAlive + pallet_balances::Error::::Expendability ); // Assert state changes. - assert_eq!(Balances::total_balance(&alice), alice_balance); - assert_eq!(EvmBalances::total_balance(&alice_evm), 0); + assert_eq!( + >::total_balance(&alice), + alice_balance + ); + assert_eq!(>::total_balance(&alice_evm), 0); // Assert mock invocations. estimate_swapped_balance_ctx.checkpoint(); @@ -353,8 +380,11 @@ fn swap_keep_alive_below_ed_fails() { ); // Assert state changes. - assert_eq!(Balances::total_balance(&alice), alice_balance); - assert_eq!(EvmBalances::total_balance(&alice_evm), 0); + assert_eq!( + >::total_balance(&alice), + alice_balance + ); + assert_eq!(>::total_balance(&alice_evm), 0); // Assert mock invocations. estimate_swapped_balance_ctx.checkpoint(); diff --git a/crates/precompile-currency-swap/src/mock.rs b/crates/precompile-currency-swap/src/mock.rs index f556d8f74..32c5242d1 100644 --- a/crates/precompile-currency-swap/src/mock.rs +++ b/crates/precompile-currency-swap/src/mock.rs @@ -88,7 +88,11 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ConstU128<2>; // 2 because we test the account kills via 1 balance type AccountStore = System; type MaxLocks = (); + type HoldIdentifier = (); + type FreezeIdentifier = (); type MaxReserves = (); + type MaxHolds = ConstU32<0>; + type MaxFreezes = ConstU32<0>; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); } From 0dc8a28a38cf1aba335a04a2959dbf5d2e1304b4 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Wed, 7 Feb 2024 14:52:27 +0300 Subject: [PATCH 24/56] Fix tests at precompile-currency-swap --- crates/precompile-currency-swap/src/tests.rs | 195 +++++++++++++------ 1 file changed, 138 insertions(+), 57 deletions(-) diff --git a/crates/precompile-currency-swap/src/tests.rs b/crates/precompile-currency-swap/src/tests.rs index dfd7381d5..ff6f10b6c 100644 --- a/crates/precompile-currency-swap/src/tests.rs +++ b/crates/precompile-currency-swap/src/tests.rs @@ -32,8 +32,11 @@ fn swap_works() { EvmBalances::make_free_balance_be(&alice_evm, alice_evm_balance); // Check test preconditions. - assert_eq!(EvmBalances::total_balance(&alice_evm), alice_evm_balance); - assert_eq!(Balances::total_balance(&alice), 0); + assert_eq!( + >::total_balance(&alice_evm), + alice_evm_balance + ); + assert_eq!(>::total_balance(&alice), 0); // Set block number to enable events. System::set_block_number(1); @@ -100,11 +103,17 @@ fn swap_works() { // Assert state changes. assert_eq!( - EvmBalances::total_balance(&alice_evm), + >::total_balance(&alice_evm), alice_evm_balance - swap_balance - expected_fee ); - assert_eq!(Balances::total_balance(&alice), swap_balance); - assert_eq!(EvmBalances::total_balance(&PRECOMPILE_ADDRESS), 0); + assert_eq!( + >::total_balance(&alice), + swap_balance + ); + assert_eq!( + >::total_balance(&PRECOMPILE_ADDRESS), + 0 + ); // Assert mock invocations. estimate_swapped_balance_ctx.checkpoint(); @@ -135,8 +144,11 @@ fn swap_works_almost_full_balance() { EvmBalances::make_free_balance_be(&alice_evm, alice_evm_balance); // Check test preconditions. - assert_eq!(EvmBalances::total_balance(&alice_evm), alice_evm_balance); - assert_eq!(Balances::total_balance(&alice), 0); + assert_eq!( + >::total_balance(&alice_evm), + alice_evm_balance + ); + assert_eq!(>::total_balance(&alice), 0); // Set block number to enable events. System::set_block_number(1); @@ -203,12 +215,18 @@ fn swap_works_almost_full_balance() { // Assert state changes. assert_eq!( - EvmBalances::total_balance(&alice_evm), + >::total_balance(&alice_evm), alice_evm_balance - swap_balance - expected_fee ); - assert_eq!(EvmBalances::total_balance(&alice_evm), 1); - assert_eq!(Balances::total_balance(&alice), swap_balance); - assert_eq!(EvmBalances::total_balance(&PRECOMPILE_ADDRESS), 0); + assert_eq!(>::total_balance(&alice_evm), 1); + assert_eq!( + >::total_balance(&alice), + swap_balance + ); + assert_eq!( + >::total_balance(&PRECOMPILE_ADDRESS), + 0 + ); // Assert mock invocations. estimate_swapped_balance_ctx.checkpoint(); @@ -235,8 +253,11 @@ fn swap_fail_no_funds() { EvmBalances::make_free_balance_be(&alice_evm, alice_evm_balance); // Check test preconditions. - assert_eq!(EvmBalances::total_balance(&alice_evm), alice_evm_balance); - assert_eq!(Balances::total_balance(&alice), 0); + assert_eq!( + >::total_balance(&alice_evm), + alice_evm_balance + ); + assert_eq!(>::total_balance(&alice), 0); // Set block number to enable events. System::set_block_number(1); @@ -281,9 +302,15 @@ fn swap_fail_no_funds() { ); // Assert state changes. - assert_eq!(EvmBalances::total_balance(&alice_evm), alice_evm_balance); - assert_eq!(Balances::total_balance(&alice), 0); - assert_eq!(EvmBalances::total_balance(&PRECOMPILE_ADDRESS), 0); + assert_eq!( + >::total_balance(&alice_evm), + alice_evm_balance + ); + assert_eq!(>::total_balance(&alice), 0); + assert_eq!( + >::total_balance(&PRECOMPILE_ADDRESS), + 0 + ); // Assert mock invocations. estimate_swapped_balance_ctx.checkpoint(); @@ -314,8 +341,11 @@ fn swap_fail_below_ed() { EvmBalances::make_free_balance_be(&alice_evm, alice_evm_balance); // Check test preconditions. - assert_eq!(EvmBalances::total_balance(&alice_evm), alice_evm_balance); - assert_eq!(Balances::total_balance(&alice), 0); + assert_eq!( + >::total_balance(&alice_evm), + alice_evm_balance + ); + assert_eq!(>::total_balance(&alice), 0); // Set block number to enable events. System::set_block_number(1); @@ -364,11 +394,14 @@ fn swap_fail_below_ed() { // Assert state changes. assert_eq!( - EvmBalances::total_balance(&alice_evm), + >::total_balance(&alice_evm), alice_evm_balance - expected_fee ); - assert_eq!(Balances::total_balance(&alice), 0); - assert_eq!(EvmBalances::total_balance(&PRECOMPILE_ADDRESS), 0); + assert_eq!(>::total_balance(&alice), 0); + assert_eq!( + >::total_balance(&PRECOMPILE_ADDRESS), + 0 + ); // Assert mock invocations. estimate_swapped_balance_ctx.checkpoint(); @@ -399,8 +432,11 @@ fn swap_fail_trait_error() { EvmBalances::make_free_balance_be(&alice_evm, alice_evm_balance); // Check test preconditions. - assert_eq!(EvmBalances::total_balance(&alice_evm), alice_evm_balance); - assert_eq!(Balances::total_balance(&alice), 0); + assert_eq!( + >::total_balance(&alice_evm), + alice_evm_balance + ); + assert_eq!(>::total_balance(&alice), 0); // Set block number to enable events. System::set_block_number(1); @@ -461,11 +497,14 @@ fn swap_fail_trait_error() { // Assert state changes. assert_eq!( - EvmBalances::total_balance(&alice_evm), + >::total_balance(&alice_evm), alice_evm_balance - expected_fee ); - assert_eq!(Balances::total_balance(&alice), 0); - assert_eq!(EvmBalances::total_balance(&PRECOMPILE_ADDRESS), 0); + assert_eq!(>::total_balance(&alice), 0); + assert_eq!( + >::total_balance(&PRECOMPILE_ADDRESS), + 0 + ); // Assert mock invocations. estimate_swapped_balance_ctx.checkpoint(); @@ -494,8 +533,11 @@ fn swap_works_full_balance() { EvmBalances::make_free_balance_be(&alice_evm, alice_evm_balance); // Check test preconditions. - assert_eq!(EvmBalances::total_balance(&alice_evm), alice_evm_balance); - assert_eq!(Balances::total_balance(&alice), 0); + assert_eq!( + >::total_balance(&alice_evm), + alice_evm_balance + ); + assert_eq!(>::total_balance(&alice), 0); // Set block number to enable events. System::set_block_number(1); @@ -563,12 +605,18 @@ fn swap_works_full_balance() { // Assert state changes. assert_eq!( - EvmBalances::total_balance(&alice_evm), + >::total_balance(&alice_evm), alice_evm_balance - swap_balance - expected_fee ); - assert_eq!(EvmBalances::total_balance(&alice_evm), 0); - assert_eq!(Balances::total_balance(&alice), swap_balance); - assert_eq!(EvmBalances::total_balance(&PRECOMPILE_ADDRESS), 0); + assert_eq!(>::total_balance(&alice_evm), 0); + assert_eq!( + >::total_balance(&alice), + swap_balance + ); + assert_eq!( + >::total_balance(&PRECOMPILE_ADDRESS), + 0 + ); // Assert mock invocations. estimate_swapped_balance_ctx.checkpoint(); @@ -598,8 +646,11 @@ fn swap_fail_bad_selector() { EvmBalances::make_free_balance_be(&alice_evm, alice_evm_balance); // Check test preconditions. - assert_eq!(EvmBalances::total_balance(&alice_evm), alice_evm_balance); - assert_eq!(Balances::total_balance(&alice), 0); + assert_eq!( + >::total_balance(&alice_evm), + alice_evm_balance + ); + assert_eq!(>::total_balance(&alice), 0); // Set block number to enable events. System::set_block_number(1); @@ -644,11 +695,14 @@ fn swap_fail_bad_selector() { // Assert state changes. assert_eq!( - EvmBalances::total_balance(&alice_evm), + >::total_balance(&alice_evm), alice_evm_balance - expected_fee ); - assert_eq!(Balances::total_balance(&alice), 0); - assert_eq!(EvmBalances::total_balance(&PRECOMPILE_ADDRESS), 0); + assert_eq!(>::total_balance(&alice), 0); + assert_eq!( + >::total_balance(&PRECOMPILE_ADDRESS), + 0 + ); // Assert mock invocations. estimate_swapped_balance_ctx.checkpoint(); @@ -679,8 +733,11 @@ fn swap_fail_value_overflow() { EvmBalances::make_free_balance_be(&alice_evm, alice_evm_balance); // Check test preconditions. - assert_eq!(EvmBalances::total_balance(&alice_evm), alice_evm_balance); - assert_eq!(Balances::total_balance(&alice), 0); + assert_eq!( + >::total_balance(&alice_evm), + alice_evm_balance + ); + assert_eq!(>::total_balance(&alice), 0); // Set block number to enable events. System::set_block_number(1); @@ -724,9 +781,15 @@ fn swap_fail_value_overflow() { ); // Assert state changes. - assert_eq!(EvmBalances::total_balance(&alice_evm), alice_evm_balance); - assert_eq!(Balances::total_balance(&alice), 0); - assert_eq!(EvmBalances::total_balance(&PRECOMPILE_ADDRESS), 0); + assert_eq!( + >::total_balance(&alice_evm), + alice_evm_balance + ); + assert_eq!(>::total_balance(&alice), 0); + assert_eq!( + >::total_balance(&PRECOMPILE_ADDRESS), + 0 + ); // Assert mock invocations. estimate_swapped_balance_ctx.checkpoint(); @@ -756,8 +819,11 @@ fn swap_fail_no_arguments() { EvmBalances::make_free_balance_be(&alice_evm, alice_evm_balance); // Check test preconditions. - assert_eq!(EvmBalances::total_balance(&alice_evm), alice_evm_balance); - assert_eq!(Balances::total_balance(&alice), 0); + assert_eq!( + >::total_balance(&alice_evm), + alice_evm_balance + ); + assert_eq!(>::total_balance(&alice), 0); // Set block number to enable events. System::set_block_number(1); @@ -802,11 +868,14 @@ fn swap_fail_no_arguments() { // Assert state changes. assert_eq!( - EvmBalances::total_balance(&alice_evm), + >::total_balance(&alice_evm), alice_evm_balance - expected_fee ); - assert_eq!(Balances::total_balance(&alice), 0); - assert_eq!(EvmBalances::total_balance(&PRECOMPILE_ADDRESS), 0); + assert_eq!(>::total_balance(&alice), 0); + assert_eq!( + >::total_balance(&PRECOMPILE_ADDRESS), + 0 + ); // Assert mock invocations. estimate_swapped_balance_ctx.checkpoint(); @@ -836,8 +905,11 @@ fn swap_fail_short_argument() { EvmBalances::make_free_balance_be(&alice_evm, alice_evm_balance); // Check test preconditions. - assert_eq!(EvmBalances::total_balance(&alice_evm), alice_evm_balance); - assert_eq!(Balances::total_balance(&alice), 0); + assert_eq!( + >::total_balance(&alice_evm), + alice_evm_balance + ); + assert_eq!(>::total_balance(&alice), 0); // Set block number to enable events. System::set_block_number(1); @@ -883,11 +955,14 @@ fn swap_fail_short_argument() { // Assert state changes. assert_eq!( - EvmBalances::total_balance(&alice_evm), + >::total_balance(&alice_evm), alice_evm_balance - expected_fee ); - assert_eq!(Balances::total_balance(&alice), 0); - assert_eq!(EvmBalances::total_balance(&PRECOMPILE_ADDRESS), 0); + assert_eq!(>::total_balance(&alice), 0); + assert_eq!( + >::total_balance(&PRECOMPILE_ADDRESS), + 0 + ); // Assert mock invocations. estimate_swapped_balance_ctx.checkpoint(); @@ -917,8 +992,11 @@ fn swap_fail_trailing_junk() { EvmBalances::make_free_balance_be(&alice_evm, alice_evm_balance); // Check test preconditions. - assert_eq!(EvmBalances::total_balance(&alice_evm), alice_evm_balance); - assert_eq!(Balances::total_balance(&alice), 0); + assert_eq!( + >::total_balance(&alice_evm), + alice_evm_balance + ); + assert_eq!(>::total_balance(&alice), 0); // Set block number to enable events. System::set_block_number(1); @@ -964,11 +1042,14 @@ fn swap_fail_trailing_junk() { // Assert state changes. assert_eq!( - EvmBalances::total_balance(&alice_evm), + >::total_balance(&alice_evm), alice_evm_balance - expected_fee ); - assert_eq!(Balances::total_balance(&alice), 0); - assert_eq!(EvmBalances::total_balance(&PRECOMPILE_ADDRESS), 0); + assert_eq!(>::total_balance(&alice), 0); + assert_eq!( + >::total_balance(&PRECOMPILE_ADDRESS), + 0 + ); // Assert mock invocations. estimate_swapped_balance_ctx.checkpoint(); From 103e57f9b2aac986edae87b27b621b71090c5ffb Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Wed, 7 Feb 2024 14:57:40 +0300 Subject: [PATCH 25/56] Fix mock at pallet-balanced-currency-swap-bridges-initializer --- .../src/mock/v0.rs | 9 ++++++++- .../src/mock/v1.rs | 9 ++++++++- .../src/mock/v2.rs | 9 ++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/crates/pallet-balanced-currency-swap-bridges-initializer/src/mock/v0.rs b/crates/pallet-balanced-currency-swap-bridges-initializer/src/mock/v0.rs index f119d8c60..521169d08 100644 --- a/crates/pallet-balanced-currency-swap-bridges-initializer/src/mock/v0.rs +++ b/crates/pallet-balanced-currency-swap-bridges-initializer/src/mock/v0.rs @@ -65,7 +65,11 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ConstU64; type AccountStore = System; type MaxLocks = (); + type HoldIdentifier = (); + type FreezeIdentifier = (); type MaxReserves = (); + type MaxHolds = ConstU32<0>; + type MaxFreezes = ConstU32<0>; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); } @@ -77,12 +81,15 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ConstU64; type AccountStore = StorageMapShim< pallet_balances::Account, - frame_system::Provider, EvmAccountId, pallet_balances::AccountData, >; type MaxLocks = (); + type HoldIdentifier = (); + type FreezeIdentifier = (); type MaxReserves = (); + type MaxHolds = ConstU32<0>; + type MaxFreezes = ConstU32<0>; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); } diff --git a/crates/pallet-balanced-currency-swap-bridges-initializer/src/mock/v1.rs b/crates/pallet-balanced-currency-swap-bridges-initializer/src/mock/v1.rs index 29b4efabd..86dda9d63 100644 --- a/crates/pallet-balanced-currency-swap-bridges-initializer/src/mock/v1.rs +++ b/crates/pallet-balanced-currency-swap-bridges-initializer/src/mock/v1.rs @@ -71,7 +71,11 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ConstU64; type AccountStore = System; type MaxLocks = (); + type HoldIdentifier = (); + type FreezeIdentifier = (); type MaxReserves = (); + type MaxHolds = ConstU32<0>; + type MaxFreezes = ConstU32<0>; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); } @@ -83,12 +87,15 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ConstU64; type AccountStore = StorageMapShim< pallet_balances::Account, - frame_system::Provider, EvmAccountId, pallet_balances::AccountData, >; type MaxLocks = (); + type HoldIdentifier = (); + type FreezeIdentifier = (); type MaxReserves = (); + type MaxHolds = ConstU32<0>; + type MaxFreezes = ConstU32<0>; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); } diff --git a/crates/pallet-balanced-currency-swap-bridges-initializer/src/mock/v2.rs b/crates/pallet-balanced-currency-swap-bridges-initializer/src/mock/v2.rs index 65792ea55..439e0c67d 100644 --- a/crates/pallet-balanced-currency-swap-bridges-initializer/src/mock/v2.rs +++ b/crates/pallet-balanced-currency-swap-bridges-initializer/src/mock/v2.rs @@ -71,7 +71,11 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ConstU64; type AccountStore = System; type MaxLocks = (); + type HoldIdentifier = (); + type FreezeIdentifier = (); type MaxReserves = (); + type MaxHolds = ConstU32<0>; + type MaxFreezes = ConstU32<0>; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); } @@ -83,12 +87,15 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ConstU64; type AccountStore = StorageMapShim< pallet_balances::Account, - frame_system::Provider, EvmAccountId, pallet_balances::AccountData, >; type MaxLocks = (); + type HoldIdentifier = (); + type FreezeIdentifier = (); type MaxReserves = (); + type MaxHolds = ConstU32<0>; + type MaxFreezes = ConstU32<0>; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); } From a9cf1c0747bdb78cff82b4a7b7910564c84c9de2 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Wed, 7 Feb 2024 15:04:10 +0300 Subject: [PATCH 26/56] Fix mock and tests at pallet-erc20-support --- crates/pallet-erc20-support/src/mock.rs | 4 ++++ crates/pallet-erc20-support/src/tests.rs | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/pallet-erc20-support/src/mock.rs b/crates/pallet-erc20-support/src/mock.rs index 589daf473..ce62fe8fd 100644 --- a/crates/pallet-erc20-support/src/mock.rs +++ b/crates/pallet-erc20-support/src/mock.rs @@ -68,7 +68,11 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ConstU64<10>; type AccountStore = System; type MaxLocks = (); + type HoldIdentifier = (); + type FreezeIdentifier = (); type MaxReserves = (); + type MaxHolds = ConstU32<0>; + type MaxFreezes = ConstU32<0>; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); } diff --git a/crates/pallet-erc20-support/src/tests.rs b/crates/pallet-erc20-support/src/tests.rs index 2b67c4b0e..d40e58f6a 100644 --- a/crates/pallet-erc20-support/src/tests.rs +++ b/crates/pallet-erc20-support/src/tests.rs @@ -1,4 +1,4 @@ -use frame_support::{assert_noop, assert_ok, traits::Currency}; +use frame_support::{assert_noop, assert_ok, sp_runtime::TokenError, traits::Currency}; use sp_core::U256; use crate::{mock::*, *}; @@ -239,7 +239,7 @@ fn approve_approval_value_more_than_balance_works() { // Try to execute transfer_from with all approved balance. assert_noop!( Erc20Balances::transfer_from(bob, alice, charlie, approved_balance), - pallet_balances::Error::::InsufficientBalance + TokenError::FundsUnavailable ); // Execute transfer_from with alice initial balance value. From 7dbd94f462a33e8a877702225b0a332fa58958a8 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Wed, 7 Feb 2024 15:06:21 +0300 Subject: [PATCH 27/56] Fix mock at pallet-dummy-precompiles-code --- crates/pallet-dummy-precompiles-code/src/mock/v0.rs | 4 ++++ crates/pallet-dummy-precompiles-code/src/mock/v1.rs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/crates/pallet-dummy-precompiles-code/src/mock/v0.rs b/crates/pallet-dummy-precompiles-code/src/mock/v0.rs index 0524b1b42..7563ef317 100644 --- a/crates/pallet-dummy-precompiles-code/src/mock/v0.rs +++ b/crates/pallet-dummy-precompiles-code/src/mock/v0.rs @@ -80,7 +80,11 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ConstU64; type AccountStore = System; type MaxLocks = (); + type HoldIdentifier = (); + type FreezeIdentifier = (); type MaxReserves = (); + type MaxHolds = ConstU32<0>; + type MaxFreezes = ConstU32<0>; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); } diff --git a/crates/pallet-dummy-precompiles-code/src/mock/v1.rs b/crates/pallet-dummy-precompiles-code/src/mock/v1.rs index 0842439a9..4f4e069b7 100644 --- a/crates/pallet-dummy-precompiles-code/src/mock/v1.rs +++ b/crates/pallet-dummy-precompiles-code/src/mock/v1.rs @@ -86,7 +86,11 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ConstU64; type AccountStore = System; type MaxLocks = (); + type HoldIdentifier = (); + type FreezeIdentifier = (); type MaxReserves = (); + type MaxHolds = ConstU32<0>; + type MaxFreezes = ConstU32<0>; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); } From 43cb79c5205c11c775fb05ccf9a07a7e3ef6999e Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Wed, 7 Feb 2024 15:08:35 +0300 Subject: [PATCH 28/56] Precompile-native-currency --- crates/precompile-native-currency/src/mock.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/precompile-native-currency/src/mock.rs b/crates/precompile-native-currency/src/mock.rs index 6d835d6a7..103556e00 100644 --- a/crates/precompile-native-currency/src/mock.rs +++ b/crates/precompile-native-currency/src/mock.rs @@ -90,7 +90,11 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ConstU128<2>; type AccountStore = System; type MaxLocks = (); + type HoldIdentifier = (); + type FreezeIdentifier = (); type MaxReserves = (); + type MaxHolds = ConstU32<0>; + type MaxFreezes = ConstU32<0>; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); } From 2b213d3ae4805203ca3c10303d67d1bd072a92f4 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Wed, 7 Feb 2024 15:09:55 +0300 Subject: [PATCH 29/56] Fix mock at pallet-token-claims and pallet-vesting --- crates/pallet-token-claims/src/mock.rs | 4 ++++ crates/pallet-vesting/src/mock.rs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/crates/pallet-token-claims/src/mock.rs b/crates/pallet-token-claims/src/mock.rs index 7e817280d..8ea284e16 100644 --- a/crates/pallet-token-claims/src/mock.rs +++ b/crates/pallet-token-claims/src/mock.rs @@ -71,7 +71,11 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ConstU64<1>; type AccountStore = System; type MaxLocks = (); + type HoldIdentifier = (); + type FreezeIdentifier = (); type MaxReserves = (); + type MaxHolds = ConstU32<0>; + type MaxFreezes = ConstU32<0>; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); } diff --git a/crates/pallet-vesting/src/mock.rs b/crates/pallet-vesting/src/mock.rs index 7d176e7fb..05c2c7e6a 100644 --- a/crates/pallet-vesting/src/mock.rs +++ b/crates/pallet-vesting/src/mock.rs @@ -65,7 +65,11 @@ impl pallet_balances::Config for Test { type ExistentialDeposit = ConstU64<1>; type AccountStore = System; type MaxLocks = (); + type HoldIdentifier = (); + type FreezeIdentifier = (); type MaxReserves = (); + type MaxHolds = ConstU32<0>; + type MaxFreezes = ConstU32<0>; type ReserveIdentifier = [u8; 8]; type WeightInfo = (); } From a6579e551a3a74a71b96992997d8d312365afed6 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Wed, 7 Feb 2024 15:12:42 +0300 Subject: [PATCH 30/56] [substrate-apply] precompile-bioauth:mock,pallet-bioauth:testing Crypto Pair trait refactory (#13657) --- crates/pallet-bioauth/src/mock/testing.rs | 6 +++--- crates/precompile-bioauth/src/mock.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/pallet-bioauth/src/mock/testing.rs b/crates/pallet-bioauth/src/mock/testing.rs index 6a3a8dd97..d40a02bb4 100644 --- a/crates/pallet-bioauth/src/mock/testing.rs +++ b/crates/pallet-bioauth/src/mock/testing.rs @@ -7,7 +7,7 @@ use mockall::{mock, predicate}; use scale_info::TypeInfo; #[cfg(feature = "std")] use serde::{Deserialize, Serialize}; -use sp_core::{crypto::Infallible, H256}; +use sp_core::{crypto::DeriveError, H256}; use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, @@ -52,7 +52,7 @@ impl AsRef<[u8]> for MockOpaqueAuthTicket { pub struct MockAuthTicketConverter; impl TryConvert> for MockAuthTicketConverter { - type Error = Infallible; + type Error = DeriveError; fn try_convert( value: MockOpaqueAuthTicket, @@ -75,7 +75,7 @@ impl Default for MockVerifier { } impl crate::Verifier> for MockVerifier { - type Error = Infallible; + type Error = DeriveError; fn verify<'a, D>(&self, _data: D, signature: Vec) -> Result where diff --git a/crates/precompile-bioauth/src/mock.rs b/crates/precompile-bioauth/src/mock.rs index cde3a985b..d27de81c1 100644 --- a/crates/precompile-bioauth/src/mock.rs +++ b/crates/precompile-bioauth/src/mock.rs @@ -11,7 +11,7 @@ use pallet_bioauth::{AuthTicket, TryConvert}; use scale_info::TypeInfo; #[cfg(feature = "std")] use serde::{Deserialize, Serialize}; -use sp_core::{crypto::Infallible, H256}; +use sp_core::{crypto::DeriveError, H256}; use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, @@ -61,7 +61,7 @@ impl From> for MockOpaqueAuthTicket { pub struct MockAuthTicketConverter; impl TryConvert> for MockAuthTicketConverter { - type Error = Infallible; + type Error = DeriveError; fn try_convert( value: MockOpaqueAuthTicket, @@ -75,7 +75,7 @@ impl TryConvert> for MockAu pub struct MockVerifier; impl pallet_bioauth::Verifier> for MockVerifier { - type Error = Infallible; + type Error = DeriveError; fn verify<'a, D>(&self, _data: D, _signature: Vec) -> Result where From e6633f0c0b9c8d59a926180c49a8053b31636a67 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Fri, 9 Feb 2024 15:34:21 +0300 Subject: [PATCH 31/56] Fix tests at claims_and_vesting as usable_balance behaviour has been changed --- .../src/tests/claims_and_vesting.rs | 129 ++++++++++++++++-- crates/humanode-runtime/src/tests/fees.rs | 6 +- 2 files changed, 120 insertions(+), 15 deletions(-) diff --git a/crates/humanode-runtime/src/tests/claims_and_vesting.rs b/crates/humanode-runtime/src/tests/claims_and_vesting.rs index 3bebeb0c7..f784103a2 100644 --- a/crates/humanode-runtime/src/tests/claims_and_vesting.rs +++ b/crates/humanode-runtime/src/tests/claims_and_vesting.rs @@ -424,7 +424,15 @@ fn direct_claiming_without_vesting_works() { // Test preconditions. assert!(TokenClaims::claims(ethereum_address).is_some()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); + // Alice account can't be reaped as the account takes part in consensus (bootnode). + // Frozen balance is 0 < existential deposit. + // + // As a result, usable balance doesn't contain existential deposit. + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE + - >::minimum_balance() + ); // Invoke the claim call. assert_ok!(TokenClaims::claim( @@ -443,9 +451,15 @@ fn direct_claiming_without_vesting_works() { ); // Ensure that the balance is not locked. + // + // Alice account can't be reaped as the account takes part in consensus (bootnode). + // Frozen balance is 0 < existantial deposit. + // + // As a result, usable balance doesn't contain existential deposit. assert_eq!( Balances::usable_balance(account_id("Alice")), INIT_BALANCE + VESTING_BALANCE + - >::minimum_balance() ); // Ensure total issuance did not change. @@ -471,7 +485,15 @@ fn direct_claiming_with_vesting_works() { // Test preconditions. assert!(TokenClaims::claims(ethereum_address).is_some()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); + // Alice account can't be reaped as the account takes part in consensus (bootnode). + // Frozen balance is 0 < existential deposit. + // + // As a result, usable balance doesn't contain existential deposit. + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE + - >::minimum_balance() + ); assert!(Vesting::locks(account_id("Alice")).is_none()); // Invoke the claim call. @@ -491,6 +513,11 @@ fn direct_claiming_with_vesting_works() { ); // Ensure that the vesting balance is locked. + // + // Alice account can't be reaped as the account takes part in consensus (bootnode). + // Frozen balance is equal to vesting balance > existential deposit. + // + // As a result, usable balance contains existential deposit. assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); // Ensure that the vesting is armed for the given account and matches the parameters. @@ -542,9 +569,15 @@ fn direct_unlock_full_balance_works() { assert_ok!(Vesting::unlock(Some(account_id("Alice")).into())); // Ensure funds are unlocked. + // + // Alice account can't be reaped as the account takes part in consensus (bootnode). + // Frozen balance is 0 < existential deposit. + // + // As a result, usable balance doesn't contain existential deposit. assert_eq!( Balances::usable_balance(account_id("Alice")), INIT_BALANCE + VESTING_BALANCE + - >::minimum_balance() ); // Ensure the vesting is gone from the state. @@ -590,7 +623,7 @@ fn direct_unlock_partial_balance_works() { // Invoke the unlock call. assert_ok!(Vesting::unlock(Some(account_id("Alice")).into())); - let unlocked_balance = Balances::usable_balance(account_id("Alice")) - INIT_BALANCE; + let unlocked_balance = VESTING_BALANCE - System::account(account_id("Alice")).data.frozen; // Ensure funds are partially unlocked and rounding works as expected. assert_eq!(unlocked_balance, EXPECTED_PARTIAL_UNLOCKED_FUNDS); @@ -622,7 +655,15 @@ fn direct_claiming_fails_when_eth_signature_invalid() { // Test preconditions. assert!(TokenClaims::claims(ethereum_address).is_some()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); + // Alice account can't be reaped as the account takes part in consensus (bootnode). + // Frozen balance is 0 < existential deposit. + // + // As a result, usable balance doesn't contain existential deposit. + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE + - >::minimum_balance() + ); // Invoke the claim call. assert_noop!( @@ -637,7 +678,15 @@ fn direct_claiming_fails_when_eth_signature_invalid() { // Ensure claims related state hasn't been changed. assert!(TokenClaims::claims(ethereum_address).is_some()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); + // Alice account can't be reaped as the account takes part in consensus (bootnode). + // Frozen balance is 0 < existential deposit. + // + // As a result, usable balance doesn't contain existential deposit. + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE + - >::minimum_balance() + ); assert_eq!(Balances::total_issuance(), total_issuance_before); }) } @@ -661,7 +710,15 @@ fn direct_claiming_fails_when_no_claim() { // Test preconditions. assert!(TokenClaims::claims(ethereum_address).is_none()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); + // Alice account can't be reaped as the account takes part in consensus (bootnode). + // Frozen balance is 0 < existential deposit. + // + // As a result, usable balance doesn't contain existential deposit. + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE + - >::minimum_balance() + ); // Invoke the claim call. assert_noop!( @@ -676,7 +733,15 @@ fn direct_claiming_fails_when_no_claim() { // Ensure claims related state hasn't been changed. assert!(TokenClaims::claims(ethereum_address).is_none()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); + // Alice account can't be reaped as the account takes part in consensus (bootnode). + // Frozen balance is 0 < existential deposit. + // + // As a result, usable balance doesn't contain existential deposit. + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE + - >::minimum_balance() + ); assert_eq!(Balances::total_issuance(), total_issuance_before); }) } @@ -714,6 +779,11 @@ fn direct_unlock_fails_when_no_vesting() { ); // Ensure funds are still locked. + // + // Alice account can't be reaped as the account takes part in consensus (bootnode). + // Frozen balance is equal to vesting balance > existential deposit. + // + // As a result, usable balance contains existential deposit. assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); // Ensure the vesting isn't gone from the state. @@ -760,7 +830,7 @@ fn claims_fails_when_vesting_already_engaged() { // Invoke the unlock call. assert_ok!(Vesting::unlock(Some(account_id("Alice")).into())); - let unlocked_balance = Balances::usable_balance(account_id("Alice")) - INIT_BALANCE; + let unlocked_balance = VESTING_BALANCE - System::account(account_id("Alice")).data.frozen; // Ensure funds are partially unlocked and rounding works as expected. assert_eq!(unlocked_balance, EXPECTED_PARTIAL_UNLOCKED_FUNDS); @@ -828,7 +898,15 @@ fn dispatch_claiming_without_vesting_works() { // Test preconditions. assert!(TokenClaims::claims(ethereum_address).is_some()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); + // Alice account can't be reaped as the account takes part in consensus (bootnode). + // Frozen balance is 0 < existential deposit. + // + // As a result, usable balance doesn't contain existential deposit. + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE + - >::minimum_balance() + ); // Validate already checked extrinsic with all possible transaction sources. assert_applyable_validate_all_transaction_sources( @@ -853,9 +931,15 @@ fn dispatch_claiming_without_vesting_works() { ); // Ensure that the balance is not locked. + // + // Alice account can't be reaped as the account takes part in consensus (bootnode). + // Frozen balance is 0 < existential deposit. + // + // As a result, usable balance doesn't contain existential deposit. assert_eq!( Balances::usable_balance(account_id("Alice")), INIT_BALANCE + VESTING_BALANCE + - >::minimum_balance() ); // Ensure total issuance did not change. @@ -891,7 +975,15 @@ fn dispatch_claiming_with_vesting_works() { // Test preconditions. assert!(TokenClaims::claims(ethereum_address).is_some()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); + // Alice account can't be reaped as the account takes part in consensus (bootnode). + // Frozen balance is 0 < existential deposit. + // + // As a result, usable balance doesn't contain existential deposit. + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE + - >::minimum_balance() + ); assert!(Vesting::locks(account_id("Alice")).is_none()); // Validate already checked extrinsic with all possible transaction sources. @@ -916,7 +1008,10 @@ fn dispatch_claiming_with_vesting_works() { INIT_BALANCE + VESTING_BALANCE ); - // Ensure that the vesting balance is locked. + // Alice account can't be reaped as the account takes part in consensus (bootnode). + // Frozen balance is equal to vesting balance > existential deposit. + // + // As a result, usable balance contains existential deposit. assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); // Ensure that the vesting is armed for the given account and matches the parameters. @@ -974,6 +1069,10 @@ fn dispatch_unlock_full_balance_works() { Balances::free_balance(account_id("Alice")), INIT_BALANCE + VESTING_BALANCE ); + // Alice account can't be reaped as the account takes part in consensus (bootnode). + // Frozen balance is equal to vesting balance < existential deposit. + // + // As a result, usable balance contains existential deposit. assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); assert!(Vesting::locks(account_id("Alice")).is_some()); @@ -993,9 +1092,15 @@ fn dispatch_unlock_full_balance_works() { )); // Ensure funds are unlocked. + // + // Alice account can't be reaped as the account takes part in consensus (bootnode). + // Frozen balance is 0 < existential deposit. + // + // As a result, usable balance doesn't contain existential deposit. assert_eq!( Balances::usable_balance(account_id("Alice")), INIT_BALANCE + VESTING_BALANCE + - >::minimum_balance() ); // Ensure the vesting is gone from the state. @@ -1066,7 +1171,7 @@ fn dispatch_unlock_partial_balance_works() { len )); - let unlocked_balance = Balances::usable_balance(account_id("Alice")) - INIT_BALANCE; + let unlocked_balance = VESTING_BALANCE - System::account(account_id("Alice")).data.frozen; // Ensure funds are partially unlocked and rounding works as expected. assert_eq!(unlocked_balance, EXPECTED_PARTIAL_UNLOCKED_FUNDS); diff --git a/crates/humanode-runtime/src/tests/fees.rs b/crates/humanode-runtime/src/tests/fees.rs index 3292fc4e0..c5a08df72 100644 --- a/crates/humanode-runtime/src/tests/fees.rs +++ b/crates/humanode-runtime/src/tests/fees.rs @@ -119,10 +119,10 @@ fn new_test_ext_with() -> sp_io::TestExternalities { } /// Crate a new keystore and populate it with some keys to use in tests. -fn keystore() -> sp_keystore::testing::KeyStore { - use sp_keystore::SyncCryptoStore; +fn keystore() -> sp_keystore::testing::MemoryKeystore { + use sp_keystore::Keystore; - let store = sp_keystore::testing::KeyStore::new(); + let store = sp_keystore::testing::MemoryKeystore::new(); store .sr25519_generate_new(crypto::KEY_TYPE, Some("//Alice")) .unwrap(); From f19e91ec5fb4c9436d8f6f71115e276ac79d62ca Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Fri, 9 Feb 2024 15:52:40 +0300 Subject: [PATCH 32/56] Update WEIGHT_TO_FEE value --- crates/humanode-runtime/src/constants.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/humanode-runtime/src/constants.rs b/crates/humanode-runtime/src/constants.rs index 51567f77e..af75aa62e 100644 --- a/crates/humanode-runtime/src/constants.rs +++ b/crates/humanode-runtime/src/constants.rs @@ -93,7 +93,7 @@ pub mod fees { /// /// We compute the fee to weight multiplier based on the weight of the `balances.transfer` call, /// and try to fit the fee such that a single transfer call costs ~0.1 HMND. - pub const WEIGHT_TO_FEE: Balance = 400_000_000; + pub const WEIGHT_TO_FEE: Balance = 380_000_000; /// The multiplier to get the fee from length. pub const LENGTH_TO_FEE: Balance = 1; From 8db1e1389085ccbd2f1e3fb2642f8f1bd1f88c86 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Fri, 9 Feb 2024 16:20:16 +0300 Subject: [PATCH 33/56] Fix benchmarking tests --- crates/pallet-bioauth/src/mock/benchmarking.rs | 6 +++--- crates/pallet-currency-swap/src/benchmarking.rs | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/pallet-bioauth/src/mock/benchmarking.rs b/crates/pallet-bioauth/src/mock/benchmarking.rs index 45cf40eae..61f667f88 100644 --- a/crates/pallet-bioauth/src/mock/benchmarking.rs +++ b/crates/pallet-bioauth/src/mock/benchmarking.rs @@ -4,7 +4,7 @@ use frame_system as system; use scale_info::TypeInfo; #[cfg(feature = "std")] use serde::{Deserialize, Serialize}; -use sp_core::{crypto::Infallible, H256}; +use sp_core::{crypto::DeriveError, H256}; use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, @@ -56,7 +56,7 @@ impl From> for MockOpaqueAuthTicket { pub struct MockAuthTicketConverter; impl TryConvert> for MockAuthTicketConverter { - type Error = Infallible; + type Error = DeriveError; fn try_convert( value: MockOpaqueAuthTicket, @@ -79,7 +79,7 @@ impl Default for MockVerifier { } impl crate::Verifier> for MockVerifier { - type Error = Infallible; + type Error = DeriveError; fn verify<'a, D>(&self, _data: D, _signature: Vec) -> Result where diff --git a/crates/pallet-currency-swap/src/benchmarking.rs b/crates/pallet-currency-swap/src/benchmarking.rs index 45326ea33..db75376b2 100644 --- a/crates/pallet-currency-swap/src/benchmarking.rs +++ b/crates/pallet-currency-swap/src/benchmarking.rs @@ -48,8 +48,8 @@ benchmarks! { let _ = >::deposit_creating(&from, init_balance.into()); - let from_balance_before = >::total_balance(&from); - let to_balance_before = >::total_balance(&to); + let from_balance_before = as Currency<_>>::total_balance(&from); + let to_balance_before = as Currency<_>>::total_balance(&to); let currency_swap = ::prepare(); @@ -57,8 +57,8 @@ benchmarks! { }: _(origin, to.clone(), from_balance) verify { - let from_balance_after = >::total_balance(&from); - let to_balance_after = >::total_balance(&to); + let from_balance_after = as Currency<_>>::total_balance(&from); + let to_balance_after = as Currency<_>>::total_balance(&to); assert_eq!(from_balance_before - from_balance_after, from_balance); assert_eq!(to_balance_after - to_balance_before, to_balance); From 9f7f42d84c48f0d95525ffb88dc6581171e09f0c Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Fri, 9 Feb 2024 16:36:11 +0300 Subject: [PATCH 34/56] Fix tests at pallet-vesting --- crates/pallet-vesting/src/tests.rs | 48 ++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 6 deletions(-) diff --git a/crates/pallet-vesting/src/tests.rs b/crates/pallet-vesting/src/tests.rs index c3ed77e57..34a85a28f 100644 --- a/crates/pallet-vesting/src/tests.rs +++ b/crates/pallet-vesting/src/tests.rs @@ -42,12 +42,18 @@ fn lock_under_vesting_works() { assert_eq!(Balances::free_balance(42), 1000); assert_eq!(Balances::usable_balance(42), 900); assert!(>::get(42).is_some()); - assert_eq!(System::events().len(), 2); + assert_eq!(System::events().len(), 3); System::assert_has_event(mock::RuntimeEvent::Vesting(Event::Locked { who: 42, schedule: MockSchedule, balance_under_lock: 100, })); + System::assert_has_event(mock::RuntimeEvent::Balances( + pallet_balances::Event::Locked { + who: 42, + amount: 100, + }, + )); System::assert_has_event(mock::RuntimeEvent::Vesting(Event::PartiallyUnlocked { who: 42, balance_left_under_lock: 100, @@ -178,12 +184,18 @@ fn lock_under_vesting_can_lock_balance_greater_than_free_balance() { assert_eq!(Balances::free_balance(42), 1000); assert_eq!(Balances::usable_balance(42), 0); assert!(>::get(42).is_some()); - assert_eq!(System::events().len(), 2); + assert_eq!(System::events().len(), 3); System::assert_has_event(mock::RuntimeEvent::Vesting(Event::Locked { who: 42, schedule: MockSchedule, balance_under_lock: 1100, })); + System::assert_has_event(mock::RuntimeEvent::Balances( + pallet_balances::Event::Locked { + who: 42, + amount: 1100, + }, + )); System::assert_has_event(mock::RuntimeEvent::Vesting(Event::PartiallyUnlocked { who: 42, balance_left_under_lock: 1100, @@ -228,10 +240,16 @@ fn unlock_works_full() { assert_eq!(Balances::free_balance(42), 1000); assert_eq!(Balances::usable_balance(42), 1000); assert!(>::get(42).is_none()); - assert_eq!(System::events().len(), 1); + assert_eq!(System::events().len(), 2); System::assert_has_event(mock::RuntimeEvent::Vesting(Event::FullyUnlocked { who: 42, })); + System::assert_has_event(mock::RuntimeEvent::Balances( + pallet_balances::Event::Unlocked { + who: 42, + amount: 100, + }, + )); // Assert mock invocations. compute_balance_under_lock_ctx.checkpoint(); @@ -272,11 +290,17 @@ fn unlock_works_partial() { assert_eq!(Balances::free_balance(42), 1000); assert_eq!(Balances::usable_balance(42), 910); assert_eq!(>::get(42).unwrap(), schedule_before); - assert_eq!(System::events().len(), 1); + assert_eq!(System::events().len(), 2); System::assert_has_event(mock::RuntimeEvent::Vesting(Event::PartiallyUnlocked { who: 42, balance_left_under_lock: 90, })); + System::assert_has_event(mock::RuntimeEvent::Balances( + pallet_balances::Event::Unlocked { + who: 42, + amount: 10, + }, + )); // Assert mock invocations. compute_balance_under_lock_ctx.checkpoint(); @@ -402,7 +426,7 @@ fn update_vesting_works_partial_unlock() { assert_eq!(Balances::free_balance(42), 1000); assert_eq!(Balances::usable_balance(42), 950); assert!(>::get(42).is_some()); - assert_eq!(System::events().len(), 2); + assert_eq!(System::events().len(), 3); System::assert_has_event(mock::RuntimeEvent::Vesting(Event::VestingUpdated { account_id: 42, old_schedule: MockSchedule, @@ -413,6 +437,12 @@ fn update_vesting_works_partial_unlock() { who: 42, balance_left_under_lock: 50, })); + System::assert_has_event(mock::RuntimeEvent::Balances( + pallet_balances::Event::Unlocked { + who: 42, + amount: 50, + }, + )); // Assert mock invocations. compute_balance_under_lock_ctx.checkpoint(); @@ -456,7 +486,7 @@ fn update_vesting_works_full_unlock() { assert_eq!(Balances::free_balance(42), 1000); assert_eq!(Balances::usable_balance(42), 1000); assert!(>::get(42).is_none()); - assert_eq!(System::events().len(), 2); + assert_eq!(System::events().len(), 3); System::assert_has_event(mock::RuntimeEvent::Vesting(Event::VestingUpdated { account_id: 42, old_schedule: MockSchedule, @@ -466,6 +496,12 @@ fn update_vesting_works_full_unlock() { System::assert_has_event(mock::RuntimeEvent::Vesting(Event::FullyUnlocked { who: 42, })); + System::assert_has_event(mock::RuntimeEvent::Balances( + pallet_balances::Event::Unlocked { + who: 42, + amount: 100, + }, + )); // Assert mock invocations. compute_balance_under_lock_ctx.checkpoint(); From 3eb66b53849a997c67afb1b03207969fb8eaff86 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Fri, 9 Feb 2024 16:38:20 +0300 Subject: [PATCH 35/56] Remove unused dependency --- Cargo.lock | 1 - crates/humanode-rpc/Cargo.toml | 1 - 2 files changed, 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fdf6bc2a5..719ec4543 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4060,7 +4060,6 @@ dependencies = [ "sc-client-api", "sc-consensus-babe", "sc-consensus-babe-rpc", - "sc-consensus-epochs", "sc-consensus-grandpa", "sc-consensus-grandpa-rpc", "sc-network", diff --git a/crates/humanode-rpc/Cargo.toml b/crates/humanode-rpc/Cargo.toml index 384b84cfe..e2ab32090 100644 --- a/crates/humanode-rpc/Cargo.toml +++ b/crates/humanode-rpc/Cargo.toml @@ -25,7 +25,6 @@ sc-chain-spec = { workspace = true } sc-client-api = { workspace = true } sc-consensus-babe = { workspace = true } sc-consensus-babe-rpc = { workspace = true } -sc-consensus-epochs = { workspace = true } sc-consensus-grandpa = { workspace = true } sc-consensus-grandpa-rpc = { workspace = true } sc-network = { workspace = true } From dadf7f0e76812422d8c7ade1b29d2b66c8c2033a Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Fri, 9 Feb 2024 17:03:21 +0300 Subject: [PATCH 36/56] Fix clippy --- crates/humanode-peer/src/service/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/humanode-peer/src/service/mod.rs b/crates/humanode-peer/src/service/mod.rs index eb55063fa..030dc2248 100644 --- a/crates/humanode-peer/src/service/mod.rs +++ b/crates/humanode-peer/src/service/mod.rs @@ -120,7 +120,7 @@ pub fn new_partial( }) .transpose()?; - let executor = sc_service::new_native_or_wasm_executor(&config); + let executor = sc_service::new_native_or_wasm_executor(config); let (client, backend, keystore_container, task_manager) = sc_service::new_full_parts::( From 41b7610619ec83c62ad2f90849beb5e03aa3d4ed Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Mon, 12 Feb 2024 14:53:04 +0300 Subject: [PATCH 37/56] Unpack partial.other --- crates/humanode-peer/src/cli/run.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/humanode-peer/src/cli/run.rs b/crates/humanode-peer/src/cli/run.rs index 24e2f506f..4f2f9ece8 100644 --- a/crates/humanode-peer/src/cli/run.rs +++ b/crates/humanode-peer/src/cli/run.rs @@ -233,7 +233,8 @@ pub async fn run() -> sc_cli::Result<()> { let runner = root.create_humanode_runner(cmd)?; runner.sync_run(|config| { let partial = service::new_partial(&config)?; - let frontier_backend = match partial.other.5 { + let (_, _, _, _, _, frontier_backend, _) = partial.other; + let frontier_backend = match frontier_backend { fc_db::Backend::KeyValue(kv_fb) => Arc::new(kv_fb), _ => { panic!("Only fc_db::Backend::KeyValue supported for FrontierDb command") From 0f707b17b857fe52b6104501321182c17a84f956 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Mon, 12 Feb 2024 16:10:15 +0300 Subject: [PATCH 38/56] [substrate-apply] pallet-*: FRAME: inherited call weight syntax (#13932) --- .../src/lib.rs | 3 +-- crates/pallet-currency-swap/src/lib.rs | 4 +--- crates/pallet-evm-accounts-mapping/src/lib.rs | 3 +-- crates/pallet-vesting/src/lib.rs | 4 +--- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/crates/pallet-balanced-currency-swap-bridges-initializer/src/lib.rs b/crates/pallet-balanced-currency-swap-bridges-initializer/src/lib.rs index 31e17fcdd..3367ff3c0 100644 --- a/crates/pallet-balanced-currency-swap-bridges-initializer/src/lib.rs +++ b/crates/pallet-balanced-currency-swap-bridges-initializer/src/lib.rs @@ -164,11 +164,10 @@ pub mod pallet { } } - #[pallet::call] + #[pallet::call(weight(T::WeightInfo))] impl Pallet { /// Verify if currencies are balanced. #[pallet::call_index(0)] - #[pallet::weight(T::WeightInfo::verify_balanced())] pub fn verify_balanced(_origin: OriginFor) -> DispatchResult { if !Pallet::::is_balanced()? { return Err(Error::::NotBalanced.into()); diff --git a/crates/pallet-currency-swap/src/lib.rs b/crates/pallet-currency-swap/src/lib.rs index 338364464..4d4ac1882 100644 --- a/crates/pallet-currency-swap/src/lib.rs +++ b/crates/pallet-currency-swap/src/lib.rs @@ -94,11 +94,10 @@ pub mod pallet { }, } - #[pallet::call] + #[pallet::call(weight(T::WeightInfo))] impl Pallet { /// Swap balances. #[pallet::call_index(0)] - #[pallet::weight(T::WeightInfo::swap())] pub fn swap( origin: OriginFor, to: T::AccountIdTo, @@ -115,7 +114,6 @@ pub mod pallet { /// Same as the swap call, but with a check that the swap will not kill the origin account. #[pallet::call_index(1)] - #[pallet::weight(T::WeightInfo::swap_keep_alive())] pub fn swap_keep_alive( origin: OriginFor, to: T::AccountIdTo, diff --git a/crates/pallet-evm-accounts-mapping/src/lib.rs b/crates/pallet-evm-accounts-mapping/src/lib.rs index 8b214d98c..022eb9222 100644 --- a/crates/pallet-evm-accounts-mapping/src/lib.rs +++ b/crates/pallet-evm-accounts-mapping/src/lib.rs @@ -117,13 +117,12 @@ pub mod pallet { } } - #[pallet::call] + #[pallet::call(weight(T::WeightInfo))] impl Pallet { /// Create a permanent two-way binding between an Ethereum address and a native address. /// The native address of the exstrinsic signer is used as a native address, while /// the address of the payload signature creator is used as Ethereum address. #[pallet::call_index(0)] - #[pallet::weight(T::WeightInfo::claim_account())] pub fn claim_account( origin: OriginFor, // Due to the fact that ethereum address can be extracted from any signature diff --git a/crates/pallet-vesting/src/lib.rs b/crates/pallet-vesting/src/lib.rs index 28746db49..3aec03b1a 100644 --- a/crates/pallet-vesting/src/lib.rs +++ b/crates/pallet-vesting/src/lib.rs @@ -121,11 +121,10 @@ pub mod pallet { NoVesting, } - #[pallet::call] + #[pallet::call(weight(T::WeightInfo))] impl Pallet { /// Unlock the vested balance according to the schedule. #[pallet::call_index(0)] - #[pallet::weight(T::WeightInfo::unlock())] pub fn unlock(origin: OriginFor) -> DispatchResult { let who = ensure_signed(origin)?; @@ -142,7 +141,6 @@ pub mod pallet { /// /// Root-level operation. #[pallet::call_index(1)] - #[pallet::weight(T::WeightInfo::update_schedule())] pub fn update_schedule( origin: OriginFor, account_id: T::AccountId, From 6f6869c810fb237b2b2b69b3c7124c235360fb61 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Thu, 15 Feb 2024 20:33:45 +0300 Subject: [PATCH 39/56] Update weights --- crates/humanode-runtime/assets/benchmark.json | 759 ++++++++---------- .../src/weights/frame_system.rs | 43 +- crates/humanode-runtime/src/weights/mod.rs | 2 +- .../src/weights/pallet_balances.rs | 58 +- .../src/weights/pallet_bioauth.rs | 29 +- .../weights/pallet_evm_accounts_mapping.rs | 7 +- .../src/weights/pallet_im_online.rs | 17 +- .../src/weights/pallet_multisig.rs | 73 +- .../src/weights/pallet_timestamp.rs | 12 +- .../src/weights/pallet_token_claims.rs | 28 +- .../src/weights/pallet_utility.rs | 35 +- .../src/weights/pallet_vesting.rs | 18 +- 12 files changed, 548 insertions(+), 533 deletions(-) diff --git a/crates/humanode-runtime/assets/benchmark.json b/crates/humanode-runtime/assets/benchmark.json index 048d8f296..f276158c7 100644 --- a/crates/humanode-runtime/assets/benchmark.json +++ b/crates/humanode-runtime/assets/benchmark.json @@ -128,7 +128,7 @@ ] ], "extrinsic_time": 0, - "storage_root_time": 0, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -234,7 +234,7 @@ ] ], "extrinsic_time": 0, - "storage_root_time": 1000, + "storage_root_time": 0, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -281,28 +281,8 @@ "benchmark": "hashing", "time_results": [ { - "components": [ - [ - "i", - 0 - ] - ], - "extrinsic_time": 14782000, - "storage_root_time": 1000, - "reads": 0, - "repeat_reads": 0, - "writes": 0, - "repeat_writes": 0, - "proof_size": 0 - }, - { - "components": [ - [ - "i", - 100 - ] - ], - "extrinsic_time": 15082000, + "components": [], + "extrinsic_time": 14043000, "storage_root_time": 2000, "reads": 0, "repeat_reads": 0, @@ -313,34 +293,14 @@ ], "db_results": [ { - "components": [ - [ - "i", - 0 - ] - ], - "extrinsic_time": 14797000, + "components": [], + "extrinsic_time": 13947000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, "repeat_writes": 0, "proof_size": 0 - }, - { - "components": [ - [ - "i", - 100 - ] - ], - "extrinsic_time": 15175000, - "storage_root_time": 3000, - "reads": 0, - "repeat_reads": 0, - "writes": 0, - "repeat_writes": 0, - "proof_size": 0 } ] }, @@ -371,76 +331,7 @@ 100 ] ], - "extrinsic_time": 3925000, - "storage_root_time": 2000, - "reads": 0, - "repeat_reads": 0, - "writes": 0, - "repeat_writes": 0, - "proof_size": 0 - } - ], - "db_results": [ - { - "components": [ - [ - "i", - 0 - ] - ], - "extrinsic_time": 0, - "storage_root_time": 1000, - "reads": 0, - "repeat_reads": 0, - "writes": 0, - "repeat_writes": 0, - "proof_size": 0 - }, - { - "components": [ - [ - "i", - 100 - ] - ], - "extrinsic_time": 3960000, - "storage_root_time": 2000, - "reads": 0, - "repeat_reads": 0, - "writes": 0, - "repeat_writes": 0, - "proof_size": 0 - } - ] - }, - { - "pallet": "frame_benchmarking", - "instance": "BaselineBench :: < Runtime >", - "benchmark": "storage_read", - "time_results": [ - { - "components": [ - [ - "i", - 0 - ] - ], - "extrinsic_time": 0, - "storage_root_time": 2000, - "reads": 0, - "repeat_reads": 0, - "writes": 0, - "repeat_writes": 0, - "proof_size": 0 - }, - { - "components": [ - [ - "i", - 1000 - ] - ], - "extrinsic_time": 1875000, + "extrinsic_time": 3767000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -458,96 +349,27 @@ ] ], "extrinsic_time": 0, - "storage_root_time": 1000, - "reads": 0, - "repeat_reads": 0, - "writes": 0, - "repeat_writes": 0, - "proof_size": 0 - }, - { - "components": [ - [ - "i", - 1000 - ] - ], - "extrinsic_time": 2406000, - "storage_root_time": 1000, - "reads": 1000, - "repeat_reads": 0, - "writes": 0, - "repeat_writes": 0, - "proof_size": 0 - } - ] - }, - { - "pallet": "frame_benchmarking", - "instance": "BaselineBench :: < Runtime >", - "benchmark": "storage_write", - "time_results": [ - { - "components": [ - [ - "i", - 0 - ] - ], - "extrinsic_time": 0, - "storage_root_time": 1000, - "reads": 0, - "repeat_reads": 0, - "writes": 0, - "repeat_writes": 0, - "proof_size": 0 - }, - { - "components": [ - [ - "i", - 1000 - ] - ], - "extrinsic_time": 324000, "storage_root_time": 2000, "reads": 0, "repeat_reads": 0, "writes": 0, "repeat_writes": 0, "proof_size": 0 - } - ], - "db_results": [ + }, { "components": [ [ "i", - 0 + 100 ] ], - "extrinsic_time": 0, + "extrinsic_time": 3798000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, "repeat_writes": 0, "proof_size": 0 - }, - { - "components": [ - [ - "i", - 1000 - ] - ], - "extrinsic_time": 380000, - "storage_root_time": 5000, - "reads": 0, - "repeat_reads": 0, - "writes": 1000, - "repeat_writes": 0, - "proof_size": 0 } ] }, @@ -563,7 +385,7 @@ 0 ] ], - "extrinsic_time": 3000, + "extrinsic_time": 2000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -578,7 +400,7 @@ 3932160 ] ], - "extrinsic_time": 336000, + "extrinsic_time": 356000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -595,7 +417,7 @@ 0 ] ], - "extrinsic_time": 4000, + "extrinsic_time": 3000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -610,7 +432,7 @@ 3932160 ] ], - "extrinsic_time": 353000, + "extrinsic_time": 375000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -632,8 +454,8 @@ 0 ] ], - "extrinsic_time": 12000, - "storage_root_time": 1000, + "extrinsic_time": 4000, + "storage_root_time": 0, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -647,7 +469,7 @@ 3932160 ] ], - "extrinsic_time": 4281000, + "extrinsic_time": 3977000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -664,7 +486,7 @@ 0 ] ], - "extrinsic_time": 12000, + "extrinsic_time": 6000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -679,7 +501,7 @@ 3932160 ] ], - "extrinsic_time": 4568000, + "extrinsic_time": 4060000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -696,7 +518,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 8000, + "extrinsic_time": 4000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -708,7 +530,7 @@ "db_results": [ { "components": [], - "extrinsic_time": 10000, + "extrinsic_time": 5000, "storage_root_time": 1000, "reads": 1, "repeat_reads": 0, @@ -730,7 +552,7 @@ 0 ] ], - "extrinsic_time": 4000, + "extrinsic_time": 2000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -745,8 +567,8 @@ 1000 ] ], - "extrinsic_time": 632000, - "storage_root_time": 2000, + "extrinsic_time": 633000, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -762,7 +584,7 @@ 0 ] ], - "extrinsic_time": 5000, + "extrinsic_time": 2000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -777,7 +599,7 @@ 1000 ] ], - "extrinsic_time": 627000, + "extrinsic_time": 602000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -799,7 +621,7 @@ 0 ] ], - "extrinsic_time": 3000, + "extrinsic_time": 1000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -814,8 +636,8 @@ 1000 ] ], - "extrinsic_time": 580000, - "storage_root_time": 3000, + "extrinsic_time": 496000, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -831,7 +653,7 @@ 0 ] ], - "extrinsic_time": 4000, + "extrinsic_time": 2000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -846,7 +668,7 @@ 1000 ] ], - "extrinsic_time": 520000, + "extrinsic_time": 483000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -868,7 +690,7 @@ 0 ] ], - "extrinsic_time": 7000, + "extrinsic_time": 5000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -883,8 +705,8 @@ 1000 ] ], - "extrinsic_time": 1467000, - "storage_root_time": 3000, + "extrinsic_time": 1146000, + "storage_root_time": 4000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -900,13 +722,13 @@ 0 ] ], - "extrinsic_time": 7000, + "extrinsic_time": 5000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 149 }, { "components": [ @@ -915,13 +737,13 @@ 1000 ] ], - "extrinsic_time": 1201000, + "extrinsic_time": 1607000, "storage_root_time": 1000, - "reads": 0, + "reads": 1000, "repeat_reads": 0, "writes": 1000, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 69676 } ] }, @@ -937,7 +759,7 @@ 0 ] ], - "extrinsic_time": 82000, + "extrinsic_time": 78000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -952,7 +774,7 @@ 1 ] ], - "extrinsic_time": 83000, + "extrinsic_time": 77000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -969,7 +791,7 @@ 0 ] ], - "extrinsic_time": 82000, + "extrinsic_time": 80000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -984,7 +806,7 @@ 1 ] ], - "extrinsic_time": 84000, + "extrinsic_time": 77000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -997,11 +819,11 @@ { "pallet": "pallet_balances", "instance": "Balances", - "benchmark": "transfer", + "benchmark": "transfer_allow_death", "time_results": [ { "components": [], - "extrinsic_time": 37000, + "extrinsic_time": 38000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1013,13 +835,13 @@ "db_results": [ { "components": [], - "extrinsic_time": 39000, + "extrinsic_time": 49000, "storage_root_time": 1000, "reads": 2, - "repeat_reads": 2, + "repeat_reads": 11, "writes": 2, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 103 } ] }, @@ -1030,7 +852,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 25000, + "extrinsic_time": 21000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1042,10 +864,10 @@ "db_results": [ { "components": [], - "extrinsic_time": 28000, + "extrinsic_time": 27000, "storage_root_time": 1000, "reads": 1, - "repeat_reads": 1, + "repeat_reads": 5, "writes": 1, "repeat_writes": 0, "proof_size": 0 @@ -1055,11 +877,11 @@ { "pallet": "pallet_balances", "instance": "Balances", - "benchmark": "set_balance_creating", + "benchmark": "force_set_balance_creating", "time_results": [ { "components": [], - "extrinsic_time": 20000, + "extrinsic_time": 9000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1071,24 +893,24 @@ "db_results": [ { "components": [], - "extrinsic_time": 21000, + "extrinsic_time": 12000, "storage_root_time": 1000, "reads": 1, - "repeat_reads": 1, + "repeat_reads": 3, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 103 } ] }, { "pallet": "pallet_balances", "instance": "Balances", - "benchmark": "set_balance_killing", + "benchmark": "force_set_balance_killing", "time_results": [ { "components": [], - "extrinsic_time": 21000, + "extrinsic_time": 12000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1100,13 +922,13 @@ "db_results": [ { "components": [], - "extrinsic_time": 22000, - "storage_root_time": 0, + "extrinsic_time": 16000, + "storage_root_time": 1000, "reads": 1, - "repeat_reads": 1, + "repeat_reads": 2, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 103 } ] }, @@ -1117,7 +939,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 37000, + "extrinsic_time": 39000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1129,13 +951,13 @@ "db_results": [ { "components": [], - "extrinsic_time": 37000, + "extrinsic_time": 50000, "storage_root_time": 1000, "reads": 3, - "repeat_reads": 5, + "repeat_reads": 22, "writes": 3, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 242 } ] }, @@ -1146,7 +968,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 30000, + "extrinsic_time": 25000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1161,7 +983,7 @@ "extrinsic_time": 31000, "storage_root_time": 1000, "reads": 1, - "repeat_reads": 1, + "repeat_reads": 5, "writes": 1, "repeat_writes": 0, "proof_size": 0 @@ -1175,8 +997,8 @@ "time_results": [ { "components": [], - "extrinsic_time": 17000, - "storage_root_time": 0, + "extrinsic_time": 10000, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -1187,13 +1009,82 @@ "db_results": [ { "components": [], - "extrinsic_time": 19000, + "extrinsic_time": 13000, + "storage_root_time": 1000, + "reads": 1, + "repeat_reads": 3, + "writes": 1, + "repeat_writes": 0, + "proof_size": 103 + } + ] + }, + { + "pallet": "pallet_balances", + "instance": "Balances", + "benchmark": "upgrade_accounts", + "time_results": [ + { + "components": [ + [ + "u", + 1 + ] + ], + "extrinsic_time": 11000, + "storage_root_time": 1000, + "reads": 0, + "repeat_reads": 0, + "writes": 0, + "repeat_writes": 0, + "proof_size": 0 + }, + { + "components": [ + [ + "u", + 1000 + ] + ], + "extrinsic_time": 8381000, + "storage_root_time": 1000, + "reads": 0, + "repeat_reads": 0, + "writes": 0, + "repeat_writes": 0, + "proof_size": 0 + } + ], + "db_results": [ + { + "components": [ + [ + "u", + 1 + ] + ], + "extrinsic_time": 13000, "storage_root_time": 1000, "reads": 1, "repeat_reads": 2, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 103 + }, + { + "components": [ + [ + "u", + 1000 + ] + ], + "extrinsic_time": 10398000, + "storage_root_time": 6000, + "reads": 1000, + "repeat_reads": 2000, + "writes": 1000, + "repeat_writes": 0, + "proof_size": 135643 } ] }, @@ -1213,8 +1104,8 @@ 30719999 ] ], - "extrinsic_time": 4304486000, - "storage_root_time": 10000, + "extrinsic_time": 3380149000, + "storage_root_time": 7000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -1232,7 +1123,7 @@ 30719999 ] ], - "extrinsic_time": 4243473000, + "extrinsic_time": 3745654000, "storage_root_time": 8000, "reads": 0, "repeat_reads": 0, @@ -1251,7 +1142,7 @@ 0 ] ], - "extrinsic_time": 127000, + "extrinsic_time": 154000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1270,8 +1161,8 @@ 30719999 ] ], - "extrinsic_time": 3909973000, - "storage_root_time": 12000, + "extrinsic_time": 3509815000, + "storage_root_time": 7000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -1291,13 +1182,13 @@ 30719999 ] ], - "extrinsic_time": 3845321000, - "storage_root_time": 8000, + "extrinsic_time": 4268126000, + "storage_root_time": 7000, "reads": 4, "repeat_reads": 0, "writes": 2, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 583680173 }, { "components": [ @@ -1310,13 +1201,13 @@ 30719999 ] ], - "extrinsic_time": 4022003000, - "storage_root_time": 7000, + "extrinsic_time": 4439143000, + "storage_root_time": 9000, "reads": 4, "repeat_reads": 0, "writes": 2, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 583803020 }, { "components": [ @@ -1329,13 +1220,13 @@ 0 ] ], - "extrinsic_time": 132000, + "extrinsic_time": 185000, "storage_root_time": 1000, "reads": 4, "repeat_reads": 0, "writes": 2, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 123030 }, { "components": [ @@ -1348,13 +1239,13 @@ 30719999 ] ], - "extrinsic_time": 3888667000, - "storage_root_time": 8000, + "extrinsic_time": 4663001000, + "storage_root_time": 11000, "reads": 4, "repeat_reads": 0, "writes": 2, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 583803020 } ] }, @@ -1370,8 +1261,8 @@ 0 ] ], - "extrinsic_time": 7000, - "storage_root_time": 2000, + "extrinsic_time": 3000, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -1385,8 +1276,8 @@ 3072 ] ], - "extrinsic_time": 6000, - "storage_root_time": 1000, + "extrinsic_time": 3000, + "storage_root_time": 0, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -1402,7 +1293,7 @@ 0 ] ], - "extrinsic_time": 9000, + "extrinsic_time": 4000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1417,7 +1308,7 @@ 3072 ] ], - "extrinsic_time": 6000, + "extrinsic_time": 3000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1440,7 +1331,7 @@ ] ], "extrinsic_time": 6000, - "storage_root_time": 1000, + "storage_root_time": 0, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -1454,7 +1345,7 @@ 3072 ] ], - "extrinsic_time": 74000, + "extrinsic_time": 116000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1471,13 +1362,13 @@ 0 ] ], - "extrinsic_time": 6000, + "extrinsic_time": 10000, "storage_root_time": 1000, "reads": 2, "repeat_reads": 1, "writes": 0, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 141 }, { "components": [ @@ -1486,13 +1377,13 @@ 3072 ] ], - "extrinsic_time": 79000, + "extrinsic_time": 122000, "storage_root_time": 1000, "reads": 2, "repeat_reads": 0, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 123028 } ] }, @@ -1503,7 +1394,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 58000, + "extrinsic_time": 54000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1515,13 +1406,13 @@ "db_results": [ { "components": [], - "extrinsic_time": 60000, + "extrinsic_time": 64000, "storage_root_time": 1000, "reads": 4, "repeat_reads": 0, "writes": 2, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 132 } ] }, @@ -1537,7 +1428,7 @@ 0 ] ], - "extrinsic_time": 79000, + "extrinsic_time": 76000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1552,7 +1443,7 @@ 1 ] ], - "extrinsic_time": 77000, + "extrinsic_time": 95000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1569,7 +1460,7 @@ 0 ] ], - "extrinsic_time": 78000, + "extrinsic_time": 77000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1584,7 +1475,7 @@ 1 ] ], - "extrinsic_time": 79000, + "extrinsic_time": 75000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1601,7 +1492,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 5000, + "extrinsic_time": 2000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1613,7 +1504,7 @@ "db_results": [ { "components": [], - "extrinsic_time": 5000, + "extrinsic_time": 3000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1639,7 +1530,7 @@ 100 ] ], - "extrinsic_time": 94000, + "extrinsic_time": 85000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1658,8 +1549,8 @@ 100 ] ], - "extrinsic_time": 142000, - "storage_root_time": 2000, + "extrinsic_time": 134000, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -1677,7 +1568,7 @@ 1 ] ], - "extrinsic_time": 117000, + "extrinsic_time": 94000, "storage_root_time": 2000, "reads": 0, "repeat_reads": 0, @@ -1696,7 +1587,7 @@ 100 ] ], - "extrinsic_time": 136000, + "extrinsic_time": 124000, "storage_root_time": 2000, "reads": 0, "repeat_reads": 0, @@ -1717,13 +1608,13 @@ 100 ] ], - "extrinsic_time": 96000, + "extrinsic_time": 102000, "storage_root_time": 1000, "reads": 5, "repeat_reads": 4, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 293 }, { "components": [ @@ -1736,13 +1627,13 @@ 100 ] ], - "extrinsic_time": 135000, - "storage_root_time": 2000, + "extrinsic_time": 199000, + "storage_root_time": 3000, "reads": 4, "repeat_reads": 2, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 32265 }, { "components": [ @@ -1755,13 +1646,13 @@ 1 ] ], - "extrinsic_time": 119000, + "extrinsic_time": 108000, "storage_root_time": 2000, "reads": 4, "repeat_reads": 2, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 32265 }, { "components": [ @@ -1774,13 +1665,13 @@ 100 ] ], - "extrinsic_time": 134000, - "storage_root_time": 2000, + "extrinsic_time": 158000, + "storage_root_time": 4000, "reads": 4, "repeat_reads": 2, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 32265 } ] }, @@ -1796,7 +1687,7 @@ 0 ] ], - "extrinsic_time": 14000, + "extrinsic_time": 9000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1811,7 +1702,7 @@ 10000 ] ], - "extrinsic_time": 16000, + "extrinsic_time": 11000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1828,7 +1719,7 @@ 0 ] ], - "extrinsic_time": 12000, + "extrinsic_time": 10000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1843,8 +1734,8 @@ 10000 ] ], - "extrinsic_time": 20000, - "storage_root_time": 1000, + "extrinsic_time": 11000, + "storage_root_time": 2000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -1869,7 +1760,7 @@ 10000 ] ], - "extrinsic_time": 37000, + "extrinsic_time": 31000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1888,7 +1779,7 @@ 10000 ] ], - "extrinsic_time": 44000, + "extrinsic_time": 35000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1907,7 +1798,7 @@ 0 ] ], - "extrinsic_time": 34000, + "extrinsic_time": 24000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1926,7 +1817,7 @@ 10000 ] ], - "extrinsic_time": 44000, + "extrinsic_time": 49000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1947,13 +1838,13 @@ 10000 ] ], - "extrinsic_time": 42000, + "extrinsic_time": 37000, "storage_root_time": 1000, - "reads": 2, + "reads": 1, "repeat_reads": 0, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 145 }, { "components": [ @@ -1966,13 +1857,13 @@ 10000 ] ], - "extrinsic_time": 44000, + "extrinsic_time": 41000, "storage_root_time": 1000, - "reads": 2, + "reads": 1, "repeat_reads": 0, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 564 }, { "components": [ @@ -1985,13 +1876,13 @@ 0 ] ], - "extrinsic_time": 35000, + "extrinsic_time": 30000, "storage_root_time": 1000, - "reads": 2, + "reads": 1, "repeat_reads": 0, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 564 }, { "components": [ @@ -2004,13 +1895,13 @@ 10000 ] ], - "extrinsic_time": 44000, + "extrinsic_time": 50000, "storage_root_time": 1000, - "reads": 2, + "reads": 1, "repeat_reads": 0, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 564 } ] }, @@ -2030,7 +1921,7 @@ 10000 ] ], - "extrinsic_time": 30000, + "extrinsic_time": 26000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2049,8 +1940,8 @@ 10000 ] ], - "extrinsic_time": 34000, - "storage_root_time": 0, + "extrinsic_time": 28000, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -2068,7 +1959,7 @@ 0 ] ], - "extrinsic_time": 25000, + "extrinsic_time": 17000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2087,8 +1978,8 @@ 10000 ] ], - "extrinsic_time": 37000, - "storage_root_time": 1000, + "extrinsic_time": 35000, + "storage_root_time": 2000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -2108,13 +1999,13 @@ 10000 ] ], - "extrinsic_time": 32000, - "storage_root_time": 1000, + "extrinsic_time": 28000, + "storage_root_time": 0, "reads": 1, "repeat_reads": 0, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 248 }, { "components": [ @@ -2127,13 +2018,13 @@ 10000 ] ], - "extrinsic_time": 36000, + "extrinsic_time": 33000, "storage_root_time": 1000, "reads": 1, "repeat_reads": 0, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 248 }, { "components": [ @@ -2146,13 +2037,13 @@ 0 ] ], - "extrinsic_time": 26000, + "extrinsic_time": 22000, "storage_root_time": 1000, "reads": 1, "repeat_reads": 0, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 248 }, { "components": [ @@ -2165,13 +2056,13 @@ 10000 ] ], - "extrinsic_time": 35000, + "extrinsic_time": 40000, "storage_root_time": 1000, "reads": 1, "repeat_reads": 0, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 248 } ] }, @@ -2191,7 +2082,7 @@ 10000 ] ], - "extrinsic_time": 39000, + "extrinsic_time": 34000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2210,7 +2101,7 @@ 10000 ] ], - "extrinsic_time": 45000, + "extrinsic_time": 42000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2229,7 +2120,7 @@ 0 ] ], - "extrinsic_time": 57000, + "extrinsic_time": 52000, "storage_root_time": 2000, "reads": 0, "repeat_reads": 0, @@ -2248,8 +2139,8 @@ 10000 ] ], - "extrinsic_time": 52000, - "storage_root_time": 1000, + "extrinsic_time": 60000, + "storage_root_time": 2000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -2269,13 +2160,13 @@ 10000 ] ], - "extrinsic_time": 41000, - "storage_root_time": 0, + "extrinsic_time": 39000, + "storage_root_time": 1000, "reads": 2, - "repeat_reads": 2, + "repeat_reads": 3, "writes": 2, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 351 }, { "components": [ @@ -2288,13 +2179,13 @@ 10000 ] ], - "extrinsic_time": 47000, - "storage_root_time": 1000, + "extrinsic_time": 46000, + "storage_root_time": 2000, "reads": 2, - "repeat_reads": 2, + "repeat_reads": 3, "writes": 2, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 4752 }, { "components": [ @@ -2307,13 +2198,13 @@ 0 ] ], - "extrinsic_time": 48000, + "extrinsic_time": 50000, "storage_root_time": 2000, "reads": 2, - "repeat_reads": 2, + "repeat_reads": 3, "writes": 2, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 4752 }, { "components": [ @@ -2326,13 +2217,13 @@ 10000 ] ], - "extrinsic_time": 49000, + "extrinsic_time": 47000, "storage_root_time": 1000, "reads": 2, - "repeat_reads": 2, + "repeat_reads": 3, "writes": 2, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 4752 } ] }, @@ -2348,7 +2239,7 @@ 2 ] ], - "extrinsic_time": 30000, + "extrinsic_time": 23000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2363,8 +2254,8 @@ 128 ] ], - "extrinsic_time": 32000, - "storage_root_time": 1000, + "extrinsic_time": 26000, + "storage_root_time": 2000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -2380,13 +2271,13 @@ 2 ] ], - "extrinsic_time": 31000, - "storage_root_time": 2000, - "reads": 2, + "extrinsic_time": 26000, + "storage_root_time": 1000, + "reads": 1, "repeat_reads": 0, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 145 }, { "components": [ @@ -2395,13 +2286,13 @@ 128 ] ], - "extrinsic_time": 34000, + "extrinsic_time": 38000, "storage_root_time": 1000, - "reads": 2, + "reads": 1, "repeat_reads": 0, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 564 } ] }, @@ -2417,7 +2308,7 @@ 2 ] ], - "extrinsic_time": 20000, + "extrinsic_time": 12000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2432,7 +2323,7 @@ 128 ] ], - "extrinsic_time": 24000, + "extrinsic_time": 16000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2449,13 +2340,13 @@ 2 ] ], - "extrinsic_time": 21000, + "extrinsic_time": 17000, "storage_root_time": 1000, "reads": 1, "repeat_reads": 0, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 248 }, { "components": [ @@ -2464,13 +2355,13 @@ 128 ] ], - "extrinsic_time": 24000, + "extrinsic_time": 20000, "storage_root_time": 1000, "reads": 1, "repeat_reads": 0, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 248 } ] }, @@ -2486,7 +2377,7 @@ 2 ] ], - "extrinsic_time": 25000, + "extrinsic_time": 21000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2501,7 +2392,7 @@ 128 ] ], - "extrinsic_time": 35000, + "extrinsic_time": 31000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2518,13 +2409,13 @@ 2 ] ], - "extrinsic_time": 27000, + "extrinsic_time": 26000, "storage_root_time": 1000, "reads": 1, "repeat_reads": 0, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 351 }, { "components": [ @@ -2533,13 +2424,13 @@ 128 ] ], - "extrinsic_time": 34000, + "extrinsic_time": 35000, "storage_root_time": 1000, "reads": 1, "repeat_reads": 0, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 719 } ] }, @@ -2550,7 +2441,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 11000, + "extrinsic_time": 10000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2568,7 +2459,7 @@ "repeat_reads": 0, "writes": 1, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 278 } ] }, @@ -2591,13 +2482,13 @@ "db_results": [ { "components": [], - "extrinsic_time": 4000, + "extrinsic_time": 6000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 94 } ] }, @@ -2608,7 +2499,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 93000, + "extrinsic_time": 99000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2620,13 +2511,13 @@ "db_results": [ { "components": [], - "extrinsic_time": 97000, - "storage_root_time": 1000, - "reads": 8, - "repeat_reads": 4, + "extrinsic_time": 110000, + "storage_root_time": 2000, + "reads": 9, + "repeat_reads": 8, "writes": 5, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 593 } ] }, @@ -2649,13 +2540,13 @@ "db_results": [ { "components": [], - "extrinsic_time": 35000, + "extrinsic_time": 34000, "storage_root_time": 1000, "reads": 3, - "repeat_reads": 3, + "repeat_reads": 7, "writes": 4, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 264 } ] }, @@ -2666,8 +2557,8 @@ "time_results": [ { "components": [], - "extrinsic_time": 30000, - "storage_root_time": 1000, + "extrinsic_time": 27000, + "storage_root_time": 0, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -2678,13 +2569,13 @@ "db_results": [ { "components": [], - "extrinsic_time": 33000, + "extrinsic_time": 34000, "storage_root_time": 1000, "reads": 3, - "repeat_reads": 3, + "repeat_reads": 7, "writes": 4, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 264 } ] }, @@ -2695,7 +2586,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 32000, + "extrinsic_time": 26000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2707,13 +2598,13 @@ "db_results": [ { "components": [], - "extrinsic_time": 34000, + "extrinsic_time": 38000, "storage_root_time": 1000, "reads": 3, - "repeat_reads": 3, + "repeat_reads": 7, "writes": 4, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 264 } ] }, @@ -2729,7 +2620,7 @@ 0 ] ], - "extrinsic_time": 11000, + "extrinsic_time": 3000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2744,7 +2635,7 @@ 1000 ] ], - "extrinsic_time": 1867000, + "extrinsic_time": 2104000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2761,7 +2652,7 @@ 0 ] ], - "extrinsic_time": 12000, + "extrinsic_time": 4000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2776,7 +2667,7 @@ 1000 ] ], - "extrinsic_time": 1911000, + "extrinsic_time": 2314000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2793,8 +2684,8 @@ "time_results": [ { "components": [], - "extrinsic_time": 13000, - "storage_root_time": 1000, + "extrinsic_time": 3000, + "storage_root_time": 0, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -2805,7 +2696,7 @@ "db_results": [ { "components": [], - "extrinsic_time": 6000, + "extrinsic_time": 5000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2827,7 +2718,7 @@ 0 ] ], - "extrinsic_time": 13000, + "extrinsic_time": 4000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2842,7 +2733,7 @@ 1000 ] ], - "extrinsic_time": 2124000, + "extrinsic_time": 2407000, "storage_root_time": 3000, "reads": 0, "repeat_reads": 0, @@ -2859,7 +2750,7 @@ 0 ] ], - "extrinsic_time": 13000, + "extrinsic_time": 5000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2874,8 +2765,8 @@ 1000 ] ], - "extrinsic_time": 2030000, - "storage_root_time": 1000, + "extrinsic_time": 2621000, + "storage_root_time": 2000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -2891,7 +2782,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 13000, + "extrinsic_time": 6000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2903,8 +2794,8 @@ "db_results": [ { "components": [], - "extrinsic_time": 14000, - "storage_root_time": 1000, + "extrinsic_time": 7000, + "storage_root_time": 0, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -2925,7 +2816,7 @@ 0 ] ], - "extrinsic_time": 10000, + "extrinsic_time": 5000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2940,8 +2831,8 @@ 1000 ] ], - "extrinsic_time": 1822000, - "storage_root_time": 2000, + "extrinsic_time": 2005000, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -2957,8 +2848,8 @@ 0 ] ], - "extrinsic_time": 12000, - "storage_root_time": 1000, + "extrinsic_time": 5000, + "storage_root_time": 2000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -2972,7 +2863,7 @@ 1000 ] ], - "extrinsic_time": 2074000, + "extrinsic_time": 2335000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2989,7 +2880,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 35000, + "extrinsic_time": 36000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -3001,13 +2892,13 @@ "db_results": [ { "components": [], - "extrinsic_time": 38000, + "extrinsic_time": 41000, "storage_root_time": 1000, - "reads": 5, - "repeat_reads": 2, + "reads": 6, + "repeat_reads": 3, "writes": 3, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 488 } ] }, @@ -3018,7 +2909,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 38000, + "extrinsic_time": 32000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -3030,13 +2921,13 @@ "db_results": [ { "components": [], - "extrinsic_time": 40000, - "storage_root_time": 0, - "reads": 5, - "repeat_reads": 2, + "extrinsic_time": 42000, + "storage_root_time": 1000, + "reads": 6, + "repeat_reads": 3, "writes": 3, "repeat_writes": 0, - "proof_size": 0 + "proof_size": 488 } ] } diff --git a/crates/humanode-runtime/src/weights/frame_system.rs b/crates/humanode-runtime/src/weights/frame_system.rs index b4564aa9e..0a03907b6 100644 --- a/crates/humanode-runtime/src/weights/frame_system.rs +++ b/crates/humanode-runtime/src/weights/frame_system.rs @@ -13,36 +13,55 @@ pub struct WeightInfo(PhantomData); impl frame_system::WeightInfo for WeightInfo { /// The range of component `b` is `[0, 3932160]`. fn remark(_b: u32, ) -> Weight { - // Minimum execution time: 3_000 nanoseconds. - Weight::from_parts(336_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(356_000_000, 0) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(_b: u32, ) -> Weight { - // Minimum execution time: 12_000 nanoseconds. - Weight::from_parts(4_281_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(3_977_000_000, 0) } fn set_heap_pages() -> Weight { - // Minimum execution time: 8_000 nanoseconds. - Weight::from_parts(8_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(4_000_000, 0) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } /// The range of component `i` is `[0, 1000]`. fn set_storage(_i: u32, ) -> Weight { - // Minimum execution time: 4_000 nanoseconds. - Weight::from_parts(632_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(633_000_000, 0) .saturating_add(T::DbWeight::get().writes(1000)) } /// The range of component `i` is `[0, 1000]`. fn kill_storage(_i: u32, ) -> Weight { - // Minimum execution time: 3_000 nanoseconds. - Weight::from_parts(580_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 1_000_000 picoseconds. + Weight::from_parts(496_000_000, 0) .saturating_add(T::DbWeight::get().writes(1000)) } /// The range of component `p` is `[0, 1000]`. fn kill_prefix(_p: u32, ) -> Weight { - // Minimum execution time: 7_000 nanoseconds. - Weight::from_parts(1_467_000_000, 0) + // Proof Size summary in bytes: + // Measured: `149 + p * (69 ±0)` + // Estimated: `0` + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(1_146_000_000, 0) + .saturating_add(T::DbWeight::get().reads(1000)) .saturating_add(T::DbWeight::get().writes(1000)) } } diff --git a/crates/humanode-runtime/src/weights/mod.rs b/crates/humanode-runtime/src/weights/mod.rs index c2f5a36a1..f82f0af10 100644 --- a/crates/humanode-runtime/src/weights/mod.rs +++ b/crates/humanode-runtime/src/weights/mod.rs @@ -1,4 +1,4 @@ -// DO NOT EDIT! This file is generated by "utils/weights/benchmark-all" command. +// DO NOT EDIT! This file is generated by "./utils/weights/benchmark-all" command. //! Computed benchmarks. //! Mode: "dev" diff --git a/crates/humanode-runtime/src/weights/pallet_balances.rs b/crates/humanode-runtime/src/weights/pallet_balances.rs index 0115c02d0..e98f2be3f 100644 --- a/crates/humanode-runtime/src/weights/pallet_balances.rs +++ b/crates/humanode-runtime/src/weights/pallet_balances.rs @@ -12,48 +12,76 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_balances::WeightInfo for WeightInfo { fn transfer_allow_death() -> Weight { - // Minimum execution time: 37_000 nanoseconds. - Weight::from_parts(37_000_000, 0) + // Proof Size summary in bytes: + // Measured: `103` + // Estimated: `0` + // Minimum execution time: 38_000_000 picoseconds. + Weight::from_parts(38_000_000, 0) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } fn transfer_keep_alive() -> Weight { - // Minimum execution time: 25_000 nanoseconds. - Weight::from_parts(25_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 21_000_000 picoseconds. + Weight::from_parts(21_000_000, 0) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } fn force_set_balance_creating() -> Weight { - // Minimum execution time: 20_000 nanoseconds. - Weight::from_parts(20_000_000, 0) + // Proof Size summary in bytes: + // Measured: `103` + // Estimated: `0` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } fn force_set_balance_killing() -> Weight { - // Minimum execution time: 21_000 nanoseconds. - Weight::from_parts(21_000_000, 0) + // Proof Size summary in bytes: + // Measured: `103` + // Estimated: `0` + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(12_000_000, 0) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } fn force_transfer() -> Weight { - // Minimum execution time: 37_000 nanoseconds. - Weight::from_parts(37_000_000, 0) + // Proof Size summary in bytes: + // Measured: `242` + // Estimated: `0` + // Minimum execution time: 39_000_000 picoseconds. + Weight::from_parts(39_000_000, 0) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } fn transfer_all() -> Weight { - // Minimum execution time: 30_000 nanoseconds. - Weight::from_parts(30_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 25_000_000 picoseconds. + Weight::from_parts(25_000_000, 0) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } fn force_unreserve() -> Weight { - // Minimum execution time: 17_000 nanoseconds. - Weight::from_parts(17_000_000, 0) + // Proof Size summary in bytes: + // Measured: `103` + // Estimated: `0` + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(10_000_000, 0) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + /// The range of component `u` is `[1, 1000]`. fn upgrade_accounts(_u: u32, ) -> Weight { - todo!() + // Proof Size summary in bytes: + // Measured: `0 + u * (135 ±0)` + // Estimated: `0` + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(8_381_000_000, 0) + .saturating_add(T::DbWeight::get().reads(1000)) + .saturating_add(T::DbWeight::get().writes(1000)) } } diff --git a/crates/humanode-runtime/src/weights/pallet_bioauth.rs b/crates/humanode-runtime/src/weights/pallet_bioauth.rs index 280b5f356..4ac1b3b87 100644 --- a/crates/humanode-runtime/src/weights/pallet_bioauth.rs +++ b/crates/humanode-runtime/src/weights/pallet_bioauth.rs @@ -13,24 +13,35 @@ pub struct WeightInfo(PhantomData); impl pallet_bioauth::WeightInfo for WeightInfo { /// The range of component `n` is `[0, 30719999]`. /// The range of component `a` is `[0, 3071]`. - fn authenticate(_a: u32, n: u32, ) -> Weight { - // Minimum execution time: 127_000 nanoseconds. - Weight::from_parts(227_889_999_931, 0) - // Standard Error: 9_401 - .saturating_add(Weight::from_parts(132_701, 0).saturating_mul(n.into())) + fn authenticate(a: u32, n: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `183 + a * (40 ±0) + n * (19 ±0)` + // Estimated: `0` + // Minimum execution time: 154_000_000 picoseconds. + Weight::from_parts(154_000_000, 0) + // Standard Error: 40_799_410 + .saturating_add(Weight::from_parts(32_248_192, 0).saturating_mul(a.into())) + // Standard Error: 4_078 + .saturating_add(Weight::from_parts(113_249, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } /// The range of component `a` is `[0, 3072]`. fn set_robonode_public_key(_a: u32, ) -> Weight { - // Minimum execution time: 6_000 nanoseconds. - Weight::from_parts(7_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) .saturating_add(T::DbWeight::get().writes(2)) } /// The range of component `a` is `[0, 3072]`. fn on_initialize(_a: u32, ) -> Weight { - // Minimum execution time: 6_000 nanoseconds. - Weight::from_parts(74_000_000, 0) + // Proof Size summary in bytes: + // Measured: `141 + a * (40 ±0)` + // Estimated: `0` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(116_000_000, 0) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/crates/humanode-runtime/src/weights/pallet_evm_accounts_mapping.rs b/crates/humanode-runtime/src/weights/pallet_evm_accounts_mapping.rs index 8c5c10f5a..771936ad0 100644 --- a/crates/humanode-runtime/src/weights/pallet_evm_accounts_mapping.rs +++ b/crates/humanode-runtime/src/weights/pallet_evm_accounts_mapping.rs @@ -12,8 +12,11 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_evm_accounts_mapping::WeightInfo for WeightInfo { fn claim_account() -> Weight { - // Minimum execution time: 58_000 nanoseconds. - Weight::from_parts(58_000_000, 0) + // Proof Size summary in bytes: + // Measured: `132` + // Estimated: `0` + // Minimum execution time: 54_000_000 picoseconds. + Weight::from_parts(54_000_000, 0) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } diff --git a/crates/humanode-runtime/src/weights/pallet_im_online.rs b/crates/humanode-runtime/src/weights/pallet_im_online.rs index 3a2c4209d..7351a317d 100644 --- a/crates/humanode-runtime/src/weights/pallet_im_online.rs +++ b/crates/humanode-runtime/src/weights/pallet_im_online.rs @@ -11,15 +11,18 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_im_online`. pub struct WeightInfo(PhantomData); impl pallet_im_online::WeightInfo for WeightInfo { - /// The range of component `e` is `[1, 100]`. /// The range of component `k` is `[1, 1000]`. + /// The range of component `e` is `[1, 100]`. fn validate_unsigned_and_then_heartbeat(k: u32, e: u32, ) -> Weight { - // Minimum execution time: 94_000 nanoseconds. - Weight::from_parts(71_732_732, 0) - // Standard Error: 5_201 - .saturating_add(Weight::from_parts(45_045, 0).saturating_mul(k.into())) - // Standard Error: 52_486 - .saturating_add(Weight::from_parts(222_222, 0).saturating_mul(e.into())) + // Proof Size summary in bytes: + // Measured: `260 + k * (32 ±0)` + // Estimated: `0` + // Minimum execution time: 85_000_000 picoseconds. + Weight::from_parts(49_602_420, 0) + // Standard Error: 8_668 + .saturating_add(Weight::from_parts(44_044, 0).saturating_mul(k.into())) + // Standard Error: 87_477 + .saturating_add(Weight::from_parts(353_535, 0).saturating_mul(e.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/crates/humanode-runtime/src/weights/pallet_multisig.rs b/crates/humanode-runtime/src/weights/pallet_multisig.rs index 33705b650..a6f20a0a1 100644 --- a/crates/humanode-runtime/src/weights/pallet_multisig.rs +++ b/crates/humanode-runtime/src/weights/pallet_multisig.rs @@ -13,61 +13,82 @@ pub struct WeightInfo(PhantomData); impl pallet_multisig::WeightInfo for WeightInfo { /// The range of component `z` is `[0, 10000]`. fn as_multi_threshold_1(_z: u32, ) -> Weight { - // Minimum execution time: 14_000 nanoseconds. - Weight::from_parts(16_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(11_000_000, 0) } /// The range of component `z` is `[0, 10000]`. /// The range of component `s` is `[2, 128]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 34_000 nanoseconds. - Weight::from_parts(26_888_888, 0) - // Standard Error: 0 - .saturating_add(Weight::from_parts(55_555, 0).saturating_mul(s.into())) - // Standard Error: 0 - .saturating_add(Weight::from_parts(1_000, 0).saturating_mul(z.into())) - .saturating_add(T::DbWeight::get().reads(2)) + // Proof Size summary in bytes: + // Measured: `138 + s * (3 ±0)` + // Estimated: `0` + // Minimum execution time: 24_000_000 picoseconds. + Weight::from_parts(12_825_396, 0) + // Standard Error: 96_225 + .saturating_add(Weight::from_parts(87_301, 0).saturating_mul(s.into())) + // Standard Error: 1_212 + .saturating_add(Weight::from_parts(1_800, 0).saturating_mul(z.into())) + .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// The range of component `s` is `[3, 128]`. /// The range of component `z` is `[0, 10000]`. + /// The range of component `s` is `[3, 128]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { - // Minimum execution time: 25_000 nanoseconds. - Weight::from_parts(19_368_000, 0) - // Standard Error: 20_784 + // Proof Size summary in bytes: + // Measured: `248` + // Estimated: `0` + // Minimum execution time: 17_000_000 picoseconds. + Weight::from_parts(11_368_000, 0) + // Standard Error: 48_497 .saturating_add(Weight::from_parts(44_000, 0).saturating_mul(s.into())) - // Standard Error: 259 - .saturating_add(Weight::from_parts(1_050, 0).saturating_mul(z.into())) + // Standard Error: 606 + .saturating_add(Weight::from_parts(1_450, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// The range of component `s` is `[2, 128]`. /// The range of component `z` is `[0, 10000]`. fn as_multi_complete(s: u32, _z: u32, ) -> Weight { - // Minimum execution time: 39_000 nanoseconds. - Weight::from_parts(47_349_206, 0) - // Standard Error: 48_112 - .saturating_add(Weight::from_parts(75_396, 0).saturating_mul(s.into())) + // Proof Size summary in bytes: + // Measured: `281 + s * (34 ±0)` + // Estimated: `0` + // Minimum execution time: 34_000_000 picoseconds. + Weight::from_parts(34_730_158, 0) + // Standard Error: 123_717 + .saturating_add(Weight::from_parts(134_920, 0).saturating_mul(s.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } /// The range of component `s` is `[2, 128]`. fn approve_as_multi_create(_s: u32, ) -> Weight { - // Minimum execution time: 30_000 nanoseconds. - Weight::from_parts(32_000_000, 0) - .saturating_add(T::DbWeight::get().reads(2)) + // Proof Size summary in bytes: + // Measured: `138 + s * (3 ±0)` + // Estimated: `0` + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(26_000_000, 0) + .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// The range of component `s` is `[2, 128]`. fn approve_as_multi_approve(_s: u32, ) -> Weight { - // Minimum execution time: 20_000 nanoseconds. - Weight::from_parts(24_000_000, 0) + // Proof Size summary in bytes: + // Measured: `248` + // Estimated: `0` + // Minimum execution time: 12_000_000 picoseconds. + Weight::from_parts(16_000_000, 0) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// The range of component `s` is `[2, 128]`. fn cancel_as_multi(_s: u32, ) -> Weight { - // Minimum execution time: 25_000 nanoseconds. - Weight::from_parts(35_000_000, 0) + // Proof Size summary in bytes: + // Measured: `345 + s * (2 ±0)` + // Estimated: `0` + // Minimum execution time: 21_000_000 picoseconds. + Weight::from_parts(31_000_000, 0) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/crates/humanode-runtime/src/weights/pallet_timestamp.rs b/crates/humanode-runtime/src/weights/pallet_timestamp.rs index e10e19d42..1ab11fae5 100644 --- a/crates/humanode-runtime/src/weights/pallet_timestamp.rs +++ b/crates/humanode-runtime/src/weights/pallet_timestamp.rs @@ -12,13 +12,19 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_timestamp::WeightInfo for WeightInfo { fn set() -> Weight { - // Minimum execution time: 11_000 nanoseconds. - Weight::from_parts(11_000_000, 0) + // Proof Size summary in bytes: + // Measured: `278` + // Estimated: `0` + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(10_000_000, 0) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } fn on_finalize() -> Weight { - // Minimum execution time: 4_000 nanoseconds. + // Proof Size summary in bytes: + // Measured: `94` + // Estimated: `0` + // Minimum execution time: 4_000_000 picoseconds. Weight::from_parts(4_000_000, 0) } } diff --git a/crates/humanode-runtime/src/weights/pallet_token_claims.rs b/crates/humanode-runtime/src/weights/pallet_token_claims.rs index 620fbe231..d1803a1ab 100644 --- a/crates/humanode-runtime/src/weights/pallet_token_claims.rs +++ b/crates/humanode-runtime/src/weights/pallet_token_claims.rs @@ -12,26 +12,38 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_token_claims::WeightInfo for WeightInfo { fn claim() -> Weight { - // Minimum execution time: 93_000 nanoseconds. - Weight::from_parts(93_000_000, 0) - .saturating_add(T::DbWeight::get().reads(8)) + // Proof Size summary in bytes: + // Measured: `593` + // Estimated: `0` + // Minimum execution time: 99_000_000 picoseconds. + Weight::from_parts(99_000_000, 0) + .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(5)) } fn add_claim() -> Weight { - // Minimum execution time: 31_000 nanoseconds. + // Proof Size summary in bytes: + // Measured: `264` + // Estimated: `0` + // Minimum execution time: 31_000_000 picoseconds. Weight::from_parts(31_000_000, 0) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) } fn remove_claim() -> Weight { - // Minimum execution time: 30_000 nanoseconds. - Weight::from_parts(30_000_000, 0) + // Proof Size summary in bytes: + // Measured: `264` + // Estimated: `0` + // Minimum execution time: 27_000_000 picoseconds. + Weight::from_parts(27_000_000, 0) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) } fn change_claim() -> Weight { - // Minimum execution time: 32_000 nanoseconds. - Weight::from_parts(32_000_000, 0) + // Proof Size summary in bytes: + // Measured: `264` + // Estimated: `0` + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(26_000_000, 0) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/crates/humanode-runtime/src/weights/pallet_utility.rs b/crates/humanode-runtime/src/weights/pallet_utility.rs index 52f65b149..2a0ca8146 100644 --- a/crates/humanode-runtime/src/weights/pallet_utility.rs +++ b/crates/humanode-runtime/src/weights/pallet_utility.rs @@ -13,25 +13,40 @@ pub struct WeightInfo(PhantomData); impl pallet_utility::WeightInfo for WeightInfo { /// The range of component `c` is `[0, 1000]`. fn batch(_c: u32, ) -> Weight { - // Minimum execution time: 11_000 nanoseconds. - Weight::from_parts(1_867_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(2_104_000_000, 0) } fn as_derivative() -> Weight { - // Minimum execution time: 13_000 nanoseconds. - Weight::from_parts(13_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) } /// The range of component `c` is `[0, 1000]`. fn batch_all(_c: u32, ) -> Weight { - // Minimum execution time: 13_000 nanoseconds. - Weight::from_parts(2_124_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(2_407_000_000, 0) } fn dispatch_as() -> Weight { - // Minimum execution time: 13_000 nanoseconds. - Weight::from_parts(13_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 6_000_000 picoseconds. + Weight::from_parts(6_000_000, 0) } /// The range of component `c` is `[0, 1000]`. fn force_batch(_c: u32, ) -> Weight { - // Minimum execution time: 10_000 nanoseconds. - Weight::from_parts(1_822_000_000, 0) + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(2_005_000_000, 0) } } diff --git a/crates/humanode-runtime/src/weights/pallet_vesting.rs b/crates/humanode-runtime/src/weights/pallet_vesting.rs index ef492ab2b..bdba32899 100644 --- a/crates/humanode-runtime/src/weights/pallet_vesting.rs +++ b/crates/humanode-runtime/src/weights/pallet_vesting.rs @@ -12,15 +12,21 @@ use sp_std::marker::PhantomData; pub struct WeightInfo(PhantomData); impl pallet_vesting::WeightInfo for WeightInfo { fn unlock() -> Weight { - // Minimum execution time: 35_000 nanoseconds. - Weight::from_parts(35_000_000, 0) - .saturating_add(T::DbWeight::get().reads(5)) + // Proof Size summary in bytes: + // Measured: `488` + // Estimated: `0` + // Minimum execution time: 36_000_000 picoseconds. + Weight::from_parts(36_000_000, 0) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } fn update_schedule() -> Weight { - // Minimum execution time: 38_000 nanoseconds. - Weight::from_parts(38_000_000, 0) - .saturating_add(T::DbWeight::get().reads(5)) + // Proof Size summary in bytes: + // Measured: `488` + // Estimated: `0` + // Minimum execution time: 32_000_000 picoseconds. + Weight::from_parts(32_000_000, 0) + .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } } From 492d00f2888b9bccc02d4c45c41be304e70e78ac Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Thu, 15 Feb 2024 20:52:59 +0300 Subject: [PATCH 40/56] Update WEIGHT_TO_FEE constant --- crates/humanode-runtime/src/constants.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/humanode-runtime/src/constants.rs b/crates/humanode-runtime/src/constants.rs index af75aa62e..fa1a9bc8b 100644 --- a/crates/humanode-runtime/src/constants.rs +++ b/crates/humanode-runtime/src/constants.rs @@ -93,7 +93,7 @@ pub mod fees { /// /// We compute the fee to weight multiplier based on the weight of the `balances.transfer` call, /// and try to fit the fee such that a single transfer call costs ~0.1 HMND. - pub const WEIGHT_TO_FEE: Balance = 380_000_000; + pub const WEIGHT_TO_FEE: Balance = 385_000_000; /// The multiplier to get the fee from length. pub const LENGTH_TO_FEE: Balance = 1; From f97810a9e37fb572a45c12c6ced37f9d4da98fd4 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Tue, 16 Apr 2024 14:28:19 +0300 Subject: [PATCH 41/56] Improve handling unbalanced funds --- crates/humanode-runtime/src/currency_swap.rs | 11 ++++--- crates/humanode-runtime/src/lib.rs | 7 ++-- crates/pallet-pot/src/lib.rs | 34 +++++++++++++------- 3 files changed, 33 insertions(+), 19 deletions(-) diff --git a/crates/humanode-runtime/src/currency_swap.rs b/crates/humanode-runtime/src/currency_swap.rs index 8298a6f9b..d69fdef9a 100644 --- a/crates/humanode-runtime/src/currency_swap.rs +++ b/crates/humanode-runtime/src/currency_swap.rs @@ -3,7 +3,8 @@ use sp_runtime::traits::Identity; use crate::{ parameter_types, AccountId, Balances, EvmAccountId, EvmBalances, EvmToNativeSwapBridgePot, - FeesPot, NativeToEvmSwapBridgePot, TreasuryPot, + NativeToEvmSwapBridgePot, PotInstanceEvmToNativeSwapBridge, PotInstanceFees, + PotInstanceTreasury, Runtime, }; parameter_types! { @@ -51,12 +52,12 @@ impl primitives_currency_swap_proxy::Config for EvmToNativeProxyConfig { pub type FeesPotProxy = primitives_currency_swap_proxy::SwapUnbalanced< EvmToNativeProxyConfig, - FeesPot, - EvmToNativeSwapBridgePot, + pallet_pot::DepositUnbalancedCurrency, + pallet_pot::DepositUnbalancedCurrency, >; pub type TreasuryPotProxy = primitives_currency_swap_proxy::SwapUnbalanced< EvmToNativeProxyConfig, - TreasuryPot, - EvmToNativeSwapBridgePot, + pallet_pot::DepositUnbalancedCurrency, + pallet_pot::DepositUnbalancedCurrency, >; diff --git a/crates/humanode-runtime/src/lib.rs b/crates/humanode-runtime/src/lib.rs index 9df3ac6c7..8f31f11be 100644 --- a/crates/humanode-runtime/src/lib.rs +++ b/crates/humanode-runtime/src/lib.rs @@ -445,7 +445,7 @@ impl pallet_balances::Config for Runtime { type Balance = Balance; /// The ubiquitous event type. type RuntimeEvent = RuntimeEvent; - type DustRemoval = TreasuryPot; + type DustRemoval = pallet_pot::DepositUnbalancedFungible; type ExistentialDeposit = ConstU128<500>; type AccountStore = System; type WeightInfo = weights::pallet_balances::WeightInfo; @@ -457,7 +457,10 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; + type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter< + Balances, + pallet_pot::DepositUnbalancedCurrency, + >; type OperationalFeeMultiplier = ConstU8<5>; type WeightToFee = frame_support::weights::ConstantMultiplier< Balance, diff --git a/crates/pallet-pot/src/lib.rs b/crates/pallet-pot/src/lib.rs index 0a8f626bd..c5a2fef77 100644 --- a/crates/pallet-pot/src/lib.rs +++ b/crates/pallet-pot/src/lib.rs @@ -5,11 +5,14 @@ #![cfg_attr(not(feature = "std"), no_std)] -use frame_support::traits::{ - fungible::{Balanced, Credit, Inspect}, - Imbalance, OnUnbalanced, StorageVersion, +use frame_support::{ + pallet_prelude::*, + traits::{ + fungible::{Balanced, Credit, Inspect}, + Currency, Imbalance, OnUnbalanced, StorageVersion, + }, + PalletId, }; -use frame_support::{pallet_prelude::*, traits::Currency, PalletId}; use frame_system::pallet_prelude::*; use sp_runtime::traits::{AccountIdConversion, CheckedSub, MaybeDisplay, Saturating}; @@ -197,30 +200,37 @@ impl, I: 'static> Pallet { } } -impl, I: 'static> OnUnbalanced> for Pallet { +/// Handle unbalanced funds by depositing them into this pot. +/// +/// Implementation for [`Currency`]. +pub struct DepositUnbalancedCurrency(PhantomData<(T, I)>); + +impl, I: 'static> OnUnbalanced> + for DepositUnbalancedCurrency +{ fn on_nonzero_unbalanced(amount: NegativeImbalanceOf) { let numeric_amount = amount.peek(); // Must resolve into existing but better to be safe. - T::Currency::resolve_creating(&Self::account_id(), amount); + T::Currency::resolve_creating(&Pallet::::account_id(), amount); - Self::deposit_event(Event::Deposit { + Pallet::::deposit_event(Event::Deposit { value: numeric_amount, }); } } -/// A helper to handle `OnUnbalanced` implementation over `CreditOf` -/// to avoid conflicting implmentation. -pub struct OnUnbalancedOverCredit(Pallet); +/// Handle unbalanced funds by depositing them into this pot. +/// +/// Implementation for [`Fungible`]. +pub struct DepositUnbalancedFungible(PhantomData<(T, I)>); -impl, I: 'static> OnUnbalanced> for OnUnbalancedOverCredit { +impl, I: 'static> OnUnbalanced> for DepositUnbalancedFungible { fn on_nonzero_unbalanced(amount: CreditOf) { let numeric_amount = amount.peek(); // Pot account already exists. let _ = T::Currency::resolve(&Pallet::::account_id(), amount); - T::Currency::done_deposit(&Pallet::::account_id(), numeric_amount); Pallet::::deposit_event(Event::Deposit { value: numeric_amount, From 014e4460d2bf51ce004da534c5f3a8e70106c741 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Wed, 17 Apr 2024 11:57:17 +0300 Subject: [PATCH 42/56] Fix clippy --- crates/pallet-pot/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/pallet-pot/src/lib.rs b/crates/pallet-pot/src/lib.rs index c5a2fef77..486738446 100644 --- a/crates/pallet-pot/src/lib.rs +++ b/crates/pallet-pot/src/lib.rs @@ -222,7 +222,7 @@ impl, I: 'static> OnUnbalanced> /// Handle unbalanced funds by depositing them into this pot. /// -/// Implementation for [`Fungible`]. +/// Implementation for `Fungible` behavior. pub struct DepositUnbalancedFungible(PhantomData<(T, I)>); impl, I: 'static> OnUnbalanced> for DepositUnbalancedFungible { From 8871304de95283f9a3917ee27d12badb9abcc53c Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Wed, 17 Apr 2024 12:22:37 +0300 Subject: [PATCH 43/56] Rerun benchmark-all --- crates/humanode-runtime/assets/benchmark.json | 322 +++++++++--------- crates/humanode-runtime/src/constants.rs | 2 +- .../src/weights/frame_system.rs | 16 +- crates/humanode-runtime/src/weights/mod.rs | 2 +- .../src/weights/pallet_balances.rs | 24 +- .../src/weights/pallet_bioauth.rs | 16 +- .../src/weights/pallet_im_online.rs | 10 +- .../src/weights/pallet_multisig.rs | 46 +-- .../src/weights/pallet_timestamp.rs | 4 +- .../src/weights/pallet_token_claims.rs | 8 +- .../src/weights/pallet_utility.rs | 12 +- .../src/weights/pallet_vesting.rs | 4 +- 12 files changed, 234 insertions(+), 232 deletions(-) diff --git a/crates/humanode-runtime/assets/benchmark.json b/crates/humanode-runtime/assets/benchmark.json index f276158c7..e6835b461 100644 --- a/crates/humanode-runtime/assets/benchmark.json +++ b/crates/humanode-runtime/assets/benchmark.json @@ -59,7 +59,7 @@ ] ], "extrinsic_time": 0, - "storage_root_time": 1000, + "storage_root_time": 0, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -80,7 +80,7 @@ 0 ] ], - "extrinsic_time": 0, + "extrinsic_time": 1000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -112,7 +112,7 @@ 0 ] ], - "extrinsic_time": 0, + "extrinsic_time": 1000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -181,7 +181,7 @@ 0 ] ], - "extrinsic_time": 0, + "extrinsic_time": 1000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -234,7 +234,7 @@ ] ], "extrinsic_time": 0, - "storage_root_time": 0, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -251,7 +251,7 @@ ] ], "extrinsic_time": 0, - "storage_root_time": 1000, + "storage_root_time": 0, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -282,8 +282,8 @@ "time_results": [ { "components": [], - "extrinsic_time": 14043000, - "storage_root_time": 2000, + "extrinsic_time": 13947000, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -294,7 +294,7 @@ "db_results": [ { "components": [], - "extrinsic_time": 13947000, + "extrinsic_time": 13943000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -331,7 +331,7 @@ 100 ] ], - "extrinsic_time": 3767000, + "extrinsic_time": 3839000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -349,7 +349,7 @@ ] ], "extrinsic_time": 0, - "storage_root_time": 2000, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -363,8 +363,8 @@ 100 ] ], - "extrinsic_time": 3798000, - "storage_root_time": 1000, + "extrinsic_time": 3865000, + "storage_root_time": 2000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -400,7 +400,7 @@ 3932160 ] ], - "extrinsic_time": 356000, + "extrinsic_time": 297000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -417,7 +417,7 @@ 0 ] ], - "extrinsic_time": 3000, + "extrinsic_time": 2000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -432,7 +432,7 @@ 3932160 ] ], - "extrinsic_time": 375000, + "extrinsic_time": 307000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -455,7 +455,7 @@ ] ], "extrinsic_time": 4000, - "storage_root_time": 0, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -469,7 +469,7 @@ 3932160 ] ], - "extrinsic_time": 3977000, + "extrinsic_time": 4095000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -486,7 +486,7 @@ 0 ] ], - "extrinsic_time": 6000, + "extrinsic_time": 5000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -501,7 +501,7 @@ 3932160 ] ], - "extrinsic_time": 4060000, + "extrinsic_time": 4120000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -518,7 +518,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 4000, + "extrinsic_time": 3000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -530,7 +530,7 @@ "db_results": [ { "components": [], - "extrinsic_time": 5000, + "extrinsic_time": 4000, "storage_root_time": 1000, "reads": 1, "repeat_reads": 0, @@ -567,7 +567,7 @@ 1000 ] ], - "extrinsic_time": 633000, + "extrinsic_time": 610000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -585,7 +585,7 @@ ] ], "extrinsic_time": 2000, - "storage_root_time": 1000, + "storage_root_time": 0, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -599,8 +599,8 @@ 1000 ] ], - "extrinsic_time": 602000, - "storage_root_time": 1000, + "extrinsic_time": 674000, + "storage_root_time": 3000, "reads": 0, "repeat_reads": 0, "writes": 1000, @@ -621,7 +621,7 @@ 0 ] ], - "extrinsic_time": 1000, + "extrinsic_time": 2000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -636,7 +636,7 @@ 1000 ] ], - "extrinsic_time": 496000, + "extrinsic_time": 490000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -668,7 +668,7 @@ 1000 ] ], - "extrinsic_time": 483000, + "extrinsic_time": 486000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -691,7 +691,7 @@ ] ], "extrinsic_time": 5000, - "storage_root_time": 1000, + "storage_root_time": 0, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -705,8 +705,8 @@ 1000 ] ], - "extrinsic_time": 1146000, - "storage_root_time": 4000, + "extrinsic_time": 1185000, + "storage_root_time": 2000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -737,8 +737,8 @@ 1000 ] ], - "extrinsic_time": 1607000, - "storage_root_time": 1000, + "extrinsic_time": 1601000, + "storage_root_time": 2000, "reads": 1000, "repeat_reads": 0, "writes": 1000, @@ -759,7 +759,7 @@ 0 ] ], - "extrinsic_time": 78000, + "extrinsic_time": 80000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -774,7 +774,7 @@ 1 ] ], - "extrinsic_time": 77000, + "extrinsic_time": 79000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -792,7 +792,7 @@ ] ], "extrinsic_time": 80000, - "storage_root_time": 1000, + "storage_root_time": 0, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -806,7 +806,7 @@ 1 ] ], - "extrinsic_time": 77000, + "extrinsic_time": 79000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -824,7 +824,7 @@ { "components": [], "extrinsic_time": 38000, - "storage_root_time": 1000, + "storage_root_time": 0, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -835,7 +835,7 @@ "db_results": [ { "components": [], - "extrinsic_time": 49000, + "extrinsic_time": 47000, "storage_root_time": 1000, "reads": 2, "repeat_reads": 11, @@ -852,7 +852,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 21000, + "extrinsic_time": 23000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -864,7 +864,7 @@ "db_results": [ { "components": [], - "extrinsic_time": 27000, + "extrinsic_time": 31000, "storage_root_time": 1000, "reads": 1, "repeat_reads": 5, @@ -893,7 +893,7 @@ "db_results": [ { "components": [], - "extrinsic_time": 12000, + "extrinsic_time": 11000, "storage_root_time": 1000, "reads": 1, "repeat_reads": 3, @@ -910,7 +910,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 12000, + "extrinsic_time": 13000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -923,7 +923,7 @@ { "components": [], "extrinsic_time": 16000, - "storage_root_time": 1000, + "storage_root_time": 0, "reads": 1, "repeat_reads": 2, "writes": 1, @@ -939,7 +939,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 39000, + "extrinsic_time": 41000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -951,7 +951,7 @@ "db_results": [ { "components": [], - "extrinsic_time": 50000, + "extrinsic_time": 54000, "storage_root_time": 1000, "reads": 3, "repeat_reads": 22, @@ -968,7 +968,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 25000, + "extrinsic_time": 26000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -980,7 +980,7 @@ "db_results": [ { "components": [], - "extrinsic_time": 31000, + "extrinsic_time": 32000, "storage_root_time": 1000, "reads": 1, "repeat_reads": 5, @@ -997,7 +997,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 10000, + "extrinsic_time": 11000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1031,7 +1031,7 @@ 1 ] ], - "extrinsic_time": 11000, + "extrinsic_time": 10000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1046,7 +1046,7 @@ 1000 ] ], - "extrinsic_time": 8381000, + "extrinsic_time": 8348000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1078,8 +1078,8 @@ 1000 ] ], - "extrinsic_time": 10398000, - "storage_root_time": 6000, + "extrinsic_time": 10522000, + "storage_root_time": 2000, "reads": 1000, "repeat_reads": 2000, "writes": 1000, @@ -1104,7 +1104,7 @@ 30719999 ] ], - "extrinsic_time": 3380149000, + "extrinsic_time": 3536127000, "storage_root_time": 7000, "reads": 0, "repeat_reads": 0, @@ -1123,8 +1123,8 @@ 30719999 ] ], - "extrinsic_time": 3745654000, - "storage_root_time": 8000, + "extrinsic_time": 3323295000, + "storage_root_time": 6000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -1142,7 +1142,7 @@ 0 ] ], - "extrinsic_time": 154000, + "extrinsic_time": 121000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1161,7 +1161,7 @@ 30719999 ] ], - "extrinsic_time": 3509815000, + "extrinsic_time": 3761076000, "storage_root_time": 7000, "reads": 0, "repeat_reads": 0, @@ -1182,8 +1182,8 @@ 30719999 ] ], - "extrinsic_time": 4268126000, - "storage_root_time": 7000, + "extrinsic_time": 4540184000, + "storage_root_time": 6000, "reads": 4, "repeat_reads": 0, "writes": 2, @@ -1201,8 +1201,8 @@ 30719999 ] ], - "extrinsic_time": 4439143000, - "storage_root_time": 9000, + "extrinsic_time": 4135377000, + "storage_root_time": 7000, "reads": 4, "repeat_reads": 0, "writes": 2, @@ -1220,7 +1220,7 @@ 0 ] ], - "extrinsic_time": 185000, + "extrinsic_time": 127000, "storage_root_time": 1000, "reads": 4, "repeat_reads": 0, @@ -1239,8 +1239,8 @@ 30719999 ] ], - "extrinsic_time": 4663001000, - "storage_root_time": 11000, + "extrinsic_time": 4540042000, + "storage_root_time": 7000, "reads": 4, "repeat_reads": 0, "writes": 2, @@ -1277,7 +1277,7 @@ ] ], "extrinsic_time": 3000, - "storage_root_time": 0, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -1294,7 +1294,7 @@ ] ], "extrinsic_time": 4000, - "storage_root_time": 1000, + "storage_root_time": 2000, "reads": 0, "repeat_reads": 0, "writes": 2, @@ -1331,7 +1331,7 @@ ] ], "extrinsic_time": 6000, - "storage_root_time": 0, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -1345,7 +1345,7 @@ 3072 ] ], - "extrinsic_time": 116000, + "extrinsic_time": 98000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1362,7 +1362,7 @@ 0 ] ], - "extrinsic_time": 10000, + "extrinsic_time": 9000, "storage_root_time": 1000, "reads": 2, "repeat_reads": 1, @@ -1377,7 +1377,7 @@ 3072 ] ], - "extrinsic_time": 122000, + "extrinsic_time": 129000, "storage_root_time": 1000, "reads": 2, "repeat_reads": 0, @@ -1406,7 +1406,7 @@ "db_results": [ { "components": [], - "extrinsic_time": 64000, + "extrinsic_time": 59000, "storage_root_time": 1000, "reads": 4, "repeat_reads": 0, @@ -1428,7 +1428,7 @@ 0 ] ], - "extrinsic_time": 76000, + "extrinsic_time": 75000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1443,7 +1443,7 @@ 1 ] ], - "extrinsic_time": 95000, + "extrinsic_time": 83000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1460,7 +1460,7 @@ 0 ] ], - "extrinsic_time": 77000, + "extrinsic_time": 75000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1475,7 +1475,7 @@ 1 ] ], - "extrinsic_time": 75000, + "extrinsic_time": 78000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1504,7 +1504,7 @@ "db_results": [ { "components": [], - "extrinsic_time": 3000, + "extrinsic_time": 2000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1549,8 +1549,8 @@ 100 ] ], - "extrinsic_time": 134000, - "storage_root_time": 1000, + "extrinsic_time": 125000, + "storage_root_time": 2000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -1568,7 +1568,7 @@ 1 ] ], - "extrinsic_time": 94000, + "extrinsic_time": 99000, "storage_root_time": 2000, "reads": 0, "repeat_reads": 0, @@ -1587,7 +1587,7 @@ 100 ] ], - "extrinsic_time": 124000, + "extrinsic_time": 127000, "storage_root_time": 2000, "reads": 0, "repeat_reads": 0, @@ -1608,7 +1608,7 @@ 100 ] ], - "extrinsic_time": 102000, + "extrinsic_time": 90000, "storage_root_time": 1000, "reads": 5, "repeat_reads": 4, @@ -1627,7 +1627,7 @@ 100 ] ], - "extrinsic_time": 199000, + "extrinsic_time": 164000, "storage_root_time": 3000, "reads": 4, "repeat_reads": 2, @@ -1646,7 +1646,7 @@ 1 ] ], - "extrinsic_time": 108000, + "extrinsic_time": 98000, "storage_root_time": 2000, "reads": 4, "repeat_reads": 2, @@ -1665,8 +1665,8 @@ 100 ] ], - "extrinsic_time": 158000, - "storage_root_time": 4000, + "extrinsic_time": 170000, + "storage_root_time": 3000, "reads": 4, "repeat_reads": 2, "writes": 1, @@ -1687,7 +1687,7 @@ 0 ] ], - "extrinsic_time": 9000, + "extrinsic_time": 8000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1702,7 +1702,7 @@ 10000 ] ], - "extrinsic_time": 11000, + "extrinsic_time": 9000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1719,8 +1719,8 @@ 0 ] ], - "extrinsic_time": 10000, - "storage_root_time": 1000, + "extrinsic_time": 9000, + "storage_root_time": 0, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -1734,8 +1734,8 @@ 10000 ] ], - "extrinsic_time": 11000, - "storage_root_time": 2000, + "extrinsic_time": 9000, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -1779,7 +1779,7 @@ 10000 ] ], - "extrinsic_time": 35000, + "extrinsic_time": 36000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1817,7 +1817,7 @@ 10000 ] ], - "extrinsic_time": 49000, + "extrinsic_time": 34000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1857,7 +1857,7 @@ 10000 ] ], - "extrinsic_time": 41000, + "extrinsic_time": 43000, "storage_root_time": 1000, "reads": 1, "repeat_reads": 0, @@ -1895,7 +1895,7 @@ 10000 ] ], - "extrinsic_time": 50000, + "extrinsic_time": 40000, "storage_root_time": 1000, "reads": 1, "repeat_reads": 0, @@ -1921,7 +1921,7 @@ 10000 ] ], - "extrinsic_time": 26000, + "extrinsic_time": 23000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1940,7 +1940,7 @@ 10000 ] ], - "extrinsic_time": 28000, + "extrinsic_time": 30000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -1978,8 +1978,8 @@ 10000 ] ], - "extrinsic_time": 35000, - "storage_root_time": 2000, + "extrinsic_time": 27000, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -1999,8 +1999,8 @@ 10000 ] ], - "extrinsic_time": 28000, - "storage_root_time": 0, + "extrinsic_time": 27000, + "storage_root_time": 1000, "reads": 1, "repeat_reads": 0, "writes": 1, @@ -2018,8 +2018,8 @@ 10000 ] ], - "extrinsic_time": 33000, - "storage_root_time": 1000, + "extrinsic_time": 32000, + "storage_root_time": 0, "reads": 1, "repeat_reads": 0, "writes": 1, @@ -2037,8 +2037,8 @@ 0 ] ], - "extrinsic_time": 22000, - "storage_root_time": 1000, + "extrinsic_time": 19000, + "storage_root_time": 0, "reads": 1, "repeat_reads": 0, "writes": 1, @@ -2056,7 +2056,7 @@ 10000 ] ], - "extrinsic_time": 40000, + "extrinsic_time": 30000, "storage_root_time": 1000, "reads": 1, "repeat_reads": 0, @@ -2082,7 +2082,7 @@ 10000 ] ], - "extrinsic_time": 34000, + "extrinsic_time": 32000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2101,7 +2101,7 @@ 10000 ] ], - "extrinsic_time": 42000, + "extrinsic_time": 39000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2120,8 +2120,8 @@ 0 ] ], - "extrinsic_time": 52000, - "storage_root_time": 2000, + "extrinsic_time": 29000, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -2139,8 +2139,8 @@ 10000 ] ], - "extrinsic_time": 60000, - "storage_root_time": 2000, + "extrinsic_time": 41000, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -2160,7 +2160,7 @@ 10000 ] ], - "extrinsic_time": 39000, + "extrinsic_time": 40000, "storage_root_time": 1000, "reads": 2, "repeat_reads": 3, @@ -2179,8 +2179,8 @@ 10000 ] ], - "extrinsic_time": 46000, - "storage_root_time": 2000, + "extrinsic_time": 45000, + "storage_root_time": 1000, "reads": 2, "repeat_reads": 3, "writes": 2, @@ -2198,8 +2198,8 @@ 0 ] ], - "extrinsic_time": 50000, - "storage_root_time": 2000, + "extrinsic_time": 33000, + "storage_root_time": 1000, "reads": 2, "repeat_reads": 3, "writes": 2, @@ -2217,7 +2217,7 @@ 10000 ] ], - "extrinsic_time": 47000, + "extrinsic_time": 52000, "storage_root_time": 1000, "reads": 2, "repeat_reads": 3, @@ -2239,7 +2239,7 @@ 2 ] ], - "extrinsic_time": 23000, + "extrinsic_time": 19000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2254,8 +2254,8 @@ 128 ] ], - "extrinsic_time": 26000, - "storage_root_time": 2000, + "extrinsic_time": 34000, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -2271,7 +2271,7 @@ 2 ] ], - "extrinsic_time": 26000, + "extrinsic_time": 24000, "storage_root_time": 1000, "reads": 1, "repeat_reads": 0, @@ -2286,7 +2286,7 @@ 128 ] ], - "extrinsic_time": 38000, + "extrinsic_time": 30000, "storage_root_time": 1000, "reads": 1, "repeat_reads": 0, @@ -2323,7 +2323,7 @@ 128 ] ], - "extrinsic_time": 16000, + "extrinsic_time": 21000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2340,7 +2340,7 @@ 2 ] ], - "extrinsic_time": 17000, + "extrinsic_time": 16000, "storage_root_time": 1000, "reads": 1, "repeat_reads": 0, @@ -2377,7 +2377,7 @@ 2 ] ], - "extrinsic_time": 21000, + "extrinsic_time": 20000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2392,7 +2392,7 @@ 128 ] ], - "extrinsic_time": 31000, + "extrinsic_time": 25000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2409,7 +2409,7 @@ 2 ] ], - "extrinsic_time": 26000, + "extrinsic_time": 25000, "storage_root_time": 1000, "reads": 1, "repeat_reads": 0, @@ -2424,7 +2424,7 @@ 128 ] ], - "extrinsic_time": 35000, + "extrinsic_time": 31000, "storage_root_time": 1000, "reads": 1, "repeat_reads": 0, @@ -2441,7 +2441,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 10000, + "extrinsic_time": 9000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2453,7 +2453,7 @@ "db_results": [ { "components": [], - "extrinsic_time": 15000, + "extrinsic_time": 16000, "storage_root_time": 1000, "reads": 2, "repeat_reads": 0, @@ -2499,7 +2499,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 99000, + "extrinsic_time": 88000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2511,8 +2511,8 @@ "db_results": [ { "components": [], - "extrinsic_time": 110000, - "storage_root_time": 2000, + "extrinsic_time": 114000, + "storage_root_time": 1000, "reads": 9, "repeat_reads": 8, "writes": 5, @@ -2528,7 +2528,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 31000, + "extrinsic_time": 26000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2540,7 +2540,7 @@ "db_results": [ { "components": [], - "extrinsic_time": 34000, + "extrinsic_time": 33000, "storage_root_time": 1000, "reads": 3, "repeat_reads": 7, @@ -2558,7 +2558,7 @@ { "components": [], "extrinsic_time": 27000, - "storage_root_time": 0, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -2569,7 +2569,7 @@ "db_results": [ { "components": [], - "extrinsic_time": 34000, + "extrinsic_time": 31000, "storage_root_time": 1000, "reads": 3, "repeat_reads": 7, @@ -2598,7 +2598,7 @@ "db_results": [ { "components": [], - "extrinsic_time": 38000, + "extrinsic_time": 32000, "storage_root_time": 1000, "reads": 3, "repeat_reads": 7, @@ -2635,7 +2635,7 @@ 1000 ] ], - "extrinsic_time": 2104000, + "extrinsic_time": 1861000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2652,7 +2652,7 @@ 0 ] ], - "extrinsic_time": 4000, + "extrinsic_time": 5000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2667,7 +2667,7 @@ 1000 ] ], - "extrinsic_time": 2314000, + "extrinsic_time": 2271000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2685,7 +2685,7 @@ { "components": [], "extrinsic_time": 3000, - "storage_root_time": 0, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -2696,7 +2696,7 @@ "db_results": [ { "components": [], - "extrinsic_time": 5000, + "extrinsic_time": 4000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2733,8 +2733,8 @@ 1000 ] ], - "extrinsic_time": 2407000, - "storage_root_time": 3000, + "extrinsic_time": 2008000, + "storage_root_time": 0, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -2765,8 +2765,8 @@ 1000 ] ], - "extrinsic_time": 2621000, - "storage_root_time": 2000, + "extrinsic_time": 2414000, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -2782,7 +2782,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 6000, + "extrinsic_time": 5000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2794,8 +2794,8 @@ "db_results": [ { "components": [], - "extrinsic_time": 7000, - "storage_root_time": 0, + "extrinsic_time": 6000, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -2816,7 +2816,7 @@ 0 ] ], - "extrinsic_time": 5000, + "extrinsic_time": 4000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2831,8 +2831,8 @@ 1000 ] ], - "extrinsic_time": 2005000, - "storage_root_time": 1000, + "extrinsic_time": 1884000, + "storage_root_time": 0, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -2849,7 +2849,7 @@ ] ], "extrinsic_time": 5000, - "storage_root_time": 2000, + "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, "writes": 0, @@ -2863,7 +2863,7 @@ 1000 ] ], - "extrinsic_time": 2335000, + "extrinsic_time": 2275000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2880,7 +2880,7 @@ "time_results": [ { "components": [], - "extrinsic_time": 36000, + "extrinsic_time": 30000, "storage_root_time": 1000, "reads": 0, "repeat_reads": 0, @@ -2892,7 +2892,7 @@ "db_results": [ { "components": [], - "extrinsic_time": 41000, + "extrinsic_time": 40000, "storage_root_time": 1000, "reads": 6, "repeat_reads": 3, @@ -2921,7 +2921,7 @@ "db_results": [ { "components": [], - "extrinsic_time": 42000, + "extrinsic_time": 41000, "storage_root_time": 1000, "reads": 6, "repeat_reads": 3, diff --git a/crates/humanode-runtime/src/constants.rs b/crates/humanode-runtime/src/constants.rs index fa1a9bc8b..a99ec83fb 100644 --- a/crates/humanode-runtime/src/constants.rs +++ b/crates/humanode-runtime/src/constants.rs @@ -93,7 +93,7 @@ pub mod fees { /// /// We compute the fee to weight multiplier based on the weight of the `balances.transfer` call, /// and try to fit the fee such that a single transfer call costs ~0.1 HMND. - pub const WEIGHT_TO_FEE: Balance = 385_000_000; + pub const WEIGHT_TO_FEE: Balance = 380_500_000; /// The multiplier to get the fee from length. pub const LENGTH_TO_FEE: Balance = 1; diff --git a/crates/humanode-runtime/src/weights/frame_system.rs b/crates/humanode-runtime/src/weights/frame_system.rs index 0a03907b6..23ef9cf56 100644 --- a/crates/humanode-runtime/src/weights/frame_system.rs +++ b/crates/humanode-runtime/src/weights/frame_system.rs @@ -17,7 +17,7 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(356_000_000, 0) + Weight::from_parts(297_000_000, 0) } /// The range of component `b` is `[0, 3932160]`. fn remark_with_event(_b: u32, ) -> Weight { @@ -25,14 +25,14 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(3_977_000_000, 0) + Weight::from_parts(4_095_000_000, 0) } fn set_heap_pages() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(4_000_000, 0) + // Minimum execution time: 3_000_000 picoseconds. + Weight::from_parts(3_000_000, 0) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -42,7 +42,7 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 2_000_000 picoseconds. - Weight::from_parts(633_000_000, 0) + Weight::from_parts(610_000_000, 0) .saturating_add(T::DbWeight::get().writes(1000)) } /// The range of component `i` is `[0, 1000]`. @@ -50,8 +50,8 @@ impl frame_system::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 1_000_000 picoseconds. - Weight::from_parts(496_000_000, 0) + // Minimum execution time: 2_000_000 picoseconds. + Weight::from_parts(490_000_000, 0) .saturating_add(T::DbWeight::get().writes(1000)) } /// The range of component `p` is `[0, 1000]`. @@ -60,7 +60,7 @@ impl frame_system::WeightInfo for WeightInfo { // Measured: `149 + p * (69 ±0)` // Estimated: `0` // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(1_146_000_000, 0) + Weight::from_parts(1_185_000_000, 0) .saturating_add(T::DbWeight::get().reads(1000)) .saturating_add(T::DbWeight::get().writes(1000)) } diff --git a/crates/humanode-runtime/src/weights/mod.rs b/crates/humanode-runtime/src/weights/mod.rs index f82f0af10..c2f5a36a1 100644 --- a/crates/humanode-runtime/src/weights/mod.rs +++ b/crates/humanode-runtime/src/weights/mod.rs @@ -1,4 +1,4 @@ -// DO NOT EDIT! This file is generated by "./utils/weights/benchmark-all" command. +// DO NOT EDIT! This file is generated by "utils/weights/benchmark-all" command. //! Computed benchmarks. //! Mode: "dev" diff --git a/crates/humanode-runtime/src/weights/pallet_balances.rs b/crates/humanode-runtime/src/weights/pallet_balances.rs index e98f2be3f..5f4ffaa48 100644 --- a/crates/humanode-runtime/src/weights/pallet_balances.rs +++ b/crates/humanode-runtime/src/weights/pallet_balances.rs @@ -24,8 +24,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 21_000_000 picoseconds. - Weight::from_parts(21_000_000, 0) + // Minimum execution time: 23_000_000 picoseconds. + Weight::from_parts(23_000_000, 0) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -42,8 +42,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `0` - // 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(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -51,8 +51,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `242` // Estimated: `0` - // Minimum execution time: 39_000_000 picoseconds. - Weight::from_parts(39_000_000, 0) + // Minimum execution time: 41_000_000 picoseconds. + Weight::from_parts(41_000_000, 0) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(3)) } @@ -60,8 +60,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 25_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(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -69,8 +69,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `103` // Estimated: `0` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(10_000_000, 0) + // Minimum execution time: 11_000_000 picoseconds. + Weight::from_parts(11_000_000, 0) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -79,8 +79,8 @@ impl pallet_balances::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `0 + u * (135 ±0)` // Estimated: `0` - // Minimum execution time: 11_000_000 picoseconds. - Weight::from_parts(8_381_000_000, 0) + // Minimum execution time: 10_000_000 picoseconds. + Weight::from_parts(8_348_000_000, 0) .saturating_add(T::DbWeight::get().reads(1000)) .saturating_add(T::DbWeight::get().writes(1000)) } diff --git a/crates/humanode-runtime/src/weights/pallet_bioauth.rs b/crates/humanode-runtime/src/weights/pallet_bioauth.rs index 4ac1b3b87..bb655e15d 100644 --- a/crates/humanode-runtime/src/weights/pallet_bioauth.rs +++ b/crates/humanode-runtime/src/weights/pallet_bioauth.rs @@ -11,18 +11,18 @@ use sp_std::marker::PhantomData; /// Weight functions for `pallet_bioauth`. pub struct WeightInfo(PhantomData); impl pallet_bioauth::WeightInfo for WeightInfo { - /// The range of component `n` is `[0, 30719999]`. /// The range of component `a` is `[0, 3071]`. + /// The range of component `n` is `[0, 30719999]`. fn authenticate(a: u32, n: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `183 + a * (40 ±0) + n * (19 ±0)` // Estimated: `0` - // Minimum execution time: 154_000_000 picoseconds. - Weight::from_parts(154_000_000, 0) - // Standard Error: 40_799_410 - .saturating_add(Weight::from_parts(32_248_192, 0).saturating_mul(a.into())) - // Standard Error: 4_078 - .saturating_add(Weight::from_parts(113_249, 0).saturating_mul(n.into())) + // Minimum execution time: 121_000_000 picoseconds. + Weight::from_parts(121_000_000, 0) + // Standard Error: 55_214_861 + .saturating_add(Weight::from_parts(789_124, 0).saturating_mul(a.into())) + // Standard Error: 5_519 + .saturating_add(Weight::from_parts(115_183, 0).saturating_mul(n.into())) .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -41,7 +41,7 @@ impl pallet_bioauth::WeightInfo for WeightInfo { // Measured: `141 + a * (40 ±0)` // Estimated: `0` // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(116_000_000, 0) + Weight::from_parts(98_000_000, 0) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/crates/humanode-runtime/src/weights/pallet_im_online.rs b/crates/humanode-runtime/src/weights/pallet_im_online.rs index 7351a317d..82b0fc776 100644 --- a/crates/humanode-runtime/src/weights/pallet_im_online.rs +++ b/crates/humanode-runtime/src/weights/pallet_im_online.rs @@ -18,11 +18,11 @@ impl pallet_im_online::WeightInfo for WeightInfo { // Measured: `260 + k * (32 ±0)` // Estimated: `0` // Minimum execution time: 85_000_000 picoseconds. - Weight::from_parts(49_602_420, 0) - // Standard Error: 8_668 - .saturating_add(Weight::from_parts(44_044, 0).saturating_mul(k.into())) - // Standard Error: 87_477 - .saturating_add(Weight::from_parts(353_535, 0).saturating_mul(e.into())) + Weight::from_parts(57_686_231, 0) + // Standard Error: 1_733 + .saturating_add(Weight::from_parts(41_041, 0).saturating_mul(k.into())) + // Standard Error: 17_495 + .saturating_add(Weight::from_parts(272_727, 0).saturating_mul(e.into())) .saturating_add(T::DbWeight::get().reads(5)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/crates/humanode-runtime/src/weights/pallet_multisig.rs b/crates/humanode-runtime/src/weights/pallet_multisig.rs index a6f20a0a1..b2954f28f 100644 --- a/crates/humanode-runtime/src/weights/pallet_multisig.rs +++ b/crates/humanode-runtime/src/weights/pallet_multisig.rs @@ -16,49 +16,51 @@ 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(11_000_000, 0) + // Minimum execution time: 8_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) } - /// The range of component `z` is `[0, 10000]`. /// The range of component `s` is `[2, 128]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_create(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `138 + s * (3 ±0)` // Estimated: `0` // Minimum execution time: 24_000_000 picoseconds. - Weight::from_parts(12_825_396, 0) - // Standard Error: 96_225 - .saturating_add(Weight::from_parts(87_301, 0).saturating_mul(s.into())) - // Standard Error: 1_212 - .saturating_add(Weight::from_parts(1_800, 0).saturating_mul(z.into())) + Weight::from_parts(19_936_507, 0) + // Standard Error: 13_746 + .saturating_add(Weight::from_parts(31_746, 0).saturating_mul(s.into())) + // Standard Error: 173 + .saturating_add(Weight::from_parts(1_100, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - /// The range of component `z` is `[0, 10000]`. /// The range of component `s` is `[3, 128]`. + /// The range of component `z` is `[0, 10000]`. fn as_multi_approve(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `248` // Estimated: `0` // Minimum execution time: 17_000_000 picoseconds. Weight::from_parts(11_368_000, 0) - // Standard Error: 48_497 + // Standard Error: 20_784 .saturating_add(Weight::from_parts(44_000, 0).saturating_mul(s.into())) - // Standard Error: 606 - .saturating_add(Weight::from_parts(1_450, 0).saturating_mul(z.into())) + // Standard Error: 259 + .saturating_add(Weight::from_parts(1_150, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// The range of component `s` is `[2, 128]`. /// The range of component `z` is `[0, 10000]`. - fn as_multi_complete(s: u32, _z: u32, ) -> Weight { + fn as_multi_complete(s: u32, z: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `281 + s * (34 ±0)` // Estimated: `0` - // Minimum execution time: 34_000_000 picoseconds. - Weight::from_parts(34_730_158, 0) - // Standard Error: 123_717 - .saturating_add(Weight::from_parts(134_920, 0).saturating_mul(s.into())) + // Minimum execution time: 29_000_000 picoseconds. + Weight::from_parts(20_873_015, 0) + // Standard Error: 13_746 + .saturating_add(Weight::from_parts(63_492, 0).saturating_mul(s.into())) + // Standard Error: 173 + .saturating_add(Weight::from_parts(1_100, 0).saturating_mul(z.into())) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(2)) } @@ -67,8 +69,8 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `138 + s * (3 ±0)` // Estimated: `0` - // Minimum execution time: 23_000_000 picoseconds. - Weight::from_parts(26_000_000, 0) + // Minimum execution time: 19_000_000 picoseconds. + Weight::from_parts(34_000_000, 0) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -78,7 +80,7 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Measured: `248` // Estimated: `0` // Minimum execution time: 12_000_000 picoseconds. - Weight::from_parts(16_000_000, 0) + Weight::from_parts(21_000_000, 0) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } @@ -87,8 +89,8 @@ impl pallet_multisig::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `345 + s * (2 ±0)` // Estimated: `0` - // Minimum execution time: 21_000_000 picoseconds. - Weight::from_parts(31_000_000, 0) + // Minimum execution time: 20_000_000 picoseconds. + Weight::from_parts(25_000_000, 0) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/crates/humanode-runtime/src/weights/pallet_timestamp.rs b/crates/humanode-runtime/src/weights/pallet_timestamp.rs index 1ab11fae5..172b19fc4 100644 --- a/crates/humanode-runtime/src/weights/pallet_timestamp.rs +++ b/crates/humanode-runtime/src/weights/pallet_timestamp.rs @@ -15,8 +15,8 @@ impl pallet_timestamp::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `278` // Estimated: `0` - // Minimum execution time: 10_000_000 picoseconds. - Weight::from_parts(10_000_000, 0) + // Minimum execution time: 9_000_000 picoseconds. + Weight::from_parts(9_000_000, 0) .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } diff --git a/crates/humanode-runtime/src/weights/pallet_token_claims.rs b/crates/humanode-runtime/src/weights/pallet_token_claims.rs index d1803a1ab..73163c10d 100644 --- a/crates/humanode-runtime/src/weights/pallet_token_claims.rs +++ b/crates/humanode-runtime/src/weights/pallet_token_claims.rs @@ -15,8 +15,8 @@ impl pallet_token_claims::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `593` // Estimated: `0` - // Minimum execution time: 99_000_000 picoseconds. - Weight::from_parts(99_000_000, 0) + // Minimum execution time: 88_000_000 picoseconds. + Weight::from_parts(88_000_000, 0) .saturating_add(T::DbWeight::get().reads(9)) .saturating_add(T::DbWeight::get().writes(5)) } @@ -24,8 +24,8 @@ impl pallet_token_claims::WeightInfo for WeightInfo // Proof Size summary in bytes: // Measured: `264` // Estimated: `0` - // Minimum execution time: 31_000_000 picoseconds. - Weight::from_parts(31_000_000, 0) + // Minimum execution time: 26_000_000 picoseconds. + Weight::from_parts(26_000_000, 0) .saturating_add(T::DbWeight::get().reads(3)) .saturating_add(T::DbWeight::get().writes(4)) } diff --git a/crates/humanode-runtime/src/weights/pallet_utility.rs b/crates/humanode-runtime/src/weights/pallet_utility.rs index 2a0ca8146..9c43c2e44 100644 --- a/crates/humanode-runtime/src/weights/pallet_utility.rs +++ b/crates/humanode-runtime/src/weights/pallet_utility.rs @@ -17,7 +17,7 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 3_000_000 picoseconds. - Weight::from_parts(2_104_000_000, 0) + Weight::from_parts(1_861_000_000, 0) } fn as_derivative() -> Weight { // Proof Size summary in bytes: @@ -32,21 +32,21 @@ impl pallet_utility::WeightInfo for WeightInfo { // Measured: `0` // Estimated: `0` // Minimum execution time: 4_000_000 picoseconds. - Weight::from_parts(2_407_000_000, 0) + Weight::from_parts(2_008_000_000, 0) } fn dispatch_as() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 6_000_000 picoseconds. - Weight::from_parts(6_000_000, 0) + // Minimum execution time: 5_000_000 picoseconds. + Weight::from_parts(5_000_000, 0) } /// The range of component `c` is `[0, 1000]`. fn force_batch(_c: u32, ) -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 5_000_000 picoseconds. - Weight::from_parts(2_005_000_000, 0) + // Minimum execution time: 4_000_000 picoseconds. + Weight::from_parts(1_884_000_000, 0) } } diff --git a/crates/humanode-runtime/src/weights/pallet_vesting.rs b/crates/humanode-runtime/src/weights/pallet_vesting.rs index bdba32899..2de422cb1 100644 --- a/crates/humanode-runtime/src/weights/pallet_vesting.rs +++ b/crates/humanode-runtime/src/weights/pallet_vesting.rs @@ -15,8 +15,8 @@ impl pallet_vesting::WeightInfo for WeightInfo { // Proof Size summary in bytes: // Measured: `488` // Estimated: `0` - // Minimum execution time: 36_000_000 picoseconds. - Weight::from_parts(36_000_000, 0) + // Minimum execution time: 30_000_000 picoseconds. + Weight::from_parts(30_000_000, 0) .saturating_add(T::DbWeight::get().reads(6)) .saturating_add(T::DbWeight::get().writes(3)) } From 62b0fbd4bad115182227372a94fa242f511162f9 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Wed, 17 Apr 2024 16:43:17 +0300 Subject: [PATCH 44/56] Use block_in_place for keystore operations --- .../src/cli/subcommand/bioauth/key/insert.rs | 4 +++- crates/humanode-peer/src/service/mod.rs | 8 +++----- crates/humanode-peer/src/validator_key.rs | 9 +++++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/crates/humanode-peer/src/cli/subcommand/bioauth/key/insert.rs b/crates/humanode-peer/src/cli/subcommand/bioauth/key/insert.rs index 8c8056cb4..85492ff9d 100644 --- a/crates/humanode-peer/src/cli/subcommand/bioauth/key/insert.rs +++ b/crates/humanode-peer/src/cli/subcommand/bioauth/key/insert.rs @@ -58,7 +58,9 @@ pub async fn insert_bioauth_key( keystore: Arc, ) -> sc_cli::Result<()> { // We don't use a password for keystore at the current moment. That's why None is passed. - let pair = utils::pair_from_suri::<::Pair>(suri, None)?; + let pair = tokio::task::block_in_place(move || { + utils::pair_from_suri::<::Pair>(suri, None) + })?; let public = pair.public().as_ref().to_vec(); keystore .insert(PK::ID, suri, &public[..]) diff --git a/crates/humanode-peer/src/service/mod.rs b/crates/humanode-peer/src/service/mod.rs index 030dc2248..31679b091 100644 --- a/crates/humanode-peer/src/service/mod.rs +++ b/crates/humanode-peer/src/service/mod.rs @@ -605,11 +605,9 @@ fn init_dev_bioauth_keystore_keys( ) -> Result<(), sp_keystore::Error> { if let Some(seed) = seed { use sp_application_crypto::AppCrypto; - let _public = sp_keystore::Keystore::sr25519_generate_new( - keystore, - KeystoreBioauthId::ID, - Some(seed), - )?; + let _public = tokio::task::block_in_place(move || { + sp_keystore::Keystore::sr25519_generate_new(keystore, KeystoreBioauthId::ID, Some(seed)) + })?; } Ok(()) } diff --git a/crates/humanode-peer/src/validator_key.rs b/crates/humanode-peer/src/validator_key.rs index 5818189d2..e980edb79 100644 --- a/crates/humanode-peer/src/validator_key.rs +++ b/crates/humanode-peer/src/validator_key.rs @@ -51,10 +51,11 @@ where D: AsRef<[u8]> + Send + 'a, { let data = data.as_ref(); - let outcome = self - .keystore - .sign_with(PK::ID, PK::CRYPTO_ID, self.public_key.0.as_slice(), data) - .map_err(SignerError::Keystore)?; + let outcome = tokio::task::block_in_place(move || { + self.keystore + .sign_with(PK::ID, PK::CRYPTO_ID, self.public_key.0.as_slice(), data) + }) + .map_err(SignerError::Keystore)?; outcome.ok_or(SignerError::NoSignature) } From 38df4d6d8bceeb04412315c22f82b2033e772824 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Thu, 6 Jun 2024 17:33:49 +0300 Subject: [PATCH 45/56] Fix help stdout fixtures --- .../help.benchmark.block.stdout.txt | 84 +----- .../help.benchmark.extrinsic.stdout.txt | 84 +----- .../help.benchmark.machine.stdout.txt | 24 +- .../help.benchmark.overhead.stdout.txt | 84 +----- .../help.benchmark.pallet.stdout.txt | 24 +- .../help.benchmark.storage.stdout.txt | 62 +--- .../help.bioauth.api-versions.stdout.txt | 24 +- .../help.bioauth.auth-url.stdout.txt | 267 +++++------------- .../help.bioauth.key.insert.stdout.txt | 24 +- .../help.bioauth.key.list.stdout.txt | 24 +- .../help-output/help.build-spec.stdout.txt | 58 +--- .../help-output/help.check-block.stdout.txt | 88 +----- .../help-output/help.export-blocks.stdout.txt | 70 +---- .../help-output/help.export-state.stdout.txt | 62 +--- .../help-output/help.frontier-db.stdout.txt | 62 +--- .../help-output/help.import-blocks.stdout.txt | 88 +----- .../help.key.generate-node-key.stdout.txt | 19 +- .../help-output/help.key.insert.stdout.txt | 24 +- .../help.key.inspect-node-key.stdout.txt | 23 +- .../help-output/help.key.inspect.stdout.txt | 14 +- .../help-output/help.purge-chain.stdout.txt | 24 +- .../help-output/help.revert.stdout.txt | 62 +--- 22 files changed, 218 insertions(+), 1077 deletions(-) diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.block.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.block.stdout.txt index 163f84ce2..72290b254 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.block.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.block.stdout.txt @@ -20,39 +20,25 @@ Usage: humanode-peer benchmark block [OPTIONS] --from --to Options: --chain - Specify the chain specification. - - It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). + Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) --dev - Specify the development chain. - - This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. + Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. - - Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l`. + Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` --detailed-log-output - Enable detailed log output. - - This includes displaying the log target, log level and thread name. - - This is automatically enabled when something is logged with any higher level than `info`. + Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. - - Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. - - The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. + Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set --tracing-targets Sets a custom profiling filter. Syntax is the same as for logging: `=` @@ -66,44 +52,10 @@ Options: - log: Output the tracing records using the log --state-pruning - Specify the state pruning mode. - - This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. - - This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. - - Possible values: - - - archive: - - Keep the state of all blocks. - - - 'archive-canonical' - - Keep only the state of finalized blocks. - - - number - - Keep the state of the last number of finalized blocks. - - [default: 256] + Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. - - This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. - - Possible values: - 'archive' - - Keep all blocks. - - - 'archive-canonical' - - Keep only finalized blocks. - - - number - - Keep the last `number` of finalized blocks. + Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks [default: archive-canonical] @@ -129,15 +81,7 @@ Options: - compiled: Uses a compiled runtime --wasmtime-instantiation-strategy - The WASM instantiation method to use. - - Only has an effect when `wasm-execution` is set to `compiled`. - - The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. - - The fastest (and the default) strategy available is `pooling-copy-on-write`. - - The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy. + The WASM instantiation method to use. Only has an effect when `wasm-execution` is set to `compiled`. The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. The fastest (and the default) strategy available is `pooling-copy-on-write`. The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy [default: pooling-copy-on-write] @@ -149,9 +93,7 @@ Options: - legacy-instance-reuse: Legacy instance reuse mechanism. DEPRECATED. Will be removed in the future --wasm-runtime-overrides - Specify the path where local WASM runtimes are stored. - - These runtimes will override on-chain runtimes when the version matches. + Specify the path where local WASM runtimes are stored. These runtimes will override on-chain runtimes when the version matches --execution-syncing The means of execution used when calling into the runtime for importing blocks as part of an initial sync @@ -208,16 +150,12 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --trie-cache-size - Specify the state cache size. - - Providing `0` will disable the cache. + Specify the state cache size. Providing `0` will disable the cache [default: 67108864] --state-cache-size - DEPRECATED - - Switch to `--trie-cache-size`. + DEPRECATED Switch to `--trie-cache-size` --from Number of the first block to consider diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.extrinsic.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.extrinsic.stdout.txt index 252879f30..b5019eec6 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.extrinsic.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.extrinsic.stdout.txt @@ -8,39 +8,25 @@ Usage: humanode-peer benchmark extrinsic [OPTIONS] Options: --chain - Specify the chain specification. - - It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). + Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) --dev - Specify the development chain. - - This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. + Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. - - Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l`. + Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` --detailed-log-output - Enable detailed log output. - - This includes displaying the log target, log level and thread name. - - This is automatically enabled when something is logged with any higher level than `info`. + Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. - - Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. - - The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. + Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set --tracing-targets Sets a custom profiling filter. Syntax is the same as for logging: `=` @@ -54,44 +40,10 @@ Options: - log: Output the tracing records using the log --state-pruning - Specify the state pruning mode. - - This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. - - This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. - - Possible values: - - - archive: - - Keep the state of all blocks. - - - 'archive-canonical' - - Keep only the state of finalized blocks. - - - number - - Keep the state of the last number of finalized blocks. - - [default: 256] + Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. - - This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. - - Possible values: - 'archive' - - Keep all blocks. - - - 'archive-canonical' - - Keep only finalized blocks. - - - number - - Keep the last `number` of finalized blocks. + Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks [default: archive-canonical] @@ -117,15 +69,7 @@ Options: - compiled: Uses a compiled runtime --wasmtime-instantiation-strategy - The WASM instantiation method to use. - - Only has an effect when `wasm-execution` is set to `compiled`. - - The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. - - The fastest (and the default) strategy available is `pooling-copy-on-write`. - - The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy. + The WASM instantiation method to use. Only has an effect when `wasm-execution` is set to `compiled`. The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. The fastest (and the default) strategy available is `pooling-copy-on-write`. The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy [default: pooling-copy-on-write] @@ -137,9 +81,7 @@ Options: - legacy-instance-reuse: Legacy instance reuse mechanism. DEPRECATED. Will be removed in the future --wasm-runtime-overrides - Specify the path where local WASM runtimes are stored. - - These runtimes will override on-chain runtimes when the version matches. + Specify the path where local WASM runtimes are stored. These runtimes will override on-chain runtimes when the version matches --execution-syncing The means of execution used when calling into the runtime for importing blocks as part of an initial sync @@ -196,16 +138,12 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --trie-cache-size - Specify the state cache size. - - Providing `0` will disable the cache. + Specify the state cache size. Providing `0` will disable the cache [default: 67108864] --state-cache-size - DEPRECATED - - Switch to `--trie-cache-size`. + DEPRECATED Switch to `--trie-cache-size` --warmup Rounds of warmups before measuring diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.machine.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.machine.stdout.txt index 82b07b34d..6b0c41771 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.machine.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.machine.stdout.txt @@ -8,39 +8,25 @@ Usage: humanode-peer benchmark machine [OPTIONS] Options: --chain - Specify the chain specification. - - It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). + Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) --dev - Specify the development chain. - - This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. + Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. - - Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l`. + Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` --detailed-log-output - Enable detailed log output. - - This includes displaying the log target, log level and thread name. - - This is automatically enabled when something is logged with any higher level than `info`. + Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. - - Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. - - The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. + Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set --tracing-targets Sets a custom profiling filter. Syntax is the same as for logging: `=` diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.overhead.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.overhead.stdout.txt index 464bbe9c3..ffb120fc8 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.overhead.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.overhead.stdout.txt @@ -4,39 +4,25 @@ Usage: humanode-peer benchmark overhead [OPTIONS] Options: --chain - Specify the chain specification. - - It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). + Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) --dev - Specify the development chain. - - This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. + Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. - - Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l`. + Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` --detailed-log-output - Enable detailed log output. - - This includes displaying the log target, log level and thread name. - - This is automatically enabled when something is logged with any higher level than `info`. + Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. - - Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. - - The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. + Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set --tracing-targets Sets a custom profiling filter. Syntax is the same as for logging: `=` @@ -50,44 +36,10 @@ Options: - log: Output the tracing records using the log --state-pruning - Specify the state pruning mode. - - This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. - - This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. - - Possible values: - - - archive: - - Keep the state of all blocks. - - - 'archive-canonical' - - Keep only the state of finalized blocks. - - - number - - Keep the state of the last number of finalized blocks. - - [default: 256] + Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. - - This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. - - Possible values: - 'archive' - - Keep all blocks. - - - 'archive-canonical' - - Keep only finalized blocks. - - - number - - Keep the last `number` of finalized blocks. + Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks [default: archive-canonical] @@ -113,15 +65,7 @@ Options: - compiled: Uses a compiled runtime --wasmtime-instantiation-strategy - The WASM instantiation method to use. - - Only has an effect when `wasm-execution` is set to `compiled`. - - The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. - - The fastest (and the default) strategy available is `pooling-copy-on-write`. - - The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy. + The WASM instantiation method to use. Only has an effect when `wasm-execution` is set to `compiled`. The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. The fastest (and the default) strategy available is `pooling-copy-on-write`. The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy [default: pooling-copy-on-write] @@ -133,9 +77,7 @@ Options: - legacy-instance-reuse: Legacy instance reuse mechanism. DEPRECATED. Will be removed in the future --wasm-runtime-overrides - Specify the path where local WASM runtimes are stored. - - These runtimes will override on-chain runtimes when the version matches. + Specify the path where local WASM runtimes are stored. These runtimes will override on-chain runtimes when the version matches --execution-syncing The means of execution used when calling into the runtime for importing blocks as part of an initial sync @@ -192,16 +134,12 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --trie-cache-size - Specify the state cache size. - - Providing `0` will disable the cache. + Specify the state cache size. Providing `0` will disable the cache [default: 67108864] --state-cache-size - DEPRECATED - - Switch to `--trie-cache-size`. + DEPRECATED Switch to `--trie-cache-size` --weight-path File or directory to write the *weight* files to. diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.pallet.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.pallet.stdout.txt index 1ce080489..bf03a064e 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.pallet.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.pallet.stdout.txt @@ -98,39 +98,25 @@ Options: Display and run extra benchmarks that would otherwise not be needed for weight construction --chain - Specify the chain specification. - - It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). + Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) --dev - Specify the development chain. - - This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. + Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. - - Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l`. + Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` --detailed-log-output - Enable detailed log output. - - This includes displaying the log target, log level and thread name. - - This is automatically enabled when something is logged with any higher level than `info`. + Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. - - Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. - - The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. + Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set --tracing-targets Sets a custom profiling filter. Syntax is the same as for logging: `=` diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.storage.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.storage.stdout.txt index 7ba0194ca..70a871f43 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.storage.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.storage.stdout.txt @@ -4,39 +4,25 @@ Usage: humanode-peer benchmark storage [OPTIONS] --state-version Options: --chain - Specify the chain specification. - - It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). + Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) --dev - Specify the development chain. - - This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. + Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. - - Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l`. + Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` --detailed-log-output - Enable detailed log output. - - This includes displaying the log target, log level and thread name. - - This is automatically enabled when something is logged with any higher level than `info`. + Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. - - Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. - - The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. + Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set --tracing-targets Sets a custom profiling filter. Syntax is the same as for logging: `=` @@ -62,44 +48,10 @@ Options: Limit the memory the database cache can use --state-pruning - Specify the state pruning mode. - - This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. - - This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. - - Possible values: - - - archive: - - Keep the state of all blocks. - - - 'archive-canonical' - - Keep only the state of finalized blocks. - - - number - - Keep the state of the last number of finalized blocks. - - [default: 256] + Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. - - This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. - - Possible values: - 'archive' - - Keep all blocks. - - - 'archive-canonical' - - Keep only finalized blocks. - - - number - - Keep the last `number` of finalized blocks. + Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks [default: archive-canonical] diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.api-versions.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.api-versions.stdout.txt index db0697e43..33f74cb9e 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.api-versions.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.api-versions.stdout.txt @@ -4,39 +4,25 @@ Usage: humanode-peer bioauth api-versions [OPTIONS] Options: --chain - Specify the chain specification. - - It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). + Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) --dev - Specify the development chain. - - This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. + Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. - - Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l`. + Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` --detailed-log-output - Enable detailed log output. - - This includes displaying the log target, log level and thread name. - - This is automatically enabled when something is logged with any higher level than `info`. + Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. - - Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. - - The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. + Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set --tracing-targets Sets a custom profiling filter. Syntax is the same as for logging: `=` diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.auth-url.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.auth-url.stdout.txt index 2d3c557af..9d3d92a9a 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.auth-url.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.auth-url.stdout.txt @@ -4,26 +4,19 @@ Usage: humanode-peer bioauth auth-url [OPTIONS] Options: --validator - Enable validator mode. - - The node will be started with the authority role and actively participate in any consensus task that it can (e.g. depending on availability of local keys). + Enable validator mode. The node will be started with the authority role and actively participate in any consensus task that it can (e.g. depending on availability of local keys) --no-grandpa Disable GRANDPA voter when running in validator mode, otherwise disable the GRANDPA observer --rpc-external - Listen to all RPC interfaces. - - Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC proxy server to filter out dangerous methods. More details: . Use `--unsafe-rpc-external` to suppress the warning if you understand the risks. + Listen to all RPC interfaces. Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC proxy server to filter out dangerous methods. More details: . Use `--unsafe-rpc-external` to suppress the warning if you understand the risks --unsafe-rpc-external - Listen to all RPC interfaces. - - Same as `--rpc-external`. + Listen to all RPC interfaces. Same as `--rpc-external` --rpc-methods RPC methods to expose. - - `unsafe`: Exposes every RPC method. - `safe`: Exposes only a safe subset of RPC methods, denying unsafe RPC methods. - `auto`: Acts as `safe` if RPC is served externally, e.g. when `--{rpc,ws}-external` is @@ -37,14 +30,10 @@ Options: - unsafe: Expose every RPC method (even potentially unsafe ones) --ws-external - Listen to all Websocket interfaces. - - Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC proxy server to filter out dangerous methods. More details: . Use `--unsafe-ws-external` to suppress the warning if you understand the risks. + Listen to all Websocket interfaces. Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC proxy server to filter out dangerous methods. More details: . Use `--unsafe-ws-external` to suppress the warning if you understand the risks --unsafe-ws-external - Listen to all Websocket interfaces. - - Same as `--ws-external` but doesn't warn you about it. + Listen to all Websocket interfaces. Same as `--ws-external` but doesn't warn you about it --rpc-max-payload DEPRECATED, this has no affect anymore. Use `rpc_max_request_size` or `rpc_max_response_size` instead @@ -58,11 +47,6 @@ Options: --rpc-max-subscriptions-per-connection Set the the maximum concurrent subscriptions per connection. Default is 1024 - --prometheus-external - Expose Prometheus exporter on all interfaces. - - Default is local. - --ipc-path DEPRECATED, IPC support has been removed @@ -79,37 +63,38 @@ Options: DEPRECATED, this has no affect anymore. Use `rpc_max_response_size` instead --rpc-cors - Specify browser Origins allowed to access the HTTP & WS RPC servers. - - A comma-separated list of origins (protocol://domain or special `null` value). Value of `all` will disable origin validation. Default is to allow localhost and origins. When running in --dev mode the default is to allow all origins. + Specify browser Origins allowed to access the HTTP & WS RPC servers. A comma-separated list of origins (protocol://domain or special `null` value). Value of `all` will disable origin validation. Default is to allow localhost and origins. When running in --dev mode the default is to allow all origins + + --name + The human-readable name for this node. It's used as network node name + + --no-telemetry + Disable connecting to the Substrate telemetry server. Telemetry is on by default on global chains + + --telemetry-url + The URL of the telemetry server to connect to. This flag can be passed multiple times as a means to specify multiple telemetry endpoints. Verbosity levels range from 0-9, with 0 denoting the least verbosity. Expected format is 'URL VERBOSITY', e.g. `--telemetry-url 'wss://foo/bar 0'` --prometheus-port Specify Prometheus exporter TCP Port - --no-prometheus - Do not expose a Prometheus exporter endpoint. - - Prometheus metric endpoint is enabled by default. + --prometheus-external + Expose Prometheus exporter on all interfaces. Default is local - --name - The human-readable name for this node. - - The node name will be reported to the telemetry server, if enabled. + --no-prometheus + Do not expose a Prometheus exporter endpoint. Prometheus metric endpoint is enabled by default - --no-telemetry - Disable connecting to the Substrate telemetry server. + --max-runtime-instances + The size of the instances cache for each runtime. The values higher than 256 are illegal - Telemetry is on by default on global chains. + [default: 8] - --telemetry-url - The URL of the telemetry server to connect to. + --runtime-cache-size + Maximum number of different runtimes that can be cached - This flag can be passed multiple times as a means to specify multiple telemetry endpoints. Verbosity levels range from 0-9, with 0 denoting the least verbosity. Expected format is 'URL VERBOSITY', e.g. `--telemetry-url 'wss://foo/bar 0'`. + [default: 2] --offchain-worker - Should execute offchain workers on every block. - - By default it's only enabled for nodes that are authoring new blocks. + Should execute offchain workers on every block. By default it's only enabled for nodes that are authoring new blocks [default: when-authority] @@ -119,47 +104,31 @@ Options: - when-authority: Only enable the offchain worker when running as a validator (or collator, if this is a parachain node) --enable-offchain-indexing - Enable Offchain Indexing API, which allows block import to write to Offchain DB. - - Enables a runtime to write directly to a offchain workers DB during block import. + Enable Offchain Indexing API, which allows block import to write to Offchain DB. Enables a runtime to write directly to a offchain workers DB during block import [default: false] [possible values: true, false] --chain - Specify the chain specification. - - It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). + Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) --dev - Specify the development chain. - - This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. + Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. - - Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l`. + Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` --detailed-log-output - Enable detailed log output. - - This includes displaying the log target, log level and thread name. - - This is automatically enabled when something is logged with any higher level than `info`. + Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. - - Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. - - The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. + Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set --tracing-targets Sets a custom profiling filter. Syntax is the same as for logging: `=` @@ -173,44 +142,10 @@ Options: - log: Output the tracing records using the log --state-pruning - Specify the state pruning mode. - - This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. - - This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. - - Possible values: - - - archive: - - Keep the state of all blocks. - - - 'archive-canonical' - - Keep only the state of finalized blocks. - - - number - - Keep the state of the last number of finalized blocks. - - [default: 256] + Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. - - This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. - - Possible values: - 'archive' - - Keep all blocks. - - - 'archive-canonical' - - Keep only finalized blocks. - - - number - - Keep the last `number` of finalized blocks. + Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks [default: archive-canonical] @@ -236,15 +171,7 @@ Options: - compiled: Uses a compiled runtime --wasmtime-instantiation-strategy - The WASM instantiation method to use. - - Only has an effect when `wasm-execution` is set to `compiled`. - - The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. - - The fastest (and the default) strategy available is `pooling-copy-on-write`. - - The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy. + The WASM instantiation method to use. Only has an effect when `wasm-execution` is set to `compiled`. The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. The fastest (and the default) strategy available is `pooling-copy-on-write`. The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy [default: pooling-copy-on-write] @@ -256,9 +183,7 @@ Options: - legacy-instance-reuse: Legacy instance reuse mechanism. DEPRECATED. Will be removed in the future --wasm-runtime-overrides - Specify the path where local WASM runtimes are stored. - - These runtimes will override on-chain runtimes when the version matches. + Specify the path where local WASM runtimes are stored. These runtimes will override on-chain runtimes when the version matches --execution-syncing The means of execution used when calling into the runtime for importing blocks as part of an initial sync @@ -315,16 +240,12 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --trie-cache-size - Specify the state cache size. - - Providing `0` will disable the cache. + Specify the state cache size. Providing `0` will disable the cache [default: 67108864] --state-cache-size - DEPRECATED - - Switch to `--trie-cache-size`. + DEPRECATED Switch to `--trie-cache-size` --bootnodes ... Specify a list of bootnodes @@ -333,11 +254,7 @@ Options: Specify a list of reserved node addresses --reserved-only - Whether to only synchronize the chain with reserved nodes. - - Also disables automatic peer discovery. - - TCP connections might still be established with non-reserved nodes. In particular, if you are a validator your node might still connect to other validator nodes and collator nodes regardless of whether they are defined as reserved nodes. + Whether to only synchronize the chain with reserved nodes. Also disables automatic peer discovery. TCP connections might still be established with non-reserved nodes. In particular, if you are a validator your node might still connect to other validator nodes and collator nodes regardless of whether they are defined as reserved nodes --public-addr ... The public address that other nodes will use to connect to it. This can be used if there's a proxy in front of this node @@ -372,40 +289,18 @@ Options: [default: 100] --no-mdns - Disable mDNS discovery. - - By default, the network will use mDNS to discover other nodes on the local network. This disables it. Automatically implied when using --dev. + Disable mDNS discovery. By default, the network will use mDNS to discover other nodes on the local network. This disables it. Automatically implied when using --dev --max-parallel-downloads - Maximum number of peers from which to ask for the same blocks in parallel. - - This allows downloading announced blocks from multiple peers. Decrease to save traffic and risk increased latency. + Maximum number of peers from which to ask for the same blocks in parallel. This allows downloading announced blocks from multiple peers. Decrease to save traffic and risk increased latency [default: 5] --node-key - The secret key to use for libp2p networking. - - The value is a string that is parsed according to the choice of `--node-key-type` as follows: - - `ed25519`: The value is parsed as a hex-encoded Ed25519 32 byte secret key, i.e. 64 hex characters. - - The value of this option takes precedence over `--node-key-file`. - - WARNING: Secrets provided as command-line arguments are easily exposed. Use of this option should be limited to development and testing. To use an externally managed secret key, use `--node-key-file` instead. + The secret key to use for libp2p networking. The value is a string that is parsed according to the choice of `--node-key-type` as follows: `ed25519`: The value is parsed as a hex-encoded Ed25519 32 byte secret key, i.e. 64 hex characters. The value of this option takes precedence over `--node-key-file`. WARNING: Secrets provided as command-line arguments are easily exposed. Use of this option should be limited to development and testing. To use an externally managed secret key, use `--node-key-file` instead --node-key-type - The type of secret key to use for libp2p networking. - - The secret key of the node is obtained as follows: - - * If the `--node-key` option is given, the value is parsed as a secret key according to the type. See the documentation for `--node-key`. - - * If the `--node-key-file` option is given, the secret key is read from the specified file. See the documentation for `--node-key-file`. - - * Otherwise, the secret key is read from a file with a predetermined, type-specific name from the chain-specific network config directory inside the base directory specified by `--base-dir`. If this file does not exist, it is created with a newly generated secret key of the chosen type. - - The node's secret key determines the corresponding public key and hence the node's peer ID in the context of libp2p. + The type of secret key to use for libp2p networking. The secret key of the node is obtained as follows: * If the `--node-key` option is given, the value is parsed as a secret key according to the type. See the documentation for `--node-key`. * If the `--node-key-file` option is given, the secret key is read from the specified file. See the documentation for `--node-key-file`. * Otherwise, the secret key is read from a file with a predetermined, type-specific name from the chain-specific network config directory inside the base directory specified by `--base-dir`. If this file does not exist, it is created with a newly generated secret key of the chosen type. The node's secret key determines the corresponding public key and hence the node's peer ID in the context of libp2p [default: ed25519] @@ -413,23 +308,13 @@ Options: - ed25519: Use ed25519 --node-key-file - The file from which to read the node's secret key to use for libp2p networking. - - The contents of the file are parsed according to the choice of `--node-key-type` as follows: - - `ed25519`: The file must contain an unencoded 32 byte or hex encoded Ed25519 secret key. - - If the file does not exist, it is created with a newly generated secret key of the chosen type. + The file from which to read the node's secret key to use for libp2p networking. The contents of the file are parsed according to the choice of `--node-key-type` as follows: `ed25519`: The file must contain an unencoded 32 byte or hex encoded Ed25519 secret key. If the file does not exist, it is created with a newly generated secret key of the chosen type --discover-local - Enable peer discovery on local networks. - - By default this option is `true` for `--dev` or when the chain type is `Local`/`Development` and false otherwise. + Enable peer discovery on local networks. By default this option is `true` for `--dev` or when the chain type is `Local`/`Development` and false otherwise --kademlia-disjoint-query-paths - Require iterative Kademlia DHT queries to use disjoint paths for increased resiliency in the presence of potentially adversarial nodes. - - See the S/Kademlia paper for more information on the high level design as well as its security improvements. + Require iterative Kademlia DHT queries to use disjoint paths for increased resiliency in the presence of potentially adversarial nodes. See the S/Kademlia paper for more information on the high level design as well as its security improvements --ipfs-server Join the IPFS network and serve transactions over bitswap protocol @@ -437,11 +322,6 @@ Options: --sync Blockchain syncing mode. - - `full`: Download and validate full blockchain history. - - `fast`: Download blocks and the latest state only. - - `fast-unsafe`: Same as `fast`, but skip downloading state proofs. - - `warp`: Download the latest state and proof. - [default: full] Possible values: @@ -450,6 +330,13 @@ Options: - fast-unsafe: Download blocks without executing them. Download latest state without proofs - warp: Prove finality and download the latest state + --max-blocks-per-request + Maximum number of blocks per request. + + Try reducing this number from the default value if you have a slow network connection and observe block requests timing out. + + [default: 64] + --pool-limit Maximum number of transactions in the transaction pool @@ -463,6 +350,21 @@ Options: --tx-ban-seconds How long a transaction is banned for, if it is considered invalid. Defaults to 1800s + --keystore-uri + Specify custom URIs to connect to for keystore-services + + --keystore-path + Specify custom keystore path + + --password-interactive + Use interactive shell for entering the password used by the keystore + + --password + Password used by the keystore. This allows appending an extra user-defined secret to the seed + + --password-filename + File that contains the password used by the keystore + --alice Shortcut for `--name Alice --validator` with session keys for `Alice` added to keystore @@ -490,39 +392,8 @@ Options: --force-authoring Enable authoring even when offline - --keystore-uri - Specify custom URIs to connect to for keystore-services - - --keystore-path - Specify custom keystore path - - --password-interactive - Use interactive shell for entering the password used by the keystore - - --password - Password used by the keystore. This allows appending an extra user-defined secret to the seed - - --password-filename - File that contains the password used by the keystore - - --max-runtime-instances - The size of the instances cache for each runtime. - - The default value is 8 and the values higher than 256 are ignored. - - --runtime-cache-size - Maximum number of different runtimes that can be cached - - [default: 2] - --tmp - Run a temporary node. - - A temporary directory will be created to store the configuration and will be deleted at the end of the process. - - Note: the directory is random per process execution. This directory is used as base path which includes: database, node key and keystore. - - When `--dev` is given and no explicit `--base-path`, this option is implied. + Run a temporary node. A temporary directory will be created to store the configuration and will be deleted at the end of the process. Note: the directory is random per process execution. This directory is used as base path which includes: database, node key and keystore. When `--dev` is given and no explicit `--base-path`, this option is implied --webapp-url The URL to use for the web app. Used to print the QR Code to the console, so it doesn't matter much diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.key.insert.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.key.insert.stdout.txt index 20e849876..5cc924b62 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.key.insert.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.key.insert.stdout.txt @@ -7,39 +7,25 @@ Options: The secret key uri (mnemonic) --chain - Specify the chain specification. - - It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). + Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) --dev - Specify the development chain. - - This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. + Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. - - Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l`. + Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` --detailed-log-output - Enable detailed log output. - - This includes displaying the log target, log level and thread name. - - This is automatically enabled when something is logged with any higher level than `info`. + Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. - - Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. - - The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. + Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set --tracing-targets Sets a custom profiling filter. Syntax is the same as for logging: `=` diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.key.list.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.key.list.stdout.txt index de8497e49..7e15e4f7d 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.key.list.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.key.list.stdout.txt @@ -4,39 +4,25 @@ Usage: humanode-peer bioauth key list [OPTIONS] Options: --chain - Specify the chain specification. - - It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). + Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) --dev - Specify the development chain. - - This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. + Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. - - Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l`. + Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` --detailed-log-output - Enable detailed log output. - - This includes displaying the log target, log level and thread name. - - This is automatically enabled when something is logged with any higher level than `info`. + Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. - - Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. - - The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. + Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set --tracing-targets Sets a custom profiling filter. Syntax is the same as for logging: `=` diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.build-spec.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.build-spec.stdout.txt index db9a55017..44c9b38d3 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.build-spec.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.build-spec.stdout.txt @@ -7,44 +7,28 @@ Options: Force raw genesis storage output --disable-default-bootnode - Disable adding the default bootnode to the specification. - - By default the `/ip4/127.0.0.1/tcp/30333/p2p/NODE_PEER_ID` bootnode is added to the specification when no bootnode exists. + Disable adding the default bootnode to the specification. By default the `/ip4/127.0.0.1/tcp/30333/p2p/NODE_PEER_ID` bootnode is added to the specification when no bootnode exists --chain - Specify the chain specification. - - It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). + Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) --dev - Specify the development chain. - - This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. + Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. - - Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l`. + Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` --detailed-log-output - Enable detailed log output. - - This includes displaying the log target, log level and thread name. - - This is automatically enabled when something is logged with any higher level than `info`. + Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. - - Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. - - The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. + Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set --tracing-targets Sets a custom profiling filter. Syntax is the same as for logging: `=` @@ -58,28 +42,10 @@ Options: - log: Output the tracing records using the log --node-key - The secret key to use for libp2p networking. - - The value is a string that is parsed according to the choice of `--node-key-type` as follows: - - `ed25519`: The value is parsed as a hex-encoded Ed25519 32 byte secret key, i.e. 64 hex characters. - - The value of this option takes precedence over `--node-key-file`. - - WARNING: Secrets provided as command-line arguments are easily exposed. Use of this option should be limited to development and testing. To use an externally managed secret key, use `--node-key-file` instead. + The secret key to use for libp2p networking. The value is a string that is parsed according to the choice of `--node-key-type` as follows: `ed25519`: The value is parsed as a hex-encoded Ed25519 32 byte secret key, i.e. 64 hex characters. The value of this option takes precedence over `--node-key-file`. WARNING: Secrets provided as command-line arguments are easily exposed. Use of this option should be limited to development and testing. To use an externally managed secret key, use `--node-key-file` instead --node-key-type - The type of secret key to use for libp2p networking. - - The secret key of the node is obtained as follows: - - * If the `--node-key` option is given, the value is parsed as a secret key according to the type. See the documentation for `--node-key`. - - * If the `--node-key-file` option is given, the secret key is read from the specified file. See the documentation for `--node-key-file`. - - * Otherwise, the secret key is read from a file with a predetermined, type-specific name from the chain-specific network config directory inside the base directory specified by `--base-dir`. If this file does not exist, it is created with a newly generated secret key of the chosen type. - - The node's secret key determines the corresponding public key and hence the node's peer ID in the context of libp2p. + The type of secret key to use for libp2p networking. The secret key of the node is obtained as follows: * If the `--node-key` option is given, the value is parsed as a secret key according to the type. See the documentation for `--node-key`. * If the `--node-key-file` option is given, the secret key is read from the specified file. See the documentation for `--node-key-file`. * Otherwise, the secret key is read from a file with a predetermined, type-specific name from the chain-specific network config directory inside the base directory specified by `--base-dir`. If this file does not exist, it is created with a newly generated secret key of the chosen type. The node's secret key determines the corresponding public key and hence the node's peer ID in the context of libp2p [default: ed25519] @@ -87,13 +53,7 @@ Options: - ed25519: Use ed25519 --node-key-file - The file from which to read the node's secret key to use for libp2p networking. - - The contents of the file are parsed according to the choice of `--node-key-type` as follows: - - `ed25519`: The file must contain an unencoded 32 byte or hex encoded Ed25519 secret key. - - If the file does not exist, it is created with a newly generated secret key of the chosen type. + The file from which to read the node's secret key to use for libp2p networking. The contents of the file are parsed according to the choice of `--node-key-type` as follows: `ed25519`: The file must contain an unencoded 32 byte or hex encoded Ed25519 secret key. If the file does not exist, it is created with a newly generated secret key of the chosen type -h, --help Print help (see a summary with '-h') diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.check-block.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.check-block.stdout.txt index c170dc4d1..1277d0be1 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.check-block.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.check-block.stdout.txt @@ -8,44 +8,28 @@ Arguments: Options: --default-heap-pages - The default number of 64KB pages to ever allocate for Wasm execution. - - Don't alter this unless you know what you're doing. + The default number of 64KB pages to ever allocate for Wasm execution. Don't alter this unless you know what you're doing --chain - Specify the chain specification. - - It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). + Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) --dev - Specify the development chain. - - This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. + Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. - - Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l`. + Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` --detailed-log-output - Enable detailed log output. - - This includes displaying the log target, log level and thread name. - - This is automatically enabled when something is logged with any higher level than `info`. + Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. - - Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. - - The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. + Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set --tracing-targets Sets a custom profiling filter. Syntax is the same as for logging: `=` @@ -59,44 +43,10 @@ Options: - log: Output the tracing records using the log --state-pruning - Specify the state pruning mode. - - This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. - - This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. - - Possible values: - - - archive: - - Keep the state of all blocks. - - - 'archive-canonical' - - Keep only the state of finalized blocks. - - - number - - Keep the state of the last number of finalized blocks. - - [default: 256] + Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. - - This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. - - Possible values: - 'archive' - - Keep all blocks. - - - 'archive-canonical' - - Keep only finalized blocks. - - - number - - Keep the last `number` of finalized blocks. + Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks [default: archive-canonical] @@ -122,15 +72,7 @@ Options: - compiled: Uses a compiled runtime --wasmtime-instantiation-strategy - The WASM instantiation method to use. - - Only has an effect when `wasm-execution` is set to `compiled`. - - The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. - - The fastest (and the default) strategy available is `pooling-copy-on-write`. - - The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy. + The WASM instantiation method to use. Only has an effect when `wasm-execution` is set to `compiled`. The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. The fastest (and the default) strategy available is `pooling-copy-on-write`. The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy [default: pooling-copy-on-write] @@ -142,9 +84,7 @@ Options: - legacy-instance-reuse: Legacy instance reuse mechanism. DEPRECATED. Will be removed in the future --wasm-runtime-overrides - Specify the path where local WASM runtimes are stored. - - These runtimes will override on-chain runtimes when the version matches. + Specify the path where local WASM runtimes are stored. These runtimes will override on-chain runtimes when the version matches --execution-syncing The means of execution used when calling into the runtime for importing blocks as part of an initial sync @@ -201,16 +141,12 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --trie-cache-size - Specify the state cache size. - - Providing `0` will disable the cache. + Specify the state cache size. Providing `0` will disable the cache [default: 67108864] --state-cache-size - DEPRECATED - - Switch to `--trie-cache-size`. + DEPRECATED Switch to `--trie-cache-size` -h, --help Print help (see a summary with '-h') diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.export-blocks.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.export-blocks.stdout.txt index fa68fbf08..9ee7f0adc 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.export-blocks.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.export-blocks.stdout.txt @@ -8,52 +8,34 @@ Arguments: Options: --from - Specify starting block number. - - Default is 1. + Specify starting block number. Default is 1 --to - Specify last block number. - - Default is best block. + Specify last block number. Default is best block --binary Use binary output rather than JSON --chain - Specify the chain specification. - - It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). + Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) --dev - Specify the development chain. - - This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. + Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. - - Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l`. + Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` --detailed-log-output - Enable detailed log output. - - This includes displaying the log target, log level and thread name. - - This is automatically enabled when something is logged with any higher level than `info`. + Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. - - Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. - - The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. + Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set --tracing-targets Sets a custom profiling filter. Syntax is the same as for logging: `=` @@ -67,44 +49,10 @@ Options: - log: Output the tracing records using the log --state-pruning - Specify the state pruning mode. - - This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. - - This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. - - Possible values: - - - archive: - - Keep the state of all blocks. - - - 'archive-canonical' - - Keep only the state of finalized blocks. - - - number - - Keep the state of the last number of finalized blocks. - - [default: 256] + Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. - - This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. - - Possible values: - 'archive' - - Keep all blocks. - - - 'archive-canonical' - - Keep only finalized blocks. - - - number - - Keep the last `number` of finalized blocks. + Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks [default: archive-canonical] diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.export-state.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.export-state.stdout.txt index 44406fde6..eb268928d 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.export-state.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.export-state.stdout.txt @@ -8,39 +8,25 @@ Arguments: Options: --chain - Specify the chain specification. - - It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). + Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) --dev - Specify the development chain. - - This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. + Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. - - Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l`. + Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` --detailed-log-output - Enable detailed log output. - - This includes displaying the log target, log level and thread name. - - This is automatically enabled when something is logged with any higher level than `info`. + Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. - - Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. - - The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. + Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set --tracing-targets Sets a custom profiling filter. Syntax is the same as for logging: `=` @@ -54,44 +40,10 @@ Options: - log: Output the tracing records using the log --state-pruning - Specify the state pruning mode. - - This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. - - This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. - - Possible values: - - - archive: - - Keep the state of all blocks. - - - 'archive-canonical' - - Keep only the state of finalized blocks. - - - number - - Keep the state of the last number of finalized blocks. - - [default: 256] + Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. - - This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. - - Possible values: - 'archive' - - Keep all blocks. - - - 'archive-canonical' - - Keep only finalized blocks. - - - number - - Keep the last `number` of finalized blocks. + Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks [default: archive-canonical] diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.frontier-db.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.frontier-db.stdout.txt index 31440d8d0..d6a43c0ba 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.frontier-db.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.frontier-db.stdout.txt @@ -29,39 +29,25 @@ Options: In any case, payload must be serializable to a known type. --chain - Specify the chain specification. - - It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). + Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) --dev - Specify the development chain. - - This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. + Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. - - Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l`. + Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` --detailed-log-output - Enable detailed log output. - - This includes displaying the log target, log level and thread name. - - This is automatically enabled when something is logged with any higher level than `info`. + Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. - - Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. - - The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. + Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set --tracing-targets Sets a custom profiling filter. Syntax is the same as for logging: `=` @@ -75,44 +61,10 @@ Options: - log: Output the tracing records using the log --state-pruning - Specify the state pruning mode. - - This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. - - This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. - - Possible values: - - - archive: - - Keep the state of all blocks. - - - 'archive-canonical' - - Keep only the state of finalized blocks. - - - number - - Keep the state of the last number of finalized blocks. - - [default: 256] + Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. - - This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. - - Possible values: - 'archive' - - Keep all blocks. - - - 'archive-canonical' - - Keep only finalized blocks. - - - number - - Keep the last `number` of finalized blocks. + Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks [default: archive-canonical] diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.import-blocks.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.import-blocks.stdout.txt index e575fc3d6..2581856f5 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.import-blocks.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.import-blocks.stdout.txt @@ -8,47 +8,31 @@ Arguments: Options: --default-heap-pages - The default number of 64KB pages to ever allocate for Wasm execution. - - Don't alter this unless you know what you're doing. + The default number of 64KB pages to ever allocate for Wasm execution. Don't alter this unless you know what you're doing --binary Try importing blocks from binary format rather than JSON --chain - Specify the chain specification. - - It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). + Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) --dev - Specify the development chain. - - This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. + Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. - - Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l`. + Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` --detailed-log-output - Enable detailed log output. - - This includes displaying the log target, log level and thread name. - - This is automatically enabled when something is logged with any higher level than `info`. + Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. - - Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. - - The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. + Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set --tracing-targets Sets a custom profiling filter. Syntax is the same as for logging: `=` @@ -62,44 +46,10 @@ Options: - log: Output the tracing records using the log --state-pruning - Specify the state pruning mode. - - This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. - - This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. - - Possible values: - - - archive: - - Keep the state of all blocks. - - - 'archive-canonical' - - Keep only the state of finalized blocks. - - - number - - Keep the state of the last number of finalized blocks. - - [default: 256] + Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. - - This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. - - Possible values: - 'archive' - - Keep all blocks. - - - 'archive-canonical' - - Keep only finalized blocks. - - - number - - Keep the last `number` of finalized blocks. + Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks [default: archive-canonical] @@ -125,15 +75,7 @@ Options: - compiled: Uses a compiled runtime --wasmtime-instantiation-strategy - The WASM instantiation method to use. - - Only has an effect when `wasm-execution` is set to `compiled`. - - The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. - - The fastest (and the default) strategy available is `pooling-copy-on-write`. - - The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy. + The WASM instantiation method to use. Only has an effect when `wasm-execution` is set to `compiled`. The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. The fastest (and the default) strategy available is `pooling-copy-on-write`. The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy [default: pooling-copy-on-write] @@ -145,9 +87,7 @@ Options: - legacy-instance-reuse: Legacy instance reuse mechanism. DEPRECATED. Will be removed in the future --wasm-runtime-overrides - Specify the path where local WASM runtimes are stored. - - These runtimes will override on-chain runtimes when the version matches. + Specify the path where local WASM runtimes are stored. These runtimes will override on-chain runtimes when the version matches --execution-syncing The means of execution used when calling into the runtime for importing blocks as part of an initial sync @@ -204,16 +144,12 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --trie-cache-size - Specify the state cache size. - - Providing `0` will disable the cache. + Specify the state cache size. Providing `0` will disable the cache [default: 67108864] --state-cache-size - DEPRECATED - - Switch to `--trie-cache-size`. + DEPRECATED Switch to `--trie-cache-size` -h, --help Print help (see a summary with '-h') diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.key.generate-node-key.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.key.generate-node-key.stdout.txt index 14fe747de..2ae900e92 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.key.generate-node-key.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.key.generate-node-key.stdout.txt @@ -3,18 +3,7 @@ Generate a random node key, write it to a file or stdout and write the correspon Usage: humanode-peer key generate-node-key [OPTIONS] Options: - --file - Name of file to save secret key to. - - If not given, the secret key is printed to stdout. - - --bin - The output is in raw binary format. - - If not given, the output is written as an hex encoded string. - - -h, --help - Print help (see a summary with '-h') - - -V, --version - Print version + --file Name of file to save secret key to. If not given, the secret key is printed to stdout + --bin The output is in raw binary format. If not given, the output is written as an hex encoded string + -h, --help Print help + -V, --version Print version diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.key.insert.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.key.insert.stdout.txt index 7518b1c1c..3248e9ad5 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.key.insert.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.key.insert.stdout.txt @@ -10,39 +10,25 @@ Options: Key type, examples: "gran", or "imon" --chain - Specify the chain specification. - - It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). + Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) --dev - Specify the development chain. - - This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. + Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. - - Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l`. + Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` --detailed-log-output - Enable detailed log output. - - This includes displaying the log target, log level and thread name. - - This is automatically enabled when something is logged with any higher level than `info`. + Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. - - Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. - - The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. + Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set --tracing-targets Sets a custom profiling filter. Syntax is the same as for logging: `=` diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.key.inspect-node-key.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.key.inspect-node-key.stdout.txt index fff223382..9addf5bec 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.key.inspect-node-key.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.key.inspect-node-key.stdout.txt @@ -3,21 +3,8 @@ Load a node key from a file or stdin and print the corresponding peer-id Usage: humanode-peer key inspect-node-key [OPTIONS] Options: - --file - Name of file to read the secret key from. - - If not given, the secret key is read from stdin (up to EOF). - - --bin - The input is in raw binary format. - - If not given, the input is read as an hex encoded string. - - -n, --network - This argument is deprecated and has no effect for this command - - -h, --help - Print help (see a summary with '-h') - - -V, --version - Print version + --file Name of file to read the secret key from. If not given, the secret key is read from stdin (up to EOF) + --bin The input is in raw binary format. If not given, the input is read as an hex encoded string + -n, --network This argument is deprecated and has no effect for this command + -h, --help Print help + -V, --version Print version diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.key.inspect.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.key.inspect.stdout.txt index 3b236f799..24300dfaa 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.key.inspect.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.key.inspect.stdout.txt @@ -4,13 +4,7 @@ Usage: humanode-peer key inspect [OPTIONS] [URI] Arguments: [URI] - A Key URI to be inspected. May be a secret seed, secret URI (with derivation paths and password), SS58, public URI or a hex encoded public key. - - If it is a hex encoded public key, `--public` needs to be given as argument. - - If the given value is a file, the file content will be used as URI. - - If omitted, you will be prompted for the URI. + A Key URI to be inspected. May be a secret seed, secret URI (with derivation paths and password), SS58, public URI or a hex encoded public key. If it is a hex encoded public key, `--public` needs to be given as argument. If the given value is a file, the file content will be used as URI. If omitted, you will be prompted for the URI Options: --public @@ -54,11 +48,7 @@ Options: - ecdsa: Use --expect-public - Expect that `--uri` has the given public key/account-id. - - If `--uri` has any derivations, the public key is checked against the base `uri`, i.e. the `uri` without any derivation applied. However, if `uri` has a password or there is one given by `--password`, it will be used to decrypt `uri` before comparing the public key/account-id. - - If there is no derivation in `--uri`, the public key will be checked against the public key of `--uri` directly. + Expect that `--uri` has the given public key/account-id. If `--uri` has any derivations, the public key is checked against the base `uri`, i.e. the `uri` without any derivation applied. However, if `uri` has a password or there is one given by `--password`, it will be used to decrypt `uri` before comparing the public key/account-id. If there is no derivation in `--uri`, the public key will be checked against the public key of `--uri` directly -h, --help Print help (see a summary with '-h') diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.purge-chain.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.purge-chain.stdout.txt index f5ba424eb..4c1070935 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.purge-chain.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.purge-chain.stdout.txt @@ -7,39 +7,25 @@ Options: Skip interactive prompt by answering yes automatically --chain - Specify the chain specification. - - It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). + Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) --dev - Specify the development chain. - - This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. + Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. - - Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l`. + Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` --detailed-log-output - Enable detailed log output. - - This includes displaying the log target, log level and thread name. - - This is automatically enabled when something is logged with any higher level than `info`. + Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. - - Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. - - The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. + Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set --tracing-targets Sets a custom profiling filter. Syntax is the same as for logging: `=` diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.revert.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.revert.stdout.txt index 1cf2f173e..ba8399498 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.revert.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.revert.stdout.txt @@ -10,39 +10,25 @@ Arguments: Options: --chain - Specify the chain specification. - - It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). + Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) --dev - Specify the development chain. - - This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. + Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. - - Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l`. + Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` --detailed-log-output - Enable detailed log output. - - This includes displaying the log target, log level and thread name. - - This is automatically enabled when something is logged with any higher level than `info`. + Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. - - Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. - - The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. + Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set --tracing-targets Sets a custom profiling filter. Syntax is the same as for logging: `=` @@ -56,44 +42,10 @@ Options: - log: Output the tracing records using the log --state-pruning - Specify the state pruning mode. - - This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. - - This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. - - Possible values: - - - archive: - - Keep the state of all blocks. - - - 'archive-canonical' - - Keep only the state of finalized blocks. - - - number - - Keep the state of the last number of finalized blocks. - - [default: 256] + Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. - - This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. - - Possible values: - 'archive' - - Keep all blocks. - - - 'archive-canonical' - - Keep only finalized blocks. - - - number - - Keep the last `number` of finalized blocks. + Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks [default: archive-canonical] From 9a7bffe5259aea5557750e5af991db4cd2ba4fe0 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Thu, 6 Jun 2024 17:35:27 +0300 Subject: [PATCH 46/56] Fix typos --- crates/humanode-runtime/src/tests/claims_and_vesting.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/humanode-runtime/src/tests/claims_and_vesting.rs b/crates/humanode-runtime/src/tests/claims_and_vesting.rs index f784103a2..e3f855e97 100644 --- a/crates/humanode-runtime/src/tests/claims_and_vesting.rs +++ b/crates/humanode-runtime/src/tests/claims_and_vesting.rs @@ -453,7 +453,7 @@ fn direct_claiming_without_vesting_works() { // Ensure that the balance is not locked. // // Alice account can't be reaped as the account takes part in consensus (bootnode). - // Frozen balance is 0 < existantial deposit. + // Frozen balance is 0 < existential deposit. // // As a result, usable balance doesn't contain existential deposit. assert_eq!( From 12279069eead3fdc6f82430a05b0f204bb09261f Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Wed, 21 Aug 2024 15:59:38 +0300 Subject: [PATCH 47/56] Fix clippy --- crates/author-ext-api/src/lib.rs | 2 +- crates/bioauth-flow-api/src/lib.rs | 2 +- crates/pallet-vesting/src/api.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/author-ext-api/src/lib.rs b/crates/author-ext-api/src/lib.rs index ef68928f1..8bb1d2e64 100644 --- a/crates/author-ext-api/src/lib.rs +++ b/crates/author-ext-api/src/lib.rs @@ -17,7 +17,7 @@ pub enum CreateSignedSetKeysExtrinsicError { sp_api::decl_runtime_apis! { /// Runtime API for the author extension logic. - pub trait AuthorExtApi { + pub trait AuthorExtApi where Id: Encode { /// Create signed set_keys extrinsic. fn create_signed_set_keys_extrinsic(id: &Id, session_keys: Vec) -> Result; } diff --git a/crates/bioauth-flow-api/src/lib.rs b/crates/bioauth-flow-api/src/lib.rs index 43414b9bf..8df251f0c 100644 --- a/crates/bioauth-flow-api/src/lib.rs +++ b/crates/bioauth-flow-api/src/lib.rs @@ -23,7 +23,7 @@ pub enum BioauthStatus { sp_api::decl_runtime_apis! { /// Runtime API for the bioauth flow. - pub trait BioauthFlowApi { + pub trait BioauthFlowApi where Id: Encode { /// Determine the bioauth status for the given `id` at the current block. /// /// This call is intended for use in the bioauth flow, and the `id` passed is likely. diff --git a/crates/pallet-vesting/src/api.rs b/crates/pallet-vesting/src/api.rs index 531667f22..7ca75a943 100644 --- a/crates/pallet-vesting/src/api.rs +++ b/crates/pallet-vesting/src/api.rs @@ -15,7 +15,7 @@ pub enum EvaluationError { sp_api::decl_runtime_apis! { /// A runtime API for evaluating the locking logic. - pub trait VestingEvaluationApi { + pub trait VestingEvaluationApi where AccountId: Encode { /// Compute the balance under lock. fn evaluate_lock(account: &AccountId) -> Result; } From a2ec0c27afe8df6edf6814850ac02e1c90df2ecb Mon Sep 17 00:00:00 2001 From: MOZGIII Date: Tue, 10 Sep 2024 11:01:11 -0300 Subject: [PATCH 48/56] Reset claims and vesting tests at runtime --- .../src/tests/claims_and_vesting.rs | 129 ++---------------- 1 file changed, 12 insertions(+), 117 deletions(-) diff --git a/crates/humanode-runtime/src/tests/claims_and_vesting.rs b/crates/humanode-runtime/src/tests/claims_and_vesting.rs index e3f855e97..3bebeb0c7 100644 --- a/crates/humanode-runtime/src/tests/claims_and_vesting.rs +++ b/crates/humanode-runtime/src/tests/claims_and_vesting.rs @@ -424,15 +424,7 @@ fn direct_claiming_without_vesting_works() { // Test preconditions. assert!(TokenClaims::claims(ethereum_address).is_some()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - // Alice account can't be reaped as the account takes part in consensus (bootnode). - // Frozen balance is 0 < existential deposit. - // - // As a result, usable balance doesn't contain existential deposit. - assert_eq!( - Balances::usable_balance(account_id("Alice")), - INIT_BALANCE - - >::minimum_balance() - ); + assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); // Invoke the claim call. assert_ok!(TokenClaims::claim( @@ -451,15 +443,9 @@ fn direct_claiming_without_vesting_works() { ); // Ensure that the balance is not locked. - // - // Alice account can't be reaped as the account takes part in consensus (bootnode). - // Frozen balance is 0 < existential deposit. - // - // As a result, usable balance doesn't contain existential deposit. assert_eq!( Balances::usable_balance(account_id("Alice")), INIT_BALANCE + VESTING_BALANCE - - >::minimum_balance() ); // Ensure total issuance did not change. @@ -485,15 +471,7 @@ fn direct_claiming_with_vesting_works() { // Test preconditions. assert!(TokenClaims::claims(ethereum_address).is_some()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - // Alice account can't be reaped as the account takes part in consensus (bootnode). - // Frozen balance is 0 < existential deposit. - // - // As a result, usable balance doesn't contain existential deposit. - assert_eq!( - Balances::usable_balance(account_id("Alice")), - INIT_BALANCE - - >::minimum_balance() - ); + assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); assert!(Vesting::locks(account_id("Alice")).is_none()); // Invoke the claim call. @@ -513,11 +491,6 @@ fn direct_claiming_with_vesting_works() { ); // Ensure that the vesting balance is locked. - // - // Alice account can't be reaped as the account takes part in consensus (bootnode). - // Frozen balance is equal to vesting balance > existential deposit. - // - // As a result, usable balance contains existential deposit. assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); // Ensure that the vesting is armed for the given account and matches the parameters. @@ -569,15 +542,9 @@ fn direct_unlock_full_balance_works() { assert_ok!(Vesting::unlock(Some(account_id("Alice")).into())); // Ensure funds are unlocked. - // - // Alice account can't be reaped as the account takes part in consensus (bootnode). - // Frozen balance is 0 < existential deposit. - // - // As a result, usable balance doesn't contain existential deposit. assert_eq!( Balances::usable_balance(account_id("Alice")), INIT_BALANCE + VESTING_BALANCE - - >::minimum_balance() ); // Ensure the vesting is gone from the state. @@ -623,7 +590,7 @@ fn direct_unlock_partial_balance_works() { // Invoke the unlock call. assert_ok!(Vesting::unlock(Some(account_id("Alice")).into())); - let unlocked_balance = VESTING_BALANCE - System::account(account_id("Alice")).data.frozen; + let unlocked_balance = Balances::usable_balance(account_id("Alice")) - INIT_BALANCE; // Ensure funds are partially unlocked and rounding works as expected. assert_eq!(unlocked_balance, EXPECTED_PARTIAL_UNLOCKED_FUNDS); @@ -655,15 +622,7 @@ fn direct_claiming_fails_when_eth_signature_invalid() { // Test preconditions. assert!(TokenClaims::claims(ethereum_address).is_some()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - // Alice account can't be reaped as the account takes part in consensus (bootnode). - // Frozen balance is 0 < existential deposit. - // - // As a result, usable balance doesn't contain existential deposit. - assert_eq!( - Balances::usable_balance(account_id("Alice")), - INIT_BALANCE - - >::minimum_balance() - ); + assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); // Invoke the claim call. assert_noop!( @@ -678,15 +637,7 @@ fn direct_claiming_fails_when_eth_signature_invalid() { // Ensure claims related state hasn't been changed. assert!(TokenClaims::claims(ethereum_address).is_some()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - // Alice account can't be reaped as the account takes part in consensus (bootnode). - // Frozen balance is 0 < existential deposit. - // - // As a result, usable balance doesn't contain existential deposit. - assert_eq!( - Balances::usable_balance(account_id("Alice")), - INIT_BALANCE - - >::minimum_balance() - ); + assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); assert_eq!(Balances::total_issuance(), total_issuance_before); }) } @@ -710,15 +661,7 @@ fn direct_claiming_fails_when_no_claim() { // Test preconditions. assert!(TokenClaims::claims(ethereum_address).is_none()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - // Alice account can't be reaped as the account takes part in consensus (bootnode). - // Frozen balance is 0 < existential deposit. - // - // As a result, usable balance doesn't contain existential deposit. - assert_eq!( - Balances::usable_balance(account_id("Alice")), - INIT_BALANCE - - >::minimum_balance() - ); + assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); // Invoke the claim call. assert_noop!( @@ -733,15 +676,7 @@ fn direct_claiming_fails_when_no_claim() { // Ensure claims related state hasn't been changed. assert!(TokenClaims::claims(ethereum_address).is_none()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - // Alice account can't be reaped as the account takes part in consensus (bootnode). - // Frozen balance is 0 < existential deposit. - // - // As a result, usable balance doesn't contain existential deposit. - assert_eq!( - Balances::usable_balance(account_id("Alice")), - INIT_BALANCE - - >::minimum_balance() - ); + assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); assert_eq!(Balances::total_issuance(), total_issuance_before); }) } @@ -779,11 +714,6 @@ fn direct_unlock_fails_when_no_vesting() { ); // Ensure funds are still locked. - // - // Alice account can't be reaped as the account takes part in consensus (bootnode). - // Frozen balance is equal to vesting balance > existential deposit. - // - // As a result, usable balance contains existential deposit. assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); // Ensure the vesting isn't gone from the state. @@ -830,7 +760,7 @@ fn claims_fails_when_vesting_already_engaged() { // Invoke the unlock call. assert_ok!(Vesting::unlock(Some(account_id("Alice")).into())); - let unlocked_balance = VESTING_BALANCE - System::account(account_id("Alice")).data.frozen; + let unlocked_balance = Balances::usable_balance(account_id("Alice")) - INIT_BALANCE; // Ensure funds are partially unlocked and rounding works as expected. assert_eq!(unlocked_balance, EXPECTED_PARTIAL_UNLOCKED_FUNDS); @@ -898,15 +828,7 @@ fn dispatch_claiming_without_vesting_works() { // Test preconditions. assert!(TokenClaims::claims(ethereum_address).is_some()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - // Alice account can't be reaped as the account takes part in consensus (bootnode). - // Frozen balance is 0 < existential deposit. - // - // As a result, usable balance doesn't contain existential deposit. - assert_eq!( - Balances::usable_balance(account_id("Alice")), - INIT_BALANCE - - >::minimum_balance() - ); + assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); // Validate already checked extrinsic with all possible transaction sources. assert_applyable_validate_all_transaction_sources( @@ -931,15 +853,9 @@ fn dispatch_claiming_without_vesting_works() { ); // Ensure that the balance is not locked. - // - // Alice account can't be reaped as the account takes part in consensus (bootnode). - // Frozen balance is 0 < existential deposit. - // - // As a result, usable balance doesn't contain existential deposit. assert_eq!( Balances::usable_balance(account_id("Alice")), INIT_BALANCE + VESTING_BALANCE - - >::minimum_balance() ); // Ensure total issuance did not change. @@ -975,15 +891,7 @@ fn dispatch_claiming_with_vesting_works() { // Test preconditions. assert!(TokenClaims::claims(ethereum_address).is_some()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - // Alice account can't be reaped as the account takes part in consensus (bootnode). - // Frozen balance is 0 < existential deposit. - // - // As a result, usable balance doesn't contain existential deposit. - assert_eq!( - Balances::usable_balance(account_id("Alice")), - INIT_BALANCE - - >::minimum_balance() - ); + assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); assert!(Vesting::locks(account_id("Alice")).is_none()); // Validate already checked extrinsic with all possible transaction sources. @@ -1008,10 +916,7 @@ fn dispatch_claiming_with_vesting_works() { INIT_BALANCE + VESTING_BALANCE ); - // Alice account can't be reaped as the account takes part in consensus (bootnode). - // Frozen balance is equal to vesting balance > existential deposit. - // - // As a result, usable balance contains existential deposit. + // Ensure that the vesting balance is locked. assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); // Ensure that the vesting is armed for the given account and matches the parameters. @@ -1069,10 +974,6 @@ fn dispatch_unlock_full_balance_works() { Balances::free_balance(account_id("Alice")), INIT_BALANCE + VESTING_BALANCE ); - // Alice account can't be reaped as the account takes part in consensus (bootnode). - // Frozen balance is equal to vesting balance < existential deposit. - // - // As a result, usable balance contains existential deposit. assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); assert!(Vesting::locks(account_id("Alice")).is_some()); @@ -1092,15 +993,9 @@ fn dispatch_unlock_full_balance_works() { )); // Ensure funds are unlocked. - // - // Alice account can't be reaped as the account takes part in consensus (bootnode). - // Frozen balance is 0 < existential deposit. - // - // As a result, usable balance doesn't contain existential deposit. assert_eq!( Balances::usable_balance(account_id("Alice")), INIT_BALANCE + VESTING_BALANCE - - >::minimum_balance() ); // Ensure the vesting is gone from the state. @@ -1171,7 +1066,7 @@ fn dispatch_unlock_partial_balance_works() { len )); - let unlocked_balance = VESTING_BALANCE - System::account(account_id("Alice")).data.frozen; + let unlocked_balance = Balances::usable_balance(account_id("Alice")) - INIT_BALANCE; // Ensure funds are partially unlocked and rounding works as expected. assert_eq!(unlocked_balance, EXPECTED_PARTIAL_UNLOCKED_FUNDS); From 361c4fc51162f74b67e2fe8616f43cd0120e34cb Mon Sep 17 00:00:00 2001 From: MOZGIII Date: Tue, 10 Sep 2024 12:23:44 -0300 Subject: [PATCH 49/56] Fixed tests --- .../src/tests/claims_and_vesting.rs | 222 ++++++++++++++---- 1 file changed, 177 insertions(+), 45 deletions(-) diff --git a/crates/humanode-runtime/src/tests/claims_and_vesting.rs b/crates/humanode-runtime/src/tests/claims_and_vesting.rs index 3bebeb0c7..3b7ada193 100644 --- a/crates/humanode-runtime/src/tests/claims_and_vesting.rs +++ b/crates/humanode-runtime/src/tests/claims_and_vesting.rs @@ -24,8 +24,9 @@ use crate::{ token_claims::types::ClaimInfo, }; -const INIT_BALANCE: u128 = 10u128.pow(18 + 6); -const VESTING_BALANCE: u128 = 1000; +const UNIT: u128 = 10u128.pow(18 + 6); +const INIT_BALANCE: u128 = 10 * UNIT; +const VESTING_BALANCE: u128 = 1000 * UNIT; const START_TIMESTAMP: u64 = 1000; const CLIFF: u64 = 1000; @@ -119,16 +120,16 @@ fn new_test_ext() -> sp_io::TestExternalities { .cloned() .chain(pot_accounts) .map(|k| (k, INIT_BALANCE)) - .chain( - [( + .chain([ + ( TokenClaimsPot::account_id(), - 2 * VESTING_BALANCE + >::minimum_balance(), + 2 * VESTING_BALANCE + existential_deposit(), ), ( NativeToEvmSwapBridgePot::account_id(), - >::minimum_balance(), - )] - ) + existential_deposit(), + ), + ]) .collect() }, }, @@ -406,6 +407,10 @@ fn genesis_claims_invalid_vesting_initialization_with_null() { assert_genesis_json(token_claims, 1000000000000000000000500); } +fn existential_deposit() -> Balance { + ::ExistentialDeposit::get() +} + /// This test verifies that claiming without vesting works (direct runtime call) in the happy path. #[test] fn direct_claiming_without_vesting_works() { @@ -424,7 +429,12 @@ fn direct_claiming_without_vesting_works() { // Test preconditions. assert!(TokenClaims::claims(ethereum_address).is_some()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE + // Alice account can't be reaped, so existential deposit is untouchable. + - existential_deposit() + ); // Invoke the claim call. assert_ok!(TokenClaims::claim( @@ -445,7 +455,7 @@ fn direct_claiming_without_vesting_works() { // Ensure that the balance is not locked. assert_eq!( Balances::usable_balance(account_id("Alice")), - INIT_BALANCE + VESTING_BALANCE + INIT_BALANCE + VESTING_BALANCE - existential_deposit() ); // Ensure total issuance did not change. @@ -471,7 +481,12 @@ fn direct_claiming_with_vesting_works() { // Test preconditions. assert!(TokenClaims::claims(ethereum_address).is_some()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE + // Alice account can't be reaped, so existential deposit is untouchable. + - existential_deposit() + ); assert!(Vesting::locks(account_id("Alice")).is_none()); // Invoke the claim call. @@ -491,7 +506,10 @@ fn direct_claiming_with_vesting_works() { ); // Ensure that the vesting balance is locked. - assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE // existential deposit is not subtracted because it is overwhelmed with freeze being untouchable + ); // Ensure that the vesting is armed for the given account and matches the parameters. assert_eq!( @@ -538,6 +556,17 @@ fn direct_unlock_full_balance_works() { set_timestamp(START_TIMESTAMP + CLIFF + VESTING_DURATION); switch_block(); + // Test preconditions. + assert_eq!( + Balances::free_balance(account_id("Alice")), + INIT_BALANCE + VESTING_BALANCE + ); + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE // existential deposit is not subtracted because it is overwhelmed with freeze being untouchable + ); + assert!(Vesting::locks(account_id("Alice")).is_some()); + // Invoke the unlock call. assert_ok!(Vesting::unlock(Some(account_id("Alice")).into())); @@ -545,6 +574,8 @@ fn direct_unlock_full_balance_works() { assert_eq!( Balances::usable_balance(account_id("Alice")), INIT_BALANCE + VESTING_BALANCE + // Alice account can't be reaped, so existential deposit is untouchable. + - existential_deposit() ); // Ensure the vesting is gone from the state. @@ -564,7 +595,7 @@ fn direct_unlock_partial_balance_works() { const PARTIAL_DURATION: u64 = 2000; const PARTIAL_VESTING_TIMESTAMP: u64 = START_TIMESTAMP + CLIFF + PARTIAL_DURATION; // 2/3 from VESTING_BALANCE rounded up. - const EXPECTED_PARTIAL_UNLOCKED_FUNDS: u128 = 667; + const EXPECTED_PARTIAL_UNLOCKED_FUNDS: u128 = 666666666666666666666666667; // Run blocks to be vesting schedule ready. switch_block(); @@ -587,10 +618,23 @@ fn direct_unlock_partial_balance_works() { set_timestamp(PARTIAL_VESTING_TIMESTAMP); switch_block(); + // Test preconditions. + assert_eq!( + Balances::free_balance(account_id("Alice")), + INIT_BALANCE + VESTING_BALANCE + ); + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE // existential deposit is not subtracted because it is overwhelmed with freeze being untouchable + ); + assert!(Vesting::locks(account_id("Alice")).is_some()); + // Invoke the unlock call. assert_ok!(Vesting::unlock(Some(account_id("Alice")).into())); - let unlocked_balance = Balances::usable_balance(account_id("Alice")) - INIT_BALANCE; + let unlocked_balance = + // existential deposit is not subtracted because it is overwhelmed with freeze being untouchable + Balances::usable_balance(account_id("Alice")) - INIT_BALANCE; // Ensure funds are partially unlocked and rounding works as expected. assert_eq!(unlocked_balance, EXPECTED_PARTIAL_UNLOCKED_FUNDS); @@ -622,7 +666,12 @@ fn direct_claiming_fails_when_eth_signature_invalid() { // Test preconditions. assert!(TokenClaims::claims(ethereum_address).is_some()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE + // Alice account can't be reaped, so existential deposit is untouchable. + - existential_deposit() + ); // Invoke the claim call. assert_noop!( @@ -637,7 +686,10 @@ fn direct_claiming_fails_when_eth_signature_invalid() { // Ensure claims related state hasn't been changed. assert!(TokenClaims::claims(ethereum_address).is_some()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE - existential_deposit() + ); assert_eq!(Balances::total_issuance(), total_issuance_before); }) } @@ -661,7 +713,12 @@ fn direct_claiming_fails_when_no_claim() { // Test preconditions. assert!(TokenClaims::claims(ethereum_address).is_none()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE + // Alice account can't be reaped, so existential deposit is untouchable. + - existential_deposit() + ); // Invoke the claim call. assert_noop!( @@ -676,7 +733,10 @@ fn direct_claiming_fails_when_no_claim() { // Ensure claims related state hasn't been changed. assert!(TokenClaims::claims(ethereum_address).is_none()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE - existential_deposit() + ); assert_eq!(Balances::total_issuance(), total_issuance_before); }) } @@ -714,7 +774,10 @@ fn direct_unlock_fails_when_no_vesting() { ); // Ensure funds are still locked. - assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE // existential deposit is not subtracted because it is overwhelmed with freeze being untouchable + ); // Ensure the vesting isn't gone from the state. assert!(Vesting::locks(account_id("Alice")).is_some()); @@ -734,7 +797,7 @@ fn claims_fails_when_vesting_already_engaged() { const PARTIAL_DURATION: u64 = 2000; const PARTIAL_VESTING_TIMESTAMP: u64 = START_TIMESTAMP + CLIFF + PARTIAL_DURATION; // 2/3 from VESTING_BALANCE rounded up. - const EXPECTED_PARTIAL_UNLOCKED_FUNDS: u128 = 667; + const EXPECTED_PARTIAL_UNLOCKED_FUNDS: u128 = 666666666666666666666666667; // Run blocks to be vesting schedule ready. switch_block(); @@ -760,7 +823,9 @@ fn claims_fails_when_vesting_already_engaged() { // Invoke the unlock call. assert_ok!(Vesting::unlock(Some(account_id("Alice")).into())); - let unlocked_balance = Balances::usable_balance(account_id("Alice")) - INIT_BALANCE; + let unlocked_balance = + // existential deposit is not subtracted because it is overwhelmed with freeze being untouchable + Balances::usable_balance(account_id("Alice")) - INIT_BALANCE; // Ensure funds are partially unlocked and rounding works as expected. assert_eq!(unlocked_balance, EXPECTED_PARTIAL_UNLOCKED_FUNDS); @@ -828,7 +893,12 @@ fn dispatch_claiming_without_vesting_works() { // Test preconditions. assert!(TokenClaims::claims(ethereum_address).is_some()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE + // Alice account can't be reaped, so existential deposit is untouchable. + - existential_deposit() + ); // Validate already checked extrinsic with all possible transaction sources. assert_applyable_validate_all_transaction_sources( @@ -855,7 +925,7 @@ fn dispatch_claiming_without_vesting_works() { // Ensure that the balance is not locked. assert_eq!( Balances::usable_balance(account_id("Alice")), - INIT_BALANCE + VESTING_BALANCE + INIT_BALANCE + VESTING_BALANCE - existential_deposit() ); // Ensure total issuance did not change. @@ -891,7 +961,12 @@ fn dispatch_claiming_with_vesting_works() { // Test preconditions. assert!(TokenClaims::claims(ethereum_address).is_some()); assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); - assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE + // Alice account can't be reaped, so existential deposit is untouchable. + - existential_deposit() + ); assert!(Vesting::locks(account_id("Alice")).is_none()); // Validate already checked extrinsic with all possible transaction sources. @@ -917,7 +992,10 @@ fn dispatch_claiming_with_vesting_works() { ); // Ensure that the vesting balance is locked. - assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE // existential deposit is not subtracted because it is overwhelmed with freeze being untouchable + ); // Ensure that the vesting is armed for the given account and matches the parameters. assert_eq!( @@ -952,6 +1030,8 @@ fn dispatch_unlock_full_balance_works() { let (ethereum_address, ethereum_signature) = sign_sample_token_claim(b"Batumi", account_id("Alice")); + let total_issuance_before = Balances::total_issuance(); + // Invoke the direct runtime claim call for future unlocking. assert_ok!(TokenClaims::claim( Some(account_id("Alice")).into(), @@ -963,21 +1043,22 @@ fn dispatch_unlock_full_balance_works() { set_timestamp(START_TIMESTAMP + CLIFF + VESTING_DURATION); switch_block(); - // Prepare unlock data that are used to validate and apply `CheckedExtrinsic`. - let (checked_extrinsic, normal_dispatch_info, len) = prepare_applyable_data( - RuntimeCall::Vesting(pallet_vesting::Call::unlock {}), - account_id("Alice"), - ); - // Test preconditions. assert_eq!( Balances::free_balance(account_id("Alice")), INIT_BALANCE + VESTING_BALANCE ); - assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE // existential deposit is not subtracted because it is overwhelmed with freeze being untouchable + ); assert!(Vesting::locks(account_id("Alice")).is_some()); - let total_issuance_before = Balances::total_issuance(); + // Prepare unlock data that are used to validate and apply `CheckedExtrinsic`. + let (checked_extrinsic, normal_dispatch_info, len) = prepare_applyable_data( + RuntimeCall::Vesting(pallet_vesting::Call::unlock {}), + account_id("Alice"), + ); // Validate already checked extrinsic with all possible transaction sources. assert_applyable_validate_all_transaction_sources( @@ -996,6 +1077,8 @@ fn dispatch_unlock_full_balance_works() { assert_eq!( Balances::usable_balance(account_id("Alice")), INIT_BALANCE + VESTING_BALANCE + // Alice account can't be reaped, so existential deposit is untouchable. + - existential_deposit() ); // Ensure the vesting is gone from the state. @@ -1015,7 +1098,7 @@ fn dispatch_unlock_partial_balance_works() { const PARTIAL_DURATION: u64 = 2000; const PARTIAL_VESTING_TIMESTAMP: u64 = START_TIMESTAMP + CLIFF + PARTIAL_DURATION; // 2/3 from VESTING_BALANCE rounded up. - const EXPECTED_PARTIAL_UNLOCKED_FUNDS: u128 = 667; + const EXPECTED_PARTIAL_UNLOCKED_FUNDS: u128 = 666666666666666666666666667; // Run blocks to be vesting schedule ready. switch_block(); @@ -1026,6 +1109,8 @@ fn dispatch_unlock_partial_balance_works() { let (ethereum_address, ethereum_signature) = sign_sample_token_claim(b"Batumi", account_id("Alice")); + let total_issuance_before = Balances::total_issuance(); + // Invoke the direct runtime claim call for future unlocking. assert_ok!(TokenClaims::claim( Some(account_id("Alice")).into(), @@ -1037,21 +1122,22 @@ fn dispatch_unlock_partial_balance_works() { set_timestamp(PARTIAL_VESTING_TIMESTAMP); switch_block(); - // Prepare unlock data that are used to validate and apply `CheckedExtrinsic`. - let (checked_extrinsic, normal_dispatch_info, len) = prepare_applyable_data( - RuntimeCall::Vesting(pallet_vesting::Call::unlock {}), - account_id("Alice"), - ); - // Test preconditions. assert_eq!( Balances::free_balance(account_id("Alice")), INIT_BALANCE + VESTING_BALANCE ); - assert_eq!(Balances::usable_balance(account_id("Alice")), INIT_BALANCE); + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE // existential deposit is not subtracted because it is overwhelmed with freeze being untouchable + ); assert!(Vesting::locks(account_id("Alice")).is_some()); - let total_issuance_before = Balances::total_issuance(); + // Prepare unlock data that are used to validate and apply `CheckedExtrinsic`. + let (checked_extrinsic, normal_dispatch_info, len) = prepare_applyable_data( + RuntimeCall::Vesting(pallet_vesting::Call::unlock {}), + account_id("Alice"), + ); // Validate already checked extrinsic with all possible transaction sources. assert_applyable_validate_all_transaction_sources( @@ -1066,7 +1152,9 @@ fn dispatch_unlock_partial_balance_works() { len )); - let unlocked_balance = Balances::usable_balance(account_id("Alice")) - INIT_BALANCE; + let unlocked_balance = + // existential deposit is not subtracted because it is overwhelmed with freeze being untouchable + Balances::usable_balance(account_id("Alice")) - INIT_BALANCE; // Ensure funds are partially unlocked and rounding works as expected. assert_eq!(unlocked_balance, EXPECTED_PARTIAL_UNLOCKED_FUNDS); @@ -1085,10 +1173,24 @@ fn dispatch_unlock_partial_balance_works() { fn dispatch_claiming_fails_when_eth_signature_invalid() { // Build the state from the config. new_test_ext().execute_with(move || { + let (ethereum_address, _) = sign_sample_token_claim(b"Dubai", account_id("Alice")); + + let total_issuance_before = Balances::total_issuance(); + + // Test preconditions. + assert!(TokenClaims::claims(ethereum_address).is_some()); + assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE + // Alice account can't be reaped, so existential deposit is untouchable. + - existential_deposit() + ); + // Prepare token claim data that are used to validate and apply `CheckedExtrinsic`. let (checked_extrinsic, normal_dispatch_info, len) = prepare_applyable_data( RuntimeCall::TokenClaims(pallet_token_claims::Call::claim { - ethereum_address: EthereumAddress::default(), + ethereum_address, ethereum_signature: EcdsaSignature::default(), }), account_id("Alice"), @@ -1114,6 +1216,15 @@ fn dispatch_claiming_fails_when_eth_signature_invalid() { InvalidTransaction::BadProof )) ); + + // Ensure claims related state hasn't been changed. + assert!(TokenClaims::claims(ethereum_address).is_some()); + assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE - existential_deposit() + ); + assert_eq!(Balances::total_issuance(), total_issuance_before); }) } @@ -1126,6 +1237,18 @@ fn dispatch_claiming_fails_when_no_claim() { let (ethereum_address, ethereum_signature) = sign_sample_token_claim(b"Invalid", account_id("Alice")); + let total_issuance_before = Balances::total_issuance(); + + // Test preconditions. + assert!(TokenClaims::claims(ethereum_address).is_none()); + assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE + // Alice account can't be reaped, so existential deposit is untouchable. + - existential_deposit() + ); + // Prepare token claim data that are used to validate and apply `CheckedExtrinsic`. let (checked_extrinsic, normal_dispatch_info, len) = prepare_applyable_data( RuntimeCall::TokenClaims(pallet_token_claims::Call::claim { @@ -1153,6 +1276,15 @@ fn dispatch_claiming_fails_when_no_claim() { Applyable::apply::(checked_extrinsic, &normal_dispatch_info, len), Err(TransactionValidityError::Invalid(InvalidTransaction::Call)) ); + + // Ensure claims related state hasn't been changed. + assert!(TokenClaims::claims(ethereum_address).is_none()); + assert_eq!(Balances::free_balance(account_id("Alice")), INIT_BALANCE); + assert_eq!( + Balances::usable_balance(account_id("Alice")), + INIT_BALANCE - existential_deposit() + ); + assert_eq!(Balances::total_issuance(), total_issuance_before); }) } @@ -1209,7 +1341,7 @@ fn dispatch_claiming_zero_balance_works() { // Ensure that the balance is not locked. assert_eq!( Balances::usable_balance(account_id("Zero")), - VESTING_BALANCE + VESTING_BALANCE // existential deposit is not subtracted because it is overwhelmed with freeze being untouchable ); // Ensure total issuance did not change. From 7b25e5d6602cae9a7c601a3658aaf2347af3147e Mon Sep 17 00:00:00 2001 From: MOZGIII Date: Tue, 10 Sep 2024 12:48:32 -0300 Subject: [PATCH 50/56] Reformat runtime API traits --- crates/author-ext-api/src/lib.rs | 5 ++++- crates/bioauth-flow-api/src/lib.rs | 6 +++++- crates/pallet-vesting/src/api.rs | 6 +++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/crates/author-ext-api/src/lib.rs b/crates/author-ext-api/src/lib.rs index 8bb1d2e64..a45a530fe 100644 --- a/crates/author-ext-api/src/lib.rs +++ b/crates/author-ext-api/src/lib.rs @@ -17,7 +17,10 @@ pub enum CreateSignedSetKeysExtrinsicError { sp_api::decl_runtime_apis! { /// Runtime API for the author extension logic. - pub trait AuthorExtApi where Id: Encode { + pub trait AuthorExtApi + where + Id: Encode, + { /// Create signed set_keys extrinsic. fn create_signed_set_keys_extrinsic(id: &Id, session_keys: Vec) -> Result; } diff --git a/crates/bioauth-flow-api/src/lib.rs b/crates/bioauth-flow-api/src/lib.rs index 8df251f0c..61dc6e7eb 100644 --- a/crates/bioauth-flow-api/src/lib.rs +++ b/crates/bioauth-flow-api/src/lib.rs @@ -23,7 +23,11 @@ pub enum BioauthStatus { sp_api::decl_runtime_apis! { /// Runtime API for the bioauth flow. - pub trait BioauthFlowApi where Id: Encode { + pub trait BioauthFlowApi + where + Id: Encode, + Timestamp: Decode, + { /// Determine the bioauth status for the given `id` at the current block. /// /// This call is intended for use in the bioauth flow, and the `id` passed is likely. diff --git a/crates/pallet-vesting/src/api.rs b/crates/pallet-vesting/src/api.rs index 7ca75a943..1a4d46dde 100644 --- a/crates/pallet-vesting/src/api.rs +++ b/crates/pallet-vesting/src/api.rs @@ -15,7 +15,11 @@ pub enum EvaluationError { sp_api::decl_runtime_apis! { /// A runtime API for evaluating the locking logic. - pub trait VestingEvaluationApi where AccountId: Encode { + pub trait VestingEvaluationApi + where + AccountId: Encode, + Balance: Decode, + { /// Compute the balance under lock. fn evaluate_lock(account: &AccountId) -> Result; } From aa7ff58dbcd8a10e53c519f07780ccab023ce3d7 Mon Sep 17 00:00:00 2001 From: MOZGIII Date: Wed, 11 Sep 2024 11:25:12 -0300 Subject: [PATCH 51/56] Cleanup comment at crates/humanode-runtime/src/lib.rs --- crates/humanode-runtime/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/humanode-runtime/src/lib.rs b/crates/humanode-runtime/src/lib.rs index 8f31f11be..2a1b6e8c0 100644 --- a/crates/humanode-runtime/src/lib.rs +++ b/crates/humanode-runtime/src/lib.rs @@ -448,6 +448,13 @@ impl pallet_balances::Config for Runtime { type DustRemoval = pallet_pot::DepositUnbalancedFungible; type ExistentialDeposit = ConstU128<500>; type AccountStore = System; + type MaxLocks = ConstU32<50>; + // . + type HoldIdentifier = (); + type FreezeIdentifier = (); + type MaxReserves = (); + type MaxHolds = ConstU32<0>; + type MaxFreezes = ConstU32<0>; type WeightInfo = weights::pallet_balances::WeightInfo; } From f9b06045fc3be23b08aae1629634d5c4a4489bd8 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Thu, 12 Sep 2024 11:08:24 +0300 Subject: [PATCH 52/56] Use locked/polkadot-v0.9.42-2024-09-12 substrate and frontier forks --- Cargo.lock | 812 +++++++++++++++++++++++++---------------------------- Cargo.toml | 184 ++++++------ 2 files changed, 478 insertions(+), 518 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 719ec4543..3efe997b9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -560,6 +560,17 @@ dependencies = [ "pin-project-lite 0.2.13", ] +[[package]] +name = "async-recursion" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + [[package]] name = "async-trait" version = "0.1.83" @@ -700,12 +711,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" -[[package]] -name = "base58" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581" - [[package]] name = "base64" version = "0.13.1" @@ -815,7 +820,7 @@ checksum = "aa13fae8b6255872fd86f7faf4b41168661d7d78609f7bfe6771b85c6739a15b" dependencies = [ "bs58 0.5.0", "hmac 0.12.1", - "k256 0.13.3", + "k256", "once_cell", "pbkdf2 0.12.2", "rand_core 0.6.4", @@ -836,9 +841,6 @@ name = "bitflags" version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" -dependencies = [ - "serde", -] [[package]] name = "bitvec" @@ -1346,6 +1348,7 @@ dependencies = [ "encode_unicode", "lazy_static", "libc", + "unicode-width", "windows-sys 0.52.0", ] @@ -1677,7 +1680,7 @@ version = "0.1.0" dependencies = [ "anyhow", "bip32", - "hex-literal 0.4.1", + "hex-literal", "libsecp256k1", "sha3 0.10.8", "sp-core", @@ -1887,7 +1890,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", - "pem-rfc7468 0.6.0", + "pem-rfc7468", "zeroize", ] @@ -1898,7 +1901,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", - "pem-rfc7468 0.7.0", "zeroize", ] @@ -2257,7 +2259,7 @@ version = "0.1.0" dependencies = [ "eip191-crypto", "hex", - "hex-literal 0.4.1", + "hex-literal", "primitives-ethereum", "sp-std", ] @@ -2268,14 +2270,14 @@ version = "0.1.0" dependencies = [ "eip712-common", "eip712-common-test-utils", - "hex-literal 0.4.1", + "hex-literal", ] [[package]] name = "eip712-common" version = "0.1.0" dependencies = [ - "hex-literal 0.4.1", + "hex-literal", "primitives-ethereum", "sp-core", "sp-core-hashing-proc-macro", @@ -2301,7 +2303,7 @@ version = "0.1.0" dependencies = [ "eip712-common", "eip712-common-test-utils", - "hex-literal 0.4.1", + "hex-literal", ] [[package]] @@ -2327,7 +2329,7 @@ dependencies = [ "generic-array 0.14.7", "group 0.12.1", "hkdf", - "pem-rfc7468 0.6.0", + "pem-rfc7468", "pkcs8 0.9.0", "rand_core 0.6.4", "sec1 0.3.0", @@ -2416,17 +2418,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "etcetera" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" -dependencies = [ - "cfg-if", - "home", - "windows-sys 0.48.0", -] - [[package]] name = "ethabi" version = "18.0.0" @@ -2506,7 +2497,7 @@ dependencies = [ "elliptic-curve 0.13.8", "ethabi", "generic-array 0.14.7", - "k256 0.13.3", + "k256", "num_enum 0.7.3", "open-fastrlp", "rand 0.8.5", @@ -2668,7 +2659,7 @@ checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fc-cli" version = "1.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "clap", "ethereum-types", @@ -2686,7 +2677,7 @@ dependencies = [ [[package]] name = "fc-consensus" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "async-trait", "fp-consensus", @@ -2702,7 +2693,7 @@ dependencies = [ [[package]] name = "fc-db" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "async-trait", "ethereum", @@ -2732,7 +2723,7 @@ dependencies = [ [[package]] name = "fc-mapping-sync" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "fc-db", "fc-storage", @@ -2755,7 +2746,7 @@ dependencies = [ [[package]] name = "fc-rpc" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "ethereum", "ethereum-types", @@ -2805,7 +2796,7 @@ dependencies = [ [[package]] name = "fc-rpc-core" version = "1.1.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "ethereum", "ethereum-types", @@ -2818,7 +2809,7 @@ dependencies = [ [[package]] name = "fc-storage" version = "1.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "ethereum", "ethereum-types", @@ -2906,12 +2897,6 @@ dependencies = [ "scale-info", ] -[[package]] -name = "finl_unicode" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" - [[package]] name = "fixed-hash" version = "0.8.0" @@ -2985,7 +2970,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "parity-scale-codec", ] @@ -3002,7 +2987,7 @@ dependencies = [ [[package]] name = "fp-account" version = "1.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "hex", "impl-serde", @@ -3021,7 +3006,7 @@ dependencies = [ [[package]] name = "fp-consensus" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "ethereum", "parity-scale-codec", @@ -3033,13 +3018,13 @@ dependencies = [ [[package]] name = "fp-ethereum" version = "1.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "ethereum", "ethereum-types", "fp-evm", "frame-support", - "num_enum 0.5.11", + "num_enum 0.6.1", "parity-scale-codec", "sp-std", ] @@ -3047,11 +3032,12 @@ dependencies = [ [[package]] name = "fp-evm" version = "3.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "evm", "frame-support", "parity-scale-codec", + "scale-info", "serde", "sp-core", "sp-runtime", @@ -3061,7 +3047,7 @@ dependencies = [ [[package]] name = "fp-rpc" version = "3.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "ethereum", "ethereum-types", @@ -3078,7 +3064,7 @@ dependencies = [ [[package]] name = "fp-self-contained" version = "1.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "frame-support", "parity-scale-codec", @@ -3090,7 +3076,7 @@ dependencies = [ [[package]] name = "fp-storage" version = "2.0.0" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "parity-scale-codec", "serde", @@ -3105,7 +3091,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "frame-support", "frame-support-procedural", @@ -3130,7 +3116,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "Inflector", "array-bytes", @@ -3177,7 +3163,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "frame-support", "frame-system", @@ -3206,15 +3192,19 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ + "async-recursion", "futures", + "indicatif", + "jsonrpsee", "log", "parity-scale-codec", "serde", "sp-core", "sp-io", "sp-runtime", + "spinners", "substrate-rpc-client", "tokio", ] @@ -3222,14 +3212,14 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "bitflags 1.3.2", "environmental", "frame-metadata", "frame-support-procedural", "impl-trait-for-tuples", - "k256 0.11.6", + "k256", "log", "once_cell", "parity-scale-codec", @@ -3255,44 +3245,45 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse", "frame-support-procedural-tools", "itertools 0.10.5", + "proc-macro-warning", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.79", ] [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.79", ] [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.79", ] [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "frame-support", "log", @@ -3310,7 +3301,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "frame-benchmarking", "frame-support", @@ -3325,7 +3316,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "parity-scale-codec", "sp-api", @@ -3334,7 +3325,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "frame-support", "parity-scale-codec", @@ -3811,12 +3802,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hex-literal" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" - [[package]] name = "hex-literal" version = "0.4.1" @@ -3990,7 +3975,7 @@ dependencies = [ "frame-system-rpc-runtime-api", "futures", "hex", - "hex-literal 0.4.1", + "hex-literal", "humanode-rpc", "humanode-runtime", "indoc", @@ -4107,7 +4092,7 @@ dependencies = [ "frame-system-rpc-runtime-api", "frame-try-runtime", "hex", - "hex-literal 0.4.1", + "hex-literal", "keystore-bioauth-account-id", "libsecp256k1", "pallet-authorship", @@ -4227,6 +4212,23 @@ dependencies = [ "tokio-rustls 0.23.4", ] +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http 0.2.12", + "hyper", + "log", + "rustls 0.21.10", + "rustls-native-certs", + "tokio", + "tokio-rustls 0.24.1", + "webpki-roots 0.25.4", +] + [[package]] name = "hyper-tls" version = "0.5.0" @@ -4378,6 +4380,19 @@ dependencies = [ "hashbrown 0.14.3", ] +[[package]] +name = "indicatif" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" +dependencies = [ + "console", + "instant", + "number_prefix", + "portable-atomic", + "unicode-width", +] + [[package]] name = "indoc" version = "2.0.5" @@ -4531,6 +4546,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" dependencies = [ "jsonrpsee-core", + "jsonrpsee-http-client", "jsonrpsee-proc-macros", "jsonrpsee-server", "jsonrpsee-types", @@ -4587,6 +4603,25 @@ dependencies = [ "tracing", ] +[[package]] +name = "jsonrpsee-http-client" +version = "0.16.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43" +dependencies = [ + "async-trait", + "hyper", + "hyper-rustls 0.24.2", + "jsonrpsee-core", + "jsonrpsee-types", + "rustc-hash", + "serde", + "serde_json", + "thiserror", + "tokio", + "tracing", +] + [[package]] name = "jsonrpsee-proc-macros" version = "0.16.3" @@ -4648,18 +4683,6 @@ dependencies = [ "jsonrpsee-types", ] -[[package]] -name = "k256" -version = "0.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" -dependencies = [ - "cfg-if", - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.8", -] - [[package]] name = "k256" version = "0.13.3" @@ -4715,9 +4738,9 @@ dependencies = [ [[package]] name = "kvdb-rocksdb" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2182b8219fee6bd83aacaab7344e840179ae079d5216aa4e249b4d704646a844" +checksum = "fe7a749456510c45f795e8b04a6a3e0976d0139213ecbf465843830ad55e2217" dependencies = [ "kvdb", "num_cpus", @@ -5230,9 +5253,9 @@ dependencies = [ [[package]] name = "librocksdb-sys" -version = "0.8.3+7.4.4" +version = "0.10.0+7.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "557b255ff04123fcc176162f56ed0c9cd42d8f357cf55b3fabeb60f7413741b3" +checksum = "0fe4d5874f5ff2bc616e55e8c6086d478fcda13faf9495768a4aa1c22042d30b" dependencies = [ "bindgen", "bzip2-sys", @@ -5421,6 +5444,12 @@ dependencies = [ "libc", ] +[[package]] +name = "maplit" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" + [[package]] name = "match_cfg" version = "0.1.0" @@ -5940,23 +5969,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-bigint-dig" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" -dependencies = [ - "byteorder", - "lazy_static", - "libm", - "num-integer", - "num-iter", - "num-traits", - "rand 0.8.5", - "smallvec", - "zeroize", -] - [[package]] name = "num-complex" version = "0.4.5" @@ -6043,6 +6055,15 @@ dependencies = [ "num_enum_derive 0.5.11", ] +[[package]] +name = "num_enum" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +dependencies = [ + "num_enum_derive 0.6.1", +] + [[package]] name = "num_enum" version = "0.7.3" @@ -6058,12 +6079,23 @@ version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ - "proc-macro-crate 1.1.3", "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "num_enum_derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +dependencies = [ + "proc-macro-crate 1.1.3", + "proc-macro2", + "quote", + "syn 2.0.79", +] + [[package]] name = "num_enum_derive" version = "0.7.3" @@ -6085,6 +6117,12 @@ dependencies = [ "libc", ] +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + [[package]] name = "numtoa" version = "0.2.4" @@ -6251,7 +6289,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "frame-support", "frame-system", @@ -6265,7 +6303,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "frame-benchmarking", "frame-support", @@ -6278,7 +6316,7 @@ dependencies = [ "scale-info", "sp-application-crypto", "sp-consensus-babe", - "sp-consensus-vrf", + "sp-core", "sp-io", "sp-runtime", "sp-session", @@ -6304,7 +6342,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "frame-benchmarking", "frame-support", @@ -6397,7 +6435,7 @@ dependencies = [ "fp-evm", "frame-support", "frame-system", - "hex-literal 0.4.1", + "hex-literal", "pallet-balances", "pallet-evm", "pallet-evm-balances", @@ -6424,7 +6462,7 @@ dependencies = [ [[package]] name = "pallet-ethereum" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "ethereum", "ethereum-types", @@ -6460,7 +6498,7 @@ dependencies = [ [[package]] name = "pallet-evm" version = "6.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "environmental", "evm", @@ -6470,7 +6508,7 @@ dependencies = [ "frame-support", "frame-system", "hex", - "hex-literal 0.3.4", + "hex-literal", "impl-trait-for-tuples", "log", "parity-scale-codec", @@ -6500,7 +6538,7 @@ dependencies = [ [[package]] name = "pallet-evm-balances" version = "1.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "frame-support", "frame-system", @@ -6514,7 +6552,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-blake2" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "fp-evm", ] @@ -6522,7 +6560,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-bn128" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "fp-evm", "sp-core", @@ -6532,7 +6570,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-modexp" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "fp-evm", "num", @@ -6541,7 +6579,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-sha3fips" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "fp-evm", "tiny-keccak", @@ -6550,7 +6588,7 @@ dependencies = [ [[package]] name = "pallet-evm-precompile-simple" version = "2.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "fp-evm", "ripemd", @@ -6560,7 +6598,7 @@ dependencies = [ [[package]] name = "pallet-evm-system" version = "1.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "fp-evm", "frame-support", @@ -6575,7 +6613,7 @@ dependencies = [ [[package]] name = "pallet-evm-test-vector-support" version = "1.0.0-dev" -source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.40-2024-08-19#6b6d019d5f25b602485e19e411def78fa860d905" +source = "git+https://github.com/humanode-network/frontier?tag=locked/polkadot-v0.9.42-2024-09-12#1afab28e8d5aebe7d44f9043b3ba19e9555123dc" dependencies = [ "evm", "fp-evm", @@ -6588,7 +6626,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "frame-benchmarking", "frame-support", @@ -6626,7 +6664,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "frame-benchmarking", "frame-support", @@ -6646,7 +6684,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "frame-benchmarking", "frame-support", @@ -6662,7 +6700,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "frame-support", "frame-system", @@ -6692,7 +6730,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "frame-support", "frame-system", @@ -6713,7 +6751,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "frame-support", "frame-system", @@ -6727,7 +6765,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "frame-benchmarking", "frame-support", @@ -6764,7 +6802,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "frame-support", "frame-system", @@ -6780,7 +6818,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6796,7 +6834,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6808,7 +6846,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "frame-benchmarking", "frame-support", @@ -7010,15 +7048,6 @@ dependencies = [ "base64ct", ] -[[package]] -name = "pem-rfc7468" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" -dependencies = [ - "base64ct", -] - [[package]] name = "percent-encoding" version = "2.3.1" @@ -7118,17 +7147,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkcs1" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" -dependencies = [ - "der 0.7.8", - "pkcs8 0.10.2", - "spki 0.7.3", -] - [[package]] name = "pkcs8" version = "0.9.0" @@ -7262,7 +7280,7 @@ dependencies = [ "fp-evm", "frame-support", "frame-system", - "hex-literal 0.4.1", + "hex-literal", "mockall", "num_enum 0.7.3", "pallet-balances", @@ -7284,7 +7302,7 @@ dependencies = [ "fp-evm", "frame-support", "frame-system", - "hex-literal 0.4.1", + "hex-literal", "mockall", "pallet-evm-accounts-mapping", "parity-scale-codec", @@ -7303,7 +7321,7 @@ dependencies = [ "fp-evm", "frame-support", "frame-system", - "hex-literal 0.4.1", + "hex-literal", "num_enum 0.7.3", "pallet-balances", "pallet-erc20-support", @@ -7325,7 +7343,7 @@ dependencies = [ "fp-evm", "frame-support", "frame-system", - "hex-literal 0.4.1", + "hex-literal", "impl-trait-for-tuples", "log", "num_enum 0.7.3", @@ -7457,7 +7475,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" dependencies = [ "thiserror", - "toml", + "toml 0.5.11", ] [[package]] @@ -7502,6 +7520,17 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-warning" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e99670bafb56b9a106419397343bdbc8b8742c3cc449fec6345f86173f47cd4" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.79", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -8130,7 +8159,7 @@ name = "robonode-crypto" version = "0.1.0" dependencies = [ "ed25519-dalek 2.1.1", - "hex-literal 0.4.1", + "hex-literal", "rand 0.8.5", ] @@ -8169,9 +8198,9 @@ dependencies = [ [[package]] name = "rocksdb" -version = "0.19.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9562ea1d70c0cc63a34a22d977753b50cca91cc6b6527750463bd5dd8697bc" +checksum = "015439787fce1e75d55f279078d33ff14b4af5d93d995e8838ee4631301c8a99" dependencies = [ "libc", "librocksdb-sys", @@ -8214,26 +8243,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "rsa" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" -dependencies = [ - "const-oid", - "digest 0.10.7", - "num-bigint-dig", - "num-integer", - "num-traits", - "pkcs1", - "pkcs8 0.10.2", - "rand_core 0.6.4", - "signature 2.2.0", - "spki 0.7.3", - "subtle", - "zeroize", -] - [[package]] name = "rtcp" version = "0.7.2" @@ -8459,7 +8468,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "log", "sp-core", @@ -8470,7 +8479,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "futures", "futures-timer", @@ -8493,7 +8502,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8508,7 +8517,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -8527,18 +8536,18 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.79", ] [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "array-bytes", "chrono", @@ -8578,7 +8587,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "fnv", "futures", @@ -8604,7 +8613,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "hash-db 0.16.0", "kvdb", @@ -8630,7 +8639,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "async-trait", "futures", @@ -8655,13 +8664,12 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "async-trait", "fork-tree", "futures", "log", - "merlin", "num-bigint", "num-rational", "num-traits", @@ -8674,7 +8682,6 @@ dependencies = [ "sc-keystore", "sc-telemetry", "scale-info", - "schnorrkel", "sp-api", "sp-application-crypto", "sp-block-builder", @@ -8682,7 +8689,6 @@ dependencies = [ "sp-consensus", "sp-consensus-babe", "sp-consensus-slots", - "sp-consensus-vrf", "sp-core", "sp-inherents", "sp-keystore", @@ -8694,7 +8700,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "futures", "jsonrpsee", @@ -8716,7 +8722,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8729,7 +8735,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "ahash 0.8.8", "array-bytes", @@ -8769,7 +8775,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "finality-grandpa", "futures", @@ -8789,7 +8795,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "async-trait", "futures", @@ -8812,7 +8818,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "lru", "parity-scale-codec", @@ -8836,7 +8842,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -8849,7 +8855,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "log", "sc-allocator", @@ -8862,7 +8868,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "anyhow", "cfg-if", @@ -8880,7 +8886,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "ansi_term", "futures", @@ -8896,7 +8902,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "array-bytes", "async-trait", @@ -8911,7 +8917,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "array-bytes", "async-channel", @@ -8941,6 +8947,7 @@ dependencies = [ "serde", "serde_json", "smallvec", + "snow", "sp-arithmetic", "sp-blockchain", "sp-consensus", @@ -8955,7 +8962,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "cid", "futures", @@ -8975,7 +8982,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "array-bytes", "async-trait", @@ -9003,7 +9010,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "ahash 0.8.8", "futures", @@ -9022,7 +9029,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "array-bytes", "futures", @@ -9044,7 +9051,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "array-bytes", "async-trait", @@ -9078,7 +9085,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "array-bytes", "futures", @@ -9098,7 +9105,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "array-bytes", "bytes", @@ -9106,7 +9113,7 @@ dependencies = [ "futures", "futures-timer", "hyper", - "hyper-rustls", + "hyper-rustls 0.23.2", "libp2p", "num_cpus", "once_cell", @@ -9129,7 +9136,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "futures", "libp2p", @@ -9142,7 +9149,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9151,7 +9158,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "futures", "jsonrpsee", @@ -9181,7 +9188,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9200,7 +9207,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "http 0.2.12", "jsonrpsee", @@ -9215,7 +9222,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "array-bytes", "futures", @@ -9241,7 +9248,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "async-trait", "directories", @@ -9307,7 +9314,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "log", "parity-scale-codec", @@ -9318,7 +9325,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "clap", "fs4", @@ -9334,7 +9341,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "futures", "libc", @@ -9353,7 +9360,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "chrono", "futures", @@ -9372,7 +9379,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "ansi_term", "atty", @@ -9403,18 +9410,18 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.79", ] [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "async-trait", "futures", @@ -9441,7 +9448,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "async-trait", "futures", @@ -9455,7 +9462,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "async-channel", "futures", @@ -9744,6 +9751,15 @@ dependencies = [ "thiserror", ] +[[package]] +name = "serde_spanned" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -10026,13 +10042,15 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "hash-db 0.16.0", "log", "parity-scale-codec", + "scale-info", "sp-api-proc-macro", "sp-core", + "sp-metadata-ir", "sp-runtime", "sp-state-machine", "sp-std", @@ -10044,7 +10062,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "Inflector", "blake2", @@ -10052,13 +10070,13 @@ dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.79", ] [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "parity-scale-codec", "scale-info", @@ -10071,7 +10089,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "integer-sqrt", "num-traits", @@ -10085,7 +10103,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "parity-scale-codec", "sp-api", @@ -10097,7 +10115,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "futures", "log", @@ -10115,7 +10133,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "async-trait", "futures", @@ -10130,7 +10148,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "async-trait", "parity-scale-codec", @@ -10148,10 +10166,9 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "async-trait", - "merlin", "parity-scale-codec", "scale-info", "serde", @@ -10159,7 +10176,6 @@ dependencies = [ "sp-application-crypto", "sp-consensus", "sp-consensus-slots", - "sp-consensus-vrf", "sp-core", "sp-inherents", "sp-keystore", @@ -10171,7 +10187,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "finality-grandpa", "log", @@ -10189,7 +10205,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "parity-scale-codec", "scale-info", @@ -10198,29 +10214,16 @@ dependencies = [ "sp-timestamp", ] -[[package]] -name = "sp-consensus-vrf" -version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" -dependencies = [ - "parity-scale-codec", - "scale-info", - "schnorrkel", - "sp-core", - "sp-runtime", - "sp-std", -] - [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "array-bytes", - "base58", "bitflags 1.3.2", "blake2", "bounded-collections", + "bs58 0.4.0", "dyn-clonable", "ed25519-zebra", "futures", @@ -10233,6 +10236,7 @@ dependencies = [ "merlin", "parity-scale-codec", "parking_lot 0.12.1", + "paste", "primitive-types", "rand 0.8.5", "regex", @@ -10257,7 +10261,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "blake2b_simd", "byteorder", @@ -10271,18 +10275,18 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "proc-macro2", "quote", "sp-core-hashing", - "syn 1.0.109", + "syn 2.0.79", ] [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10291,17 +10295,17 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.79", ] [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "environmental", "parity-scale-codec", @@ -10312,7 +10316,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10327,7 +10331,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "bytes", "ed25519 1.5.3", @@ -10336,6 +10340,7 @@ dependencies = [ "libsecp256k1", "log", "parity-scale-codec", + "rustversion", "secp256k1 0.24.3", "sp-core", "sp-externalities", @@ -10352,7 +10357,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "lazy_static", "sp-core", @@ -10363,14 +10368,11 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ - "async-trait", "futures", - "merlin", "parity-scale-codec", "parking_lot 0.12.1", - "schnorrkel", "serde", "sp-core", "sp-externalities", @@ -10380,16 +10382,27 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "thiserror", - "zstd", + "zstd 0.12.4", +] + +[[package]] +name = "sp-metadata-ir" +version = "0.1.0" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" +dependencies = [ + "frame-metadata", + "parity-scale-codec", + "scale-info", + "sp-std", ] [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "sp-api", "sp-core", @@ -10399,7 +10412,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "backtrace", "lazy_static", @@ -10409,7 +10422,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "rustc-hash", "serde", @@ -10419,7 +10432,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "either", "hash256-std-hasher", @@ -10441,7 +10454,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -10459,19 +10472,19 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "Inflector", "proc-macro-crate 1.1.3", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.79", ] [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "parity-scale-codec", "scale-info", @@ -10485,10 +10498,11 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "parity-scale-codec", "scale-info", + "serde", "sp-core", "sp-runtime", "sp-std", @@ -10497,7 +10511,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "hash-db 0.16.0", "log", @@ -10517,12 +10531,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10535,7 +10549,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "async-trait", "futures-timer", @@ -10550,7 +10564,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "parity-scale-codec", "sp-std", @@ -10562,7 +10576,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "sp-api", "sp-runtime", @@ -10571,7 +10585,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "async-trait", "log", @@ -10587,11 +10601,11 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "ahash 0.8.8", "hash-db 0.16.0", - "hashbrown 0.12.3", + "hashbrown 0.13.2", "lazy_static", "memory-db", "nohash-hasher", @@ -10610,7 +10624,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10627,18 +10641,18 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.79", ] [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -10652,7 +10666,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "parity-scale-codec", "scale-info", @@ -10679,6 +10693,17 @@ dependencies = [ "lock_api", ] +[[package]] +name = "spinners" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0ef947f358b9c238923f764c72a4a9d42f2d637c46e059dbd319d6e7cfb4f82" +dependencies = [ + "lazy_static", + "maplit", + "strum 0.24.1", +] + [[package]] name = "spki" version = "0.6.0" @@ -10718,8 +10743,6 @@ checksum = "dba03c279da73694ef99763320dea58b51095dfe87d001b1d4b5fe78ba8763cf" dependencies = [ "sqlx-core", "sqlx-macros", - "sqlx-mysql", - "sqlx-postgres", "sqlx-sqlite", ] @@ -10753,7 +10776,6 @@ dependencies = [ "paste", "percent-encoding", "serde", - "serde_json", "sha2 0.10.8", "smallvec", "sqlformat", @@ -10795,7 +10817,6 @@ dependencies = [ "serde_json", "sha2 0.10.8", "sqlx-core", - "sqlx-mysql", "sqlx-sqlite", "syn 1.0.109", "tempfile", @@ -10803,87 +10824,6 @@ dependencies = [ "url", ] -[[package]] -name = "sqlx-mysql" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e37195395df71fd068f6e2082247891bc11e3289624bbc776a0cdfa1ca7f1ea4" -dependencies = [ - "atoi", - "base64 0.21.7", - "bitflags 2.4.2", - "byteorder", - "bytes", - "crc", - "digest 0.10.7", - "dotenvy", - "either", - "futures-channel", - "futures-core", - "futures-io", - "futures-util", - "generic-array 0.14.7", - "hex", - "hkdf", - "hmac 0.12.1", - "itoa", - "log", - "md-5", - "memchr", - "once_cell", - "percent-encoding", - "rand 0.8.5", - "rsa", - "serde", - "sha1", - "sha2 0.10.8", - "smallvec", - "sqlx-core", - "stringprep", - "thiserror", - "tracing", - "whoami", -] - -[[package]] -name = "sqlx-postgres" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6ac0ac3b7ccd10cc96c7ab29791a7dd236bd94021f31eec7ba3d46a74aa1c24" -dependencies = [ - "atoi", - "base64 0.21.7", - "bitflags 2.4.2", - "byteorder", - "crc", - "dotenvy", - "etcetera", - "futures-channel", - "futures-core", - "futures-io", - "futures-util", - "hex", - "hkdf", - "hmac 0.12.1", - "home", - "itoa", - "log", - "md-5", - "memchr", - "once_cell", - "rand 0.8.5", - "serde", - "serde_json", - "sha1", - "sha2 0.10.8", - "smallvec", - "sqlx-core", - "stringprep", - "thiserror", - "tracing", - "whoami", -] - [[package]] name = "sqlx-sqlite" version = "0.7.3" @@ -10962,17 +10902,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "stringprep" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" -dependencies = [ - "finl_unicode", - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "strsim" version = "0.10.0" @@ -11077,7 +11006,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -11096,7 +11025,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "hyper", "log", @@ -11108,7 +11037,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "async-trait", "jsonrpsee", @@ -11121,7 +11050,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "ansi_term", "build-helper", @@ -11130,7 +11059,7 @@ dependencies = [ "sp-maybe-compressed-blob", "strum 0.24.1", "tempfile", - "toml", + "toml 0.7.8", "walkdir", "wasm-opt", ] @@ -11500,11 +11429,39 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.19.15", +] + [[package]] name = "toml_datetime" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.2.3", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] [[package]] name = "toml_edit" @@ -11793,7 +11750,7 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.40-2024-08-19#932c8647f103d362ad612220ed133cc464bd22a6" +source = "git+https://github.com/humanode-network/substrate?tag=locked/polkadot-v0.9.42-2024-09-12#56b16fefbd7a5ba07afd94cb37367d078da0ac52" dependencies = [ "async-trait", "clap", @@ -11824,7 +11781,7 @@ dependencies = [ "sp-version", "sp-weights", "substrate-rpc-client", - "zstd", + "zstd 0.12.4", ] [[package]] @@ -12187,12 +12144,6 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "wasite" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" - [[package]] name = "wasm-bindgen" version = "0.2.91" @@ -12420,9 +12371,9 @@ dependencies = [ "rustix 0.36.17", "serde", "sha2 0.10.8", - "toml", + "toml 0.5.11", "windows-sys 0.42.0", - "zstd", + "zstd 0.11.2+zstd.1.5.2", ] [[package]] @@ -12812,16 +12763,6 @@ dependencies = [ "rustix 0.38.31", ] -[[package]] -name = "whoami" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" -dependencies = [ - "redox_syscall 0.4.1", - "wasite", -] - [[package]] name = "wide" version = "0.7.15" @@ -13280,7 +13221,16 @@ version = "0.11.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" dependencies = [ - "zstd-safe", + "zstd-safe 5.0.2+zstd.1.5.2", +] + +[[package]] +name = "zstd" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" +dependencies = [ + "zstd-safe 6.0.6", ] [[package]] @@ -13293,6 +13243,16 @@ dependencies = [ "zstd-sys", ] +[[package]] +name = "zstd-safe" +version = "6.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" +dependencies = [ + "libc", + "zstd-sys", +] + [[package]] name = "zstd-sys" version = "2.0.9+zstd.1.5.5" diff --git a/Cargo.toml b/Cargo.toml index 8e7f82b76..5b5a48a60 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,100 +70,100 @@ wiremock = { version = "0.5", default-features = false } codec = { package = "parity-scale-codec", version = "3.2.2", default-features = false } # Substrate fork. -frame-benchmarking = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -frame-benchmarking-cli = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -frame-executive = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -frame-support = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -frame-system = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -frame-system-benchmarking = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -frame-system-rpc-runtime-api = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -frame-try-runtime = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-authorship = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-babe = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-balances = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-grandpa = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-im-online = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-multisig = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-offences = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-session = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-sudo = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-timestamp = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-transaction-payment = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-transaction-payment-rpc = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-utility = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-basic-authorship = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-chain-spec = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-chain-spec-derive = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-cli = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-client-api = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-consensus = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-consensus-babe = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-consensus-babe-rpc = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-consensus-epochs = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-consensus-grandpa = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-consensus-grandpa-rpc = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-executor = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-network = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-network-sync = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-rpc = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-rpc-api = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-rpc-spec-v2 = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-service = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-telemetry = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-tracing = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-transaction-pool = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-transaction-pool-api = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sc-utils = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-api = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-application-crypto = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-block-builder = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-blockchain = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-consensus = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-consensus-babe = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-consensus-grandpa = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-core = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-core-hashing-proc-macro = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-inherents = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-io = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-keyring = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-keystore = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-offchain = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-panic-handler = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-runtime = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-session = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-staking = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-std = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-timestamp = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-tracing = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-transaction-pool = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -sp-version = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -substrate-frame-rpc-system = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -substrate-wasm-builder = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -try-runtime-cli = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } +frame-benchmarking = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +frame-benchmarking-cli = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +frame-executive = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +frame-support = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +frame-system = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +frame-system-benchmarking = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +frame-system-rpc-runtime-api = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +frame-try-runtime = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-authorship = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-babe = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-balances = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-grandpa = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-im-online = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-multisig = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-offences = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-session = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-sudo = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-timestamp = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-transaction-payment = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-transaction-payment-rpc = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-utility = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-basic-authorship = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-chain-spec = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-chain-spec-derive = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-cli = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-client-api = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-consensus = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-consensus-babe = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-consensus-babe-rpc = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-consensus-epochs = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-consensus-grandpa = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-consensus-grandpa-rpc = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-executor = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-network = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-network-sync = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-rpc = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-rpc-api = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-rpc-spec-v2 = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-service = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-telemetry = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-tracing = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-transaction-pool = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-transaction-pool-api = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sc-utils = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-api = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-application-crypto = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-block-builder = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-blockchain = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-consensus = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-consensus-babe = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-consensus-grandpa = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-core = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-core-hashing-proc-macro = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-inherents = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-io = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-keyring = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-keystore = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-offchain = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-panic-handler = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-runtime = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-session = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-staking = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-std = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-timestamp = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-tracing = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-transaction-pool = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +sp-version = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +substrate-frame-rpc-system = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +substrate-wasm-builder = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +try-runtime-cli = { git = "https://github.com/humanode-network/substrate", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } # Frontier fork. -fc-cli = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -fc-consensus = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -fc-db = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -fc-mapping-sync = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -fc-rpc = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -fc-rpc-core = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -fc-storage = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -fp-evm = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -fp-rpc = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -fp-self-contained = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -fp-storage = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-ethereum = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-evm = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-evm-balances = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-evm-precompile-blake2 = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-evm-precompile-bn128 = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-evm-precompile-modexp = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-evm-precompile-sha3fips = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-evm-precompile-simple = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-evm-system = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } -pallet-evm-test-vector-support = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.40-2024-08-19", default-features = false } +fc-cli = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +fc-consensus = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +fc-db = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +fc-mapping-sync = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +fc-rpc = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +fc-rpc-core = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +fc-storage = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +fp-evm = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +fp-rpc = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +fp-self-contained = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +fp-storage = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-ethereum = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-evm = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-evm-balances = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-evm-precompile-blake2 = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-evm-precompile-bn128 = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-evm-precompile-modexp = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-evm-precompile-sha3fips = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-evm-precompile-simple = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-evm-system = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } +pallet-evm-test-vector-support = { git = "https://github.com/humanode-network/frontier", tag = "locked/polkadot-v0.9.42-2024-09-12", default-features = false } [profile.release] debug = "line-tables-only" From 79e51c89f36e2a315a2533db7cbb8fda2ee9de1c Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Thu, 12 Sep 2024 11:25:18 +0300 Subject: [PATCH 53/56] Update fixtures for help-output --- .../help.benchmark.block.stdout.txt | 66 +++-- .../help.benchmark.extrinsic.stdout.txt | 66 +++-- .../help.benchmark.machine.stdout.txt | 34 ++- .../help.benchmark.overhead.stdout.txt | 66 +++-- .../help.benchmark.pallet.stdout.txt | 34 ++- .../help.benchmark.storage.stdout.txt | 42 ++- .../help.bioauth.api-versions.stdout.txt | 34 ++- .../help.bioauth.auth-url.stdout.txt | 249 ++++++++++++---- .../help.bioauth.key.insert.stdout.txt | 38 ++- .../help.bioauth.key.list.stdout.txt | 38 ++- .../help-output/help.build-spec.stdout.txt | 64 +++- .../help-output/help.check-block.stdout.txt | 66 +++-- .../help-output/help.export-blocks.stdout.txt | 42 ++- .../help-output/help.export-state.stdout.txt | 42 ++- .../help-output/help.frontier-db.stdout.txt | 42 ++- .../help-output/help.import-blocks.stdout.txt | 66 +++-- .../help-output/help.key.generate.stdout.txt | 4 +- .../help-output/help.key.insert.stdout.txt | 38 ++- .../help-output/help.key.inspect.stdout.txt | 4 +- .../help-output/help.purge-chain.stdout.txt | 34 ++- .../help-output/help.revert.stdout.txt | 42 ++- .../bash/fixtures/help-output/help.stdout.txt | 274 +++++++++--------- 22 files changed, 1017 insertions(+), 368 deletions(-) diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.block.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.block.stdout.txt index 72290b254..f497bb83f 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.block.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.block.stdout.txt @@ -20,28 +20,50 @@ Usage: humanode-peer benchmark block [OPTIONS] --from --to Options: --chain - Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) + Specify the chain specification. + + It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). --dev - Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden + Specify the development chain. + + This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` + Sets a custom logging filter (syntax: `=`). + + Log levels (least to most verbose) are `error`, `warn`, `info`, `debug`, and `trace`. + + By default, all targets log `info`. The global log level can be set with `-l`. + + Multiple `=` entries can be specified and separated by a comma. + + *Example*: `--log error,sync=debug,grandpa=warn`. Sets Global log level to `error`, sets `sync` target to debug and grandpa target to `warn`. --detailed-log-output - Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` + Enable detailed log output. + + Includes displaying the log target, log level and thread name. + + This is automatically enabled when something is logged with any higher level than `info`. --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set + Enable feature to dynamically update and reload the log filter. + + Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. + + The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. --tracing-targets - Sets a custom profiling filter. Syntax is the same as for logging: `=` + Sets a custom profiling filter. + + Syntax is the same as for logging (`--log`). --tracing-receiver Receiver to process tracing messages @@ -52,10 +74,14 @@ Options: - log: Output the tracing records using the log --state-pruning - Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] + Specify the state pruning mode. + + This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks + Specify the blocks pruning mode. + + This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks. [default: archive-canonical] @@ -81,7 +107,9 @@ Options: - compiled: Uses a compiled runtime --wasmtime-instantiation-strategy - The WASM instantiation method to use. Only has an effect when `wasm-execution` is set to `compiled`. The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. The fastest (and the default) strategy available is `pooling-copy-on-write`. The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy + The WASM instantiation method to use. + + Only has an effect when `wasm-execution` is set to `compiled`. The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. The fastest (and the default) strategy available is `pooling-copy-on-write`. The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy. [default: pooling-copy-on-write] @@ -93,10 +121,12 @@ Options: - legacy-instance-reuse: Legacy instance reuse mechanism. DEPRECATED. Will be removed in the future --wasm-runtime-overrides - Specify the path where local WASM runtimes are stored. These runtimes will override on-chain runtimes when the version matches + Specify the path where local WASM runtimes are stored. + + These runtimes will override on-chain runtimes when the version matches. --execution-syncing - The means of execution used when calling into the runtime for importing blocks as part of an initial sync + Runtime execution strategy for importing blocks during initial sync Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -105,7 +135,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-import-block - The means of execution used when calling into the runtime for general block import (including locally authored blocks) + Runtime execution strategy for general block import (including locally authored blocks) Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -114,7 +144,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-block-construction - The means of execution used when calling into the runtime while constructing blocks + Runtime execution strategy for constructing blocks Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -123,7 +153,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-offchain-worker - The means of execution used when calling into the runtime while using an off-chain worker + Runtime execution strategy for offchain workers Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -132,7 +162,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-other - The means of execution used when calling into the runtime while not syncing, importing or constructing blocks + Runtime execution strategy when not syncing, importing or constructing blocks Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -150,12 +180,14 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --trie-cache-size - Specify the state cache size. Providing `0` will disable the cache + Specify the state cache size. + + Providing `0` will disable the cache. [default: 67108864] --state-cache-size - DEPRECATED Switch to `--trie-cache-size` + DEPRECATED: switch to `--trie-cache-size` --from Number of the first block to consider diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.extrinsic.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.extrinsic.stdout.txt index b5019eec6..87857e260 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.extrinsic.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.extrinsic.stdout.txt @@ -8,28 +8,50 @@ Usage: humanode-peer benchmark extrinsic [OPTIONS] Options: --chain - Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) + Specify the chain specification. + + It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). --dev - Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden + Specify the development chain. + + This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` + Sets a custom logging filter (syntax: `=`). + + Log levels (least to most verbose) are `error`, `warn`, `info`, `debug`, and `trace`. + + By default, all targets log `info`. The global log level can be set with `-l`. + + Multiple `=` entries can be specified and separated by a comma. + + *Example*: `--log error,sync=debug,grandpa=warn`. Sets Global log level to `error`, sets `sync` target to debug and grandpa target to `warn`. --detailed-log-output - Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` + Enable detailed log output. + + Includes displaying the log target, log level and thread name. + + This is automatically enabled when something is logged with any higher level than `info`. --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set + Enable feature to dynamically update and reload the log filter. + + Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. + + The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. --tracing-targets - Sets a custom profiling filter. Syntax is the same as for logging: `=` + Sets a custom profiling filter. + + Syntax is the same as for logging (`--log`). --tracing-receiver Receiver to process tracing messages @@ -40,10 +62,14 @@ Options: - log: Output the tracing records using the log --state-pruning - Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] + Specify the state pruning mode. + + This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks + Specify the blocks pruning mode. + + This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks. [default: archive-canonical] @@ -69,7 +95,9 @@ Options: - compiled: Uses a compiled runtime --wasmtime-instantiation-strategy - The WASM instantiation method to use. Only has an effect when `wasm-execution` is set to `compiled`. The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. The fastest (and the default) strategy available is `pooling-copy-on-write`. The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy + The WASM instantiation method to use. + + Only has an effect when `wasm-execution` is set to `compiled`. The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. The fastest (and the default) strategy available is `pooling-copy-on-write`. The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy. [default: pooling-copy-on-write] @@ -81,10 +109,12 @@ Options: - legacy-instance-reuse: Legacy instance reuse mechanism. DEPRECATED. Will be removed in the future --wasm-runtime-overrides - Specify the path where local WASM runtimes are stored. These runtimes will override on-chain runtimes when the version matches + Specify the path where local WASM runtimes are stored. + + These runtimes will override on-chain runtimes when the version matches. --execution-syncing - The means of execution used when calling into the runtime for importing blocks as part of an initial sync + Runtime execution strategy for importing blocks during initial sync Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -93,7 +123,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-import-block - The means of execution used when calling into the runtime for general block import (including locally authored blocks) + Runtime execution strategy for general block import (including locally authored blocks) Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -102,7 +132,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-block-construction - The means of execution used when calling into the runtime while constructing blocks + Runtime execution strategy for constructing blocks Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -111,7 +141,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-offchain-worker - The means of execution used when calling into the runtime while using an off-chain worker + Runtime execution strategy for offchain workers Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -120,7 +150,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-other - The means of execution used when calling into the runtime while not syncing, importing or constructing blocks + Runtime execution strategy when not syncing, importing or constructing blocks Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -138,12 +168,14 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --trie-cache-size - Specify the state cache size. Providing `0` will disable the cache + Specify the state cache size. + + Providing `0` will disable the cache. [default: 67108864] --state-cache-size - DEPRECATED Switch to `--trie-cache-size` + DEPRECATED: switch to `--trie-cache-size` --warmup Rounds of warmups before measuring diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.machine.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.machine.stdout.txt index 6b0c41771..340dde683 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.machine.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.machine.stdout.txt @@ -8,28 +8,50 @@ Usage: humanode-peer benchmark machine [OPTIONS] Options: --chain - Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) + Specify the chain specification. + + It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). --dev - Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden + Specify the development chain. + + This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` + Sets a custom logging filter (syntax: `=`). + + Log levels (least to most verbose) are `error`, `warn`, `info`, `debug`, and `trace`. + + By default, all targets log `info`. The global log level can be set with `-l`. + + Multiple `=` entries can be specified and separated by a comma. + + *Example*: `--log error,sync=debug,grandpa=warn`. Sets Global log level to `error`, sets `sync` target to debug and grandpa target to `warn`. --detailed-log-output - Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` + Enable detailed log output. + + Includes displaying the log target, log level and thread name. + + This is automatically enabled when something is logged with any higher level than `info`. --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set + Enable feature to dynamically update and reload the log filter. + + Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. + + The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. --tracing-targets - Sets a custom profiling filter. Syntax is the same as for logging: `=` + Sets a custom profiling filter. + + Syntax is the same as for logging (`--log`). --tracing-receiver Receiver to process tracing messages diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.overhead.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.overhead.stdout.txt index ffb120fc8..a7ce4c8f4 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.overhead.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.overhead.stdout.txt @@ -4,28 +4,50 @@ Usage: humanode-peer benchmark overhead [OPTIONS] Options: --chain - Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) + Specify the chain specification. + + It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). --dev - Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden + Specify the development chain. + + This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` + Sets a custom logging filter (syntax: `=`). + + Log levels (least to most verbose) are `error`, `warn`, `info`, `debug`, and `trace`. + + By default, all targets log `info`. The global log level can be set with `-l`. + + Multiple `=` entries can be specified and separated by a comma. + + *Example*: `--log error,sync=debug,grandpa=warn`. Sets Global log level to `error`, sets `sync` target to debug and grandpa target to `warn`. --detailed-log-output - Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` + Enable detailed log output. + + Includes displaying the log target, log level and thread name. + + This is automatically enabled when something is logged with any higher level than `info`. --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set + Enable feature to dynamically update and reload the log filter. + + Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. + + The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. --tracing-targets - Sets a custom profiling filter. Syntax is the same as for logging: `=` + Sets a custom profiling filter. + + Syntax is the same as for logging (`--log`). --tracing-receiver Receiver to process tracing messages @@ -36,10 +58,14 @@ Options: - log: Output the tracing records using the log --state-pruning - Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] + Specify the state pruning mode. + + This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks + Specify the blocks pruning mode. + + This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks. [default: archive-canonical] @@ -65,7 +91,9 @@ Options: - compiled: Uses a compiled runtime --wasmtime-instantiation-strategy - The WASM instantiation method to use. Only has an effect when `wasm-execution` is set to `compiled`. The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. The fastest (and the default) strategy available is `pooling-copy-on-write`. The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy + The WASM instantiation method to use. + + Only has an effect when `wasm-execution` is set to `compiled`. The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. The fastest (and the default) strategy available is `pooling-copy-on-write`. The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy. [default: pooling-copy-on-write] @@ -77,10 +105,12 @@ Options: - legacy-instance-reuse: Legacy instance reuse mechanism. DEPRECATED. Will be removed in the future --wasm-runtime-overrides - Specify the path where local WASM runtimes are stored. These runtimes will override on-chain runtimes when the version matches + Specify the path where local WASM runtimes are stored. + + These runtimes will override on-chain runtimes when the version matches. --execution-syncing - The means of execution used when calling into the runtime for importing blocks as part of an initial sync + Runtime execution strategy for importing blocks during initial sync Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -89,7 +119,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-import-block - The means of execution used when calling into the runtime for general block import (including locally authored blocks) + Runtime execution strategy for general block import (including locally authored blocks) Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -98,7 +128,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-block-construction - The means of execution used when calling into the runtime while constructing blocks + Runtime execution strategy for constructing blocks Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -107,7 +137,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-offchain-worker - The means of execution used when calling into the runtime while using an off-chain worker + Runtime execution strategy for offchain workers Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -116,7 +146,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-other - The means of execution used when calling into the runtime while not syncing, importing or constructing blocks + Runtime execution strategy when not syncing, importing or constructing blocks Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -134,12 +164,14 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --trie-cache-size - Specify the state cache size. Providing `0` will disable the cache + Specify the state cache size. + + Providing `0` will disable the cache. [default: 67108864] --state-cache-size - DEPRECATED Switch to `--trie-cache-size` + DEPRECATED: switch to `--trie-cache-size` --weight-path File or directory to write the *weight* files to. diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.pallet.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.pallet.stdout.txt index bf03a064e..8f1a8ea3a 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.pallet.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.pallet.stdout.txt @@ -98,28 +98,50 @@ Options: Display and run extra benchmarks that would otherwise not be needed for weight construction --chain - Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) + Specify the chain specification. + + It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). --dev - Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden + Specify the development chain. + + This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` + Sets a custom logging filter (syntax: `=`). + + Log levels (least to most verbose) are `error`, `warn`, `info`, `debug`, and `trace`. + + By default, all targets log `info`. The global log level can be set with `-l`. + + Multiple `=` entries can be specified and separated by a comma. + + *Example*: `--log error,sync=debug,grandpa=warn`. Sets Global log level to `error`, sets `sync` target to debug and grandpa target to `warn`. --detailed-log-output - Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` + Enable detailed log output. + + Includes displaying the log target, log level and thread name. + + This is automatically enabled when something is logged with any higher level than `info`. --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set + Enable feature to dynamically update and reload the log filter. + + Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. + + The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. --tracing-targets - Sets a custom profiling filter. Syntax is the same as for logging: `=` + Sets a custom profiling filter. + + Syntax is the same as for logging (`--log`). --tracing-receiver Receiver to process tracing messages diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.storage.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.storage.stdout.txt index 70a871f43..04f361bef 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.storage.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.benchmark.storage.stdout.txt @@ -4,28 +4,50 @@ Usage: humanode-peer benchmark storage [OPTIONS] --state-version Options: --chain - Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) + Specify the chain specification. + + It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). --dev - Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden + Specify the development chain. + + This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` + Sets a custom logging filter (syntax: `=`). + + Log levels (least to most verbose) are `error`, `warn`, `info`, `debug`, and `trace`. + + By default, all targets log `info`. The global log level can be set with `-l`. + + Multiple `=` entries can be specified and separated by a comma. + + *Example*: `--log error,sync=debug,grandpa=warn`. Sets Global log level to `error`, sets `sync` target to debug and grandpa target to `warn`. --detailed-log-output - Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` + Enable detailed log output. + + Includes displaying the log target, log level and thread name. + + This is automatically enabled when something is logged with any higher level than `info`. --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set + Enable feature to dynamically update and reload the log filter. + + Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. + + The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. --tracing-targets - Sets a custom profiling filter. Syntax is the same as for logging: `=` + Sets a custom profiling filter. + + Syntax is the same as for logging (`--log`). --tracing-receiver Receiver to process tracing messages @@ -48,10 +70,14 @@ Options: Limit the memory the database cache can use --state-pruning - Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] + Specify the state pruning mode. + + This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks + Specify the blocks pruning mode. + + This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks. [default: archive-canonical] diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.api-versions.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.api-versions.stdout.txt index 33f74cb9e..352e57763 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.api-versions.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.api-versions.stdout.txt @@ -4,28 +4,50 @@ Usage: humanode-peer bioauth api-versions [OPTIONS] Options: --chain - Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) + Specify the chain specification. + + It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). --dev - Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden + Specify the development chain. + + This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` + Sets a custom logging filter (syntax: `=`). + + Log levels (least to most verbose) are `error`, `warn`, `info`, `debug`, and `trace`. + + By default, all targets log `info`. The global log level can be set with `-l`. + + Multiple `=` entries can be specified and separated by a comma. + + *Example*: `--log error,sync=debug,grandpa=warn`. Sets Global log level to `error`, sets `sync` target to debug and grandpa target to `warn`. --detailed-log-output - Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` + Enable detailed log output. + + Includes displaying the log target, log level and thread name. + + This is automatically enabled when something is logged with any higher level than `info`. --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set + Enable feature to dynamically update and reload the log filter. + + Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. + + The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. --tracing-targets - Sets a custom profiling filter. Syntax is the same as for logging: `=` + Sets a custom profiling filter. + + Syntax is the same as for logging (`--log`). --tracing-receiver Receiver to process tracing messages diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.auth-url.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.auth-url.stdout.txt index 9d3d92a9a..2565856d3 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.auth-url.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.auth-url.stdout.txt @@ -4,19 +4,32 @@ Usage: humanode-peer bioauth auth-url [OPTIONS] Options: --validator - Enable validator mode. The node will be started with the authority role and actively participate in any consensus task that it can (e.g. depending on availability of local keys) + Enable validator mode. + + The node will be started with the authority role and actively participate in any consensus task that it can (e.g. depending on availability of local keys). --no-grandpa - Disable GRANDPA voter when running in validator mode, otherwise disable the GRANDPA observer + Disable GRANDPA. + + Disables voter when running in validator mode, otherwise disable the GRANDPA observer. --rpc-external - Listen to all RPC interfaces. Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC proxy server to filter out dangerous methods. More details: . Use `--unsafe-rpc-external` to suppress the warning if you understand the risks + Listen to all RPC interfaces (default: local). + + Not all RPC methods are safe to be exposed publicly. + + Use an RPC proxy server to filter out dangerous methods. More details: . + + Use `--unsafe-rpc-external` to suppress the warning if you understand the risks. --unsafe-rpc-external - Listen to all RPC interfaces. Same as `--rpc-external` + Listen to all RPC interfaces. + + Same as `--rpc-external`. --rpc-methods RPC methods to expose. + - `unsafe`: Exposes every RPC method. - `safe`: Exposes only a safe subset of RPC methods, denying unsafe RPC methods. - `auto`: Acts as `safe` if RPC is served externally, e.g. when `--{rpc,ws}-external` is @@ -30,10 +43,14 @@ Options: - unsafe: Expose every RPC method (even potentially unsafe ones) --ws-external - Listen to all Websocket interfaces. Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC proxy server to filter out dangerous methods. More details: . Use `--unsafe-ws-external` to suppress the warning if you understand the risks + Listen to all Websocket interfaces. + + Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC proxy server to filter out dangerous methods. More details: . Use `--unsafe-ws-external` to suppress the warning if you understand the risks. --unsafe-ws-external - Listen to all Websocket interfaces. Same as `--ws-external` but doesn't warn you about it + Listen to all Websocket interfaces. + + Same as `--ws-external` but doesn't warn you about it. --rpc-max-payload DEPRECATED, this has no affect anymore. Use `rpc_max_request_size` or `rpc_max_response_size` instead @@ -63,28 +80,44 @@ Options: DEPRECATED, this has no affect anymore. Use `rpc_max_response_size` instead --rpc-cors - Specify browser Origins allowed to access the HTTP & WS RPC servers. A comma-separated list of origins (protocol://domain or special `null` value). Value of `all` will disable origin validation. Default is to allow localhost and origins. When running in --dev mode the default is to allow all origins + Specify browser *origins* allowed to access the HTTP and WS RPC servers. + + A comma-separated list of origins (`protocol://domain` or special `null` value). Value of `all` will disable origin validation. Default is to allow localhost and origins. When running in `--dev` mode the default is to allow all origins. --name - The human-readable name for this node. It's used as network node name + The human-readable name for this node. + + It's used as network node name. --no-telemetry - Disable connecting to the Substrate telemetry server. Telemetry is on by default on global chains + Disable connecting to the Substrate telemetry server. + + Telemetry is on by default on global chains. --telemetry-url - The URL of the telemetry server to connect to. This flag can be passed multiple times as a means to specify multiple telemetry endpoints. Verbosity levels range from 0-9, with 0 denoting the least verbosity. Expected format is 'URL VERBOSITY', e.g. `--telemetry-url 'wss://foo/bar 0'` + The URL of the telemetry server to connect to. + + This flag can be passed multiple times as a means to specify multiple telemetry endpoints. Verbosity levels range from 0-9, with 0 denoting the least verbosity. + + Expected format is 'URL VERBOSITY', e.g. `--telemetry-url 'wss://foo/bar 0'`. --prometheus-port Specify Prometheus exporter TCP Port --prometheus-external - Expose Prometheus exporter on all interfaces. Default is local + Expose Prometheus exporter on all interfaces. + + Default is local. --no-prometheus - Do not expose a Prometheus exporter endpoint. Prometheus metric endpoint is enabled by default + Do not expose a Prometheus exporter endpoint. + + Prometheus metric endpoint is enabled by default. --max-runtime-instances - The size of the instances cache for each runtime. The values higher than 256 are illegal + The size of the instances cache for each runtime [max: 32]. + + Values higher than 32 are illegal. [default: 8] @@ -94,7 +127,7 @@ Options: [default: 2] --offchain-worker - Should execute offchain workers on every block. By default it's only enabled for nodes that are authoring new blocks + Execute offchain workers on every block [default: when-authority] @@ -104,34 +137,58 @@ Options: - when-authority: Only enable the offchain worker when running as a validator (or collator, if this is a parachain node) --enable-offchain-indexing - Enable Offchain Indexing API, which allows block import to write to Offchain DB. Enables a runtime to write directly to a offchain workers DB during block import + Enable offchain indexing API. + + Allows the runtime to write directly to offchain workers DB during block import. [default: false] [possible values: true, false] --chain - Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) + Specify the chain specification. + + It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). --dev - Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden + Specify the development chain. + + This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` + Sets a custom logging filter (syntax: `=`). + + Log levels (least to most verbose) are `error`, `warn`, `info`, `debug`, and `trace`. + + By default, all targets log `info`. The global log level can be set with `-l`. + + Multiple `=` entries can be specified and separated by a comma. + + *Example*: `--log error,sync=debug,grandpa=warn`. Sets Global log level to `error`, sets `sync` target to debug and grandpa target to `warn`. --detailed-log-output - Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` + Enable detailed log output. + + Includes displaying the log target, log level and thread name. + + This is automatically enabled when something is logged with any higher level than `info`. --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set + Enable feature to dynamically update and reload the log filter. + + Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. + + The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. --tracing-targets - Sets a custom profiling filter. Syntax is the same as for logging: `=` + Sets a custom profiling filter. + + Syntax is the same as for logging (`--log`). --tracing-receiver Receiver to process tracing messages @@ -142,10 +199,14 @@ Options: - log: Output the tracing records using the log --state-pruning - Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] + Specify the state pruning mode. + + This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks + Specify the blocks pruning mode. + + This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks. [default: archive-canonical] @@ -171,7 +232,9 @@ Options: - compiled: Uses a compiled runtime --wasmtime-instantiation-strategy - The WASM instantiation method to use. Only has an effect when `wasm-execution` is set to `compiled`. The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. The fastest (and the default) strategy available is `pooling-copy-on-write`. The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy + The WASM instantiation method to use. + + Only has an effect when `wasm-execution` is set to `compiled`. The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. The fastest (and the default) strategy available is `pooling-copy-on-write`. The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy. [default: pooling-copy-on-write] @@ -183,10 +246,12 @@ Options: - legacy-instance-reuse: Legacy instance reuse mechanism. DEPRECATED. Will be removed in the future --wasm-runtime-overrides - Specify the path where local WASM runtimes are stored. These runtimes will override on-chain runtimes when the version matches + Specify the path where local WASM runtimes are stored. + + These runtimes will override on-chain runtimes when the version matches. --execution-syncing - The means of execution used when calling into the runtime for importing blocks as part of an initial sync + Runtime execution strategy for importing blocks during initial sync Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -195,7 +260,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-import-block - The means of execution used when calling into the runtime for general block import (including locally authored blocks) + Runtime execution strategy for general block import (including locally authored blocks) Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -204,7 +269,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-block-construction - The means of execution used when calling into the runtime while constructing blocks + Runtime execution strategy for constructing blocks Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -213,7 +278,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-offchain-worker - The means of execution used when calling into the runtime while using an off-chain worker + Runtime execution strategy for offchain workers Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -222,7 +287,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-other - The means of execution used when calling into the runtime while not syncing, importing or constructing blocks + Runtime execution strategy when not syncing, importing or constructing blocks Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -240,12 +305,14 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --trie-cache-size - Specify the state cache size. Providing `0` will disable the cache + Specify the state cache size. + + Providing `0` will disable the cache. [default: 67108864] --state-cache-size - DEPRECATED Switch to `--trie-cache-size` + DEPRECATED: switch to `--trie-cache-size` --bootnodes ... Specify a list of bootnodes @@ -254,10 +321,14 @@ Options: Specify a list of reserved node addresses --reserved-only - Whether to only synchronize the chain with reserved nodes. Also disables automatic peer discovery. TCP connections might still be established with non-reserved nodes. In particular, if you are a validator your node might still connect to other validator nodes and collator nodes regardless of whether they are defined as reserved nodes + Whether to only synchronize the chain with reserved nodes. + + Also disables automatic peer discovery. TCP connections might still be established with non-reserved nodes. In particular, if you are a validator your node might still connect to other validator nodes and collator nodes regardless of whether they are defined as reserved nodes. --public-addr ... - The public address that other nodes will use to connect to it. This can be used if there's a proxy in front of this node + Public address that other nodes will use to connect to this node. + + This can be used if there's a proxy in front of this node. --listen-addr ... Listen on this multiaddress. @@ -268,13 +339,21 @@ Options: Specify p2p protocol TCP port --no-private-ip - Always forbid connecting to private IPv4/IPv6 addresses (as specified in [RFC1918](https://tools.ietf.org/html/rfc1918)), unless the address was passed with `--reserved-nodes` or `--bootnodes`. Enabled by default for chains marked as "live" in their chain specifications + Always forbid connecting to private IPv4/IPv6 addresses. + + The option doesn't apply to addresses passed with `--reserved-nodes` or `--bootnodes`. Enabled by default for chains marked as "live" in their chain specifications. + + Address allocation for private networks is specified by [RFC1918](https://tools.ietf.org/html/rfc1918)). --allow-private-ip - Always accept connecting to private IPv4/IPv6 addresses (as specified in [RFC1918](https://tools.ietf.org/html/rfc1918)). Enabled by default for chains marked as "local" in their chain specifications, or when `--dev` is passed + Always accept connecting to private IPv4/IPv6 addresses. + + Enabled by default for chains marked as "local" in their chain specifications, or when `--dev` is passed. + + Address allocation for private networks is specified by [RFC1918](https://tools.ietf.org/html/rfc1918)). --out-peers - Specify the number of outgoing connections we're trying to maintain + Number of outgoing connections we're trying to maintain [default: 8] @@ -289,18 +368,40 @@ Options: [default: 100] --no-mdns - Disable mDNS discovery. By default, the network will use mDNS to discover other nodes on the local network. This disables it. Automatically implied when using --dev + Disable mDNS discovery (default: true). + + By default, the network will use mDNS to discover other nodes on the local network. This disables it. Automatically implied when using --dev. --max-parallel-downloads - Maximum number of peers from which to ask for the same blocks in parallel. This allows downloading announced blocks from multiple peers. Decrease to save traffic and risk increased latency + Maximum number of peers from which to ask for the same blocks in parallel. + + This allows downloading announced blocks from multiple peers. Decrease to save traffic and risk increased latency. [default: 5] --node-key - The secret key to use for libp2p networking. The value is a string that is parsed according to the choice of `--node-key-type` as follows: `ed25519`: The value is parsed as a hex-encoded Ed25519 32 byte secret key, i.e. 64 hex characters. The value of this option takes precedence over `--node-key-file`. WARNING: Secrets provided as command-line arguments are easily exposed. Use of this option should be limited to development and testing. To use an externally managed secret key, use `--node-key-file` instead + Secret key to use for p2p networking. + + The value is a string that is parsed according to the choice of `--node-key-type` as follows: + + - `ed25519`: the value is parsed as a hex-encoded Ed25519 32 byte secret key (64 hex chars) + + The value of this option takes precedence over `--node-key-file`. + + WARNING: Secrets provided as command-line arguments are easily exposed. Use of this option should be limited to development and testing. To use an externally managed secret key, use `--node-key-file` instead. --node-key-type - The type of secret key to use for libp2p networking. The secret key of the node is obtained as follows: * If the `--node-key` option is given, the value is parsed as a secret key according to the type. See the documentation for `--node-key`. * If the `--node-key-file` option is given, the secret key is read from the specified file. See the documentation for `--node-key-file`. * Otherwise, the secret key is read from a file with a predetermined, type-specific name from the chain-specific network config directory inside the base directory specified by `--base-dir`. If this file does not exist, it is created with a newly generated secret key of the chosen type. The node's secret key determines the corresponding public key and hence the node's peer ID in the context of libp2p + Crypto primitive to use for p2p networking. + + The secret key of the node is obtained as follows: + + - If the `--node-key` option is given, the value is parsed as a secret key according to the type. See the documentation for `--node-key`. + + - If the `--node-key-file` option is given, the secret key is read from the specified file. See the documentation for `--node-key-file`. + + - Otherwise, the secret key is read from a file with a predetermined, type-specific name from the chain-specific network config directory inside the base directory specified by `--base-dir`. If this file does not exist, it is created with a newly generated secret key of the chosen type. + + The node's secret key determines the corresponding public key and hence the node's peer ID in the context of libp2p. [default: ed25519] @@ -308,13 +409,25 @@ Options: - ed25519: Use ed25519 --node-key-file - The file from which to read the node's secret key to use for libp2p networking. The contents of the file are parsed according to the choice of `--node-key-type` as follows: `ed25519`: The file must contain an unencoded 32 byte or hex encoded Ed25519 secret key. If the file does not exist, it is created with a newly generated secret key of the chosen type + File from which to read the node's secret key to use for p2p networking. + + The contents of the file are parsed according to the choice of `--node-key-type` as follows: + + - `ed25519`: the file must contain an unencoded 32 byte or hex encoded Ed25519 secret key. + + If the file does not exist, it is created with a newly generated secret key of the chosen type. --discover-local - Enable peer discovery on local networks. By default this option is `true` for `--dev` or when the chain type is `Local`/`Development` and false otherwise + Enable peer discovery on local networks. + + By default this option is `true` for `--dev` or when the chain type is `Local`/`Development` and false otherwise. --kademlia-disjoint-query-paths - Require iterative Kademlia DHT queries to use disjoint paths for increased resiliency in the presence of potentially adversarial nodes. See the S/Kademlia paper for more information on the high level design as well as its security improvements + Require iterative Kademlia DHT queries to use disjoint paths. + + Disjoint paths increase resiliency in the presence of potentially adversarial nodes. + + See the S/Kademlia paper for more information on the high level design as well as its security improvements. --ipfs-server Join the IPFS network and serve transactions over bitswap protocol @@ -348,7 +461,9 @@ Options: [default: 20480] --tx-ban-seconds - How long a transaction is banned for, if it is considered invalid. Defaults to 1800s + How long a transaction is banned for. + + If it is considered invalid. Defaults to 1800s. --keystore-uri Specify custom URIs to connect to for keystore-services @@ -360,40 +475,64 @@ Options: Use interactive shell for entering the password used by the keystore --password - Password used by the keystore. This allows appending an extra user-defined secret to the seed + Password used by the keystore. + + This allows appending an extra user-defined secret to the seed. --password-filename File that contains the password used by the keystore --alice - Shortcut for `--name Alice --validator` with session keys for `Alice` added to keystore + Shortcut for `--name Alice --validator`. + + Session keys for `Alice` are added to keystore. --bob - Shortcut for `--name Bob --validator` with session keys for `Bob` added to keystore + Shortcut for `--name Bob --validator`. + + Session keys for `Bob` are added to keystore. --charlie - Shortcut for `--name Charlie --validator` with session keys for `Charlie` added to keystore + Shortcut for `--name Charlie --validator`. + + Session keys for `Charlie` are added to keystore. --dave - Shortcut for `--name Dave --validator` with session keys for `Dave` added to keystore + Shortcut for `--name Dave --validator`. + + Session keys for `Dave` are added to keystore. --eve - Shortcut for `--name Eve --validator` with session keys for `Eve` added to keystore + Shortcut for `--name Eve --validator`. + + Session keys for `Eve` are added to keystore. --ferdie - Shortcut for `--name Ferdie --validator` with session keys for `Ferdie` added to keystore + Shortcut for `--name Ferdie --validator`. + + Session keys for `Ferdie` are added to keystore. --one - Shortcut for `--name One --validator` with session keys for `One` added to keystore + Shortcut for `--name One --validator`. + + Session keys for `One` are added to keystore. --two - Shortcut for `--name Two --validator` with session keys for `Two` added to keystore + Shortcut for `--name Two --validator`. + + Session keys for `Two` are added to keystore. --force-authoring Enable authoring even when offline --tmp - Run a temporary node. A temporary directory will be created to store the configuration and will be deleted at the end of the process. Note: the directory is random per process execution. This directory is used as base path which includes: database, node key and keystore. When `--dev` is given and no explicit `--base-path`, this option is implied + Run a temporary node. + + A temporary directory will be created to store the configuration and will be deleted at the end of the process. + + Note: the directory is random per process execution. This directory is used as base path which includes: database, node key and keystore. + + When `--dev` is given and no explicit `--base-path`, this option is implied. --webapp-url The URL to use for the web app. Used to print the QR Code to the console, so it doesn't matter much diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.key.insert.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.key.insert.stdout.txt index 5cc924b62..faaf3ae4d 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.key.insert.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.key.insert.stdout.txt @@ -7,28 +7,50 @@ Options: The secret key uri (mnemonic) --chain - Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) + Specify the chain specification. + + It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). --dev - Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden + Specify the development chain. + + This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` + Sets a custom logging filter (syntax: `=`). + + Log levels (least to most verbose) are `error`, `warn`, `info`, `debug`, and `trace`. + + By default, all targets log `info`. The global log level can be set with `-l`. + + Multiple `=` entries can be specified and separated by a comma. + + *Example*: `--log error,sync=debug,grandpa=warn`. Sets Global log level to `error`, sets `sync` target to debug and grandpa target to `warn`. --detailed-log-output - Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` + Enable detailed log output. + + Includes displaying the log target, log level and thread name. + + This is automatically enabled when something is logged with any higher level than `info`. --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set + Enable feature to dynamically update and reload the log filter. + + Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. + + The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. --tracing-targets - Sets a custom profiling filter. Syntax is the same as for logging: `=` + Sets a custom profiling filter. + + Syntax is the same as for logging (`--log`). --tracing-receiver Receiver to process tracing messages @@ -48,7 +70,9 @@ Options: Use interactive shell for entering the password used by the keystore --password - Password used by the keystore. This allows appending an extra user-defined secret to the seed + Password used by the keystore. + + This allows appending an extra user-defined secret to the seed. --password-filename File that contains the password used by the keystore diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.key.list.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.key.list.stdout.txt index 7e15e4f7d..95d77bf14 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.key.list.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.bioauth.key.list.stdout.txt @@ -4,28 +4,50 @@ Usage: humanode-peer bioauth key list [OPTIONS] Options: --chain - Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) + Specify the chain specification. + + It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). --dev - Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden + Specify the development chain. + + This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` + Sets a custom logging filter (syntax: `=`). + + Log levels (least to most verbose) are `error`, `warn`, `info`, `debug`, and `trace`. + + By default, all targets log `info`. The global log level can be set with `-l`. + + Multiple `=` entries can be specified and separated by a comma. + + *Example*: `--log error,sync=debug,grandpa=warn`. Sets Global log level to `error`, sets `sync` target to debug and grandpa target to `warn`. --detailed-log-output - Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` + Enable detailed log output. + + Includes displaying the log target, log level and thread name. + + This is automatically enabled when something is logged with any higher level than `info`. --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set + Enable feature to dynamically update and reload the log filter. + + Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. + + The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. --tracing-targets - Sets a custom profiling filter. Syntax is the same as for logging: `=` + Sets a custom profiling filter. + + Syntax is the same as for logging (`--log`). --tracing-receiver Receiver to process tracing messages @@ -45,7 +67,9 @@ Options: Use interactive shell for entering the password used by the keystore --password - Password used by the keystore. This allows appending an extra user-defined secret to the seed + Password used by the keystore. + + This allows appending an extra user-defined secret to the seed. --password-filename File that contains the password used by the keystore diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.build-spec.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.build-spec.stdout.txt index 44c9b38d3..b43213388 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.build-spec.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.build-spec.stdout.txt @@ -10,28 +10,50 @@ Options: Disable adding the default bootnode to the specification. By default the `/ip4/127.0.0.1/tcp/30333/p2p/NODE_PEER_ID` bootnode is added to the specification when no bootnode exists --chain - Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) + Specify the chain specification. + + It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). --dev - Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden + Specify the development chain. + + This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` + Sets a custom logging filter (syntax: `=`). + + Log levels (least to most verbose) are `error`, `warn`, `info`, `debug`, and `trace`. + + By default, all targets log `info`. The global log level can be set with `-l`. + + Multiple `=` entries can be specified and separated by a comma. + + *Example*: `--log error,sync=debug,grandpa=warn`. Sets Global log level to `error`, sets `sync` target to debug and grandpa target to `warn`. --detailed-log-output - Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` + Enable detailed log output. + + Includes displaying the log target, log level and thread name. + + This is automatically enabled when something is logged with any higher level than `info`. --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set + Enable feature to dynamically update and reload the log filter. + + Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. + + The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. --tracing-targets - Sets a custom profiling filter. Syntax is the same as for logging: `=` + Sets a custom profiling filter. + + Syntax is the same as for logging (`--log`). --tracing-receiver Receiver to process tracing messages @@ -42,10 +64,28 @@ Options: - log: Output the tracing records using the log --node-key - The secret key to use for libp2p networking. The value is a string that is parsed according to the choice of `--node-key-type` as follows: `ed25519`: The value is parsed as a hex-encoded Ed25519 32 byte secret key, i.e. 64 hex characters. The value of this option takes precedence over `--node-key-file`. WARNING: Secrets provided as command-line arguments are easily exposed. Use of this option should be limited to development and testing. To use an externally managed secret key, use `--node-key-file` instead + Secret key to use for p2p networking. + + The value is a string that is parsed according to the choice of `--node-key-type` as follows: + + - `ed25519`: the value is parsed as a hex-encoded Ed25519 32 byte secret key (64 hex chars) + + The value of this option takes precedence over `--node-key-file`. + + WARNING: Secrets provided as command-line arguments are easily exposed. Use of this option should be limited to development and testing. To use an externally managed secret key, use `--node-key-file` instead. --node-key-type - The type of secret key to use for libp2p networking. The secret key of the node is obtained as follows: * If the `--node-key` option is given, the value is parsed as a secret key according to the type. See the documentation for `--node-key`. * If the `--node-key-file` option is given, the secret key is read from the specified file. See the documentation for `--node-key-file`. * Otherwise, the secret key is read from a file with a predetermined, type-specific name from the chain-specific network config directory inside the base directory specified by `--base-dir`. If this file does not exist, it is created with a newly generated secret key of the chosen type. The node's secret key determines the corresponding public key and hence the node's peer ID in the context of libp2p + Crypto primitive to use for p2p networking. + + The secret key of the node is obtained as follows: + + - If the `--node-key` option is given, the value is parsed as a secret key according to the type. See the documentation for `--node-key`. + + - If the `--node-key-file` option is given, the secret key is read from the specified file. See the documentation for `--node-key-file`. + + - Otherwise, the secret key is read from a file with a predetermined, type-specific name from the chain-specific network config directory inside the base directory specified by `--base-dir`. If this file does not exist, it is created with a newly generated secret key of the chosen type. + + The node's secret key determines the corresponding public key and hence the node's peer ID in the context of libp2p. [default: ed25519] @@ -53,7 +93,13 @@ Options: - ed25519: Use ed25519 --node-key-file - The file from which to read the node's secret key to use for libp2p networking. The contents of the file are parsed according to the choice of `--node-key-type` as follows: `ed25519`: The file must contain an unencoded 32 byte or hex encoded Ed25519 secret key. If the file does not exist, it is created with a newly generated secret key of the chosen type + File from which to read the node's secret key to use for p2p networking. + + The contents of the file are parsed according to the choice of `--node-key-type` as follows: + + - `ed25519`: the file must contain an unencoded 32 byte or hex encoded Ed25519 secret key. + + If the file does not exist, it is created with a newly generated secret key of the chosen type. -h, --help Print help (see a summary with '-h') diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.check-block.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.check-block.stdout.txt index 1277d0be1..38c9194e3 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.check-block.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.check-block.stdout.txt @@ -11,28 +11,50 @@ Options: The default number of 64KB pages to ever allocate for Wasm execution. Don't alter this unless you know what you're doing --chain - Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) + Specify the chain specification. + + It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). --dev - Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden + Specify the development chain. + + This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` + Sets a custom logging filter (syntax: `=`). + + Log levels (least to most verbose) are `error`, `warn`, `info`, `debug`, and `trace`. + + By default, all targets log `info`. The global log level can be set with `-l`. + + Multiple `=` entries can be specified and separated by a comma. + + *Example*: `--log error,sync=debug,grandpa=warn`. Sets Global log level to `error`, sets `sync` target to debug and grandpa target to `warn`. --detailed-log-output - Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` + Enable detailed log output. + + Includes displaying the log target, log level and thread name. + + This is automatically enabled when something is logged with any higher level than `info`. --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set + Enable feature to dynamically update and reload the log filter. + + Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. + + The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. --tracing-targets - Sets a custom profiling filter. Syntax is the same as for logging: `=` + Sets a custom profiling filter. + + Syntax is the same as for logging (`--log`). --tracing-receiver Receiver to process tracing messages @@ -43,10 +65,14 @@ Options: - log: Output the tracing records using the log --state-pruning - Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] + Specify the state pruning mode. + + This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks + Specify the blocks pruning mode. + + This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks. [default: archive-canonical] @@ -72,7 +98,9 @@ Options: - compiled: Uses a compiled runtime --wasmtime-instantiation-strategy - The WASM instantiation method to use. Only has an effect when `wasm-execution` is set to `compiled`. The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. The fastest (and the default) strategy available is `pooling-copy-on-write`. The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy + The WASM instantiation method to use. + + Only has an effect when `wasm-execution` is set to `compiled`. The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. The fastest (and the default) strategy available is `pooling-copy-on-write`. The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy. [default: pooling-copy-on-write] @@ -84,10 +112,12 @@ Options: - legacy-instance-reuse: Legacy instance reuse mechanism. DEPRECATED. Will be removed in the future --wasm-runtime-overrides - Specify the path where local WASM runtimes are stored. These runtimes will override on-chain runtimes when the version matches + Specify the path where local WASM runtimes are stored. + + These runtimes will override on-chain runtimes when the version matches. --execution-syncing - The means of execution used when calling into the runtime for importing blocks as part of an initial sync + Runtime execution strategy for importing blocks during initial sync Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -96,7 +126,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-import-block - The means of execution used when calling into the runtime for general block import (including locally authored blocks) + Runtime execution strategy for general block import (including locally authored blocks) Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -105,7 +135,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-block-construction - The means of execution used when calling into the runtime while constructing blocks + Runtime execution strategy for constructing blocks Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -114,7 +144,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-offchain-worker - The means of execution used when calling into the runtime while using an off-chain worker + Runtime execution strategy for offchain workers Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -123,7 +153,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-other - The means of execution used when calling into the runtime while not syncing, importing or constructing blocks + Runtime execution strategy when not syncing, importing or constructing blocks Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -141,12 +171,14 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --trie-cache-size - Specify the state cache size. Providing `0` will disable the cache + Specify the state cache size. + + Providing `0` will disable the cache. [default: 67108864] --state-cache-size - DEPRECATED Switch to `--trie-cache-size` + DEPRECATED: switch to `--trie-cache-size` -h, --help Print help (see a summary with '-h') diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.export-blocks.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.export-blocks.stdout.txt index 9ee7f0adc..c3b8b99af 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.export-blocks.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.export-blocks.stdout.txt @@ -17,28 +17,50 @@ Options: Use binary output rather than JSON --chain - Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) + Specify the chain specification. + + It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). --dev - Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden + Specify the development chain. + + This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` + Sets a custom logging filter (syntax: `=`). + + Log levels (least to most verbose) are `error`, `warn`, `info`, `debug`, and `trace`. + + By default, all targets log `info`. The global log level can be set with `-l`. + + Multiple `=` entries can be specified and separated by a comma. + + *Example*: `--log error,sync=debug,grandpa=warn`. Sets Global log level to `error`, sets `sync` target to debug and grandpa target to `warn`. --detailed-log-output - Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` + Enable detailed log output. + + Includes displaying the log target, log level and thread name. + + This is automatically enabled when something is logged with any higher level than `info`. --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set + Enable feature to dynamically update and reload the log filter. + + Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. + + The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. --tracing-targets - Sets a custom profiling filter. Syntax is the same as for logging: `=` + Sets a custom profiling filter. + + Syntax is the same as for logging (`--log`). --tracing-receiver Receiver to process tracing messages @@ -49,10 +71,14 @@ Options: - log: Output the tracing records using the log --state-pruning - Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] + Specify the state pruning mode. + + This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks + Specify the blocks pruning mode. + + This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks. [default: archive-canonical] diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.export-state.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.export-state.stdout.txt index eb268928d..7a3cf5dce 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.export-state.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.export-state.stdout.txt @@ -8,28 +8,50 @@ Arguments: Options: --chain - Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) + Specify the chain specification. + + It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). --dev - Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden + Specify the development chain. + + This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` + Sets a custom logging filter (syntax: `=`). + + Log levels (least to most verbose) are `error`, `warn`, `info`, `debug`, and `trace`. + + By default, all targets log `info`. The global log level can be set with `-l`. + + Multiple `=` entries can be specified and separated by a comma. + + *Example*: `--log error,sync=debug,grandpa=warn`. Sets Global log level to `error`, sets `sync` target to debug and grandpa target to `warn`. --detailed-log-output - Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` + Enable detailed log output. + + Includes displaying the log target, log level and thread name. + + This is automatically enabled when something is logged with any higher level than `info`. --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set + Enable feature to dynamically update and reload the log filter. + + Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. + + The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. --tracing-targets - Sets a custom profiling filter. Syntax is the same as for logging: `=` + Sets a custom profiling filter. + + Syntax is the same as for logging (`--log`). --tracing-receiver Receiver to process tracing messages @@ -40,10 +62,14 @@ Options: - log: Output the tracing records using the log --state-pruning - Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] + Specify the state pruning mode. + + This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks + Specify the blocks pruning mode. + + This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks. [default: archive-canonical] diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.frontier-db.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.frontier-db.stdout.txt index d6a43c0ba..4efaf9c0f 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.frontier-db.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.frontier-db.stdout.txt @@ -29,28 +29,50 @@ Options: In any case, payload must be serializable to a known type. --chain - Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) + Specify the chain specification. + + It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). --dev - Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden + Specify the development chain. + + This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` + Sets a custom logging filter (syntax: `=`). + + Log levels (least to most verbose) are `error`, `warn`, `info`, `debug`, and `trace`. + + By default, all targets log `info`. The global log level can be set with `-l`. + + Multiple `=` entries can be specified and separated by a comma. + + *Example*: `--log error,sync=debug,grandpa=warn`. Sets Global log level to `error`, sets `sync` target to debug and grandpa target to `warn`. --detailed-log-output - Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` + Enable detailed log output. + + Includes displaying the log target, log level and thread name. + + This is automatically enabled when something is logged with any higher level than `info`. --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set + Enable feature to dynamically update and reload the log filter. + + Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. + + The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. --tracing-targets - Sets a custom profiling filter. Syntax is the same as for logging: `=` + Sets a custom profiling filter. + + Syntax is the same as for logging (`--log`). --tracing-receiver Receiver to process tracing messages @@ -61,10 +83,14 @@ Options: - log: Output the tracing records using the log --state-pruning - Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] + Specify the state pruning mode. + + This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks + Specify the blocks pruning mode. + + This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks. [default: archive-canonical] diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.import-blocks.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.import-blocks.stdout.txt index 2581856f5..2e6b5fc9b 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.import-blocks.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.import-blocks.stdout.txt @@ -14,28 +14,50 @@ Options: Try importing blocks from binary format rather than JSON --chain - Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) + Specify the chain specification. + + It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). --dev - Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden + Specify the development chain. + + This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` + Sets a custom logging filter (syntax: `=`). + + Log levels (least to most verbose) are `error`, `warn`, `info`, `debug`, and `trace`. + + By default, all targets log `info`. The global log level can be set with `-l`. + + Multiple `=` entries can be specified and separated by a comma. + + *Example*: `--log error,sync=debug,grandpa=warn`. Sets Global log level to `error`, sets `sync` target to debug and grandpa target to `warn`. --detailed-log-output - Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` + Enable detailed log output. + + Includes displaying the log target, log level and thread name. + + This is automatically enabled when something is logged with any higher level than `info`. --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set + Enable feature to dynamically update and reload the log filter. + + Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. + + The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. --tracing-targets - Sets a custom profiling filter. Syntax is the same as for logging: `=` + Sets a custom profiling filter. + + Syntax is the same as for logging (`--log`). --tracing-receiver Receiver to process tracing messages @@ -46,10 +68,14 @@ Options: - log: Output the tracing records using the log --state-pruning - Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] + Specify the state pruning mode. + + This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks + Specify the blocks pruning mode. + + This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks. [default: archive-canonical] @@ -75,7 +101,9 @@ Options: - compiled: Uses a compiled runtime --wasmtime-instantiation-strategy - The WASM instantiation method to use. Only has an effect when `wasm-execution` is set to `compiled`. The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. The fastest (and the default) strategy available is `pooling-copy-on-write`. The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy + The WASM instantiation method to use. + + Only has an effect when `wasm-execution` is set to `compiled`. The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. The fastest (and the default) strategy available is `pooling-copy-on-write`. The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy. [default: pooling-copy-on-write] @@ -87,10 +115,12 @@ Options: - legacy-instance-reuse: Legacy instance reuse mechanism. DEPRECATED. Will be removed in the future --wasm-runtime-overrides - Specify the path where local WASM runtimes are stored. These runtimes will override on-chain runtimes when the version matches + Specify the path where local WASM runtimes are stored. + + These runtimes will override on-chain runtimes when the version matches. --execution-syncing - The means of execution used when calling into the runtime for importing blocks as part of an initial sync + Runtime execution strategy for importing blocks during initial sync Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -99,7 +129,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-import-block - The means of execution used when calling into the runtime for general block import (including locally authored blocks) + Runtime execution strategy for general block import (including locally authored blocks) Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -108,7 +138,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-block-construction - The means of execution used when calling into the runtime while constructing blocks + Runtime execution strategy for constructing blocks Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -117,7 +147,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-offchain-worker - The means of execution used when calling into the runtime while using an off-chain worker + Runtime execution strategy for offchain workers Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -126,7 +156,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-other - The means of execution used when calling into the runtime while not syncing, importing or constructing blocks + Runtime execution strategy when not syncing, importing or constructing blocks Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -144,12 +174,14 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --trie-cache-size - Specify the state cache size. Providing `0` will disable the cache + Specify the state cache size. + + Providing `0` will disable the cache. [default: 67108864] --state-cache-size - DEPRECATED Switch to `--trie-cache-size` + DEPRECATED: switch to `--trie-cache-size` -h, --help Print help (see a summary with '-h') diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.key.generate.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.key.generate.stdout.txt index 3d760cda4..481c0379c 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.key.generate.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.key.generate.stdout.txt @@ -16,7 +16,9 @@ Options: Use interactive shell for entering the password used by the keystore --password - Password used by the keystore. This allows appending an extra user-defined secret to the seed + Password used by the keystore. + + This allows appending an extra user-defined secret to the seed. --password-filename File that contains the password used by the keystore diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.key.insert.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.key.insert.stdout.txt index 3248e9ad5..18fa5870b 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.key.insert.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.key.insert.stdout.txt @@ -10,28 +10,50 @@ Options: Key type, examples: "gran", or "imon" --chain - Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) + Specify the chain specification. + + It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). --dev - Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden + Specify the development chain. + + This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` + Sets a custom logging filter (syntax: `=`). + + Log levels (least to most verbose) are `error`, `warn`, `info`, `debug`, and `trace`. + + By default, all targets log `info`. The global log level can be set with `-l`. + + Multiple `=` entries can be specified and separated by a comma. + + *Example*: `--log error,sync=debug,grandpa=warn`. Sets Global log level to `error`, sets `sync` target to debug and grandpa target to `warn`. --detailed-log-output - Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` + Enable detailed log output. + + Includes displaying the log target, log level and thread name. + + This is automatically enabled when something is logged with any higher level than `info`. --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set + Enable feature to dynamically update and reload the log filter. + + Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. + + The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. --tracing-targets - Sets a custom profiling filter. Syntax is the same as for logging: `=` + Sets a custom profiling filter. + + Syntax is the same as for logging (`--log`). --tracing-receiver Receiver to process tracing messages @@ -51,7 +73,9 @@ Options: Use interactive shell for entering the password used by the keystore --password - Password used by the keystore. This allows appending an extra user-defined secret to the seed + Password used by the keystore. + + This allows appending an extra user-defined secret to the seed. --password-filename File that contains the password used by the keystore diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.key.inspect.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.key.inspect.stdout.txt index 24300dfaa..1d1aa3477 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.key.inspect.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.key.inspect.stdout.txt @@ -20,7 +20,9 @@ Options: Use interactive shell for entering the password used by the keystore --password - Password used by the keystore. This allows appending an extra user-defined secret to the seed + Password used by the keystore. + + This allows appending an extra user-defined secret to the seed. --password-filename File that contains the password used by the keystore diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.purge-chain.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.purge-chain.stdout.txt index 4c1070935..f1179487d 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.purge-chain.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.purge-chain.stdout.txt @@ -7,28 +7,50 @@ Options: Skip interactive prompt by answering yes automatically --chain - Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) + Specify the chain specification. + + It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). --dev - Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden + Specify the development chain. + + This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` + Sets a custom logging filter (syntax: `=`). + + Log levels (least to most verbose) are `error`, `warn`, `info`, `debug`, and `trace`. + + By default, all targets log `info`. The global log level can be set with `-l`. + + Multiple `=` entries can be specified and separated by a comma. + + *Example*: `--log error,sync=debug,grandpa=warn`. Sets Global log level to `error`, sets `sync` target to debug and grandpa target to `warn`. --detailed-log-output - Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` + Enable detailed log output. + + Includes displaying the log target, log level and thread name. + + This is automatically enabled when something is logged with any higher level than `info`. --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set + Enable feature to dynamically update and reload the log filter. + + Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. + + The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. --tracing-targets - Sets a custom profiling filter. Syntax is the same as for logging: `=` + Sets a custom profiling filter. + + Syntax is the same as for logging (`--log`). --tracing-receiver Receiver to process tracing messages diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.revert.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.revert.stdout.txt index ba8399498..65303850d 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.revert.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.revert.stdout.txt @@ -10,28 +10,50 @@ Arguments: Options: --chain - Specify the chain specification. It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand) + Specify the chain specification. + + It can be one of the predefined ones (dev, local, or staging) or it can be a path to a file with the chainspec (such as one exported by the `build-spec` subcommand). --dev - Specify the development chain. This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden + Specify the development chain. + + This flag sets `--chain=dev`, `--force-authoring`, `--rpc-cors=all`, `--alice`, and `--tmp` flags, unless explicitly overridden. -d, --base-path Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l` + Sets a custom logging filter (syntax: `=`). + + Log levels (least to most verbose) are `error`, `warn`, `info`, `debug`, and `trace`. + + By default, all targets log `info`. The global log level can be set with `-l`. + + Multiple `=` entries can be specified and separated by a comma. + + *Example*: `--log error,sync=debug,grandpa=warn`. Sets Global log level to `error`, sets `sync` target to debug and grandpa target to `warn`. --detailed-log-output - Enable detailed log output. This includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info` + Enable detailed log output. + + Includes displaying the log target, log level and thread name. + + This is automatically enabled when something is logged with any higher level than `info`. --disable-log-color Disable log color output --enable-log-reloading - Enable feature to dynamically update and reload the log filter. Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set + Enable feature to dynamically update and reload the log filter. + + Be aware that enabling this feature can lead to a performance decrease up to factor six or more. Depending on the global logging level the performance decrease changes. + + The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. --tracing-targets - Sets a custom profiling filter. Syntax is the same as for logging: `=` + Sets a custom profiling filter. + + Syntax is the same as for logging (`--log`). --tracing-receiver Receiver to process tracing messages @@ -42,10 +64,14 @@ Options: - log: Output the tracing records using the log --state-pruning - Specify the state pruning mode. This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] + Specify the state pruning mode. + + This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning - Specify the blocks pruning mode. This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks + Specify the blocks pruning mode. + + This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks. [default: archive-canonical] diff --git a/utils/e2e-tests/bash/fixtures/help-output/help.stdout.txt b/utils/e2e-tests/bash/fixtures/help-output/help.stdout.txt index 749e8a79c..f733a7bd4 100644 --- a/utils/e2e-tests/bash/fixtures/help-output/help.stdout.txt +++ b/utils/e2e-tests/bash/fixtures/help-output/help.stdout.txt @@ -27,12 +27,18 @@ Options: The node will be started with the authority role and actively participate in any consensus task that it can (e.g. depending on availability of local keys). --no-grandpa - Disable GRANDPA voter when running in validator mode, otherwise disable the GRANDPA observer + Disable GRANDPA. + + Disables voter when running in validator mode, otherwise disable the GRANDPA observer. --rpc-external - Listen to all RPC interfaces. + Listen to all RPC interfaces (default: local). + + Not all RPC methods are safe to be exposed publicly. + + Use an RPC proxy server to filter out dangerous methods. More details: . - Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC proxy server to filter out dangerous methods. More details: . Use `--unsafe-rpc-external` to suppress the warning if you understand the risks. + Use `--unsafe-rpc-external` to suppress the warning if you understand the risks. --unsafe-rpc-external Listen to all RPC interfaces. @@ -76,11 +82,6 @@ Options: --rpc-max-subscriptions-per-connection Set the the maximum concurrent subscriptions per connection. Default is 1024 - --prometheus-external - Expose Prometheus exporter on all interfaces. - - Default is local. - --ipc-path DEPRECATED, IPC support has been removed @@ -97,22 +98,14 @@ Options: DEPRECATED, this has no affect anymore. Use `rpc_max_response_size` instead --rpc-cors - Specify browser Origins allowed to access the HTTP & WS RPC servers. + Specify browser *origins* allowed to access the HTTP and WS RPC servers. - A comma-separated list of origins (protocol://domain or special `null` value). Value of `all` will disable origin validation. Default is to allow localhost and origins. When running in --dev mode the default is to allow all origins. - - --prometheus-port - Specify Prometheus exporter TCP Port - - --no-prometheus - Do not expose a Prometheus exporter endpoint. - - Prometheus metric endpoint is enabled by default. + A comma-separated list of origins (`protocol://domain` or special `null` value). Value of `all` will disable origin validation. Default is to allow localhost and origins. When running in `--dev` mode the default is to allow all origins. --name The human-readable name for this node. - The node name will be reported to the telemetry server, if enabled. + It's used as network node name. --no-telemetry Disable connecting to the Substrate telemetry server. @@ -122,12 +115,37 @@ Options: --telemetry-url The URL of the telemetry server to connect to. - This flag can be passed multiple times as a means to specify multiple telemetry endpoints. Verbosity levels range from 0-9, with 0 denoting the least verbosity. Expected format is 'URL VERBOSITY', e.g. `--telemetry-url 'wss://foo/bar 0'`. + This flag can be passed multiple times as a means to specify multiple telemetry endpoints. Verbosity levels range from 0-9, with 0 denoting the least verbosity. + + Expected format is 'URL VERBOSITY', e.g. `--telemetry-url 'wss://foo/bar 0'`. - --offchain-worker - Should execute offchain workers on every block. + --prometheus-port + Specify Prometheus exporter TCP Port + + --prometheus-external + Expose Prometheus exporter on all interfaces. + + Default is local. + + --no-prometheus + Do not expose a Prometheus exporter endpoint. + + Prometheus metric endpoint is enabled by default. + + --max-runtime-instances + The size of the instances cache for each runtime [max: 32]. + + Values higher than 32 are illegal. + + [default: 8] + + --runtime-cache-size + Maximum number of different runtimes that can be cached - By default it's only enabled for nodes that are authoring new blocks. + [default: 2] + + --offchain-worker + Execute offchain workers on every block [default: when-authority] @@ -137,9 +155,9 @@ Options: - when-authority: Only enable the offchain worker when running as a validator (or collator, if this is a parachain node) --enable-offchain-indexing - Enable Offchain Indexing API, which allows block import to write to Offchain DB. + Enable offchain indexing API. - Enables a runtime to write directly to a offchain workers DB during block import. + Allows the runtime to write directly to offchain workers DB during block import. [default: false] [possible values: true, false] @@ -158,14 +176,20 @@ Options: Specify custom base path -l, --log ... - Sets a custom logging filter. Syntax is `=`, e.g. -lsync=debug. + Sets a custom logging filter (syntax: `=`). + + Log levels (least to most verbose) are `error`, `warn`, `info`, `debug`, and `trace`. - Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log `info`. The global log level can be set with `-l`. + By default, all targets log `info`. The global log level can be set with `-l`. + + Multiple `=` entries can be specified and separated by a comma. + + *Example*: `--log error,sync=debug,grandpa=warn`. Sets Global log level to `error`, sets `sync` target to debug and grandpa target to `warn`. --detailed-log-output Enable detailed log output. - This includes displaying the log target, log level and thread name. + Includes displaying the log target, log level and thread name. This is automatically enabled when something is logged with any higher level than `info`. @@ -180,7 +204,9 @@ Options: The `system_addLogFilter` and `system_resetLogFilter` RPCs will have no effect with this option not being set. --tracing-targets - Sets a custom profiling filter. Syntax is the same as for logging: `=` + Sets a custom profiling filter. + + Syntax is the same as for logging (`--log`). --tracing-receiver Receiver to process tracing messages @@ -193,42 +219,12 @@ Options: --state-pruning Specify the state pruning mode. - This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. - - This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. - - Possible values: - - - archive: - - Keep the state of all blocks. - - - 'archive-canonical' - - Keep only the state of finalized blocks. - - - number - - Keep the state of the last number of finalized blocks. - - [default: 256] + This mode specifies when the block's state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn't match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - 'archive-canonical' Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256] --blocks-pruning Specify the blocks pruning mode. - This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. - - Possible values: - 'archive' - - Keep all blocks. - - - 'archive-canonical' - - Keep only finalized blocks. - - - number - - Keep the last `number` of finalized blocks. + This mode specifies when the block's body (including justifications) should be pruned (ie, removed) from the database. Possible values: - 'archive' Keep all blocks. - 'archive-canonical' Keep only finalized blocks. - number Keep the last `number` of finalized blocks. [default: archive-canonical] @@ -256,13 +252,7 @@ Options: --wasmtime-instantiation-strategy The WASM instantiation method to use. - Only has an effect when `wasm-execution` is set to `compiled`. - - The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. - - The fastest (and the default) strategy available is `pooling-copy-on-write`. - - The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy. + Only has an effect when `wasm-execution` is set to `compiled`. The copy-on-write strategies are only supported on Linux. If the copy-on-write variant of a strategy is unsupported the executor will fall back to the non-CoW equivalent. The fastest (and the default) strategy available is `pooling-copy-on-write`. The `legacy-instance-reuse` strategy is deprecated and will be removed in the future. It should only be used in case of issues with the default instantiation strategy. [default: pooling-copy-on-write] @@ -279,7 +269,7 @@ Options: These runtimes will override on-chain runtimes when the version matches. --execution-syncing - The means of execution used when calling into the runtime for importing blocks as part of an initial sync + Runtime execution strategy for importing blocks during initial sync Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -288,7 +278,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-import-block - The means of execution used when calling into the runtime for general block import (including locally authored blocks) + Runtime execution strategy for general block import (including locally authored blocks) Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -297,7 +287,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-block-construction - The means of execution used when calling into the runtime while constructing blocks + Runtime execution strategy for constructing blocks Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -306,7 +296,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-offchain-worker - The means of execution used when calling into the runtime while using an off-chain worker + Runtime execution strategy for offchain workers Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -315,7 +305,7 @@ Options: - native-else-wasm: Execute with the native build if possible; if it fails, then execute with WebAssembly --execution-other - The means of execution used when calling into the runtime while not syncing, importing or constructing blocks + Runtime execution strategy when not syncing, importing or constructing blocks Possible values: - native: Execute with native build (if available, WebAssembly otherwise) @@ -340,9 +330,7 @@ Options: [default: 67108864] --state-cache-size - DEPRECATED - - Switch to `--trie-cache-size`. + DEPRECATED: switch to `--trie-cache-size` --bootnodes ... Specify a list of bootnodes @@ -353,12 +341,12 @@ Options: --reserved-only Whether to only synchronize the chain with reserved nodes. - Also disables automatic peer discovery. - - TCP connections might still be established with non-reserved nodes. In particular, if you are a validator your node might still connect to other validator nodes and collator nodes regardless of whether they are defined as reserved nodes. + Also disables automatic peer discovery. TCP connections might still be established with non-reserved nodes. In particular, if you are a validator your node might still connect to other validator nodes and collator nodes regardless of whether they are defined as reserved nodes. --public-addr ... - The public address that other nodes will use to connect to it. This can be used if there's a proxy in front of this node + Public address that other nodes will use to connect to this node. + + This can be used if there's a proxy in front of this node. --listen-addr ... Listen on this multiaddress. @@ -369,13 +357,21 @@ Options: Specify p2p protocol TCP port --no-private-ip - Always forbid connecting to private IPv4/IPv6 addresses (as specified in [RFC1918](https://tools.ietf.org/html/rfc1918)), unless the address was passed with `--reserved-nodes` or `--bootnodes`. Enabled by default for chains marked as "live" in their chain specifications + Always forbid connecting to private IPv4/IPv6 addresses. + + The option doesn't apply to addresses passed with `--reserved-nodes` or `--bootnodes`. Enabled by default for chains marked as "live" in their chain specifications. + + Address allocation for private networks is specified by [RFC1918](https://tools.ietf.org/html/rfc1918)). --allow-private-ip - Always accept connecting to private IPv4/IPv6 addresses (as specified in [RFC1918](https://tools.ietf.org/html/rfc1918)). Enabled by default for chains marked as "local" in their chain specifications, or when `--dev` is passed + Always accept connecting to private IPv4/IPv6 addresses. + + Enabled by default for chains marked as "local" in their chain specifications, or when `--dev` is passed. + + Address allocation for private networks is specified by [RFC1918](https://tools.ietf.org/html/rfc1918)). --out-peers - Specify the number of outgoing connections we're trying to maintain + Number of outgoing connections we're trying to maintain [default: 8] @@ -390,7 +386,7 @@ Options: [default: 100] --no-mdns - Disable mDNS discovery. + Disable mDNS discovery (default: true). By default, the network will use mDNS to discover other nodes on the local network. This disables it. Automatically implied when using --dev. @@ -402,26 +398,26 @@ Options: [default: 5] --node-key - The secret key to use for libp2p networking. + Secret key to use for p2p networking. The value is a string that is parsed according to the choice of `--node-key-type` as follows: - `ed25519`: The value is parsed as a hex-encoded Ed25519 32 byte secret key, i.e. 64 hex characters. + - `ed25519`: the value is parsed as a hex-encoded Ed25519 32 byte secret key (64 hex chars) The value of this option takes precedence over `--node-key-file`. WARNING: Secrets provided as command-line arguments are easily exposed. Use of this option should be limited to development and testing. To use an externally managed secret key, use `--node-key-file` instead. --node-key-type - The type of secret key to use for libp2p networking. + Crypto primitive to use for p2p networking. The secret key of the node is obtained as follows: - * If the `--node-key` option is given, the value is parsed as a secret key according to the type. See the documentation for `--node-key`. + - If the `--node-key` option is given, the value is parsed as a secret key according to the type. See the documentation for `--node-key`. - * If the `--node-key-file` option is given, the secret key is read from the specified file. See the documentation for `--node-key-file`. + - If the `--node-key-file` option is given, the secret key is read from the specified file. See the documentation for `--node-key-file`. - * Otherwise, the secret key is read from a file with a predetermined, type-specific name from the chain-specific network config directory inside the base directory specified by `--base-dir`. If this file does not exist, it is created with a newly generated secret key of the chosen type. + - Otherwise, the secret key is read from a file with a predetermined, type-specific name from the chain-specific network config directory inside the base directory specified by `--base-dir`. If this file does not exist, it is created with a newly generated secret key of the chosen type. The node's secret key determines the corresponding public key and hence the node's peer ID in the context of libp2p. @@ -431,11 +427,11 @@ Options: - ed25519: Use ed25519 --node-key-file - The file from which to read the node's secret key to use for libp2p networking. + File from which to read the node's secret key to use for p2p networking. The contents of the file are parsed according to the choice of `--node-key-type` as follows: - `ed25519`: The file must contain an unencoded 32 byte or hex encoded Ed25519 secret key. + - `ed25519`: the file must contain an unencoded 32 byte or hex encoded Ed25519 secret key. If the file does not exist, it is created with a newly generated secret key of the chosen type. @@ -445,7 +441,9 @@ Options: By default this option is `true` for `--dev` or when the chain type is `Local`/`Development` and false otherwise. --kademlia-disjoint-query-paths - Require iterative Kademlia DHT queries to use disjoint paths for increased resiliency in the presence of potentially adversarial nodes. + Require iterative Kademlia DHT queries to use disjoint paths. + + Disjoint paths increase resiliency in the presence of potentially adversarial nodes. See the S/Kademlia paper for more information on the high level design as well as its security improvements. @@ -455,11 +453,6 @@ Options: --sync Blockchain syncing mode. - - `full`: Download and validate full blockchain history. - - `fast`: Download blocks and the latest state only. - - `fast-unsafe`: Same as `fast`, but skip downloading state proofs. - - `warp`: Download the latest state and proof. - [default: full] Possible values: @@ -468,6 +461,13 @@ Options: - fast-unsafe: Download blocks without executing them. Download latest state without proofs - warp: Prove finality and download the latest state + --max-blocks-per-request + Maximum number of blocks per request. + + Try reducing this number from the default value if you have a slow network connection and observe block requests timing out. + + [default: 64] + --pool-limit Maximum number of transactions in the transaction pool @@ -479,60 +479,70 @@ Options: [default: 20480] --tx-ban-seconds - How long a transaction is banned for, if it is considered invalid. Defaults to 1800s + How long a transaction is banned for. + + If it is considered invalid. Defaults to 1800s. + + --keystore-uri + Specify custom URIs to connect to for keystore-services + + --keystore-path + Specify custom keystore path + + --password-interactive + Use interactive shell for entering the password used by the keystore + + --password + Password used by the keystore. + + This allows appending an extra user-defined secret to the seed. + + --password-filename + File that contains the password used by the keystore --alice - Shortcut for `--name Alice --validator` with session keys for `Alice` added to keystore + Shortcut for `--name Alice --validator`. + + Session keys for `Alice` are added to keystore. --bob - Shortcut for `--name Bob --validator` with session keys for `Bob` added to keystore + Shortcut for `--name Bob --validator`. + + Session keys for `Bob` are added to keystore. --charlie - Shortcut for `--name Charlie --validator` with session keys for `Charlie` added to keystore + Shortcut for `--name Charlie --validator`. + + Session keys for `Charlie` are added to keystore. --dave - Shortcut for `--name Dave --validator` with session keys for `Dave` added to keystore + Shortcut for `--name Dave --validator`. + + Session keys for `Dave` are added to keystore. --eve - Shortcut for `--name Eve --validator` with session keys for `Eve` added to keystore + Shortcut for `--name Eve --validator`. + + Session keys for `Eve` are added to keystore. --ferdie - Shortcut for `--name Ferdie --validator` with session keys for `Ferdie` added to keystore + Shortcut for `--name Ferdie --validator`. + + Session keys for `Ferdie` are added to keystore. --one - Shortcut for `--name One --validator` with session keys for `One` added to keystore + Shortcut for `--name One --validator`. + + Session keys for `One` are added to keystore. --two - Shortcut for `--name Two --validator` with session keys for `Two` added to keystore + Shortcut for `--name Two --validator`. + + Session keys for `Two` are added to keystore. --force-authoring Enable authoring even when offline - --keystore-uri - Specify custom URIs to connect to for keystore-services - - --keystore-path - Specify custom keystore path - - --password-interactive - Use interactive shell for entering the password used by the keystore - - --password - Password used by the keystore. This allows appending an extra user-defined secret to the seed - - --password-filename - File that contains the password used by the keystore - - --max-runtime-instances - The size of the instances cache for each runtime. - - The default value is 8 and the values higher than 256 are ignored. - - --runtime-cache-size - Maximum number of different runtimes that can be cached - - [default: 2] - --tmp Run a temporary node. From 16ead2c996adf3e80ba391906232b20811417330 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Mon, 23 Sep 2024 11:04:31 +0300 Subject: [PATCH 54/56] Remove duplicated definitions --- crates/humanode-runtime/src/lib.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/humanode-runtime/src/lib.rs b/crates/humanode-runtime/src/lib.rs index 2a1b6e8c0..ede27090f 100644 --- a/crates/humanode-runtime/src/lib.rs +++ b/crates/humanode-runtime/src/lib.rs @@ -438,8 +438,6 @@ impl pallet_pot::Config for Runtime { } impl pallet_balances::Config for Runtime { - type MaxLocks = ConstU32<50>; - type MaxReserves = (); type ReserveIdentifier = [u8; 8]; /// The type for recording an account's balance. type Balance = Balance; From b64beb5761a45e9068834d49b0f76a4819430358 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Mon, 23 Sep 2024 11:08:51 +0300 Subject: [PATCH 55/56] Update features snapshot --- utils/checks/snapshots/features.yaml | 130 ++++++++------------------- 1 file changed, 35 insertions(+), 95 deletions(-) diff --git a/utils/checks/snapshots/features.yaml b/utils/checks/snapshots/features.yaml index 4530cefa1..2ad765f23 100644 --- a/utils/checks/snapshots/features.yaml +++ b/utils/checks/snapshots/features.yaml @@ -204,8 +204,6 @@ - name: base16ct 0.2.0 features: - alloc -- name: base58 0.2.0 - features: [] - name: base64 0.13.1 features: - alloc @@ -254,7 +252,6 @@ - default - name: bitflags 2.4.2 features: - - serde - std - name: bitvec 1.0.1 features: @@ -655,7 +652,6 @@ features: - alloc - oid - - pem - std - zeroize - name: der-parser 7.0.0 @@ -870,8 +866,6 @@ - name: errno 0.3.8 features: - std -- name: etcetera 0.8.0 - features: [] - name: ethabi 18.0.0 features: - full-serde @@ -978,14 +972,12 @@ features: [] - name: fc-db 2.0.0-dev features: - - default - ethereum - fc-storage - fp-consensus - fp-rpc - futures - kvdb-rocksdb - - parity-db - rocksdb - sc-client-api - smallvec @@ -1029,11 +1021,6 @@ - parking_lot - scale-info - std -- name: finl_unicode 1.2.0 - features: - - categories - - default - - grapheme_clusters - name: fixed-hash 0.8.0 features: - byteorder @@ -1127,6 +1114,7 @@ - serde_full - std - v14 + - v15-unstable - name: frame-support 4.0.0-dev features: - default @@ -1353,8 +1341,6 @@ - alloc - default - std -- name: hex-literal 0.3.4 - features: [] - name: hex-literal 0.4.1 features: [] - name: hkdf 0.12.4 @@ -1553,15 +1539,6 @@ features: [] - name: jsonrpsee-types 0.16.3 features: [] -- name: k256 0.11.6 - features: - - arithmetic - - digest - - ecdsa - - ecdsa-core - - sha2 - - sha256 - - std - name: k256 0.13.3 features: - alloc @@ -1583,7 +1560,7 @@ - name: kvdb-memorydb 0.13.0 features: - default -- name: kvdb-rocksdb 0.17.0 +- name: kvdb-rocksdb 0.18.0 features: [] - name: lazy_static 1.4.0 features: @@ -1677,7 +1654,7 @@ - name: libredox 0.0.1 features: - call -- name: librocksdb-sys 0.8.3+7.4.4 +- name: librocksdb-sys 0.10.0+7.9.2 features: - default - jemalloc @@ -1796,7 +1773,6 @@ features: [] - name: merlin 2.0.1 features: - - default - std - name: mime 0.3.17 features: [] @@ -1971,13 +1947,6 @@ features: - default - std -- name: num-bigint-dig 0.8.4 - features: - - i128 - - prime - - rand - - u64_digit - - zeroize - name: num-complex 0.4.5 features: - std @@ -2010,6 +1979,8 @@ - name: num_cpus 1.16.0 features: [] - name: num_enum 0.5.11 + features: [] +- name: num_enum 0.6.1 features: - std - name: num_enum 0.7.3 @@ -2017,6 +1988,8 @@ - default - std - name: num_enum_derive 0.5.11 + features: [] +- name: num_enum_derive 0.6.1 features: - proc-macro-crate - std @@ -2327,9 +2300,6 @@ - name: pem-rfc7468 0.6.0 features: - alloc -- name: pem-rfc7468 0.7.0 - features: - - alloc - name: percent-encoding 2.3.1 features: - alloc @@ -2362,17 +2332,9 @@ features: [] - name: pin-utils 0.1.0 features: [] -- name: pkcs1 0.7.5 - features: - - alloc - - pem - - pkcs8 - - std - - zeroize - name: pkcs8 0.10.2 features: - alloc - - pem - std - name: pkcs8 0.9.0 features: @@ -2486,6 +2448,8 @@ - syn-error - name: proc-macro-error-attr 1.0.4 features: [] +- name: proc-macro-warning 0.3.1 + features: [] - name: proc-macro2 1.0.86 features: - default @@ -2743,7 +2707,7 @@ features: [] - name: robonode-server 0.1.0 features: [] -- name: rocksdb 0.19.0 +- name: rocksdb 0.20.1 features: - jemalloc - snappy @@ -2755,12 +2719,6 @@ features: [] - name: rpc-validator-key-logic 0.1.0 features: [] -- name: rsa 0.9.6 - features: - - default - - pem - - std - - u64_digit - name: rtcp 0.7.2 features: [] - name: rtnetlink 0.10.1 @@ -2858,7 +2816,6 @@ features: [] - name: sc-client-db 0.10.0-dev features: - - default - kvdb-rocksdb - rocksdb - name: sc-consensus 0.10.0-dev @@ -2960,7 +2917,6 @@ - runtime-rng - name: schnorrkel 0.9.1 features: - - default - getrandom - preaudit_deprecated - rand @@ -3063,6 +3019,9 @@ - name: serde_qs 0.8.5 features: - default +- name: serde_spanned 0.6.7 + features: + - serde - name: serde_urlencoded 0.7.1 features: [] - name: sha-1 0.9.8 @@ -3163,6 +3122,7 @@ - blake2 - chacha20poly1305 - curve25519-dalek + - default - default-resolver - ring - ring-resolver @@ -3231,15 +3191,11 @@ - default - serde - std -- name: sp-consensus-vrf 0.10.0-dev - features: - - default - - std - name: sp-core 7.0.0 features: - array-bytes - - base58 - blake2 + - bs58 - default - dyn-clonable - ed25519-zebra @@ -3248,11 +3204,9 @@ - impl-serde - lazy_static - libsecp256k1 - - merlin - parking_lot - rand - regex - - schnorrkel - secp256k1 - serde - sp-core-hashing @@ -3306,6 +3260,9 @@ - std - name: sp-maybe-compressed-blob 4.1.0-dev features: [] +- name: sp-metadata-ir 0.1.0 + features: + - std - name: sp-offchain 4.0.0-dev features: - default @@ -3334,6 +3291,7 @@ - std - name: sp-staking 4.0.0-dev features: + - serde - std - name: sp-state-machine 0.13.0 features: @@ -3436,18 +3394,13 @@ - name: spki 0.7.3 features: - alloc - - pem - std - name: sqlformat 0.2.3 features: [] - name: sqlx 0.7.3 features: - _rt-tokio - - any - - default - - json - macros - - migrate - runtime-tokio - runtime-tokio-native-tls - sqlite @@ -3461,12 +3414,10 @@ - any - crc - default - - json - migrate - native-tls - offline - serde - - serde_json - sha2 - tokio - tokio-stream @@ -3475,35 +3426,17 @@ - _rt-tokio - _tls-native-tls - default - - json - - migrate - sqlite - name: sqlx-macros-core 0.7.3 features: - _rt-tokio - _tls-native-tls - default - - json - - migrate - sqlite - sqlx-sqlite - tokio -- name: sqlx-mysql 0.7.3 - features: - - any - - json - - migrate - - offline - - serde -- name: sqlx-postgres 0.7.3 - features: - - any - - json - - migrate - name: sqlx-sqlite 0.7.3 features: - - any - - json - migrate - offline - serde @@ -3522,8 +3455,6 @@ - default - name: static_init_macro 1.0.2 features: [] -- name: stringprep 0.1.4 - features: [] - name: strsim 0.10.0 features: [] - name: strsim 0.11.0 @@ -3724,8 +3655,18 @@ - name: toml 0.5.11 features: - default +- name: toml 0.7.8 + features: + - default + - display + - parse - name: toml_datetime 0.6.5 - features: [] + features: + - serde +- name: toml_edit 0.19.15 + features: + - default + - serde - name: toml_edit 0.20.2 features: - default @@ -3987,8 +3928,6 @@ features: - default - std -- name: wasite 0.1.0 - features: [] - name: wasm-bindgen 0.2.91 features: - default @@ -4131,8 +4070,6 @@ - vnet - name: which 4.4.2 features: [] -- name: whoami 1.5.1 - features: [] - name: wide 0.7.15 features: - std @@ -4242,8 +4179,6 @@ - Win32_System_Threading - Win32_System_Time - Win32_System_WindowsProgramming - - Win32_UI - - Win32_UI_Shell - default - name: windows-sys 0.52.0 features: @@ -4379,9 +4314,14 @@ features: [] - name: zstd 0.11.2+zstd.1.5.2 features: [] +- name: zstd 0.12.4 + features: [] - name: zstd-safe 5.0.2+zstd.1.5.2 features: - std +- name: zstd-safe 6.0.6 + features: + - std - name: zstd-sys 2.0.9+zstd.1.5.5 features: - std From d5bf1c8e00b4e523d4a30f9d2af3dfe76c5f5410 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrenov Date: Mon, 23 Sep 2024 11:18:49 +0300 Subject: [PATCH 56/56] RuntimeEvent to be first at pallet_balances::Config --- crates/humanode-runtime/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/humanode-runtime/src/lib.rs b/crates/humanode-runtime/src/lib.rs index ede27090f..3e386d622 100644 --- a/crates/humanode-runtime/src/lib.rs +++ b/crates/humanode-runtime/src/lib.rs @@ -438,11 +438,11 @@ impl pallet_pot::Config for Runtime { } impl pallet_balances::Config for Runtime { + /// The ubiquitous event type. + type RuntimeEvent = RuntimeEvent; type ReserveIdentifier = [u8; 8]; /// The type for recording an account's balance. type Balance = Balance; - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; type DustRemoval = pallet_pot::DepositUnbalancedFungible; type ExistentialDeposit = ConstU128<500>; type AccountStore = System;