From 6caab1f64a010ba7a94e71ea3fc00cb089daf3e4 Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Mon, 22 May 2023 19:48:57 +0800 Subject: [PATCH] Companion of paritytech/frontier#1040 Signed-off-by: Xavier Lau --- node/src/command.rs | 4 ++++ node/src/rpc.rs | 2 +- node/src/service/instant_finalize.rs | 3 +-- node/src/service/mod.rs | 6 ++---- pallet/message-gadget/src/tests.rs | 3 ++- pallet/message-transact/src/mock.rs | 1 + runtime/crab/src/pallets/ethereum.rs | 1 + runtime/darwinia/src/pallets/ethereum.rs | 1 + runtime/pangolin/src/pallets/ethereum.rs | 1 + runtime/pangoro/src/pallets/ethereum.rs | 1 + 10 files changed, 15 insertions(+), 8 deletions(-) diff --git a/node/src/command.rs b/node/src/command.rs index f47e8c1a7..7144ea17c 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -698,6 +698,7 @@ pub fn run() -> Result<()> { if chain_spec.is_crab() { return service::start_dev_node::( config, + id, ð_rpc_config, ) .map_err(Into::into); @@ -707,6 +708,7 @@ pub fn run() -> Result<()> { if chain_spec.is_darwinia() { return service::start_dev_node::( config, + id, ð_rpc_config, ) .map_err(Into::into) @@ -716,6 +718,7 @@ pub fn run() -> Result<()> { if chain_spec.is_pangolin() { return service::start_dev_node::( config, + id, ð_rpc_config, ) .map_err(Into::into) @@ -725,6 +728,7 @@ pub fn run() -> Result<()> { if chain_spec.is_pangoro() { return service::start_dev_node::( config, + id, ð_rpc_config, ) .map_err(Into::into) diff --git a/node/src/rpc.rs b/node/src/rpc.rs index e31bcf649..420983543 100644 --- a/node/src/rpc.rs +++ b/node/src/rpc.rs @@ -47,7 +47,7 @@ pub struct FullDeps { /// The Node authority flag pub is_authority: bool, /// Network service - pub network: Arc>, + pub network: Arc>, /// EthFilterApi pool. pub filter_pool: Option, /// Backend. diff --git a/node/src/service/instant_finalize.rs b/node/src/service/instant_finalize.rs index 2e1ca2a52..428fb668c 100644 --- a/node/src/service/instant_finalize.rs +++ b/node/src/service/instant_finalize.rs @@ -46,9 +46,8 @@ where async fn import_block( &mut self, mut block_import_params: sc_consensus::BlockImportParams, - cache: std::collections::HashMap>, ) -> Result { block_import_params.finalized = true; - self.0.import_block(block_import_params, cache).await + self.0.import_block(block_import_params).await } } diff --git a/node/src/service/mod.rs b/node/src/service/mod.rs index 5a1890e48..fe6af5104 100644 --- a/node/src/service/mod.rs +++ b/node/src/service/mod.rs @@ -275,7 +275,7 @@ where &sc_service::TaskManager, Arc, Arc>>, - Arc>, + Arc>, sp_keystore::SyncCryptoStorePtr, bool, ) -> Result< @@ -330,9 +330,6 @@ where spawn_handle: task_manager.spawn_handle(), relay_chain_interface: relay_chain_interface.clone(), import_queue, - block_announce_validator_builder: Some(Box::new(|_| { - Box::new(block_announce_validator) - })), }) .await?; @@ -674,6 +671,7 @@ where /// !!! WARNING: DO NOT USE ELSEWHERE pub fn start_dev_node( mut config: sc_service::Configuration, + para_id: cumulus_primitives_core::ParaId, eth_rpc_config: &crate::cli::EthRpcConfig, ) -> Result where diff --git a/pallet/message-gadget/src/tests.rs b/pallet/message-gadget/src/tests.rs index c612671c8..9eb2946de 100644 --- a/pallet/message-gadget/src/tests.rs +++ b/pallet/message-gadget/src/tests.rs @@ -81,6 +81,7 @@ impl pallet_evm::Config for Runtime { type CallOrigin = pallet_evm::EnsureAddressRoot; type ChainId = (); type Currency = Balances; + type ExtraDataLength = (); type FeeCalculator = (); type FindAuthor = (); type GasWeightMapping = pallet_evm::FixedGasWeightMapping; @@ -89,9 +90,9 @@ impl pallet_evm::Config for Runtime { type PrecompilesType = (); type PrecompilesValue = (); type Runner = pallet_evm::runner::stack::Runner; - type WeightInfo = (); type RuntimeEvent = RuntimeEvent; type Timestamp = Timestamp; + type WeightInfo = (); type WeightPerGas = (); type WithdrawOrigin = pallet_evm::EnsureAddressNever; } diff --git a/pallet/message-transact/src/mock.rs b/pallet/message-transact/src/mock.rs index 4593b438f..73f92a434 100644 --- a/pallet/message-transact/src/mock.rs +++ b/pallet/message-transact/src/mock.rs @@ -139,6 +139,7 @@ frame_support::parameter_types! { } impl pallet_ethereum::Config for TestRuntime { + type ExtraDataLength = (); type PostLogContent = PostBlockAndTxnHashes; type RuntimeEvent = RuntimeEvent; type StateRoot = IntermediateStateRoot; diff --git a/runtime/crab/src/pallets/ethereum.rs b/runtime/crab/src/pallets/ethereum.rs index cb4da4755..3141e919a 100644 --- a/runtime/crab/src/pallets/ethereum.rs +++ b/runtime/crab/src/pallets/ethereum.rs @@ -24,6 +24,7 @@ frame_support::parameter_types! { } impl pallet_ethereum::Config for Runtime { + type ExtraDataLength = ConstU32<64>; type PostLogContent = PostBlockAndTxnHashes; type RuntimeEvent = RuntimeEvent; type StateRoot = pallet_ethereum::IntermediateStateRoot; diff --git a/runtime/darwinia/src/pallets/ethereum.rs b/runtime/darwinia/src/pallets/ethereum.rs index cb4da4755..3141e919a 100644 --- a/runtime/darwinia/src/pallets/ethereum.rs +++ b/runtime/darwinia/src/pallets/ethereum.rs @@ -24,6 +24,7 @@ frame_support::parameter_types! { } impl pallet_ethereum::Config for Runtime { + type ExtraDataLength = ConstU32<64>; type PostLogContent = PostBlockAndTxnHashes; type RuntimeEvent = RuntimeEvent; type StateRoot = pallet_ethereum::IntermediateStateRoot; diff --git a/runtime/pangolin/src/pallets/ethereum.rs b/runtime/pangolin/src/pallets/ethereum.rs index cb4da4755..3141e919a 100644 --- a/runtime/pangolin/src/pallets/ethereum.rs +++ b/runtime/pangolin/src/pallets/ethereum.rs @@ -24,6 +24,7 @@ frame_support::parameter_types! { } impl pallet_ethereum::Config for Runtime { + type ExtraDataLength = ConstU32<64>; type PostLogContent = PostBlockAndTxnHashes; type RuntimeEvent = RuntimeEvent; type StateRoot = pallet_ethereum::IntermediateStateRoot; diff --git a/runtime/pangoro/src/pallets/ethereum.rs b/runtime/pangoro/src/pallets/ethereum.rs index cb4da4755..3141e919a 100644 --- a/runtime/pangoro/src/pallets/ethereum.rs +++ b/runtime/pangoro/src/pallets/ethereum.rs @@ -24,6 +24,7 @@ frame_support::parameter_types! { } impl pallet_ethereum::Config for Runtime { + type ExtraDataLength = ConstU32<64>; type PostLogContent = PostBlockAndTxnHashes; type RuntimeEvent = RuntimeEvent; type StateRoot = pallet_ethereum::IntermediateStateRoot;