mirror of
https://github.com/pezkuwichain/pezkuwi-runtime-templates.git
synced 2026-04-25 19:58:04 +00:00
Upgrade evm-template to polkadot-stable2503 (#417)
* init 2503 upgrade for evm template need to upgrade frontier forks * start upgrading frontier * wip upgrading tanssi deps and synchronizing deps therein * update tanssi wip * fix dep tree for evm template and move onto resolving errors * resolve 17 of 29 compilation errors 12 remaining most related to updating weight files * resolve weight related compilation errors and evm abstraction and proc macro require updates * impl DecodeWithMemTracking for custom origins 5 errors left requiring changes to astractions * update evm abstraction runtime compiles * node in progress frontier txpool requires more changes * update txpool for node and node release compiles * remove unused code commented out * fix tanssi registrar benchmarking compilation * fix pallet registrar benchmarks and unit tests * update tanssi runtime apis to have benchmark features * clean and fix some errors tests are recently requiring benchmark hidden impls oddly * combine ci steps for running test and checking benchmark compilation to see if output changes * update xcm core buyer 2412 dep to 2503 release ty @KitHat * rm conditional compilation for runtime benchmarks inside a few declarative macro definitions * apply clippy fix * move runtime benchmarks declarations for referenda conviction voting and assets common into the runtime not sure why only those require explicit feature declaration * break build but apply suggestions from @KitHat * fix build * fix toml sort * fix tanssi build
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use frame_support::{dispatch::GetDispatchInfo, weights::Weight};
|
||||
use parity_scale_codec::{Decode, Encode};
|
||||
use parity_scale_codec::{Decode, DecodeWithMemTracking, Encode};
|
||||
use scale_info::TypeInfo;
|
||||
use sp_core::{H160, H256};
|
||||
use sp_runtime::traits::Hash as THash;
|
||||
@@ -30,7 +30,9 @@ pallet_assets::runtime_benchmarks_enabled! {
|
||||
}
|
||||
|
||||
// Our AssetType. For now we only handle Xcm Assets
|
||||
#[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)]
|
||||
#[derive(
|
||||
Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, DecodeWithMemTracking, TypeInfo,
|
||||
)]
|
||||
pub enum AssetType {
|
||||
Xcm(xcm::v4::Location),
|
||||
}
|
||||
@@ -92,7 +94,19 @@ impl From<AssetType> for AssetId {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Default, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)]
|
||||
#[derive(
|
||||
Clone,
|
||||
Default,
|
||||
Eq,
|
||||
Debug,
|
||||
PartialEq,
|
||||
Ord,
|
||||
PartialOrd,
|
||||
Encode,
|
||||
Decode,
|
||||
DecodeWithMemTracking,
|
||||
TypeInfo,
|
||||
)]
|
||||
pub struct AssetRegistrarMetadata {
|
||||
pub name: Vec<u8>,
|
||||
pub symbol: Vec<u8>,
|
||||
|
||||
@@ -14,7 +14,17 @@ pub mod pallet_custom_origins {
|
||||
#[pallet::pallet]
|
||||
pub struct Pallet<T>(_);
|
||||
|
||||
#[derive(PartialEq, Eq, Clone, MaxEncodedLen, Encode, Decode, TypeInfo, RuntimeDebug)]
|
||||
#[derive(
|
||||
PartialEq,
|
||||
Eq,
|
||||
Clone,
|
||||
MaxEncodedLen,
|
||||
Encode,
|
||||
Decode,
|
||||
DecodeWithMemTracking,
|
||||
TypeInfo,
|
||||
RuntimeDebug,
|
||||
)]
|
||||
#[pallet::origin]
|
||||
pub enum Origin {
|
||||
/// Origin for spending (any amount of) funds.
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
//! Track configurations for governance.
|
||||
|
||||
use alloc::borrow::Cow;
|
||||
|
||||
use pallet_referenda::Track;
|
||||
use sp_runtime::str_array as s;
|
||||
|
||||
use super::*;
|
||||
use crate::constants::MINUTES;
|
||||
|
||||
@@ -34,156 +39,155 @@ const APP_WHITELISTED_CALLER: Curve =
|
||||
const SUP_WHITELISTED_CALLER: Curve =
|
||||
Curve::make_reciprocal(1, 28, percent(20), percent(5), percent(50));
|
||||
|
||||
const TRACKS_DATA: [(u16, pallet_referenda::TrackInfo<Balance, BlockNumber>); 10] = [
|
||||
(
|
||||
0,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "root",
|
||||
max_deciding: 1,
|
||||
decision_deposit: 100 * GRAND,
|
||||
prepare_period: 8 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 12 * MINUTES,
|
||||
min_enactment_period: 5 * MINUTES,
|
||||
min_approval: APP_ROOT,
|
||||
min_support: SUP_ROOT,
|
||||
},
|
||||
),
|
||||
(
|
||||
1,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "whitelisted_caller",
|
||||
max_deciding: 100,
|
||||
decision_deposit: 10 * GRAND,
|
||||
prepare_period: 6 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 4 * MINUTES,
|
||||
min_enactment_period: 3 * MINUTES,
|
||||
min_approval: APP_WHITELISTED_CALLER,
|
||||
min_support: SUP_WHITELISTED_CALLER,
|
||||
},
|
||||
),
|
||||
(
|
||||
11,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "treasurer",
|
||||
max_deciding: 10,
|
||||
decision_deposit: GRAND,
|
||||
prepare_period: 8 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 8 * MINUTES,
|
||||
min_enactment_period: 5 * MINUTES,
|
||||
min_approval: APP_TREASURER,
|
||||
min_support: SUP_TREASURER,
|
||||
},
|
||||
),
|
||||
(
|
||||
20,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "referendum_canceller",
|
||||
max_deciding: 1_000,
|
||||
decision_deposit: 10 * GRAND,
|
||||
prepare_period: 8 * MINUTES,
|
||||
decision_period: 14 * MINUTES,
|
||||
confirm_period: 8 * MINUTES,
|
||||
min_enactment_period: 3 * MINUTES,
|
||||
min_approval: APP_REFERENDUM_CANCELLER,
|
||||
min_support: SUP_REFERENDUM_CANCELLER,
|
||||
},
|
||||
),
|
||||
(
|
||||
21,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "referendum_killer",
|
||||
max_deciding: 1_000,
|
||||
decision_deposit: 50 * GRAND,
|
||||
prepare_period: 8 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 8 * MINUTES,
|
||||
min_enactment_period: 3 * MINUTES,
|
||||
min_approval: APP_REFERENDUM_KILLER,
|
||||
min_support: SUP_REFERENDUM_KILLER,
|
||||
},
|
||||
),
|
||||
(
|
||||
30,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "small_tipper",
|
||||
max_deciding: 200,
|
||||
decision_deposit: 3 * CENTS,
|
||||
prepare_period: MINUTES,
|
||||
decision_period: 14 * MINUTES,
|
||||
confirm_period: 4 * MINUTES,
|
||||
min_enactment_period: MINUTES,
|
||||
min_approval: APP_SMALL_TIPPER,
|
||||
min_support: SUP_SMALL_TIPPER,
|
||||
},
|
||||
),
|
||||
(
|
||||
31,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "big_tipper",
|
||||
max_deciding: 100,
|
||||
decision_deposit: 10 * 3 * CENTS,
|
||||
prepare_period: 4 * MINUTES,
|
||||
decision_period: 14 * MINUTES,
|
||||
confirm_period: 12 * MINUTES,
|
||||
min_enactment_period: 3 * MINUTES,
|
||||
min_approval: APP_BIG_TIPPER,
|
||||
min_support: SUP_BIG_TIPPER,
|
||||
},
|
||||
),
|
||||
(
|
||||
32,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "small_spender",
|
||||
max_deciding: 50,
|
||||
decision_deposit: 100 * 3 * CENTS,
|
||||
prepare_period: 10 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 10 * MINUTES,
|
||||
min_enactment_period: 5 * MINUTES,
|
||||
min_approval: APP_SMALL_SPENDER,
|
||||
min_support: SUP_SMALL_SPENDER,
|
||||
},
|
||||
),
|
||||
(
|
||||
33,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "medium_spender",
|
||||
max_deciding: 50,
|
||||
decision_deposit: 200 * 3 * CENTS,
|
||||
prepare_period: 10 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 12 * MINUTES,
|
||||
min_enactment_period: 5 * MINUTES,
|
||||
min_approval: APP_MEDIUM_SPENDER,
|
||||
min_support: SUP_MEDIUM_SPENDER,
|
||||
},
|
||||
),
|
||||
(
|
||||
34,
|
||||
pallet_referenda::TrackInfo {
|
||||
name: "big_spender",
|
||||
max_deciding: 50,
|
||||
decision_deposit: 400 * 3 * CENTS,
|
||||
prepare_period: 10 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 14 * MINUTES,
|
||||
min_enactment_period: 5 * MINUTES,
|
||||
min_approval: APP_BIG_SPENDER,
|
||||
min_support: SUP_BIG_SPENDER,
|
||||
},
|
||||
),
|
||||
];
|
||||
|
||||
pub struct TracksInfo;
|
||||
impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
|
||||
type Id = u16;
|
||||
type RuntimeOrigin = <RuntimeOrigin as frame_support::traits::OriginTrait>::PalletsOrigin;
|
||||
|
||||
fn tracks() -> &'static [(Self::Id, pallet_referenda::TrackInfo<Balance, BlockNumber>)] {
|
||||
&TRACKS_DATA[..]
|
||||
fn tracks() -> impl Iterator<Item = Cow<'static, Track<Self::Id, Balance, BlockNumber>>> {
|
||||
static DATA: [Track<u16, Balance, BlockNumber>; 10] = [
|
||||
Track {
|
||||
id: 0u16,
|
||||
info: pallet_referenda::TrackInfo {
|
||||
name: s("root"),
|
||||
max_deciding: 1,
|
||||
decision_deposit: 100 * GRAND,
|
||||
prepare_period: 8 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 12 * MINUTES,
|
||||
min_enactment_period: 5 * MINUTES,
|
||||
min_approval: APP_ROOT,
|
||||
min_support: SUP_ROOT,
|
||||
},
|
||||
},
|
||||
Track {
|
||||
id: 1u16,
|
||||
info: pallet_referenda::TrackInfo {
|
||||
name: s("whitelisted_caller"),
|
||||
max_deciding: 100,
|
||||
decision_deposit: 10 * GRAND,
|
||||
prepare_period: 6 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 4 * MINUTES,
|
||||
min_enactment_period: 3 * MINUTES,
|
||||
min_approval: APP_WHITELISTED_CALLER,
|
||||
min_support: SUP_WHITELISTED_CALLER,
|
||||
},
|
||||
},
|
||||
Track {
|
||||
id: 11u16,
|
||||
info: pallet_referenda::TrackInfo {
|
||||
name: s("treasurer"),
|
||||
max_deciding: 10,
|
||||
decision_deposit: GRAND,
|
||||
prepare_period: 8 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 8 * MINUTES,
|
||||
min_enactment_period: 5 * MINUTES,
|
||||
min_approval: APP_TREASURER,
|
||||
min_support: SUP_TREASURER,
|
||||
},
|
||||
},
|
||||
Track {
|
||||
id: 20u16,
|
||||
info: pallet_referenda::TrackInfo {
|
||||
name: s("referendum_canceller"),
|
||||
max_deciding: 1_000,
|
||||
decision_deposit: 10 * GRAND,
|
||||
prepare_period: 8 * MINUTES,
|
||||
decision_period: 14 * MINUTES,
|
||||
confirm_period: 8 * MINUTES,
|
||||
min_enactment_period: 3 * MINUTES,
|
||||
min_approval: APP_REFERENDUM_CANCELLER,
|
||||
min_support: SUP_REFERENDUM_CANCELLER,
|
||||
},
|
||||
},
|
||||
Track {
|
||||
id: 21u16,
|
||||
info: pallet_referenda::TrackInfo {
|
||||
name: s("referendum_killer"),
|
||||
max_deciding: 1_000,
|
||||
decision_deposit: 50 * GRAND,
|
||||
prepare_period: 8 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 8 * MINUTES,
|
||||
min_enactment_period: 3 * MINUTES,
|
||||
min_approval: APP_REFERENDUM_KILLER,
|
||||
min_support: SUP_REFERENDUM_KILLER,
|
||||
},
|
||||
},
|
||||
Track {
|
||||
id: 30u16,
|
||||
info: pallet_referenda::TrackInfo {
|
||||
name: s("small_tipper"),
|
||||
max_deciding: 200,
|
||||
decision_deposit: 3 * CENTS,
|
||||
prepare_period: MINUTES,
|
||||
decision_period: 14 * MINUTES,
|
||||
confirm_period: 4 * MINUTES,
|
||||
min_enactment_period: MINUTES,
|
||||
min_approval: APP_SMALL_TIPPER,
|
||||
min_support: SUP_SMALL_TIPPER,
|
||||
},
|
||||
},
|
||||
Track {
|
||||
id: 31u16,
|
||||
info: pallet_referenda::TrackInfo {
|
||||
name: s("big_tipper"),
|
||||
max_deciding: 100,
|
||||
decision_deposit: 10 * 3 * CENTS,
|
||||
prepare_period: 4 * MINUTES,
|
||||
decision_period: 14 * MINUTES,
|
||||
confirm_period: 12 * MINUTES,
|
||||
min_enactment_period: 3 * MINUTES,
|
||||
min_approval: APP_BIG_TIPPER,
|
||||
min_support: SUP_BIG_TIPPER,
|
||||
},
|
||||
},
|
||||
Track {
|
||||
id: 32u16,
|
||||
info: pallet_referenda::TrackInfo {
|
||||
name: s("small_spender"),
|
||||
max_deciding: 50,
|
||||
decision_deposit: 100 * 3 * CENTS,
|
||||
prepare_period: 10 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 10 * MINUTES,
|
||||
min_enactment_period: 5 * MINUTES,
|
||||
min_approval: APP_SMALL_SPENDER,
|
||||
min_support: SUP_SMALL_SPENDER,
|
||||
},
|
||||
},
|
||||
Track {
|
||||
id: 33u16,
|
||||
info: pallet_referenda::TrackInfo {
|
||||
name: s("medium_spender"),
|
||||
max_deciding: 50,
|
||||
decision_deposit: 200 * 3 * CENTS,
|
||||
prepare_period: 10 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 12 * MINUTES,
|
||||
min_enactment_period: 5 * MINUTES,
|
||||
min_approval: APP_MEDIUM_SPENDER,
|
||||
min_support: SUP_MEDIUM_SPENDER,
|
||||
},
|
||||
},
|
||||
Track {
|
||||
id: 34u16,
|
||||
info: pallet_referenda::TrackInfo {
|
||||
name: s("big_spender"),
|
||||
max_deciding: 50,
|
||||
decision_deposit: 400 * 3 * CENTS,
|
||||
prepare_period: 10 * MINUTES,
|
||||
decision_period: 20 * MINUTES,
|
||||
confirm_period: 14 * MINUTES,
|
||||
min_enactment_period: 5 * MINUTES,
|
||||
min_approval: APP_BIG_SPENDER,
|
||||
min_support: SUP_BIG_SPENDER,
|
||||
},
|
||||
},
|
||||
];
|
||||
DATA.iter().map(Cow::Borrowed)
|
||||
}
|
||||
|
||||
fn track_for(id: &Self::RuntimeOrigin) -> Result<Self::Id, ()> {
|
||||
@@ -211,7 +215,6 @@ impl pallet_referenda::TracksInfo<Balance, BlockNumber> for TracksInfo {
|
||||
}
|
||||
}
|
||||
}
|
||||
pallet_referenda::impl_tracksinfo_get!(TracksInfo, Balance, BlockNumber);
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
@@ -45,7 +45,9 @@ use openzeppelin_pallet_abstractions::{
|
||||
use openzeppelin_pallet_abstractions::{impl_openzeppelin_tanssi, TanssiConfig, TanssiWeight};
|
||||
use pallet_asset_tx_payment::HandleCredit;
|
||||
use pallet_ethereum::PostLogContent;
|
||||
use pallet_evm::{EVMCurrencyAdapter, EnsureAccountId20, IdentityAddressMapping};
|
||||
use pallet_evm::{
|
||||
EVMCurrencyAdapter, EnsureAccountId20, FrameSystemAccountProvider, IdentityAddressMapping,
|
||||
};
|
||||
use parachains_common::{
|
||||
impls::AccountIdOf,
|
||||
message_queue::{NarrowOriginToSibling, ParaIdToSibling},
|
||||
@@ -87,7 +89,7 @@ use crate::{
|
||||
constants::{
|
||||
currency::{deposit, CENTS, EXISTENTIAL_DEPOSIT, MICROCENTS, MILLICENTS},
|
||||
AVERAGE_ON_INITIALIZE_RATIO, DAYS, MAXIMUM_BLOCK_WEIGHT, MAX_BLOCK_LENGTH,
|
||||
NORMAL_DISPATCH_RATIO, SLOT_DURATION, WEIGHT_PER_GAS,
|
||||
NORMAL_DISPATCH_RATIO, SLOT_DURATION, VERSION, WEIGHT_PER_GAS,
|
||||
},
|
||||
opaque,
|
||||
types::{
|
||||
|
||||
@@ -8,7 +8,7 @@ use frame_support::{
|
||||
use orml_traits::{location::Reserve, parameter_type_with_key};
|
||||
use orml_xcm_support::MultiNativeAsset;
|
||||
use pallet_xcm::XcmPassthrough;
|
||||
use parity_scale_codec::{Decode, Encode};
|
||||
use parity_scale_codec::{Decode, DecodeWithMemTracking, Encode};
|
||||
use polkadot_parachain_primitives::primitives::{self, Sibling};
|
||||
use scale_info::TypeInfo;
|
||||
use sp_core::H160;
|
||||
@@ -312,7 +312,9 @@ parameter_type_with_key! {
|
||||
}
|
||||
|
||||
// Our currencyId. We distinguish for now between SelfReserve, and Others, defined by their Id.
|
||||
#[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)]
|
||||
#[derive(
|
||||
Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, DecodeWithMemTracking, TypeInfo,
|
||||
)]
|
||||
pub enum CurrencyId {
|
||||
// Our native token
|
||||
SelfReserve,
|
||||
@@ -483,7 +485,9 @@ impl frame_support::traits::Contains<Location> for AssetFeesFilter {
|
||||
// For now we only allow to transact in the relay, although this might change in the future
|
||||
// Transactors just defines the chains in which we allow transactions to be issued through
|
||||
// xcm
|
||||
#[derive(Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, TypeInfo)]
|
||||
#[derive(
|
||||
Clone, Eq, Debug, PartialEq, Ord, PartialOrd, Encode, Decode, DecodeWithMemTracking, TypeInfo,
|
||||
)]
|
||||
pub enum Transactors {
|
||||
Relay,
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
// Make the WASM binary available.
|
||||
#[cfg(feature = "std")]
|
||||
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
|
||||
|
||||
@@ -6,7 +6,7 @@ use frame_support::{parameter_types, traits::InstanceFilter, weights::Weight, Pa
|
||||
use frame_system::EnsureRoot;
|
||||
#[cfg(not(feature = "tanssi"))]
|
||||
use pallet_xcm::{EnsureXcm, IsVoiceOfBody};
|
||||
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
|
||||
use parity_scale_codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
|
||||
use polkadot_runtime_common::impls::{
|
||||
LocatableAssetConverter, VersionedLocatableAsset, VersionedLocationConverter,
|
||||
};
|
||||
@@ -42,7 +42,7 @@ pub use crate::{
|
||||
|
||||
/// Unchecked extrinsic type as expected by this runtime.
|
||||
pub type UncheckedExtrinsic =
|
||||
fp_self_contained::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;
|
||||
fp_self_contained::UncheckedExtrinsic<Address, RuntimeCall, Signature, TxExtension>;
|
||||
|
||||
/// Ethereum Signature
|
||||
pub type Signature = EthereumSignature;
|
||||
@@ -74,19 +74,21 @@ pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
|
||||
/// Block type as expected by this runtime.
|
||||
pub type Block = generic::Block<Header, UncheckedExtrinsic>;
|
||||
|
||||
/// The SignedExtension to the basic transaction logic.
|
||||
pub type SignedExtra = (
|
||||
frame_system::CheckNonZeroSender<Runtime>,
|
||||
frame_system::CheckSpecVersion<Runtime>,
|
||||
frame_system::CheckTxVersion<Runtime>,
|
||||
frame_system::CheckGenesis<Runtime>,
|
||||
frame_system::CheckEra<Runtime>,
|
||||
frame_system::CheckNonce<Runtime>,
|
||||
frame_system::CheckWeight<Runtime>,
|
||||
pallet_asset_tx_payment::ChargeAssetTxPayment<Runtime>,
|
||||
frame_metadata_hash_extension::CheckMetadataHash<Runtime>,
|
||||
cumulus_primitives_storage_weight_reclaim::StorageWeightReclaim<Runtime>,
|
||||
);
|
||||
/// The TransactionExtension to the basic transaction logic.
|
||||
pub type TxExtension = cumulus_pallet_weight_reclaim::StorageWeightReclaim<
|
||||
Runtime,
|
||||
(
|
||||
frame_system::CheckNonZeroSender<Runtime>,
|
||||
frame_system::CheckSpecVersion<Runtime>,
|
||||
frame_system::CheckTxVersion<Runtime>,
|
||||
frame_system::CheckGenesis<Runtime>,
|
||||
frame_system::CheckEra<Runtime>,
|
||||
frame_system::CheckNonce<Runtime>,
|
||||
frame_system::CheckWeight<Runtime>,
|
||||
pallet_asset_tx_payment::ChargeAssetTxPayment<Runtime>,
|
||||
frame_metadata_hash_extension::CheckMetadataHash<Runtime>,
|
||||
),
|
||||
>;
|
||||
|
||||
/// Executive: handles dispatch to the various modules.
|
||||
pub type Executive = frame_executive::Executive<
|
||||
@@ -144,6 +146,7 @@ pub type TreasuryPaymaster = PayOverXcm<
|
||||
Copy,
|
||||
Clone,
|
||||
Decode,
|
||||
DecodeWithMemTracking,
|
||||
Default,
|
||||
Encode,
|
||||
Eq,
|
||||
|
||||
@@ -53,8 +53,31 @@ impl<T: frame_system::Config> cumulus_pallet_xcmp_queue::WeightInfo for WeightIn
|
||||
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
|
||||
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
|
||||
/// Storage: `MessageQueue::Pages` (r:0 w:1)
|
||||
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(65585), added: 68060, mode: `MaxEncodedLen`)
|
||||
fn enqueue_xcmp_message() -> Weight {
|
||||
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
|
||||
/// The range of component `n` is `[1, 105467]`.
|
||||
fn enqueue_n_bytes_xcmp_message(n: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `82`
|
||||
// Estimated: `5487`
|
||||
// Minimum execution time: 12_977_000 picoseconds.
|
||||
Weight::from_parts(9_165_318, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5487))
|
||||
// Standard Error: 6
|
||||
.saturating_add(Weight::from_parts(943, 0).saturating_mul(n.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(4))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
/// Storage: `XcmpQueue::QueueConfig` (r:1 w:0)
|
||||
/// Proof: `XcmpQueue::QueueConfig` (`max_values`: Some(1), `max_size`: Some(12), added: 507, mode: `MaxEncodedLen`)
|
||||
/// Storage: `MessageQueue::BookStateFor` (r:1 w:1)
|
||||
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
|
||||
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||
/// Storage: `XcmpQueue::InboundXcmpSuspended` (r:1 w:0)
|
||||
/// Proof: `XcmpQueue::InboundXcmpSuspended` (`max_values`: Some(1), `max_size`: Some(4002), added: 4497, mode: `MaxEncodedLen`)
|
||||
/// Storage: `MessageQueue::Pages` (r:0 w:1)
|
||||
/// Proof: `MessageQueue::Pages` (`max_values`: None, `max_size`: Some(105521), added: 107996, mode: `MaxEncodedLen`)
|
||||
fn enqueue_2_empty_xcmp_messages() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `82`
|
||||
// Estimated: `5487`
|
||||
|
||||
@@ -109,6 +109,20 @@ impl<T: frame_system::Config> pallet_message_queue::WeightInfo for WeightInfo<T>
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
.saturating_add(T::DbWeight::get().writes(2))
|
||||
}
|
||||
/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
|
||||
/// Proof: `MessageQueue::BookStateFor` (`max_values`: None, `max_size`: Some(52), added: 2527, mode: `MaxEncodedLen`)
|
||||
/// Storage: `MessageQueue::ServiceHead` (r:0 w:1)
|
||||
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||
fn set_service_head() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `198`
|
||||
// Estimated: `3517`
|
||||
// Minimum execution time: 7_257_000 picoseconds.
|
||||
Weight::from_parts(7_582_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 3517))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `MessageQueue::ServiceHead` (r:1 w:1)
|
||||
/// Proof: `MessageQueue::ServiceHead` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `MaxEncodedLen`)
|
||||
/// Storage: `MessageQueue::BookStateFor` (r:1 w:0)
|
||||
|
||||
@@ -144,4 +144,19 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Multisig::Multisigs` (r:1 w:1)
|
||||
/// Proof: `Multisig::Multisigs` (`max_values`: None, `max_size`: Some(3346), added: 5821, mode: `MaxEncodedLen`)
|
||||
/// The range of component `s` is `[2, 100]`.
|
||||
fn poke_deposit(s: u32, ) -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `487 + s * (1 ±0)`
|
||||
// Estimated: `6811`
|
||||
// Minimum execution time: 29_451_000 picoseconds.
|
||||
Weight::from_parts(31_338_818, 0)
|
||||
.saturating_add(Weight::from_parts(0, 6811))
|
||||
// Standard Error: 1_549
|
||||
.saturating_add(Weight::from_parts(147_032, 0).saturating_mul(s.into()))
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,4 +205,20 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `Proxy::Proxies` (r:1 w:1)
|
||||
/// Proof: `Proxy::Proxies` (`max_values`: None, `max_size`: Some(1241), added: 3716, mode: `MaxEncodedLen`)
|
||||
/// Storage: `System::Account` (r:1 w:1)
|
||||
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(128), added: 2603, mode: `MaxEncodedLen`)
|
||||
/// Storage: `Proxy::Announcements` (r:1 w:1)
|
||||
/// Proof: `Proxy::Announcements` (`max_values`: None, `max_size`: Some(2233), added: 4708, mode: `MaxEncodedLen`)
|
||||
fn poke_deposit() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `487`
|
||||
// Estimated: `5698`
|
||||
// Minimum execution time: 47_219_000 picoseconds.
|
||||
Weight::from_parts(48_694_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 5698))
|
||||
.saturating_add(T::DbWeight::get().reads(3))
|
||||
.saturating_add(T::DbWeight::get().writes(3))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,4 +81,20 @@ impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> {
|
||||
// Standard Error: 3_876
|
||||
.saturating_add(Weight::from_parts(4_814_960, 0).saturating_mul(c.into()))
|
||||
}
|
||||
fn dispatch_as_fallible() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 6_848_000 picoseconds.
|
||||
Weight::from_parts(7_202_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
fn if_else() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `0`
|
||||
// Estimated: `0`
|
||||
// Minimum execution time: 8_510_000 picoseconds.
|
||||
Weight::from_parts(8_903_000, 0)
|
||||
.saturating_add(Weight::from_parts(0, 0))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,28 @@ use core::marker::PhantomData;
|
||||
/// Weight functions for `pallet_xcm`.
|
||||
pub struct WeightInfo<T>(PhantomData<T>);
|
||||
impl<T: frame_system::Config> pallet_xcm::WeightInfo for WeightInfo<T> {
|
||||
/// Storage: `PolkadotXcm::AuthorizedAliases` (r:1 w:1)
|
||||
/// Proof: `PolkadotXcm::AuthorizedAliases` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn add_authorized_alias() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `498`
|
||||
// Estimated: `3963`
|
||||
// Minimum execution time: 19_789_000 picoseconds.
|
||||
Weight::from_parts(20_317_000, 3963)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `PolkadotXcm::AuthorizedAliases` (r:1 w:1)
|
||||
/// Proof: `PolkadotXcm::AuthorizedAliases` (`max_values`: None, `max_size`: None, mode: `Measured`)
|
||||
fn remove_authorized_alias() -> Weight {
|
||||
// Proof Size summary in bytes:
|
||||
// Measured: `537`
|
||||
// Estimated: `4002`
|
||||
// Minimum execution time: 20_805_000 picoseconds.
|
||||
Weight::from_parts(21_481_000, 4002)
|
||||
.saturating_add(T::DbWeight::get().reads(1))
|
||||
.saturating_add(T::DbWeight::get().writes(1))
|
||||
}
|
||||
/// Storage: `ParachainSystem::HostConfiguration` (r:1 w:0)
|
||||
/// Proof: `ParachainSystem::HostConfiguration` (`max_values`: Some(1), `max_size`: None, mode: `Measured`)
|
||||
/// Storage: `ParachainSystem::PendingUpwardMessages` (r:1 w:1)
|
||||
|
||||
Reference in New Issue
Block a user