ci: add quick-check with rustfmt (#615)

* ci: add quick-check with clippy and rustfmt

* chore: rustfmt round

* chore: set the same rustfmt config than substrate

* chore: fix formatting

* cI: remove clippy

* ci: switch to nightly for the checks

* ci: fix toolchains and naming

* ci: Limit the check to formatting

* chore: fix formatting

* Update .rustfmt.toml

* Update .rustfmt.toml

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Chevdor
2021-09-16 16:57:52 +02:00
committed by GitHub
parent 035a576008
commit 1dd000a011
98 changed files with 1244 additions and 1872 deletions
@@ -22,9 +22,9 @@ pub use pallet::*;
#[frame_support::pallet]
pub mod pallet {
use cumulus_primitives_core::ParaId;
use frame_support::pallet_prelude::*;
use frame_system::pallet_prelude::*;
use cumulus_primitives_core::ParaId;
#[pallet::pallet]
#[pallet::generate_store(pub(super) trait Store)]
@@ -47,9 +47,7 @@ pub mod pallet {
#[cfg(feature = "std")]
impl Default for GenesisConfig {
fn default() -> Self {
Self {
parachain_id: 100.into()
}
Self { parachain_id: 100.into() }
}
}
@@ -61,11 +59,14 @@ pub mod pallet {
}
#[pallet::type_value]
pub(super) fn DefaultForParachainId() -> ParaId { 100.into() }
pub(super) fn DefaultForParachainId() -> ParaId {
100.into()
}
#[pallet::storage]
#[pallet::getter(fn parachain_id)]
pub(super) type ParachainId<T: Config> = StorageValue<_, ParaId, ValueQuery, DefaultForParachainId>;
pub(super) type ParachainId<T: Config> =
StorageValue<_, ParaId, ValueQuery, DefaultForParachainId>;
impl<T: Config> Get<ParaId> for Pallet<T> {
fn get() -> ParaId {
+46 -33
View File
@@ -18,20 +18,20 @@
#![cfg_attr(not(feature = "std"), no_std)]
use cumulus_pallet_xcm::{ensure_sibling_para, Origin as CumulusOrigin};
use cumulus_primitives_core::ParaId;
use frame_system::Config as SystemConfig;
use sp_runtime::traits::Saturating;
use sp_std::prelude::*;
use xcm::latest::prelude::*;
use sp_runtime::traits::Saturating;
use frame_system::Config as SystemConfig;
use cumulus_primitives_core::ParaId;
use cumulus_pallet_xcm::{Origin as CumulusOrigin, ensure_sibling_para};
pub use pallet::*;
#[frame_support::pallet]
pub mod pallet {
use super::*;
use frame_support::pallet_prelude::*;
use frame_system::pallet_prelude::*;
use super::*;
#[pallet::pallet]
#[pallet::generate_store(pub(super) trait Store)]
@@ -43,7 +43,8 @@ pub mod pallet {
/// The overarching event type.
type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>;
type Origin: From<<Self as SystemConfig>::Origin> + Into<Result<CumulusOrigin, <Self as Config>::Origin>>;
type Origin: From<<Self as SystemConfig>::Origin>
+ Into<Result<CumulusOrigin, <Self as Config>::Origin>>;
/// The overarching call type; we assume sibling chains use the same type.
type Call: From<Call<Self>> + Encode;
@@ -53,29 +54,16 @@ pub mod pallet {
/// The target parachains to ping.
#[pallet::storage]
pub(super) type Targets<T: Config> = StorageValue<
_,
Vec<(ParaId, Vec<u8>)>,
ValueQuery,
>;
pub(super) type Targets<T: Config> = StorageValue<_, Vec<(ParaId, Vec<u8>)>, ValueQuery>;
/// The total number of pings sent.
#[pallet::storage]
pub(super) type PingCount<T: Config> = StorageValue<
_,
u32,
ValueQuery,
>;
pub(super) type PingCount<T: Config> = StorageValue<_, u32, ValueQuery>;
/// The sent pings.
#[pallet::storage]
pub(super) type Pings<T: Config> = StorageMap<
_,
Blake2_128Concat,
u32,
T::BlockNumber,
OptionQuery,
>;
pub(super) type Pings<T: Config> =
StorageMap<_, Blake2_128Concat, u32, T::BlockNumber, OptionQuery>;
#[pallet::event]
#[pallet::generate_deposit(pub(super) fn deposit_event)]
@@ -94,17 +82,23 @@ pub mod pallet {
#[pallet::hooks]
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
fn on_finalize(
n: T::BlockNumber,
) {
fn on_finalize(n: T::BlockNumber) {
for (para, payload) in Targets::<T>::get().into_iter() {
let seq = PingCount::<T>::mutate(|seq| { *seq += 1; *seq });
let seq = PingCount::<T>::mutate(|seq| {
*seq += 1;
*seq
});
match T::XcmSender::send_xcm(
(1, Junction::Parachain(para.into())).into(),
Xcm(vec![Transact {
origin_type: OriginKind::Native,
require_weight_at_most: 1_000,
call: <T as Config>::Call::from(Call::<T>::ping { seq, payload: payload.clone() }).encode().into(),
call: <T as Config>::Call::from(Call::<T>::ping {
seq,
payload: payload.clone(),
})
.encode()
.into(),
}]),
) {
Ok(()) => {
@@ -113,7 +107,7 @@ pub mod pallet {
},
Err(e) => {
Self::deposit_event(Event::ErrorSendingPing(e, para, seq, payload));
}
},
}
}
}
@@ -129,7 +123,12 @@ pub mod pallet {
}
#[pallet::weight(0)]
pub fn start_many(origin: OriginFor<T>, para: ParaId, count: u32, payload: Vec<u8>) -> DispatchResult {
pub fn start_many(
origin: OriginFor<T>,
para: ParaId,
count: u32,
payload: Vec<u8>,
) -> DispatchResult {
ensure_root(origin)?;
for _ in 0..count {
Targets::<T>::mutate(|t| t.push((para, payload.clone())));
@@ -140,7 +139,11 @@ pub mod pallet {
#[pallet::weight(0)]
pub fn stop(origin: OriginFor<T>, para: ParaId) -> DispatchResult {
ensure_root(origin)?;
Targets::<T>::mutate(|t| if let Some(p) = t.iter().position(|(p, _)| p == &para) { t.swap_remove(p); });
Targets::<T>::mutate(|t| {
if let Some(p) = t.iter().position(|(p, _)| p == &para) {
t.swap_remove(p);
}
});
Ok(())
}
@@ -166,7 +169,12 @@ pub mod pallet {
Xcm(vec![Transact {
origin_type: OriginKind::Native,
require_weight_at_most: 1_000,
call: <T as Config>::Call::from(Call::<T>::pong { seq, payload: payload.clone() } ).encode().into(),
call: <T as Config>::Call::from(Call::<T>::pong {
seq,
payload: payload.clone(),
})
.encode()
.into(),
}]),
) {
Ok(()) => Self::deposit_event(Event::PongSent(para, seq, payload)),
@@ -181,7 +189,12 @@ pub mod pallet {
let para = ensure_sibling_para(<T as Config>::Origin::from(origin))?;
if let Some(sent_at) = Pings::<T>::take(seq) {
Self::deposit_event(Event::Ponged(para, seq, payload, frame_system::Pallet::<T>::block_number().saturating_sub(sent_at)));
Self::deposit_event(Event::Ponged(
para,
seq,
payload,
frame_system::Pallet::<T>::block_number().saturating_sub(sent_at),
));
} else {
// Pong received for a ping we apparently didn't send?!
Self::deposit_event(Event::UnknownPong(para, seq, payload));
@@ -185,9 +185,7 @@ mod tests {
}
pub fn new_test_ext() -> sp_io::TestExternalities {
let mut t = frame_system::GenesisConfig::default()
.build_storage::<Test>()
.unwrap();
let mut t = frame_system::GenesisConfig::default().build_storage::<Test>().unwrap();
// We use default for brevity, but you can configure as desired if needed.
pallet_balances::GenesisConfig::<Test>::default()
.assimilate_storage(&mut t)
+1 -4
View File
@@ -107,10 +107,7 @@ pub const PRIMARY_PROBABILITY: (u64, u64) = (1, 4);
/// The version information used to identify this runtime when compiled natively.
#[cfg(feature = "std")]
pub fn native_version() -> NativeVersion {
NativeVersion {
runtime_version: VERSION,
can_author_with: Default::default(),
}
NativeVersion { runtime_version: VERSION, can_author_with: Default::default() }
}
/// We assume that ~10% of the block weight is consumed by `on_initalize` handlers.
+1 -4
View File
@@ -75,10 +75,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
/// The version information used to identify this runtime when compiled natively.
#[cfg(feature = "std")]
pub fn native_version() -> NativeVersion {
NativeVersion {
runtime_version: VERSION,
can_author_with: Default::default(),
}
NativeVersion { runtime_version: VERSION, can_author_with: Default::default() }
}
/// We assume that ~10% of the block weight is consumed by `on_initialize` handlers.
+18 -72
View File
@@ -72,10 +72,7 @@ pub fn get_chain_spec(id: ParaId) -> ChainSpec {
move || {
testnet_genesis(
get_account_id_from_seed::<sr25519::Public>("Alice"),
vec![
get_from_seed::<AuraId>("Alice"),
get_from_seed::<AuraId>("Bob"),
],
vec![get_from_seed::<AuraId>("Alice"), get_from_seed::<AuraId>("Bob")],
vec![
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_account_id_from_seed::<sr25519::Public>("Bob"),
@@ -97,10 +94,7 @@ pub fn get_chain_spec(id: ParaId) -> ChainSpec {
None,
None,
None,
Extensions {
relay_chain: "westend".into(),
para_id: id.into(),
},
Extensions { relay_chain: "westend".into(), para_id: id.into() },
)
}
@@ -114,10 +108,7 @@ pub fn get_shell_chain_spec(id: ParaId) -> ShellChainSpec {
None,
None,
None,
Extensions {
relay_chain: "westend".into(),
para_id: id.into(),
},
Extensions { relay_chain: "westend".into(), para_id: id.into() },
)
}
@@ -138,7 +129,7 @@ pub fn staging_test_net(id: ParaId) -> ChainSpec {
.unchecked_into(),
],
vec![
hex!["9ed7705e3c7da027ba0583a22a3212042f7e715d3c168ba14f1424e2bc111d00"].into(),
hex!["9ed7705e3c7da027ba0583a22a3212042f7e715d3c168ba14f1424e2bc111d00"].into()
],
id,
)
@@ -147,10 +138,7 @@ pub fn staging_test_net(id: ParaId) -> ChainSpec {
None,
None,
None,
Extensions {
relay_chain: "westend".into(),
para_id: id.into(),
},
Extensions { relay_chain: "westend".into(), para_id: id.into() },
)
}
@@ -168,17 +156,11 @@ fn testnet_genesis(
changes_trie_config: Default::default(),
},
balances: rococo_parachain_runtime::BalancesConfig {
balances: endowed_accounts
.iter()
.cloned()
.map(|k| (k, 1 << 60))
.collect(),
balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(),
},
sudo: rococo_parachain_runtime::SudoConfig { key: root_key },
parachain_info: rococo_parachain_runtime::ParachainInfoConfig { parachain_id: id },
aura: rococo_parachain_runtime::AuraConfig {
authorities: initial_authorities,
},
aura: rococo_parachain_runtime::AuraConfig { authorities: initial_authorities },
aura_ext: Default::default(),
parachain_system: Default::default(),
}
@@ -277,10 +259,7 @@ pub fn statemint_development_config(id: ParaId) -> StatemintChainSpec {
None,
None,
Some(properties),
Extensions {
relay_chain: "polkadot-dev".into(),
para_id: id.into(),
},
Extensions { relay_chain: "polkadot-dev".into(), para_id: id.into() },
)
}
@@ -329,10 +308,7 @@ pub fn statemint_local_config(id: ParaId) -> StatemintChainSpec {
None,
None,
Some(properties),
Extensions {
relay_chain: "polkadot-local".into(),
para_id: id.into(),
},
Extensions { relay_chain: "polkadot-local".into(), para_id: id.into() },
)
}
@@ -349,11 +325,7 @@ fn statemint_genesis(
changes_trie_config: Default::default(),
},
balances: statemint_runtime::BalancesConfig {
balances: endowed_accounts
.iter()
.cloned()
.map(|k| (k, STATEMINT_ED * 4096))
.collect(),
balances: endowed_accounts.iter().cloned().map(|k| (k, STATEMINT_ED * 4096)).collect(),
},
parachain_info: statemint_runtime::ParachainInfoConfig { parachain_id: id },
collator_selection: statemint_runtime::CollatorSelectionConfig {
@@ -413,10 +385,7 @@ pub fn statemine_development_config(id: ParaId) -> StatemineChainSpec {
None,
None,
Some(properties),
Extensions {
relay_chain: "kusama-dev".into(),
para_id: id.into(),
},
Extensions { relay_chain: "kusama-dev".into(), para_id: id.into() },
)
}
@@ -465,10 +434,7 @@ pub fn statemine_local_config(id: ParaId) -> StatemineChainSpec {
None,
None,
Some(properties),
Extensions {
relay_chain: "kusama-local".into(),
para_id: id.into(),
},
Extensions { relay_chain: "kusama-local".into(), para_id: id.into() },
)
}
@@ -520,10 +486,7 @@ pub fn statemine_config(id: ParaId) -> StatemineChainSpec {
None,
None,
Some(properties),
Extensions {
relay_chain: "kusama".into(),
para_id: id.into(),
},
Extensions { relay_chain: "kusama".into(), para_id: id.into() },
)
}
@@ -540,11 +503,7 @@ fn statemine_genesis(
changes_trie_config: Default::default(),
},
balances: statemine_runtime::BalancesConfig {
balances: endowed_accounts
.iter()
.cloned()
.map(|k| (k, STATEMINE_ED * 4096))
.collect(),
balances: endowed_accounts.iter().cloned().map(|k| (k, STATEMINE_ED * 4096)).collect(),
},
parachain_info: statemine_runtime::ParachainInfoConfig { parachain_id: id },
collator_selection: statemine_runtime::CollatorSelectionConfig {
@@ -603,10 +562,7 @@ pub fn westmint_development_config(id: ParaId) -> WestmintChainSpec {
None,
None,
Some(properties),
Extensions {
relay_chain: "westend".into(),
para_id: id.into(),
},
Extensions { relay_chain: "westend".into(), para_id: id.into() },
)
}
@@ -656,10 +612,7 @@ pub fn westmint_local_config(id: ParaId) -> WestmintChainSpec {
None,
None,
Some(properties),
Extensions {
relay_chain: "westend-local".into(),
para_id: id.into(),
},
Extensions { relay_chain: "westend-local".into(), para_id: id.into() },
)
}
@@ -713,10 +666,7 @@ pub fn westmint_config(id: ParaId) -> WestmintChainSpec {
None,
None,
Some(properties),
Extensions {
relay_chain: "westend".into(),
para_id: id.into(),
},
Extensions { relay_chain: "westend".into(), para_id: id.into() },
)
}
@@ -734,11 +684,7 @@ fn westmint_genesis(
changes_trie_config: Default::default(),
},
balances: westmint_runtime::BalancesConfig {
balances: endowed_accounts
.iter()
.cloned()
.map(|k| (k, WESTMINT_ED * 4096))
.collect(),
balances: endowed_accounts.iter().cloned().map(|k| (k, WESTMINT_ED * 4096)).collect(),
},
sudo: westmint_runtime::SudoConfig { key: root_key },
parachain_info: westmint_runtime::ParachainInfoConfig { parachain_id: id },
+2 -9
View File
@@ -132,14 +132,7 @@ impl RelayChainCli {
) -> Self {
let extension = chain_spec::Extensions::try_get(&*para_config.chain_spec);
let chain_id = extension.map(|e| e.relay_chain.clone());
let base_path = para_config
.base_path
.as_ref()
.map(|x| x.path().join("polkadot"));
Self {
base_path,
chain_id,
base: polkadot_cli::RunCmd::from_iter(relay_chain_args),
}
let base_path = para_config.base_path.as_ref().map(|x| x.path().join("polkadot"));
Self { base_path, chain_id, base: polkadot_cli::RunCmd::from_iter(relay_chain_args) }
}
}
+14 -26
View File
@@ -124,7 +124,7 @@ fn load_spec(
} else {
Box::new(chain_spec)
}
}
},
})
}
@@ -292,27 +292,27 @@ pub fn run() -> Result<()> {
Some(Subcommand::BuildSpec(cmd)) => {
let runner = cli.create_runner(cmd)?;
runner.sync_run(|config| cmd.run(config.chain_spec, config.network))
}
},
Some(Subcommand::CheckBlock(cmd)) => {
construct_async_run!(|components, cli, cmd, config| {
Ok(cmd.run(components.client, components.import_queue))
})
}
},
Some(Subcommand::ExportBlocks(cmd)) => {
construct_async_run!(|components, cli, cmd, config| {
Ok(cmd.run(components.client, config.database))
})
}
},
Some(Subcommand::ExportState(cmd)) => {
construct_async_run!(|components, cli, cmd, config| {
Ok(cmd.run(components.client, config.chain_spec))
})
}
},
Some(Subcommand::ImportBlocks(cmd)) => {
construct_async_run!(|components, cli, cmd, config| {
Ok(cmd.run(components.client, components.import_queue))
})
}
},
Some(Subcommand::PurgeChain(cmd)) => {
let runner = cli.create_runner(cmd)?;
@@ -333,7 +333,7 @@ pub fn run() -> Result<()> {
cmd.run(config, polkadot_config)
})
}
},
Some(Subcommand::Revert(cmd)) => construct_async_run!(|components, cli, cmd, config| {
Ok(cmd.run(components.client, components.backend))
}),
@@ -360,7 +360,7 @@ pub fn run() -> Result<()> {
}
Ok(())
}
},
Some(Subcommand::ExportGenesisWasm(params)) => {
let mut builder = sc_cli::LoggerBuilder::new("");
builder.with_profiling(sc_tracing::TracingReceiver::Log, "");
@@ -381,8 +381,8 @@ pub fn run() -> Result<()> {
}
Ok(())
}
Some(Subcommand::Benchmark(cmd)) => {
},
Some(Subcommand::Benchmark(cmd)) =>
if cfg!(feature = "runtime-benchmarks") {
let runner = cli.create_runner(cmd)?;
if runner.config().chain_spec.is_statemine() {
@@ -398,8 +398,7 @@ pub fn run() -> Result<()> {
Err("Benchmarking wasn't enabled when building the node. \
You can enable it with `--features runtime-benchmarks`."
.into())
}
}
},
None => {
let runner = cli.create_runner(&cli.run.normalize())?;
@@ -431,14 +430,7 @@ pub fn run() -> Result<()> {
info!("Parachain id: {:?}", id);
info!("Parachain Account: {}", parachain_account);
info!("Parachain genesis state: {}", genesis_state);
info!(
"Is collating: {}",
if config.role.is_authority() {
"yes"
} else {
"no"
}
);
info!("Is collating: {}", if config.role.is_authority() { "yes" } else { "no" });
if config.chain_spec.is_statemint() {
crate::service::start_statemint_node::<
@@ -476,7 +468,7 @@ pub fn run() -> Result<()> {
.map_err(Into::into)
}
})
}
},
}
}
@@ -545,11 +537,7 @@ impl CliConfiguration<Self> for RelayChainCli {
fn chain_id(&self, is_dev: bool) -> Result<String> {
let chain_id = self.base.base.chain_id(is_dev)?;
Ok(if chain_id.is_empty() {
self.chain_id.clone().unwrap_or_default()
} else {
chain_id
})
Ok(if chain_id.is_empty() { self.chain_id.clone().unwrap_or_default() } else { chain_id })
}
fn role(&self, is_dev: bool) -> Result<sc_service::Role> {
+3 -13
View File
@@ -61,20 +61,10 @@ where
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApi};
let mut io = jsonrpc_core::IoHandler::default();
let FullDeps {
client,
pool,
deny_unsafe,
} = deps;
let FullDeps { client, pool, deny_unsafe } = deps;
io.extend_with(SystemApi::to_delegate(FullSystem::new(
client.clone(),
pool,
deny_unsafe,
)));
io.extend_with(TransactionPaymentApi::to_delegate(TransactionPayment::new(
client.clone(),
)));
io.extend_with(SystemApi::to_delegate(FullSystem::new(client.clone(), pool, deny_unsafe)));
io.extend_with(TransactionPaymentApi::to_delegate(TransactionPayment::new(client.clone())));
io
}
+26 -43
View File
@@ -308,7 +308,7 @@ where
) -> Result<Box<dyn ParachainConsensus<Block>>, sc_service::Error>,
{
if matches!(parachain_config.role, Role::Light) {
return Err("Light client not supported!".into());
return Err("Light client not supported!".into())
}
let parachain_config = prepare_node_config(parachain_config);
@@ -486,7 +486,7 @@ where
) -> Result<Box<dyn ParachainConsensus<Block>>, sc_service::Error>,
{
if matches!(parachain_config.role, Role::Light) {
return Err("Light client not supported!".into());
return Err("Light client not supported!".into())
}
let parachain_config = prepare_node_config(parachain_config);
@@ -800,13 +800,7 @@ pub async fn start_shell_node(
TFullClient<Block, shell_runtime::RuntimeApi, NativeElseWasmExecutor<ShellRuntimeExecutor>>,
>,
)> {
start_shell_node_impl::<
shell_runtime::RuntimeApi,
ShellRuntimeExecutor,
_,
_,
_,
>(
start_shell_node_impl::<shell_runtime::RuntimeApi, ShellRuntimeExecutor, _, _, _>(
parachain_config,
polkadot_config,
id,
@@ -832,17 +826,15 @@ pub async fn start_shell_node(
let relay_chain_backend = relay_chain_node.backend.clone();
let relay_chain_client = relay_chain_node.client.clone();
Ok(
cumulus_client_consensus_relay_chain::build_relay_chain_consensus(
cumulus_client_consensus_relay_chain::BuildRelayChainConsensusParams {
para_id: id,
proposer_factory,
block_import: client.clone(),
relay_chain_client: relay_chain_node.client.clone(),
relay_chain_backend: relay_chain_node.backend.clone(),
create_inherent_data_providers:
move |_, (relay_parent, validation_data)| {
let parachain_inherent =
Ok(cumulus_client_consensus_relay_chain::build_relay_chain_consensus(
cumulus_client_consensus_relay_chain::BuildRelayChainConsensusParams {
para_id: id,
proposer_factory,
block_import: client.clone(),
relay_chain_client: relay_chain_node.client.clone(),
relay_chain_backend: relay_chain_node.backend.clone(),
create_inherent_data_providers: move |_, (relay_parent, validation_data)| {
let parachain_inherent =
cumulus_primitives_parachain_inherent::ParachainInherentData::create_at_with_client(
relay_parent,
&relay_chain_client,
@@ -850,19 +842,17 @@ pub async fn start_shell_node(
&validation_data,
id,
);
async move {
let parachain_inherent =
parachain_inherent.ok_or_else(|| {
Box::<dyn std::error::Error + Send + Sync>::from(
"Failed to create parachain inherent",
)
})?;
Ok(parachain_inherent)
}
},
async move {
let parachain_inherent = parachain_inherent.ok_or_else(|| {
Box::<dyn std::error::Error + Send + Sync>::from(
"Failed to create parachain inherent",
)
})?;
Ok(parachain_inherent)
}
},
),
)
},
))
},
)
.await
@@ -879,7 +869,7 @@ impl<R> BuildOnAccess<R> {
match self {
Self::Uninitialized(f) => {
*self = Self::Initialized((f.take().unwrap())());
}
},
Self::Initialized(ref mut r) => return r,
}
}
@@ -954,13 +944,7 @@ where
async fn verify(
&mut self,
block_import: BlockImportParams<Block, ()>,
) -> Result<
(
BlockImportParams<Block, ()>,
Option<Vec<(CacheKeyId, Vec<u8>)>>,
),
String,
> {
) -> Result<(BlockImportParams<Block, ()>, Option<Vec<(CacheKeyId, Vec<u8>)>>), String> {
let block_id = BlockId::hash(*block_import.header.parent_hash());
if self
@@ -1036,9 +1020,8 @@ where
})) as Box<_>
};
let relay_chain_verifier = Box::new(RelayChainVerifier::new(client.clone(), |_, _| async {
Ok(())
})) as Box<_>;
let relay_chain_verifier =
Box::new(RelayChainVerifier::new(client.clone(), |_, _| async { Ok(()) })) as Box<_>;
let verifier = Verifier {
client: client.clone(),
@@ -32,13 +32,13 @@ pub mod currency {
/// Fee-related.
pub mod fee {
use node_primitives::Balance;
pub use sp_runtime::Perbill;
use frame_support::weights::{
constants::ExtrinsicBaseWeight, WeightToFeeCoefficient, WeightToFeeCoefficients,
WeightToFeePolynomial,
};
use node_primitives::Balance;
use smallvec::smallvec;
pub use sp_runtime::Perbill;
/// The block saturation level. Fees will be updates based on this value.
pub const TARGET_BLOCK_FULLNESS: Perbill = Perbill::from_percent(25);
+49 -45
View File
@@ -99,10 +99,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
/// The version information used to identify this runtime when compiled natively.
#[cfg(feature = "std")]
pub fn native_version() -> NativeVersion {
NativeVersion {
runtime_version: VERSION,
can_author_with: Default::default(),
}
NativeVersion { runtime_version: VERSION, can_author_with: Default::default() }
}
parameter_types! {
@@ -320,7 +317,16 @@ parameter_types! {
/// The type used to represent the kinds of proxying allowed.
#[derive(
Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug, MaxEncodedLen,
Copy,
Clone,
Eq,
PartialEq,
Ord,
PartialOrd,
Encode,
Decode,
RuntimeDebug,
MaxEncodedLen,
scale_info::TypeInfo,
)]
pub enum ProxyType {
@@ -348,58 +354,56 @@ impl InstanceFilter<Call> for ProxyType {
fn filter(&self, c: &Call) -> bool {
match self {
ProxyType::Any => true,
ProxyType::NonTransfer => {
!matches!(c, Call::Balances { .. } | Call::Assets { .. } | Call::Uniques { .. })
}
ProxyType::NonTransfer =>
!matches!(c, Call::Balances { .. } | Call::Assets { .. } | Call::Uniques { .. }),
ProxyType::CancelProxy => matches!(
c,
Call::Proxy(pallet_proxy::Call::reject_announcement { .. })
| Call::Utility { .. } | Call::Multisig { .. }
Call::Proxy(pallet_proxy::Call::reject_announcement { .. }) |
Call::Utility { .. } | Call::Multisig { .. }
),
ProxyType::Assets => {
matches!(
c,
Call::Assets { .. }
| Call::Utility { .. }
| Call::Multisig { .. }
| Call::Uniques { .. }
Call::Assets { .. } |
Call::Utility { .. } | Call::Multisig { .. } |
Call::Uniques { .. }
)
}
},
ProxyType::AssetOwner => matches!(
c,
Call::Assets(pallet_assets::Call::create { .. })
| Call::Assets(pallet_assets::Call::destroy { .. })
| Call::Assets(pallet_assets::Call::transfer_ownership { .. })
| Call::Assets(pallet_assets::Call::set_team { .. })
| Call::Assets(pallet_assets::Call::set_metadata { .. })
| Call::Assets(pallet_assets::Call::clear_metadata { .. })
| Call::Uniques(pallet_uniques::Call::create { .. })
| Call::Uniques(pallet_uniques::Call::destroy { .. })
| Call::Uniques(pallet_uniques::Call::transfer_ownership { .. })
| Call::Uniques(pallet_uniques::Call::set_team { .. })
| Call::Uniques(pallet_uniques::Call::set_metadata { .. })
| Call::Uniques(pallet_uniques::Call::set_attribute { .. })
| Call::Uniques(pallet_uniques::Call::set_class_metadata { .. })
| Call::Uniques(pallet_uniques::Call::clear_metadata { .. })
| Call::Uniques(pallet_uniques::Call::clear_attribute { .. })
| Call::Uniques(pallet_uniques::Call::clear_class_metadata { .. })
| Call::Utility { .. } | Call::Multisig { .. }
Call::Assets(pallet_assets::Call::create { .. }) |
Call::Assets(pallet_assets::Call::destroy { .. }) |
Call::Assets(pallet_assets::Call::transfer_ownership { .. }) |
Call::Assets(pallet_assets::Call::set_team { .. }) |
Call::Assets(pallet_assets::Call::set_metadata { .. }) |
Call::Assets(pallet_assets::Call::clear_metadata { .. }) |
Call::Uniques(pallet_uniques::Call::create { .. }) |
Call::Uniques(pallet_uniques::Call::destroy { .. }) |
Call::Uniques(pallet_uniques::Call::transfer_ownership { .. }) |
Call::Uniques(pallet_uniques::Call::set_team { .. }) |
Call::Uniques(pallet_uniques::Call::set_metadata { .. }) |
Call::Uniques(pallet_uniques::Call::set_attribute { .. }) |
Call::Uniques(pallet_uniques::Call::set_class_metadata { .. }) |
Call::Uniques(pallet_uniques::Call::clear_metadata { .. }) |
Call::Uniques(pallet_uniques::Call::clear_attribute { .. }) |
Call::Uniques(pallet_uniques::Call::clear_class_metadata { .. }) |
Call::Utility { .. } | Call::Multisig { .. }
),
ProxyType::AssetManager => matches!(
c,
Call::Assets(pallet_assets::Call::mint { .. })
| Call::Assets(pallet_assets::Call::burn { .. })
| Call::Assets(pallet_assets::Call::freeze { .. })
| Call::Assets(pallet_assets::Call::thaw { .. })
| Call::Assets(pallet_assets::Call::freeze_asset { .. })
| Call::Assets(pallet_assets::Call::thaw_asset { .. })
| Call::Uniques(pallet_uniques::Call::mint { .. })
| Call::Uniques(pallet_uniques::Call::burn { .. })
| Call::Uniques(pallet_uniques::Call::freeze { .. })
| Call::Uniques(pallet_uniques::Call::thaw { .. })
| Call::Uniques(pallet_uniques::Call::freeze_class { .. })
| Call::Uniques(pallet_uniques::Call::thaw_class { .. })
| Call::Utility { .. } | Call::Multisig { .. }
Call::Assets(pallet_assets::Call::mint { .. }) |
Call::Assets(pallet_assets::Call::burn { .. }) |
Call::Assets(pallet_assets::Call::freeze { .. }) |
Call::Assets(pallet_assets::Call::thaw { .. }) |
Call::Assets(pallet_assets::Call::freeze_asset { .. }) |
Call::Assets(pallet_assets::Call::thaw_asset { .. }) |
Call::Uniques(pallet_uniques::Call::mint { .. }) |
Call::Uniques(pallet_uniques::Call::burn { .. }) |
Call::Uniques(pallet_uniques::Call::freeze { .. }) |
Call::Uniques(pallet_uniques::Call::thaw { .. }) |
Call::Uniques(pallet_uniques::Call::freeze_class { .. }) |
Call::Uniques(pallet_uniques::Call::thaw_class { .. }) |
Call::Utility { .. } | Call::Multisig { .. }
),
ProxyType::Collator => matches!(
c,
@@ -1,7 +1,7 @@
pub mod pallet_assets;
pub mod pallet_balances;
pub mod pallet_multisig;
pub mod pallet_collator_selection;
pub mod pallet_multisig;
pub mod pallet_proxy;
pub mod pallet_session;
pub mod pallet_timestamp;
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_assets
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./runtime/statemine/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -38,7 +36,7 @@ impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn destroy(c: u32, s: u32, a: u32, ) -> Weight {
fn destroy(c: u32, s: u32, a: u32) -> Weight {
(0 as Weight)
// Standard Error: 37_000
.saturating_add((21_529_000 as Weight).saturating_mul(c as Weight))
@@ -109,7 +107,7 @@ impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_metadata(_n: u32, s: u32, ) -> Weight {
fn set_metadata(_n: u32, s: u32) -> Weight {
(50_315_000 as Weight)
// Standard Error: 0
.saturating_add((8_000 as Weight).saturating_mul(s as Weight))
@@ -121,7 +119,7 @@ impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn force_set_metadata(_n: u32, s: u32, ) -> Weight {
fn force_set_metadata(_n: u32, s: u32) -> Weight {
(25_933_000 as Weight)
// Standard Error: 0
.saturating_add((7_000 as Weight).saturating_mul(s as Weight))
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_balances
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./runtime/statemine/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_collator_selection
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./runtime/statemine/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -28,28 +26,26 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_collator_selection.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightInfo<T> {
fn set_invulnerables(b: u32, ) -> Weight {
fn set_invulnerables(b: u32) -> Weight {
(18_481_000 as Weight)
// Standard Error: 0
.saturating_add((67_000 as Weight).saturating_mul(b as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_desired_candidates() -> Weight {
(16_376_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
(16_376_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_candidacy_bond() -> Weight {
(17_031_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
(17_031_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn register_as_candidate(c: u32, ) -> Weight {
fn register_as_candidate(c: u32) -> Weight {
(72_345_000 as Weight)
// Standard Error: 0
.saturating_add((197_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn leave_intent(c: u32, ) -> Weight {
fn leave_intent(c: u32) -> Weight {
(55_446_000 as Weight)
// Standard Error: 0
.saturating_add((153_000 as Weight).saturating_mul(c as Weight))
@@ -61,7 +57,7 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
fn new_session(r: u32, c: u32, ) -> Weight {
fn new_session(r: u32, c: u32) -> Weight {
(0 as Weight)
// Standard Error: 1_004_000
.saturating_add((110_066_000 as Weight).saturating_mul(r as Weight))
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_multisig
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./runtime/statemine/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -28,12 +26,12 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_multisig.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
fn as_multi_threshold_1(z: u32, ) -> Weight {
fn as_multi_threshold_1(z: u32) -> Weight {
(15_911_000 as Weight)
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
}
fn as_multi_create(s: u32, z: u32, ) -> Weight {
fn as_multi_create(s: u32, z: u32) -> Weight {
(55_326_000 as Weight)
// Standard Error: 0
.saturating_add((133_000 as Weight).saturating_mul(s as Weight))
@@ -42,7 +40,7 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn as_multi_create_store(s: u32, z: u32, ) -> Weight {
fn as_multi_create_store(s: u32, z: u32) -> Weight {
(62_423_000 as Weight)
// Standard Error: 0
.saturating_add((133_000 as Weight).saturating_mul(s as Weight))
@@ -51,7 +49,7 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
fn as_multi_approve(s: u32, z: u32) -> Weight {
(32_430_000 as Weight)
// Standard Error: 0
.saturating_add((148_000 as Weight).saturating_mul(s as Weight))
@@ -60,7 +58,7 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn as_multi_approve_store(s: u32, z: u32, ) -> Weight {
fn as_multi_approve_store(s: u32, z: u32) -> Weight {
(59_789_000 as Weight)
// Standard Error: 0
.saturating_add((165_000 as Weight).saturating_mul(s as Weight))
@@ -69,7 +67,7 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
fn as_multi_complete(s: u32, z: u32) -> Weight {
(80_926_000 as Weight)
// Standard Error: 0
.saturating_add((276_000 as Weight).saturating_mul(s as Weight))
@@ -78,28 +76,28 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn approve_as_multi_create(s: u32, ) -> Weight {
fn approve_as_multi_create(s: u32) -> Weight {
(54_860_000 as Weight)
// Standard Error: 0
.saturating_add((134_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn approve_as_multi_approve(s: u32, ) -> Weight {
fn approve_as_multi_approve(s: u32) -> Weight {
(31_924_000 as Weight)
// Standard Error: 0
.saturating_add((154_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn approve_as_multi_complete(s: u32, ) -> Weight {
fn approve_as_multi_complete(s: u32) -> Weight {
(154_001_000 as Weight)
// Standard Error: 0
.saturating_add((281_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn cancel_as_multi(s: u32, ) -> Weight {
fn cancel_as_multi(s: u32) -> Weight {
(103_770_000 as Weight)
// Standard Error: 0
.saturating_add((130_000 as Weight).saturating_mul(s as Weight))
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_proxy
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./runtime/statemine/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -28,13 +26,13 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_proxy.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
fn proxy(p: u32, ) -> Weight {
fn proxy(p: u32) -> Weight {
(27_318_000 as Weight)
// Standard Error: 1_000
.saturating_add((208_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
}
fn proxy_announced(a: u32, p: u32, ) -> Weight {
fn proxy_announced(a: u32, p: u32) -> Weight {
(60_665_000 as Weight)
// Standard Error: 2_000
.saturating_add((677_000 as Weight).saturating_mul(a as Weight))
@@ -43,7 +41,7 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn remove_announcement(a: u32, p: u32, ) -> Weight {
fn remove_announcement(a: u32, p: u32) -> Weight {
(39_455_000 as Weight)
// Standard Error: 2_000
.saturating_add((687_000 as Weight).saturating_mul(a as Weight))
@@ -52,7 +50,7 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn reject_announcement(a: u32, p: u32, ) -> Weight {
fn reject_announcement(a: u32, p: u32) -> Weight {
(39_411_000 as Weight)
// Standard Error: 2_000
.saturating_add((686_000 as Weight).saturating_mul(a as Weight))
@@ -61,7 +59,7 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn announce(a: u32, p: u32, ) -> Weight {
fn announce(a: u32, p: u32) -> Weight {
(54_386_000 as Weight)
// Standard Error: 2_000
.saturating_add((677_000 as Weight).saturating_mul(a as Weight))
@@ -70,35 +68,35 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn add_proxy(p: u32, ) -> Weight {
fn add_proxy(p: u32) -> Weight {
(37_411_000 as Weight)
// Standard Error: 2_000
.saturating_add((298_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn remove_proxy(p: u32, ) -> Weight {
fn remove_proxy(p: u32) -> Weight {
(36_658_000 as Weight)
// Standard Error: 2_000
.saturating_add((332_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn remove_proxies(p: u32, ) -> Weight {
fn remove_proxies(p: u32) -> Weight {
(34_893_000 as Weight)
// Standard Error: 1_000
.saturating_add((209_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn anonymous(p: u32, ) -> Weight {
fn anonymous(p: u32) -> Weight {
(51_243_000 as Weight)
// Standard Error: 1_000
.saturating_add((44_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn kill_anonymous(p: u32, ) -> Weight {
fn kill_anonymous(p: u32) -> Weight {
(37_188_000 as Weight)
// Standard Error: 1_000
.saturating_add((208_000 as Weight).saturating_mul(p as Weight))
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_session
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./polkadot-parachains/statemine-runtime/src/weights
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_timestamp
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./runtime/statemine/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -34,7 +34,6 @@
// --header=./file_header.txt
// --output=./polkadot-parachains/statemine-runtime/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -54,7 +53,7 @@ impl<T: frame_system::Config> pallet_uniques::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn destroy(n: u32, m: u32, a: u32, ) -> Weight {
fn destroy(n: u32, m: u32, a: u32) -> Weight {
(0 as Weight)
// Standard Error: 14_000
.saturating_add((16_814_000 as Weight).saturating_mul(n as Weight))
@@ -84,7 +83,7 @@ impl<T: frame_system::Config> pallet_uniques::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn redeposit(i: u32, ) -> Weight {
fn redeposit(i: u32) -> Weight {
(0 as Weight)
// Standard Error: 11_000
.saturating_add((26_921_000 as Weight).saturating_mul(i as Weight))
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_utility
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./runtime/statemine/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -28,7 +26,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_utility.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> {
fn batch(c: u32, ) -> Weight {
fn batch(c: u32) -> Weight {
(16_177_000 as Weight)
// Standard Error: 0
.saturating_add((4_582_000 as Weight).saturating_mul(c as Weight))
@@ -36,7 +34,7 @@ impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> {
fn as_derivative() -> Weight {
(7_848_000 as Weight)
}
fn batch_all(c: u32, ) -> Weight {
fn batch_all(c: u32) -> Weight {
(17_745_000 as Weight)
// Standard Error: 0
.saturating_add((4_578_000 as Weight).saturating_mul(c as Weight))
@@ -21,7 +21,7 @@ pub mod currency {
pub const UNITS: Balance = 10_000_000_000;
pub const DOLLARS: Balance = UNITS;
pub const CENTS: Balance = UNITS / 100; // 100_000_000
pub const CENTS: Balance = UNITS / 100; // 100_000_000
pub const MILLICENTS: Balance = CENTS / 1_000; // 100_000
pub const fn deposit(items: u32, bytes: u32) -> Balance {
@@ -32,13 +32,13 @@ pub mod currency {
/// Fee-related.
pub mod fee {
use node_primitives::Balance;
pub use sp_runtime::Perbill;
use frame_support::weights::{
constants::ExtrinsicBaseWeight, WeightToFeeCoefficient, WeightToFeeCoefficients,
WeightToFeePolynomial,
};
use node_primitives::Balance;
use smallvec::smallvec;
pub use sp_runtime::Perbill;
/// The block saturation level. Fees will be updates based on this value.
pub const TARGET_BLOCK_FULLNESS: Perbill = Perbill::from_percent(25);
+51 -45
View File
@@ -99,10 +99,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
/// The version information used to identify this runtime when compiled natively.
#[cfg(feature = "std")]
pub fn native_version() -> NativeVersion {
NativeVersion {
runtime_version: VERSION,
can_author_with: Default::default(),
}
NativeVersion { runtime_version: VERSION, can_author_with: Default::default() }
}
parameter_types! {
@@ -287,7 +284,16 @@ parameter_types! {
/// The type used to represent the kinds of proxying allowed.
#[derive(
Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug, MaxEncodedLen,
Copy,
Clone,
Eq,
PartialEq,
Ord,
PartialOrd,
Encode,
Decode,
RuntimeDebug,
MaxEncodedLen,
scale_info::TypeInfo,
)]
pub enum ProxyType {
@@ -315,63 +321,63 @@ impl InstanceFilter<Call> for ProxyType {
fn filter(&self, c: &Call) -> bool {
match self {
ProxyType::Any => true,
ProxyType::NonTransfer => {
!matches!(c, Call::Balances { .. } | Call::Assets { .. } | Call::Uniques { .. })
}
ProxyType::NonTransfer =>
!matches!(c, Call::Balances { .. } | Call::Assets { .. } | Call::Uniques { .. }),
ProxyType::CancelProxy => matches!(
c,
Call::Proxy(pallet_proxy::Call::reject_announcement { .. })
| Call::Utility { .. } | Call::Multisig { .. }
Call::Proxy(pallet_proxy::Call::reject_announcement { .. }) |
Call::Utility { .. } | Call::Multisig { .. }
),
ProxyType::Assets => {
matches!(
c,
Call::Assets { .. }
| Call::Utility { .. }
| Call::Multisig { .. }
| Call::Uniques { .. }
Call::Assets { .. } |
Call::Utility { .. } | Call::Multisig { .. } |
Call::Uniques { .. }
)
}
},
ProxyType::AssetOwner => matches!(
c,
Call::Assets(pallet_assets::Call::create { .. })
| Call::Assets(pallet_assets::Call::destroy { .. })
| Call::Assets(pallet_assets::Call::transfer_ownership { .. })
| Call::Assets(pallet_assets::Call::set_team { .. })
| Call::Assets(pallet_assets::Call::set_metadata { .. })
| Call::Assets(pallet_assets::Call::clear_metadata { .. })
| Call::Uniques(pallet_uniques::Call::create { .. })
| Call::Uniques(pallet_uniques::Call::destroy { .. })
| Call::Uniques(pallet_uniques::Call::transfer_ownership { .. })
| Call::Uniques(pallet_uniques::Call::set_team { .. })
| Call::Uniques(pallet_uniques::Call::set_metadata { .. })
| Call::Uniques(pallet_uniques::Call::set_attribute { .. })
| Call::Uniques(pallet_uniques::Call::set_class_metadata { .. })
| Call::Uniques(pallet_uniques::Call::clear_metadata { .. })
| Call::Uniques(pallet_uniques::Call::clear_attribute { .. })
| Call::Uniques(pallet_uniques::Call::clear_class_metadata { .. })
| Call::Utility { .. } | Call::Multisig { .. }
Call::Assets(pallet_assets::Call::create { .. }) |
Call::Assets(pallet_assets::Call::destroy { .. }) |
Call::Assets(pallet_assets::Call::transfer_ownership { .. }) |
Call::Assets(pallet_assets::Call::set_team { .. }) |
Call::Assets(pallet_assets::Call::set_metadata { .. }) |
Call::Assets(pallet_assets::Call::clear_metadata { .. }) |
Call::Uniques(pallet_uniques::Call::create { .. }) |
Call::Uniques(pallet_uniques::Call::destroy { .. }) |
Call::Uniques(pallet_uniques::Call::transfer_ownership { .. }) |
Call::Uniques(pallet_uniques::Call::set_team { .. }) |
Call::Uniques(pallet_uniques::Call::set_metadata { .. }) |
Call::Uniques(pallet_uniques::Call::set_attribute { .. }) |
Call::Uniques(pallet_uniques::Call::set_class_metadata { .. }) |
Call::Uniques(pallet_uniques::Call::clear_metadata { .. }) |
Call::Uniques(pallet_uniques::Call::clear_attribute { .. }) |
Call::Uniques(pallet_uniques::Call::clear_class_metadata { .. }) |
Call::Utility { .. } | Call::Multisig { .. }
),
ProxyType::AssetManager => matches!(
c,
Call::Assets(pallet_assets::Call::mint { .. })
| Call::Assets(pallet_assets::Call::burn { .. })
| Call::Assets(pallet_assets::Call::freeze { .. })
| Call::Assets(pallet_assets::Call::thaw { .. })
| Call::Assets(pallet_assets::Call::freeze_asset { .. })
| Call::Assets(pallet_assets::Call::thaw_asset { .. })
| Call::Uniques(pallet_uniques::Call::mint { .. })
| Call::Uniques(pallet_uniques::Call::burn { .. })
| Call::Uniques(pallet_uniques::Call::freeze { .. })
| Call::Uniques(pallet_uniques::Call::thaw { .. })
| Call::Uniques(pallet_uniques::Call::freeze_class { .. })
| Call::Uniques(pallet_uniques::Call::thaw_class { .. })
| Call::Utility { .. } | Call::Multisig { .. }
Call::Assets(pallet_assets::Call::mint { .. }) |
Call::Assets(pallet_assets::Call::burn { .. }) |
Call::Assets(pallet_assets::Call::freeze { .. }) |
Call::Assets(pallet_assets::Call::thaw { .. }) |
Call::Assets(pallet_assets::Call::freeze_asset { .. }) |
Call::Assets(pallet_assets::Call::thaw_asset { .. }) |
Call::Uniques(pallet_uniques::Call::mint { .. }) |
Call::Uniques(pallet_uniques::Call::burn { .. }) |
Call::Uniques(pallet_uniques::Call::freeze { .. }) |
Call::Uniques(pallet_uniques::Call::thaw { .. }) |
Call::Uniques(pallet_uniques::Call::freeze_class { .. }) |
Call::Uniques(pallet_uniques::Call::thaw_class { .. }) |
Call::Utility { .. } | Call::Multisig { .. }
),
ProxyType::Collator => matches!(
c,
Call::CollatorSelection { .. } | Call::Utility { .. } | Call::Multisig { .. }
),
ProxyType::Collator =>
matches!(c, Call::CollatorSelection(..) | Call::Utility(..) | Call::Multisig(..)),
}
}
fn is_superset(&self, o: &Self) -> bool {
@@ -1,7 +1,7 @@
pub mod pallet_assets;
pub mod pallet_balances;
pub mod pallet_multisig;
pub mod pallet_collator_selection;
pub mod pallet_multisig;
pub mod pallet_proxy;
pub mod pallet_session;
pub mod pallet_timestamp;
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_assets
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./runtime/statemint/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -38,7 +36,7 @@ impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn destroy(c: u32, s: u32, a: u32, ) -> Weight {
fn destroy(c: u32, s: u32, a: u32) -> Weight {
(0 as Weight)
// Standard Error: 37_000
.saturating_add((21_822_000 as Weight).saturating_mul(c as Weight))
@@ -109,7 +107,7 @@ impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_metadata(_n: u32, s: u32, ) -> Weight {
fn set_metadata(_n: u32, s: u32) -> Weight {
(50_330_000 as Weight)
// Standard Error: 0
.saturating_add((9_000 as Weight).saturating_mul(s as Weight))
@@ -121,7 +119,7 @@ impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn force_set_metadata(_n: u32, s: u32, ) -> Weight {
fn force_set_metadata(_n: u32, s: u32) -> Weight {
(26_249_000 as Weight)
// Standard Error: 0
.saturating_add((6_000 as Weight).saturating_mul(s as Weight))
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_balances
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./runtime/statemint/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_collator_selection
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./runtime/statemint/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -28,28 +26,26 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_collator_selection.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightInfo<T> {
fn set_invulnerables(b: u32, ) -> Weight {
fn set_invulnerables(b: u32) -> Weight {
(18_563_000 as Weight)
// Standard Error: 0
.saturating_add((68_000 as Weight).saturating_mul(b as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_desired_candidates() -> Weight {
(16_363_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
(16_363_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_candidacy_bond() -> Weight {
(16_840_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
(16_840_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn register_as_candidate(c: u32, ) -> Weight {
fn register_as_candidate(c: u32) -> Weight {
(71_196_000 as Weight)
// Standard Error: 0
.saturating_add((198_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn leave_intent(c: u32, ) -> Weight {
fn leave_intent(c: u32) -> Weight {
(55_336_000 as Weight)
// Standard Error: 0
.saturating_add((151_000 as Weight).saturating_mul(c as Weight))
@@ -61,7 +57,7 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
fn new_session(r: u32, c: u32, ) -> Weight {
fn new_session(r: u32, c: u32) -> Weight {
(0 as Weight)
// Standard Error: 1_010_000
.saturating_add((109_961_000 as Weight).saturating_mul(r as Weight))
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_multisig
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./runtime/statemint/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -28,12 +26,12 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_multisig.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
fn as_multi_threshold_1(z: u32, ) -> Weight {
fn as_multi_threshold_1(z: u32) -> Weight {
(14_936_000 as Weight)
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
}
fn as_multi_create(s: u32, z: u32, ) -> Weight {
fn as_multi_create(s: u32, z: u32) -> Weight {
(56_090_000 as Weight)
// Standard Error: 1_000
.saturating_add((63_000 as Weight).saturating_mul(s as Weight))
@@ -42,7 +40,7 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn as_multi_create_store(s: u32, z: u32, ) -> Weight {
fn as_multi_create_store(s: u32, z: u32) -> Weight {
(62_519_000 as Weight)
// Standard Error: 1_000
.saturating_add((66_000 as Weight).saturating_mul(s as Weight))
@@ -51,7 +49,7 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
fn as_multi_approve(s: u32, z: u32) -> Weight {
(30_781_000 as Weight)
// Standard Error: 0
.saturating_add((111_000 as Weight).saturating_mul(s as Weight))
@@ -60,7 +58,7 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn as_multi_approve_store(s: u32, z: u32, ) -> Weight {
fn as_multi_approve_store(s: u32, z: u32) -> Weight {
(60_393_000 as Weight)
// Standard Error: 0
.saturating_add((118_000 as Weight).saturating_mul(s as Weight))
@@ -69,7 +67,7 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
fn as_multi_complete(s: u32, z: u32) -> Weight {
(81_704_000 as Weight)
// Standard Error: 1_000
.saturating_add((248_000 as Weight).saturating_mul(s as Weight))
@@ -78,28 +76,28 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn approve_as_multi_create(s: u32, ) -> Weight {
fn approve_as_multi_create(s: u32) -> Weight {
(55_585_000 as Weight)
// Standard Error: 1_000
.saturating_add((115_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn approve_as_multi_approve(s: u32, ) -> Weight {
fn approve_as_multi_approve(s: u32) -> Weight {
(33_483_000 as Weight)
// Standard Error: 1_000
.saturating_add((82_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn approve_as_multi_complete(s: u32, ) -> Weight {
fn approve_as_multi_complete(s: u32) -> Weight {
(154_732_000 as Weight)
// Standard Error: 1_000
.saturating_add((253_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn cancel_as_multi(s: u32, ) -> Weight {
fn cancel_as_multi(s: u32) -> Weight {
(104_447_000 as Weight)
// Standard Error: 1_000
.saturating_add((114_000 as Weight).saturating_mul(s as Weight))
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_proxy
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./runtime/statemint/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -28,13 +26,13 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_proxy.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
fn proxy(p: u32, ) -> Weight {
fn proxy(p: u32) -> Weight {
(27_585_000 as Weight)
// Standard Error: 1_000
.saturating_add((203_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
}
fn proxy_announced(a: u32, p: u32, ) -> Weight {
fn proxy_announced(a: u32, p: u32) -> Weight {
(61_093_000 as Weight)
// Standard Error: 2_000
.saturating_add((680_000 as Weight).saturating_mul(a as Weight))
@@ -43,7 +41,7 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn remove_announcement(a: u32, p: u32, ) -> Weight {
fn remove_announcement(a: u32, p: u32) -> Weight {
(39_494_000 as Weight)
// Standard Error: 2_000
.saturating_add((686_000 as Weight).saturating_mul(a as Weight))
@@ -52,7 +50,7 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn reject_announcement(a: u32, p: u32, ) -> Weight {
fn reject_announcement(a: u32, p: u32) -> Weight {
(39_817_000 as Weight)
// Standard Error: 2_000
.saturating_add((685_000 as Weight).saturating_mul(a as Weight))
@@ -61,7 +59,7 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn announce(a: u32, p: u32, ) -> Weight {
fn announce(a: u32, p: u32) -> Weight {
(54_835_000 as Weight)
// Standard Error: 2_000
.saturating_add((684_000 as Weight).saturating_mul(a as Weight))
@@ -70,35 +68,35 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn add_proxy(p: u32, ) -> Weight {
fn add_proxy(p: u32) -> Weight {
(37_625_000 as Weight)
// Standard Error: 2_000
.saturating_add((300_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn remove_proxy(p: u32, ) -> Weight {
fn remove_proxy(p: u32) -> Weight {
(36_945_000 as Weight)
// Standard Error: 3_000
.saturating_add((325_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn remove_proxies(p: u32, ) -> Weight {
fn remove_proxies(p: u32) -> Weight {
(35_128_000 as Weight)
// Standard Error: 1_000
.saturating_add((209_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn anonymous(p: u32, ) -> Weight {
fn anonymous(p: u32) -> Weight {
(51_624_000 as Weight)
// Standard Error: 1_000
.saturating_add((41_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn kill_anonymous(p: u32, ) -> Weight {
fn kill_anonymous(p: u32) -> Weight {
(37_469_000 as Weight)
// Standard Error: 1_000
.saturating_add((204_000 as Weight).saturating_mul(p as Weight))
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_session
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./polkadot-parachains/statemint-runtime/src/weights
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_timestamp
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./runtime/statemint/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -34,7 +34,6 @@
// --header=./file_header.txt
// --output=./polkadot-parachains/statemine-runtime/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -54,7 +53,7 @@ impl<T: frame_system::Config> pallet_uniques::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn destroy(n: u32, m: u32, a: u32, ) -> Weight {
fn destroy(n: u32, m: u32, a: u32) -> Weight {
(0 as Weight)
// Standard Error: 14_000
.saturating_add((16_814_000 as Weight).saturating_mul(n as Weight))
@@ -84,7 +83,7 @@ impl<T: frame_system::Config> pallet_uniques::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn redeposit(i: u32, ) -> Weight {
fn redeposit(i: u32) -> Weight {
(0 as Weight)
// Standard Error: 11_000
.saturating_add((26_921_000 as Weight).saturating_mul(i as Weight))
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_utility
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./runtime/statemint/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -28,7 +26,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_utility.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> {
fn batch(c: u32, ) -> Weight {
fn batch(c: u32) -> Weight {
(15_408_000 as Weight)
// Standard Error: 0
.saturating_add((4_571_000 as Weight).saturating_mul(c as Weight))
@@ -36,7 +34,7 @@ impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> {
fn as_derivative() -> Weight {
(7_817_000 as Weight)
}
fn batch_all(c: u32, ) -> Weight {
fn batch_all(c: u32) -> Weight {
(16_520_000 as Weight)
// Standard Error: 0
.saturating_add((4_571_000 as Weight).saturating_mul(c as Weight))
@@ -48,10 +48,7 @@ fn polkadot_argument_parsing() {
.unwrap();
thread::sleep(Duration::from_secs(20));
assert!(
cmd.try_wait().unwrap().is_none(),
"the process should still be running"
);
assert!(cmd.try_wait().unwrap().is_none(), "the process should still be running");
kill(Pid::from_raw(cmd.id().try_into().unwrap()), signal).unwrap();
assert_eq!(
common::wait_for(&mut cmd, 30).map(|x| x.success()),
@@ -39,10 +39,7 @@ fn interrupt_polkadot_mdns_issue_test() {
.unwrap();
thread::sleep(Duration::from_secs(20));
assert!(
cmd.try_wait().unwrap().is_none(),
"the process should still be running"
);
assert!(cmd.try_wait().unwrap().is_none(), "the process should still be running");
kill(Pid::from_raw(cmd.id().try_into().unwrap()), signal).unwrap();
assert_eq!(
common::wait_for(&mut cmd, 30).map(|x| x.success()),
@@ -40,16 +40,11 @@ fn purge_chain_works() {
// Let it produce some blocks.
thread::sleep(Duration::from_secs(30));
assert!(
cmd.try_wait().unwrap().is_none(),
"the process should still be running"
);
assert!(cmd.try_wait().unwrap().is_none(), "the process should still be running");
// Stop the process
kill(Pid::from_raw(cmd.id().try_into().unwrap()), SIGINT).unwrap();
assert!(common::wait_for(&mut cmd, 30)
.map(|x| x.success())
.unwrap_or_default());
assert!(common::wait_for(&mut cmd, 30).map(|x| x.success()).unwrap_or_default());
base_path
}
@@ -39,10 +39,7 @@ fn running_the_node_works_and_can_be_interrupted() {
.unwrap();
thread::sleep(Duration::from_secs(30));
assert!(
cmd.try_wait().unwrap().is_none(),
"the process should still be running"
);
assert!(cmd.try_wait().unwrap().is_none(), "the process should still be running");
kill(Pid::from_raw(cmd.id().try_into().unwrap()), signal).unwrap();
assert_eq!(
common::wait_for(&mut cmd, 30).map(|x| x.success()),
@@ -32,13 +32,13 @@ pub mod currency {
/// Fee-related.
pub mod fee {
use node_primitives::Balance;
pub use sp_runtime::Perbill;
use frame_support::weights::{
constants::ExtrinsicBaseWeight, WeightToFeeCoefficient, WeightToFeeCoefficients,
WeightToFeePolynomial,
};
use node_primitives::Balance;
use smallvec::smallvec;
pub use sp_runtime::Perbill;
/// The block saturation level. Fees will be updates based on this value.
pub const TARGET_BLOCK_FULLNESS: Perbill = Perbill::from_percent(25);
+51 -45
View File
@@ -99,10 +99,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
/// The version information used to identify this runtime when compiled natively.
#[cfg(feature = "std")]
pub fn native_version() -> NativeVersion {
NativeVersion {
runtime_version: VERSION,
can_author_with: Default::default(),
}
NativeVersion { runtime_version: VERSION, can_author_with: Default::default() }
}
parameter_types! {
@@ -286,7 +283,16 @@ parameter_types! {
/// The type used to represent the kinds of proxying allowed.
#[derive(
Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug, MaxEncodedLen,
Copy,
Clone,
Eq,
PartialEq,
Ord,
PartialOrd,
Encode,
Decode,
RuntimeDebug,
MaxEncodedLen,
scale_info::TypeInfo,
)]
pub enum ProxyType {
@@ -314,63 +320,63 @@ impl InstanceFilter<Call> for ProxyType {
fn filter(&self, c: &Call) -> bool {
match self {
ProxyType::Any => true,
ProxyType::NonTransfer => {
!matches!(c, Call::Balances { .. } | Call::Assets { .. } | Call::Uniques { .. })
}
ProxyType::NonTransfer =>
!matches!(c, Call::Balances { .. } | Call::Assets { .. } | Call::Uniques { .. }),
ProxyType::CancelProxy => matches!(
c,
Call::Proxy(pallet_proxy::Call::reject_announcement { .. })
| Call::Utility { .. } | Call::Multisig { .. }
Call::Proxy(pallet_proxy::Call::reject_announcement { .. }) |
Call::Utility { .. } | Call::Multisig { .. }
),
ProxyType::Assets => {
matches!(
c,
Call::Assets { .. }
| Call::Utility { .. }
| Call::Multisig { .. }
| Call::Uniques { .. }
Call::Assets { .. } |
Call::Utility { .. } | Call::Multisig { .. } |
Call::Uniques { .. }
)
}
},
ProxyType::AssetOwner => matches!(
c,
Call::Assets(pallet_assets::Call::create { .. })
| Call::Assets(pallet_assets::Call::destroy { .. })
| Call::Assets(pallet_assets::Call::transfer_ownership { .. })
| Call::Assets(pallet_assets::Call::set_team { .. })
| Call::Assets(pallet_assets::Call::set_metadata { .. })
| Call::Assets(pallet_assets::Call::clear_metadata { .. })
| Call::Uniques(pallet_uniques::Call::create { .. })
| Call::Uniques(pallet_uniques::Call::destroy { .. })
| Call::Uniques(pallet_uniques::Call::transfer_ownership { .. })
| Call::Uniques(pallet_uniques::Call::set_team { .. })
| Call::Uniques(pallet_uniques::Call::set_metadata { .. })
| Call::Uniques(pallet_uniques::Call::set_attribute { .. })
| Call::Uniques(pallet_uniques::Call::set_class_metadata { .. })
| Call::Uniques(pallet_uniques::Call::clear_metadata { .. })
| Call::Uniques(pallet_uniques::Call::clear_attribute { .. })
| Call::Uniques(pallet_uniques::Call::clear_class_metadata { .. })
| Call::Utility { .. } | Call::Multisig { .. }
Call::Assets(pallet_assets::Call::create { .. }) |
Call::Assets(pallet_assets::Call::destroy { .. }) |
Call::Assets(pallet_assets::Call::transfer_ownership { .. }) |
Call::Assets(pallet_assets::Call::set_team { .. }) |
Call::Assets(pallet_assets::Call::set_metadata { .. }) |
Call::Assets(pallet_assets::Call::clear_metadata { .. }) |
Call::Uniques(pallet_uniques::Call::create { .. }) |
Call::Uniques(pallet_uniques::Call::destroy { .. }) |
Call::Uniques(pallet_uniques::Call::transfer_ownership { .. }) |
Call::Uniques(pallet_uniques::Call::set_team { .. }) |
Call::Uniques(pallet_uniques::Call::set_metadata { .. }) |
Call::Uniques(pallet_uniques::Call::set_attribute { .. }) |
Call::Uniques(pallet_uniques::Call::set_class_metadata { .. }) |
Call::Uniques(pallet_uniques::Call::clear_metadata { .. }) |
Call::Uniques(pallet_uniques::Call::clear_attribute { .. }) |
Call::Uniques(pallet_uniques::Call::clear_class_metadata { .. }) |
Call::Utility { .. } | Call::Multisig { .. }
),
ProxyType::AssetManager => matches!(
c,
Call::Assets(pallet_assets::Call::mint { .. })
| Call::Assets(pallet_assets::Call::burn { .. })
| Call::Assets(pallet_assets::Call::freeze { .. })
| Call::Assets(pallet_assets::Call::thaw { .. })
| Call::Assets(pallet_assets::Call::freeze_asset { .. })
| Call::Assets(pallet_assets::Call::thaw_asset { .. })
| Call::Uniques(pallet_uniques::Call::mint { .. })
| Call::Uniques(pallet_uniques::Call::burn { .. })
| Call::Uniques(pallet_uniques::Call::freeze { .. })
| Call::Uniques(pallet_uniques::Call::thaw { .. })
| Call::Uniques(pallet_uniques::Call::freeze_class { .. })
| Call::Uniques(pallet_uniques::Call::thaw_class { .. })
| Call::Utility { .. } | Call::Multisig { .. }
Call::Assets(pallet_assets::Call::mint { .. }) |
Call::Assets(pallet_assets::Call::burn { .. }) |
Call::Assets(pallet_assets::Call::freeze { .. }) |
Call::Assets(pallet_assets::Call::thaw { .. }) |
Call::Assets(pallet_assets::Call::freeze_asset { .. }) |
Call::Assets(pallet_assets::Call::thaw_asset { .. }) |
Call::Uniques(pallet_uniques::Call::mint { .. }) |
Call::Uniques(pallet_uniques::Call::burn { .. }) |
Call::Uniques(pallet_uniques::Call::freeze { .. }) |
Call::Uniques(pallet_uniques::Call::thaw { .. }) |
Call::Uniques(pallet_uniques::Call::freeze_class { .. }) |
Call::Uniques(pallet_uniques::Call::thaw_class { .. }) |
Call::Utility { .. } | Call::Multisig { .. }
),
ProxyType::Collator => matches!(
c,
Call::CollatorSelection { .. } | Call::Utility { .. } | Call::Multisig { .. }
),
ProxyType::Collator =>
matches!(c, Call::CollatorSelection(..) | Call::Utility(..) | Call::Multisig(..)),
}
}
fn is_superset(&self, o: &Self) -> bool {
@@ -1,7 +1,7 @@
pub mod pallet_assets;
pub mod pallet_balances;
pub mod pallet_multisig;
pub mod pallet_collator_selection;
pub mod pallet_multisig;
pub mod pallet_proxy;
pub mod pallet_session;
pub mod pallet_timestamp;
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_assets
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./runtime/statemint/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -38,7 +36,7 @@ impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn destroy(c: u32, s: u32, a: u32, ) -> Weight {
fn destroy(c: u32, s: u32, a: u32) -> Weight {
(0 as Weight)
// Standard Error: 37_000
.saturating_add((21_822_000 as Weight).saturating_mul(c as Weight))
@@ -109,7 +107,7 @@ impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_metadata(_n: u32, s: u32, ) -> Weight {
fn set_metadata(_n: u32, s: u32) -> Weight {
(50_330_000 as Weight)
// Standard Error: 0
.saturating_add((9_000 as Weight).saturating_mul(s as Weight))
@@ -121,7 +119,7 @@ impl<T: frame_system::Config> pallet_assets::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn force_set_metadata(_n: u32, s: u32, ) -> Weight {
fn force_set_metadata(_n: u32, s: u32) -> Weight {
(26_249_000 as Weight)
// Standard Error: 0
.saturating_add((6_000 as Weight).saturating_mul(s as Weight))
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_balances
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./runtime/statemint/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_collator_selection
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./runtime/statemint/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -28,28 +26,26 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_collator_selection.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightInfo<T> {
fn set_invulnerables(b: u32, ) -> Weight {
fn set_invulnerables(b: u32) -> Weight {
(18_563_000 as Weight)
// Standard Error: 0
.saturating_add((68_000 as Weight).saturating_mul(b as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_desired_candidates() -> Weight {
(16_363_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
(16_363_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn set_candidacy_bond() -> Weight {
(16_840_000 as Weight)
.saturating_add(T::DbWeight::get().writes(1 as Weight))
(16_840_000 as Weight).saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn register_as_candidate(c: u32, ) -> Weight {
fn register_as_candidate(c: u32) -> Weight {
(71_196_000 as Weight)
// Standard Error: 0
.saturating_add((198_000 as Weight).saturating_mul(c as Weight))
.saturating_add(T::DbWeight::get().reads(4 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn leave_intent(c: u32, ) -> Weight {
fn leave_intent(c: u32) -> Weight {
(55_336_000 as Weight)
// Standard Error: 0
.saturating_add((151_000 as Weight).saturating_mul(c as Weight))
@@ -61,7 +57,7 @@ impl<T: frame_system::Config> pallet_collator_selection::WeightInfo for WeightIn
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(4 as Weight))
}
fn new_session(r: u32, c: u32, ) -> Weight {
fn new_session(r: u32, c: u32) -> Weight {
(0 as Weight)
// Standard Error: 1_010_000
.saturating_add((109_961_000 as Weight).saturating_mul(r as Weight))
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_multisig
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./runtime/statemint/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -28,12 +26,12 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_multisig.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
fn as_multi_threshold_1(z: u32, ) -> Weight {
fn as_multi_threshold_1(z: u32) -> Weight {
(14_936_000 as Weight)
// Standard Error: 0
.saturating_add((1_000 as Weight).saturating_mul(z as Weight))
}
fn as_multi_create(s: u32, z: u32, ) -> Weight {
fn as_multi_create(s: u32, z: u32) -> Weight {
(56_090_000 as Weight)
// Standard Error: 1_000
.saturating_add((63_000 as Weight).saturating_mul(s as Weight))
@@ -42,7 +40,7 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn as_multi_create_store(s: u32, z: u32, ) -> Weight {
fn as_multi_create_store(s: u32, z: u32) -> Weight {
(62_519_000 as Weight)
// Standard Error: 1_000
.saturating_add((66_000 as Weight).saturating_mul(s as Weight))
@@ -51,7 +49,7 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn as_multi_approve(s: u32, z: u32, ) -> Weight {
fn as_multi_approve(s: u32, z: u32) -> Weight {
(30_781_000 as Weight)
// Standard Error: 0
.saturating_add((111_000 as Weight).saturating_mul(s as Weight))
@@ -60,7 +58,7 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn as_multi_approve_store(s: u32, z: u32, ) -> Weight {
fn as_multi_approve_store(s: u32, z: u32) -> Weight {
(60_393_000 as Weight)
// Standard Error: 0
.saturating_add((118_000 as Weight).saturating_mul(s as Weight))
@@ -69,7 +67,7 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn as_multi_complete(s: u32, z: u32, ) -> Weight {
fn as_multi_complete(s: u32, z: u32) -> Weight {
(81_704_000 as Weight)
// Standard Error: 1_000
.saturating_add((248_000 as Weight).saturating_mul(s as Weight))
@@ -78,28 +76,28 @@ impl<T: frame_system::Config> pallet_multisig::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn approve_as_multi_create(s: u32, ) -> Weight {
fn approve_as_multi_create(s: u32) -> Weight {
(55_585_000 as Weight)
// Standard Error: 1_000
.saturating_add((115_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn approve_as_multi_approve(s: u32, ) -> Weight {
fn approve_as_multi_approve(s: u32) -> Weight {
(33_483_000 as Weight)
// Standard Error: 1_000
.saturating_add((82_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn approve_as_multi_complete(s: u32, ) -> Weight {
fn approve_as_multi_complete(s: u32) -> Weight {
(154_732_000 as Weight)
// Standard Error: 1_000
.saturating_add((253_000 as Weight).saturating_mul(s as Weight))
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn cancel_as_multi(s: u32, ) -> Weight {
fn cancel_as_multi(s: u32) -> Weight {
(104_447_000 as Weight)
// Standard Error: 1_000
.saturating_add((114_000 as Weight).saturating_mul(s as Weight))
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_proxy
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./runtime/statemint/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -28,13 +26,13 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_proxy.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
fn proxy(p: u32, ) -> Weight {
fn proxy(p: u32) -> Weight {
(27_585_000 as Weight)
// Standard Error: 1_000
.saturating_add((203_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
}
fn proxy_announced(a: u32, p: u32, ) -> Weight {
fn proxy_announced(a: u32, p: u32) -> Weight {
(61_093_000 as Weight)
// Standard Error: 2_000
.saturating_add((680_000 as Weight).saturating_mul(a as Weight))
@@ -43,7 +41,7 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn remove_announcement(a: u32, p: u32, ) -> Weight {
fn remove_announcement(a: u32, p: u32) -> Weight {
(39_494_000 as Weight)
// Standard Error: 2_000
.saturating_add((686_000 as Weight).saturating_mul(a as Weight))
@@ -52,7 +50,7 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn reject_announcement(a: u32, p: u32, ) -> Weight {
fn reject_announcement(a: u32, p: u32) -> Weight {
(39_817_000 as Weight)
// Standard Error: 2_000
.saturating_add((685_000 as Weight).saturating_mul(a as Weight))
@@ -61,7 +59,7 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn announce(a: u32, p: u32, ) -> Weight {
fn announce(a: u32, p: u32) -> Weight {
(54_835_000 as Weight)
// Standard Error: 2_000
.saturating_add((684_000 as Weight).saturating_mul(a as Weight))
@@ -70,35 +68,35 @@ impl<T: frame_system::Config> pallet_proxy::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(3 as Weight))
.saturating_add(T::DbWeight::get().writes(2 as Weight))
}
fn add_proxy(p: u32, ) -> Weight {
fn add_proxy(p: u32) -> Weight {
(37_625_000 as Weight)
// Standard Error: 2_000
.saturating_add((300_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn remove_proxy(p: u32, ) -> Weight {
fn remove_proxy(p: u32) -> Weight {
(36_945_000 as Weight)
// Standard Error: 3_000
.saturating_add((325_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn remove_proxies(p: u32, ) -> Weight {
fn remove_proxies(p: u32) -> Weight {
(35_128_000 as Weight)
// Standard Error: 1_000
.saturating_add((209_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn anonymous(p: u32, ) -> Weight {
fn anonymous(p: u32) -> Weight {
(51_624_000 as Weight)
// Standard Error: 1_000
.saturating_add((41_000 as Weight).saturating_mul(p as Weight))
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn kill_anonymous(p: u32, ) -> Weight {
fn kill_anonymous(p: u32) -> Weight {
(37_469_000 as Weight)
// Standard Error: 1_000
.saturating_add((204_000 as Weight).saturating_mul(p as Weight))
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_session
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./polkadot-parachains/statemint-runtime/src/weights
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_timestamp
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./runtime/statemint/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -34,7 +34,6 @@
// --header=./file_header.txt
// --output=./polkadot-parachains/statemine-runtime/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -54,7 +53,7 @@ impl<T: frame_system::Config> pallet_uniques::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(1 as Weight))
.saturating_add(T::DbWeight::get().writes(1 as Weight))
}
fn destroy(n: u32, m: u32, a: u32, ) -> Weight {
fn destroy(n: u32, m: u32, a: u32) -> Weight {
(0 as Weight)
// Standard Error: 14_000
.saturating_add((16_814_000 as Weight).saturating_mul(n as Weight))
@@ -84,7 +83,7 @@ impl<T: frame_system::Config> pallet_uniques::WeightInfo for WeightInfo<T> {
.saturating_add(T::DbWeight::get().reads(2 as Weight))
.saturating_add(T::DbWeight::get().writes(3 as Weight))
}
fn redeposit(i: u32, ) -> Weight {
fn redeposit(i: u32) -> Weight {
(0 as Weight)
// Standard Error: 11_000
.saturating_add((26_921_000 as Weight).saturating_mul(i as Weight))
@@ -1,4 +1,3 @@
//! Autogenerated weights for pallet_utility
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
@@ -18,7 +17,6 @@
// --raw
// --output=./runtime/statemint/src/weights/
#![allow(unused_parens)]
#![allow(unused_imports)]
@@ -28,7 +26,7 @@ use sp_std::marker::PhantomData;
/// Weight functions for pallet_utility.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> {
fn batch(c: u32, ) -> Weight {
fn batch(c: u32) -> Weight {
(15_408_000 as Weight)
// Standard Error: 0
.saturating_add((4_571_000 as Weight).saturating_mul(c as Weight))
@@ -36,7 +34,7 @@ impl<T: frame_system::Config> pallet_utility::WeightInfo for WeightInfo<T> {
fn as_derivative() -> Weight {
(7_817_000 as Weight)
}
fn batch_all(c: u32, ) -> Weight {
fn batch_all(c: u32) -> Weight {
(16_520_000 as Weight)
// Standard Error: 0
.saturating_add((4_571_000 as Weight).saturating_mul(c as Weight))