{
pub pool: Arc,
/// Graph pool instance.
pub graph: Arc>,
- /// Whether to deny unsafe calls
- pub deny_unsafe: sc_rpc::DenyUnsafe,
/// The Node authority flag
pub is_authority: bool,
/// Network service
@@ -88,7 +86,23 @@ where
/// Instantiate all RPC extensions.
pub fn create_full(
- deps: FullDeps,
+ FullDeps {
+ client,
+ pool,
+ graph,
+ is_authority,
+ network,
+ sync,
+ filter_pool,
+ frontier_backend,
+ max_past_logs,
+ fee_history_cache,
+ fee_history_cache_limit,
+ storage_override,
+ block_data_cache,
+ forced_parent_hashes,
+ pending_create_inherent_data_providers,
+ }: FullDeps,
subscription_task_executor: sc_rpc::SubscriptionTaskExecutor,
pubsub_notification_sinks: Arc<
fc_mapping_sync::EthereumBlockNotificationSinks<
@@ -132,29 +146,11 @@ where
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};
use substrate_frame_rpc_system::{System, SystemApiServer};
- let mut module = RpcExtension::new(());
- let FullDeps {
- client,
- pool,
- graph,
- deny_unsafe,
- is_authority,
- network,
- sync,
- filter_pool,
- frontier_backend,
- max_past_logs,
- fee_history_cache,
- fee_history_cache_limit,
- storage_override,
- block_data_cache,
- forced_parent_hashes,
- pending_create_inherent_data_providers,
- } = deps;
+ let mut io = RpcExtension::new(());
- module.merge(System::new(client.clone(), pool.clone(), deny_unsafe).into_rpc())?;
- module.merge(TransactionPayment::new(client.clone()).into_rpc())?;
- module.merge(
+ io.merge(System::new(client.clone(), pool.clone()).into_rpc())?;
+ io.merge(TransactionPayment::new(client.clone()).into_rpc())?;
+ io.merge(
Eth::::new(
client.clone(),
pool.clone(),
@@ -179,7 +175,7 @@ where
let tx_pool = TxPool::new(client.clone(), graph.clone());
if let Some(filter_pool) = filter_pool {
- module.merge(
+ io.merge(
EthFilter::new(
client.clone(),
frontier_backend,
@@ -193,7 +189,7 @@ where
)?;
}
- module.merge(
+ io.merge(
EthPubSub::new(
pool,
client.clone(),
@@ -204,7 +200,7 @@ where
)
.into_rpc(),
)?;
- module.merge(
+ io.merge(
Net::new(
client.clone(),
network,
@@ -213,21 +209,21 @@ where
)
.into_rpc(),
)?;
- module.merge(Web3::new(client.clone()).into_rpc())?;
- module.merge(tx_pool.into_rpc())?;
+ io.merge(Web3::new(client.clone()).into_rpc())?;
+ io.merge(tx_pool.into_rpc())?;
if let Some(tracing_config) = maybe_tracing_config {
if let Some(trace_filter_requester) = tracing_config.tracing_requesters.trace {
- module.merge(
+ io.merge(
Trace::new(client, trace_filter_requester, tracing_config.trace_filter_max_count)
.into_rpc(),
)?;
}
if let Some(debug_requester) = tracing_config.tracing_requesters.debug {
- module.merge(Debug::new(debug_requester).into_rpc())?;
+ io.merge(Debug::new(debug_requester).into_rpc())?;
}
}
- Ok(module)
+ Ok(io)
}
diff --git a/node/src/service/instant_finalize.rs b/node/src/service/instant_finalize.rs
index d966dd2ad..a28f39013 100644
--- a/node/src/service/instant_finalize.rs
+++ b/node/src/service/instant_finalize.rs
@@ -43,7 +43,7 @@ where
}
async fn import_block(
- &mut self,
+ &self,
mut block_import_params: sc_consensus::BlockImportParams,
) -> Result {
block_import_params.finalized = true;
diff --git a/node/src/service/mod.rs b/node/src/service/mod.rs
index 2ddef6c97..f76f856db 100644
--- a/node/src/service/mod.rs
+++ b/node/src/service/mod.rs
@@ -177,7 +177,7 @@ where
Ok((worker, telemetry))
})
.transpose()?;
- let executor = sc_service::new_wasm_executor::(config);
+ let executor = sc_service::new_wasm_executor::(&config.executor);
let (client, backend, keystore_container, task_manager) =
sc_service::new_full_parts_record_import::(
config,
@@ -297,7 +297,10 @@ where
.then_some(database_path.as_ref().map(|p| {
let _ = std::fs::create_dir_all(p);
- sc_sysinfo::gather_hwbench(Some(p))
+ sc_sysinfo::gather_hwbench(
+ Some(p),
+ &frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE,
+ )
}))
.flatten();
let (relay_chain_interface, collator_key) =
@@ -315,8 +318,10 @@ where
let collator = parachain_config.role.is_authority();
let prometheus_registry = parachain_config.prometheus_registry().cloned();
let import_queue_service = import_queue.service();
- let net_config =
- >::new(¶chain_config.network);
+ let net_config = >::new(
+ ¶chain_config.network,
+ prometheus_registry.clone(),
+ );
let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) =
cumulus_client_service::build_network(cumulus_client_service::BuildNetworkParams {
parachain_config: ¶chain_config,
@@ -366,7 +371,7 @@ where
> = Default::default();
let pubsub_notification_sinks = Arc::new(pubsub_notification_sinks);
// for ethereum-compatibility rpc.
- parachain_config.rpc_id_provider = Some(Box::new(fc_rpc::EthereumSubIdProvider));
+ parachain_config.rpc.id_provider = Some(Box::new(fc_rpc::EthereumSubIdProvider));
let tracing_requesters = frontier::spawn_tasks(
&task_manager,
client.clone(),
@@ -424,12 +429,11 @@ where
Ok((timestamp, parachain_inherent_data))
};
- Box::new(move |deny_unsafe, subscription_task_executor| {
+ Box::new(move |subscription_task_executor| {
let deps = crate::rpc::FullDeps {
client: client.clone(),
pool: pool.clone(),
graph: pool.pool().clone(),
- deny_unsafe,
is_authority: collator,
network: network.clone(),
sync: sync_service.clone(),
@@ -494,7 +498,7 @@ where
// in there and swapping out the requirements for your own are probably a good idea. The
// requirements for a para-chain are dictated by its relay-chain.
if let Err(e) =
- frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE.check_hardware(&hwbench)
+ frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE.check_hardware(&hwbench, false)
{
log::warn!(
"⚠️ The hardware does not meet the minimal requirements {e} for role 'Authority'.",
@@ -673,7 +677,7 @@ where
proposer,
collator_service,
// Very limited proposal time.
- authoring_duration: Duration::from_millis(1_500),
+ authoring_duration: Duration::from_millis(2_000),
reinitialize: false,
};
let fut = cumulus_client_consensus_aura::collators::lookahead::run::<
@@ -734,8 +738,11 @@ where
_telemetry_worker_handle,
),
} = new_partial::(&config, eth_rpc_config)?;
- let net_config =
- >::new(&config.network);
+ let prometheus_registry = config.prometheus_registry().cloned();
+ let net_config = >::new(
+ &config.network,
+ prometheus_registry.clone(),
+ );
let metrics = Net::register_notification_metrics(None);
let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) =
sc_service::build_network(sc_service::BuildNetworkParams {
@@ -746,7 +753,7 @@ where
spawn_handle: task_manager.spawn_handle(),
import_queue,
block_announce_validator_builder: None,
- warp_sync_params: None,
+ warp_sync_config: None,
block_relay: None,
metrics,
})?;
@@ -880,7 +887,6 @@ where
log::warn!("You could add --alice or --bob to make dev chain seal instantly.");
}
- let prometheus_registry = config.prometheus_registry().cloned();
let block_data_cache = Arc::new(fc_rpc::EthBlockDataCacheTask::new(
task_manager.spawn_handle(),
storage_override.clone(),
@@ -893,7 +899,7 @@ where
> = Default::default();
let pubsub_notification_sinks = Arc::new(pubsub_notification_sinks);
// for ethereum-compatibility rpc.
- config.rpc_id_provider = Some(Box::new(fc_rpc::EthereumSubIdProvider));
+ config.rpc.id_provider = Some(Box::new(fc_rpc::EthereumSubIdProvider));
let tracing_requesters = frontier::spawn_tasks(
&task_manager,
client.clone(),
@@ -952,12 +958,11 @@ where
Ok((timestamp, parachain_inherent_data))
};
- Box::new(move |deny_unsafe, subscription_task_executor| {
+ Box::new(move |subscription_task_executor| {
let deps = crate::rpc::FullDeps {
client: client.clone(),
pool: pool.clone(),
graph: pool.pool().clone(),
- deny_unsafe,
is_authority: collator,
network: network.clone(),
sync: sync_service.clone(),
diff --git a/pallet/account-migration/Cargo.toml b/pallet/account-migration/Cargo.toml
index 783efcd9a..8c5fecd90 100644
--- a/pallet/account-migration/Cargo.toml
+++ b/pallet/account-migration/Cargo.toml
@@ -50,7 +50,6 @@ std = [
"pallet-assets/std",
"pallet-balances/std",
"sp-core/std",
- "sp-io/std",
"sp-runtime/std",
"sp-std/std",
# polkadot-sdk optional
diff --git a/pallet/account-migration/src/lib.rs b/pallet/account-migration/src/lib.rs
index 5b01632c8..c8bf72e31 100644
--- a/pallet/account-migration/src/lib.rs
+++ b/pallet/account-migration/src/lib.rs
@@ -43,14 +43,13 @@
#![cfg_attr(not(feature = "std"), no_std)]
#![deny(missing_docs)]
-#[cfg(test)]
+#[cfg(feature = "runtime-benchmarks")]
+mod benchmarking;
+#[cfg(all(test, feature = "runtime-benchmarks"))]
mod mock;
#[cfg(test)]
mod tests;
-#[cfg(feature = "runtime-benchmarks")]
-mod benchmarking;
-
mod weights;
pub use weights::WeightInfo;
diff --git a/pallet/ethtx-forwarder/src/mock.rs b/pallet/ethtx-forwarder/src/mock.rs
index 7449d40ca..b62f7e32d 100644
--- a/pallet/ethtx-forwarder/src/mock.rs
+++ b/pallet/ethtx-forwarder/src/mock.rs
@@ -60,6 +60,7 @@ impl fp_evm::FeeCalculator for FixedGasPrice {
}
}
impl pallet_evm::Config for Runtime {
+ type AccountProvider = pallet_evm::FrameSystemAccountProvider;
type AddressMapping = pallet_evm::IdentityAddressMapping;
type BlockGasLimit = BlockGasLimit;
type BlockHashMapping = pallet_evm::SubstrateBlockHashMapping;
@@ -69,6 +70,7 @@ impl pallet_evm::Config for Runtime {
type FeeCalculator = FixedGasPrice;
type FindAuthor = ();
type GasLimitPovSizeRatio = ();
+ type GasLimitStorageGrowthRatio = ();
type GasWeightMapping = pallet_evm::FixedGasWeightMapping;
type OnChargeTransaction = ();
type OnCreate = ();
@@ -76,7 +78,6 @@ impl pallet_evm::Config for Runtime {
type PrecompilesValue = ();
type Runner = pallet_evm::runner::stack::Runner;
type RuntimeEvent = RuntimeEvent;
- type SuicideQuickClearLimit = ();
type Timestamp = Timestamp;
type WeightInfo = ();
type WeightPerGas = WeightPerGas;
@@ -90,7 +91,7 @@ impl pallet_ethereum::Config for Runtime {
type ExtraDataLength = ();
type PostLogContent = PostBlockAndTxnHashes;
type RuntimeEvent = RuntimeEvent;
- type StateRoot = pallet_ethereum::IntermediateStateRoot;
+ type StateRoot = pallet_ethereum::IntermediateStateRoot;
}
impl darwinia_ethtx_forwarder::Config for Runtime {
diff --git a/pallet/staking/src/mock.rs b/pallet/staking/src/mock.rs
index 59ec148a4..7f9a2f83c 100644
--- a/pallet/staking/src/mock.rs
+++ b/pallet/staking/src/mock.rs
@@ -274,6 +274,7 @@ impl ExtBuilder {
keys: (1..=3)
.map(|i| (AccountId(i), AccountId(i), SessionKeys { uint: i.into() }))
.collect(),
+ ..Default::default()
}
.assimilate_storage(&mut storage)
.unwrap();
diff --git a/precompile/assets/src/lib.rs b/precompile/assets/src/lib.rs
index 37ad40b79..6c5d12e2b 100644
--- a/precompile/assets/src/lib.rs
+++ b/precompile/assets/src/lib.rs
@@ -171,6 +171,7 @@ where
id: asset_id.clone().into(),
delegate: Runtime::Lookup::unlookup(spender.clone()),
},
+ 0,
)?;
}
RuntimeHelper::::try_dispatch(
@@ -181,6 +182,7 @@ where
delegate: Runtime::Lookup::unlookup(spender),
amount,
},
+ 0,
)?;
}
@@ -215,6 +217,7 @@ where
target: Runtime::Lookup::unlookup(to),
amount: value,
},
+ 0,
)?;
}
@@ -259,6 +262,7 @@ where
destination: Runtime::Lookup::unlookup(to),
amount: value,
},
+ 0,
)?;
} else {
RuntimeHelper::::try_dispatch(
@@ -269,6 +273,7 @@ where
target: Runtime::Lookup::unlookup(to),
amount: value,
},
+ 0,
)?;
}
}
@@ -343,6 +348,7 @@ where
beneficiary: Runtime::Lookup::unlookup(to),
amount: value,
},
+ 0,
)?;
}
@@ -377,6 +383,7 @@ where
who: Runtime::Lookup::unlookup(from),
amount: value,
},
+ 0,
)?;
}
@@ -408,6 +415,7 @@ where
id: asset_id.into(),
owner: Runtime::Lookup::unlookup(owner),
},
+ 0,
)?;
}
@@ -430,6 +438,7 @@ where
id: asset_id.into(),
who: Runtime::Lookup::unlookup(account),
},
+ 0,
)?;
}
@@ -452,6 +461,7 @@ where
id: asset_id.into(),
who: Runtime::Lookup::unlookup(account),
},
+ 0,
)?;
}
diff --git a/precompile/assets/src/mock.rs b/precompile/assets/src/mock.rs
index 60a9943af..a39d71ad1 100644
--- a/precompile/assets/src/mock.rs
+++ b/precompile/assets/src/mock.rs
@@ -130,6 +130,7 @@ frame_support::parameter_types! {
}
impl pallet_evm::Config for Runtime {
+ type AccountProvider = pallet_evm::FrameSystemAccountProvider;
type AddressMapping = pallet_evm::IdentityAddressMapping;
type BlockGasLimit = BlockGasLimit;
type BlockHashMapping = pallet_evm::SubstrateBlockHashMapping;
@@ -139,6 +140,7 @@ impl pallet_evm::Config for Runtime {
type FeeCalculator = ();
type FindAuthor = ();
type GasLimitPovSizeRatio = ();
+ type GasLimitStorageGrowthRatio = ();
type GasWeightMapping = pallet_evm::FixedGasWeightMapping;
type OnChargeTransaction = ();
type OnCreate = ();
@@ -146,7 +148,6 @@ impl pallet_evm::Config for Runtime {
type PrecompilesValue = PrecompilesValue;
type Runner = pallet_evm::runner::stack::Runner;
type RuntimeEvent = RuntimeEvent;
- type SuicideQuickClearLimit = ();
type Timestamp = Timestamp;
type WeightInfo = ();
type WeightPerGas = WeightPerGas;
diff --git a/precompile/state-storage/src/mock.rs b/precompile/state-storage/src/mock.rs
index 30990cda4..af1d9fb48 100644
--- a/precompile/state-storage/src/mock.rs
+++ b/precompile/state-storage/src/mock.rs
@@ -117,6 +117,7 @@ frame_support::parameter_types! {
}
impl pallet_evm::Config for Runtime {
+ type AccountProvider = pallet_evm::FrameSystemAccountProvider;
type AddressMapping = pallet_evm::IdentityAddressMapping;
type BlockGasLimit = BlockGasLimit;
type BlockHashMapping = pallet_evm::SubstrateBlockHashMapping;
@@ -126,6 +127,7 @@ impl pallet_evm::Config for Runtime {
type FeeCalculator = ();
type FindAuthor = ();
type GasLimitPovSizeRatio = ();
+ type GasLimitStorageGrowthRatio = ();
type GasWeightMapping = pallet_evm::FixedGasWeightMapping;
type OnChargeTransaction = ();
type OnCreate = ();
@@ -133,7 +135,6 @@ impl pallet_evm::Config for Runtime {
type PrecompilesValue = PrecompilesValue;
type Runner = pallet_evm::runner::stack::Runner;
type RuntimeEvent = RuntimeEvent;
- type SuicideQuickClearLimit = ();
type Timestamp = Timestamp;
type WeightInfo = ();
type WeightPerGas = WeightPerGas;
diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs
index 95fbaff8f..ca9bc7aa6 100644
--- a/runtime/common/src/lib.rs
+++ b/runtime/common/src/lib.rs
@@ -221,7 +221,7 @@ impl
where
R: pallet_authorship::Config + pallet_balances::Config,
{
- fn on_unbalanceds(
+ fn on_unbalanceds(
mut fees_then_tips: impl Iterator<
Item = frame_support::traits::fungible::Credit<
R::AccountId,
diff --git a/runtime/common/src/pallet_config.rs b/runtime/common/src/pallet_config.rs
index cf7c07836..e2b6e80eb 100644
--- a/runtime/common/src/pallet_config.rs
+++ b/runtime/common/src/pallet_config.rs
@@ -79,32 +79,24 @@ use sp_core::U256;
use sp_runtime::traits::AccountIdConversion;
use sp_std::vec;
-/// We assume that ~5% of the block weight is consumed by `on_initialize` handlers. This is
-/// used to limit the maximal weight of a single extrinsic.
-const AVERAGE_ON_INITIALIZE_RATIO: sp_runtime::Perbill = sp_runtime::Perbill::from_percent(5);
/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used by
/// `Operational` extrinsics.
pub const NORMAL_DISPATCH_RATIO: sp_runtime::Perbill = sp_runtime::Perbill::from_percent(75);
-const WEIGHT_MILLISECS_PER_BLOCK: u64 = 2_000;
pub const MAXIMUM_BLOCK_WEIGHT: frame_support::weights::Weight =
frame_support::weights::Weight::from_parts(
frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2),
cumulus_primitives_core::relay_chain::MAX_POV_SIZE as u64,
);
+// We assume that ~5% of the block weight is consumed by `on_initialize` handlers. This is
+// used to limit the maximal weight of a single extrinsic.
+const AVERAGE_ON_INITIALIZE_RATIO: sp_runtime::Perbill = sp_runtime::Perbill::from_percent(5);
+const WEIGHT_MILLISECS_PER_BLOCK: u64 = 2_000;
const BLOCK_GAS_LIMIT: u64 = 20_000_000;
-// TODO: remove in stable2409.
-#[cfg(not(feature = "runtime-benchmarks"))]
-const EXISTENTIAL_DEPOSIT: Balance = 0;
-#[cfg(feature = "runtime-benchmarks")]
-const EXISTENTIAL_DEPOSIT: Balance = 1;
-frame_support::parameter_types! {
- pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT;
-}
-
frame_support::parameter_types! {
pub const MaxBalance: Balance = Balance::MAX;
+ pub const ExistentialDeposit: Balance = 0;
// Retry a scheduled item every 10 blocks (1 minute) until the preimage exists.
pub const NoPreimagePostponement: Option = Some(10);
@@ -116,6 +108,9 @@ frame_support::parameter_types! {
pub const ReservedXcmpWeight: frame_support::weights::Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4);
pub const ReservedDmpWeight: frame_support::weights::Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4);
+ // Disable gas based storage growth limit.
+ pub const GasLimitStorageGrowthRatio: u64 = 0;
+
pub RuntimeBlockLength: frame_system::limits::BlockLength =
frame_system::limits::BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);
pub RuntimeBlockWeights: frame_system::limits::BlockWeights = frame_system::limits::BlockWeights::builder()
diff --git a/runtime/crab/src/lib.rs b/runtime/crab/src/lib.rs
index 31401064d..cead337bf 100644
--- a/runtime/crab/src/lib.rs
+++ b/runtime/crab/src/lib.rs
@@ -573,8 +573,8 @@ sp_api::impl_runtime_apis! {
}
impl xcm_runtime_apis::dry_run::DryRunApi for Runtime {
- fn dry_run_call(origin: OriginCaller, call: RuntimeCall) -> Result, xcm_runtime_apis::dry_run::Error> {
- PolkadotXcm::dry_run_call::(origin, call)
+ fn dry_run_call(origin: OriginCaller, call: RuntimeCall, result_xcms_version: xcm::Version) -> Result, xcm_runtime_apis::dry_run::Error> {
+ PolkadotXcm::dry_run_call::(origin, call, result_xcms_version)
}
fn dry_run_xcm(origin_location: xcm::VersionedLocation, xcm: xcm::VersionedXcm) -> Result, xcm_runtime_apis::dry_run::Error> {
diff --git a/runtime/crab/src/pallets/ethereum.rs b/runtime/crab/src/pallets/ethereum.rs
index 961635fb6..cc6d5c420 100644
--- a/runtime/crab/src/pallets/ethereum.rs
+++ b/runtime/crab/src/pallets/ethereum.rs
@@ -27,5 +27,5 @@ impl pallet_ethereum::Config for Runtime {
type ExtraDataLength = ConstU32<64>;
type PostLogContent = PostBlockAndTxnHashes;
type RuntimeEvent = RuntimeEvent;
- type StateRoot = pallet_ethereum::IntermediateStateRoot;
+ type StateRoot = pallet_ethereum::IntermediateStateRoot;
}
diff --git a/runtime/crab/src/pallets/evm.rs b/runtime/crab/src/pallets/evm.rs
index 6e5d85f99..403096ab2 100644
--- a/runtime/crab/src/pallets/evm.rs
+++ b/runtime/crab/src/pallets/evm.rs
@@ -161,6 +161,7 @@ impl DispatchValidateT for DarwiniaDispatchValidator {
}
impl pallet_evm::Config for Runtime {
+ type AccountProvider = pallet_evm::FrameSystemAccountProvider;
type AddressMapping = pallet_evm::IdentityAddressMapping;
type BlockGasLimit = pallet_config::BlockGasLimit;
type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping;
@@ -170,6 +171,7 @@ impl pallet_evm::Config for Runtime {
type FeeCalculator = TransactionPaymentGasPrice;
type FindAuthor = FindAuthor>;
type GasLimitPovSizeRatio = pallet_config::GasLimitPovSizeRatio;
+ type GasLimitStorageGrowthRatio = pallet_config::GasLimitStorageGrowthRatio;
type GasWeightMapping = pallet_evm::FixedGasWeightMapping;
type OnChargeTransaction = pallet_evm::EVMFungibleAdapter;
type OnCreate = ();
@@ -177,7 +179,6 @@ impl pallet_evm::Config for Runtime {
type PrecompilesValue = PrecompilesValue;
type Runner = pallet_evm::runner::stack::Runner;
type RuntimeEvent = RuntimeEvent;
- type SuicideQuickClearLimit = ();
type Timestamp = Timestamp;
type WeightInfo = ();
type WeightPerGas = pallet_config::WeightPerGas;
diff --git a/runtime/crab/src/weights/pallet_assets.rs b/runtime/crab/src/weights/pallet_assets.rs
index 99381d52f..e82fbf481 100644
--- a/runtime/crab/src/weights/pallet_assets.rs
+++ b/runtime/crab/src/weights/pallet_assets.rs
@@ -195,6 +195,12 @@ impl pallet_assets::WeightInfo for WeightInfo {
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
+ fn transfer_all() -> Weight {
+ Weight::from_parts(33_000_000, 0)
+ .saturating_add(Weight::from_parts(0, 6168))
+ .saturating_add(T::DbWeight::get().reads(4))
+ .saturating_add(T::DbWeight::get().writes(4))
+ }
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(166), added: 2641, mode: `MaxEncodedLen`)
/// Storage: `Assets::Account` (r:2 w:2)
diff --git a/runtime/darwinia/src/lib.rs b/runtime/darwinia/src/lib.rs
index 448b25e50..daf37020d 100644
--- a/runtime/darwinia/src/lib.rs
+++ b/runtime/darwinia/src/lib.rs
@@ -578,8 +578,8 @@ sp_api::impl_runtime_apis! {
}
impl xcm_runtime_apis::dry_run::DryRunApi for Runtime {
- fn dry_run_call(origin: OriginCaller, call: RuntimeCall) -> Result, xcm_runtime_apis::dry_run::Error> {
- PolkadotXcm::dry_run_call::(origin, call)
+ fn dry_run_call(origin: OriginCaller, call: RuntimeCall, result_xcms_version: xcm::Version) -> Result, xcm_runtime_apis::dry_run::Error> {
+ PolkadotXcm::dry_run_call::(origin, call, result_xcms_version)
}
fn dry_run_xcm(origin_location: xcm::VersionedLocation, xcm: xcm::VersionedXcm) -> Result, xcm_runtime_apis::dry_run::Error> {
diff --git a/runtime/darwinia/src/pallets/ethereum.rs b/runtime/darwinia/src/pallets/ethereum.rs
index 961635fb6..cc6d5c420 100644
--- a/runtime/darwinia/src/pallets/ethereum.rs
+++ b/runtime/darwinia/src/pallets/ethereum.rs
@@ -27,5 +27,5 @@ impl pallet_ethereum::Config for Runtime {
type ExtraDataLength = ConstU32<64>;
type PostLogContent = PostBlockAndTxnHashes;
type RuntimeEvent = RuntimeEvent;
- type StateRoot = pallet_ethereum::IntermediateStateRoot;
+ type StateRoot = pallet_ethereum::IntermediateStateRoot;
}
diff --git a/runtime/darwinia/src/pallets/evm.rs b/runtime/darwinia/src/pallets/evm.rs
index 35a00a110..393abf520 100644
--- a/runtime/darwinia/src/pallets/evm.rs
+++ b/runtime/darwinia/src/pallets/evm.rs
@@ -163,6 +163,7 @@ impl DispatchValidateT for DarwiniaDispatchValidator {
}
impl pallet_evm::Config for Runtime {
+ type AccountProvider = pallet_evm::FrameSystemAccountProvider;
type AddressMapping = pallet_evm::IdentityAddressMapping;
type BlockGasLimit = pallet_config::BlockGasLimit;
type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping;
@@ -172,6 +173,7 @@ impl pallet_evm::Config for Runtime {
type FeeCalculator = TransactionPaymentGasPrice;
type FindAuthor = FindAuthor>;
type GasLimitPovSizeRatio = pallet_config::GasLimitPovSizeRatio;
+ type GasLimitStorageGrowthRatio = pallet_config::GasLimitStorageGrowthRatio;
type GasWeightMapping = pallet_evm::FixedGasWeightMapping;
type OnChargeTransaction = pallet_evm::EVMFungibleAdapter;
type OnCreate = ();
@@ -179,7 +181,6 @@ impl pallet_evm::Config for Runtime {
type PrecompilesValue = PrecompilesValue;
type Runner = pallet_evm::runner::stack::Runner;
type RuntimeEvent = RuntimeEvent;
- type SuicideQuickClearLimit = ();
type Timestamp = Timestamp;
type WeightInfo = ();
type WeightPerGas = pallet_config::WeightPerGas;
diff --git a/runtime/darwinia/src/weights/pallet_assets.rs b/runtime/darwinia/src/weights/pallet_assets.rs
index fd1487ff0..9246ce2ee 100644
--- a/runtime/darwinia/src/weights/pallet_assets.rs
+++ b/runtime/darwinia/src/weights/pallet_assets.rs
@@ -195,6 +195,12 @@ impl pallet_assets::WeightInfo for WeightInfo {
.saturating_add(T::DbWeight::get().reads(4))
.saturating_add(T::DbWeight::get().writes(4))
}
+ fn transfer_all() -> Weight {
+ Weight::from_parts(33_000_000, 0)
+ .saturating_add(Weight::from_parts(0, 6168))
+ .saturating_add(T::DbWeight::get().reads(4))
+ .saturating_add(T::DbWeight::get().writes(4))
+ }
/// Storage: `Assets::Asset` (r:1 w:1)
/// Proof: `Assets::Asset` (`max_values`: None, `max_size`: Some(166), added: 2641, mode: `MaxEncodedLen`)
/// Storage: `Assets::Account` (r:2 w:2)
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
index ac981e69d..4b3d80904 100644
--- a/rust-toolchain.toml
+++ b/rust-toolchain.toml
@@ -1,5 +1,5 @@
[toolchain]
-channel = "1.81.0"
+channel = "1.82.0"
components = ["cargo", "clippy", "rust-src", "rustc", "rustfmt"]
profile = "minimal"
targets = ["wasm32-unknown-unknown"]