git.delta.rocks / unique-network / refs/commits / 2ec63fe90961

difftreelog

feat unify unique nodes

Daniel Shiposha2023-03-17parent: #c91aad4.patch.diff
in: master

6 files changed

modifiedclient/rpc/Cargo.tomldiffbeforeafterboth
--- a/client/rpc/Cargo.toml
+++ b/client/rpc/Cargo.toml
@@ -36,11 +36,17 @@
 
 sc-executor = { workspace = true }
 
-opal-runtime = { workspace = true }
+opal-runtime = { workspace = true, optional = true }
 quartz-runtime = { workspace = true, optional = true }
 unique-runtime = { workspace = true, optional = true }
 
 [features]
+default = ['opal-runtime']
+all-runtimes = [
+	'opal-runtime',
+	'quartz-runtime',
+	'unique-runtime',
+]
 pov-estimate = [
 	'opal-runtime/pov-estimate',
 	'quartz-runtime?/pov-estimate',
modifiednode/cli/Cargo.tomldiffbeforeafterboth
--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -99,6 +99,11 @@
 
 [features]
 default = ["opal-runtime"]
+all-runtimes = [
+	'opal-runtime',
+	'quartz-runtime',
+	'unique-runtime',
+]
 pov-estimate = [
 	'opal-runtime/pov-estimate',
 	'quartz-runtime?/pov-estimate',
modifiednode/cli/src/cli.rsdiffbeforeafterboth
--- a/node/cli/src/cli.rs
+++ b/node/cli/src/cli.rs
@@ -15,11 +15,9 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 use crate::chain_spec;
-use std::{path::PathBuf, env};
+use std::path::PathBuf;
 use clap::Parser;
 
-const NODE_NAME_ENV: &str = "UNIQUE_NODE_NAME";
-
 /// Sub-commands supported by the collator.
 #[derive(Debug, Parser)]
 pub enum Subcommand {
@@ -99,21 +97,7 @@
 
 impl Cli {
 	pub fn node_name() -> String {
-		match env::var(NODE_NAME_ENV).ok() {
-			Some(name) => name,
-			None => {
-				if cfg!(feature = "unique-runtime") {
-					"Unique"
-				} else if cfg!(feature = "sapphire-runtime") {
-					"Sapphire"
-				} else if cfg!(feature = "quartz-runtime") {
-					"Quartz"
-				} else {
-					"Opal"
-				}
-			}
-			.into(),
-		}
+		"Unique".into()
 	}
 }
 
modifiednode/cli/src/service.rsdiffbeforeafterboth
--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -68,7 +68,6 @@
 
 use up_common::types::opaque::*;
 
-#[cfg(feature = "pov-estimate")]
 use crate::chain_spec::RuntimeIdentification;
 
 /// Unique native executor instance.
@@ -506,12 +505,10 @@
 	#[cfg(feature = "pov-estimate")]
 	let rpc_backend = backend.clone();
 
-	#[cfg(feature = "pov-estimate")]
 	let runtime_id = parachain_config.chain_spec.runtime_id();
 
 	let rpc_builder = Box::new(move |deny_unsafe, subscription_task_executor| {
 		let full_deps = unique_rpc::FullDeps {
-			#[cfg(feature = "pov-estimate")]
 			runtime_id: runtime_id.clone(),
 
 			#[cfg(feature = "pov-estimate")]
@@ -1032,12 +1029,10 @@
 	#[cfg(feature = "pov-estimate")]
 	let rpc_backend = backend.clone();
 
-	#[cfg(feature = "pov-estimate")]
 	let runtime_id = config.chain_spec.runtime_id();
 
 	let rpc_builder = Box::new(move |deny_unsafe, subscription_executor| {
 		let full_deps = unique_rpc::FullDeps {
-			#[cfg(feature = "pov-estimate")]
 			runtime_id: runtime_id.clone(),
 
 			#[cfg(feature = "pov-estimate")]
modifiednode/rpc/Cargo.tomldiffbeforeafterboth
--- a/node/rpc/Cargo.toml
+++ b/node/rpc/Cargo.toml
@@ -44,4 +44,3 @@
 default = []
 pov-estimate = ['uc-rpc/pov-estimate']
 std = []
-unique-runtime = []
modifiednode/rpc/src/lib.rsdiffbeforeafterboth
before · node/rpc/src/lib.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617use sp_runtime::traits::BlakeTwo256;18use fc_rpc::{19	EthBlockDataCacheTask, OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override,20	StorageOverride, SchemaV2Override, SchemaV3Override,21};22use jsonrpsee::RpcModule;23use fc_rpc_core::types::{FilterPool, FeeHistoryCache};24use fp_storage::EthereumStorageSchema;25use sc_client_api::{26	backend::{AuxStore, StorageProvider},27	client::BlockchainEvents,28	StateBackend, Backend,29};30use sc_finality_grandpa::{31	FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState,32};33use sc_network::NetworkService;34use sc_rpc::SubscriptionTaskExecutor;35pub use sc_rpc_api::DenyUnsafe;36use sc_transaction_pool::{ChainApi, Pool};37use sp_api::ProvideRuntimeApi;38use sp_block_builder::BlockBuilder;39use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};40use sc_service::TransactionPool;41use std::{collections::BTreeMap, sync::Arc};4243use up_common::types::opaque::*;4445#[cfg(feature = "pov-estimate")]46type FullBackend = sc_service::TFullBackend<Block>;4748/// Extra dependencies for GRANDPA49pub struct GrandpaDeps<B> {50	/// Voting round info.51	pub shared_voter_state: SharedVoterState,52	/// Authority set info.53	pub shared_authority_set: SharedAuthoritySet<Hash, BlockNumber>,54	/// Receives notifications about justification events from Grandpa.55	pub justification_stream: GrandpaJustificationStream<Block>,56	/// Executor to drive the subscription manager in the Grandpa RPC handler.57	pub subscription_executor: SubscriptionTaskExecutor,58	/// Finality proof provider.59	pub finality_provider: Arc<FinalityProofProvider<B, Block>>,60}6162/// Full client dependencies.63pub struct FullDeps<C, P, SC, CA: ChainApi> {64	/// The client instance to use.65	pub client: Arc<C>,66	/// Transaction pool instance.67	pub pool: Arc<P>,68	/// Graph pool instance.69	pub graph: Arc<Pool<CA>>,70	/// The SelectChain Strategy71	pub select_chain: SC,72	/// The Node authority flag73	pub is_authority: bool,74	/// Whether to enable dev signer75	pub enable_dev_signer: bool,76	/// Network service77	pub network: Arc<NetworkService<Block, Hash>>,78	/// Whether to deny unsafe calls79	pub deny_unsafe: DenyUnsafe,80	/// EthFilterApi pool.81	pub filter_pool: Option<FilterPool>,8283	#[cfg(feature = "pov-estimate")]84	pub runtime_id: RuntimeId,85	/// Executor params for PoV estimating86	#[cfg(feature = "pov-estimate")]87	pub exec_params: uc_rpc::pov_estimate::ExecutorParams,88	/// Substrate Backend.89	#[cfg(feature = "pov-estimate")]90	pub backend: Arc<FullBackend>,9192	/// Ethereum Backend.93	pub eth_backend: Arc<fc_db::Backend<Block>>,94	/// Maximum number of logs in a query.95	pub max_past_logs: u32,96	/// Maximum fee history cache size.97	pub fee_history_limit: u64,98	/// Fee history cache.99	pub fee_history_cache: FeeHistoryCache,100	/// Cache for Ethereum block data.101	pub block_data_cache: Arc<EthBlockDataCacheTask<Block>>,102}103104pub fn overrides_handle<C, BE, R>(client: Arc<C>) -> Arc<OverrideHandle<Block>>105where106	C: ProvideRuntimeApi<Block> + StorageProvider<Block, BE> + AuxStore,107	C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError>,108	C: Send + Sync + 'static,109	C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,110	C::Api: up_rpc::UniqueApi<Block, <R as RuntimeInstance>::CrossAccountId, AccountId>,111	BE: Backend<Block> + 'static,112	BE::State: StateBackend<BlakeTwo256>,113	R: RuntimeInstance + Send + Sync + 'static,114{115	let mut overrides_map = BTreeMap::new();116	overrides_map.insert(117		EthereumStorageSchema::V1,118		Box::new(SchemaV1Override::new(client.clone()))119			as Box<dyn StorageOverride<_> + Send + Sync>,120	);121	overrides_map.insert(122		EthereumStorageSchema::V2,123		Box::new(SchemaV2Override::new(client.clone()))124			as Box<dyn StorageOverride<_> + Send + Sync>,125	);126	overrides_map.insert(127		EthereumStorageSchema::V3,128		Box::new(SchemaV3Override::new(client.clone()))129			as Box<dyn StorageOverride<_> + Send + Sync>,130	);131132	Arc::new(OverrideHandle {133		schemas: overrides_map,134		fallback: Box::new(RuntimeApiStorageOverride::new(client)),135	})136}137138/// Instantiate all Full RPC extensions.139pub fn create_full<C, P, SC, CA, R, A, B>(140	deps: FullDeps<C, P, SC, CA>,141	subscription_task_executor: SubscriptionTaskExecutor,142) -> Result<RpcModule<()>, Box<dyn std::error::Error + Send + Sync>>143where144	C: ProvideRuntimeApi<Block> + StorageProvider<Block, B> + AuxStore,145	C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError> + 'static,146	C: Send + Sync + 'static,147	C: BlockchainEvents<Block>,148	C::Api: substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Index>,149	C::Api: BlockBuilder<Block>,150	// C::Api: pallet_contracts_rpc::ContractsRuntimeApi<Block, AccountId, Balance, BlockNumber, Hash>,151	C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,152	C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,153	C::Api: fp_rpc::ConvertTransactionRuntimeApi<Block>,154	C::Api: up_rpc::UniqueApi<Block, <R as RuntimeInstance>::CrossAccountId, AccountId>,155	C::Api: app_promotion_rpc::AppPromotionApi<156		Block,157		BlockNumber,158		<R as RuntimeInstance>::CrossAccountId,159		AccountId,160	>,161	C::Api: up_pov_estimate_rpc::PovEstimateApi<Block>,162	B: sc_client_api::Backend<Block> + Send + Sync + 'static,163	B::State: sc_client_api::backend::StateBackend<sp_runtime::traits::HashFor<Block>>,164	P: TransactionPool<Block = Block> + 'static,165	CA: ChainApi<Block = Block> + 'static,166	R: RuntimeInstance + Send + Sync + 'static,167	<R as RuntimeInstance>::CrossAccountId: serde::Serialize,168	for<'de> <R as RuntimeInstance>::CrossAccountId: serde::Deserialize<'de>,169{170	use fc_rpc::{171		Eth, EthApiServer, EthDevSigner, EthFilter, EthFilterApiServer, EthPubSub,172		EthPubSubApiServer, EthSigner, Net, NetApiServer, Web3, Web3ApiServer,173	};174	use uc_rpc::{UniqueApiServer, Unique};175176	use uc_rpc::{AppPromotionApiServer, AppPromotion};177178	#[cfg(feature = "pov-estimate")]179	use uc_rpc::pov_estimate::{PovEstimateApiServer, PovEstimate};180181	// use pallet_contracts_rpc::{Contracts, ContractsApi};182	use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};183	use substrate_frame_rpc_system::{System, SystemApiServer};184185	let mut io = RpcModule::new(());186	let FullDeps {187		client,188		pool,189		graph,190		select_chain: _,191		fee_history_limit,192		fee_history_cache,193		block_data_cache,194		enable_dev_signer,195		is_authority,196		network,197		deny_unsafe,198		filter_pool,199200		#[cfg(feature = "pov-estimate")]201		runtime_id,202203		#[cfg(feature = "pov-estimate")]204		exec_params,205206		#[cfg(feature = "pov-estimate")]207		backend,208209		eth_backend,210		max_past_logs,211	} = deps;212213	io.merge(System::new(Arc::clone(&client), Arc::clone(&pool), deny_unsafe).into_rpc())?;214	io.merge(TransactionPayment::new(Arc::clone(&client)).into_rpc())?;215216	// io.extend_with(ContractsApi::to_delegate(Contracts::new(client.clone())));217218	let mut signers = Vec::new();219	if enable_dev_signer {220		signers.push(Box::new(EthDevSigner::new()) as Box<dyn EthSigner>);221	}222223	let overrides = overrides_handle::<_, _, R>(client.clone());224225	let execute_gas_limit_multiplier = 10;226	io.merge(227		Eth::new(228			client.clone(),229			pool.clone(),230			graph,231			Some(<R as RuntimeInstance>::get_transaction_converter()),232			network.clone(),233			signers,234			overrides.clone(),235			eth_backend.clone(),236			is_authority,237			block_data_cache.clone(),238			fee_history_cache,239			fee_history_limit,240			execute_gas_limit_multiplier,241		)242		.into_rpc(),243	)?;244245	io.merge(Unique::new(client.clone()).into_rpc())?;246247	io.merge(AppPromotion::new(client.clone()).into_rpc())?;248249	#[cfg(feature = "pov-estimate")]250	io.merge(251		PovEstimate::new(252			client.clone(),253			backend,254			deny_unsafe,255			exec_params,256			runtime_id,257		)258		.into_rpc(),259	)?;260261	if let Some(filter_pool) = filter_pool {262		io.merge(263			EthFilter::new(264				client.clone(),265				eth_backend,266				filter_pool,267				500_usize, // max stored filters268				max_past_logs,269				block_data_cache,270			)271			.into_rpc(),272		)?;273	}274275	io.merge(276		Net::new(277			client.clone(),278			network.clone(),279			// Whether to format the `peer_count` response as Hex (default) or not.280			true,281		)282		.into_rpc(),283	)?;284285	io.merge(Web3::new(client.clone()).into_rpc())?;286287	io.merge(288		EthPubSub::new(pool, client, network, subscription_task_executor, overrides).into_rpc(),289	)?;290291	Ok(io)292}
after · node/rpc/src/lib.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617use sp_runtime::traits::BlakeTwo256;18use fc_rpc::{19	EthBlockDataCacheTask, OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override,20	StorageOverride, SchemaV2Override, SchemaV3Override,21};22use jsonrpsee::RpcModule;23use fc_rpc_core::types::{FilterPool, FeeHistoryCache};24use fp_storage::EthereumStorageSchema;25use sc_client_api::{26	backend::{AuxStore, StorageProvider},27	client::BlockchainEvents,28	StateBackend, Backend,29};30use sc_finality_grandpa::{31	FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState,32};33use sc_network::NetworkService;34use sc_rpc::SubscriptionTaskExecutor;35pub use sc_rpc_api::DenyUnsafe;36use sc_transaction_pool::{ChainApi, Pool};37use sp_api::ProvideRuntimeApi;38use sp_block_builder::BlockBuilder;39use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};40use sc_service::TransactionPool;41use std::{collections::BTreeMap, sync::Arc};4243use up_common::types::opaque::*;4445#[cfg(feature = "pov-estimate")]46type FullBackend = sc_service::TFullBackend<Block>;4748/// Extra dependencies for GRANDPA49pub struct GrandpaDeps<B> {50	/// Voting round info.51	pub shared_voter_state: SharedVoterState,52	/// Authority set info.53	pub shared_authority_set: SharedAuthoritySet<Hash, BlockNumber>,54	/// Receives notifications about justification events from Grandpa.55	pub justification_stream: GrandpaJustificationStream<Block>,56	/// Executor to drive the subscription manager in the Grandpa RPC handler.57	pub subscription_executor: SubscriptionTaskExecutor,58	/// Finality proof provider.59	pub finality_provider: Arc<FinalityProofProvider<B, Block>>,60}6162/// Full client dependencies.63pub struct FullDeps<C, P, SC, CA: ChainApi> {64	/// The client instance to use.65	pub client: Arc<C>,66	/// Transaction pool instance.67	pub pool: Arc<P>,68	/// Graph pool instance.69	pub graph: Arc<Pool<CA>>,70	/// The SelectChain Strategy71	pub select_chain: SC,72	/// The Node authority flag73	pub is_authority: bool,74	/// Whether to enable dev signer75	pub enable_dev_signer: bool,76	/// Network service77	pub network: Arc<NetworkService<Block, Hash>>,78	/// Whether to deny unsafe calls79	pub deny_unsafe: DenyUnsafe,80	/// EthFilterApi pool.81	pub filter_pool: Option<FilterPool>,8283	/// Runtime identification (read from the chain spec)84	pub runtime_id: RuntimeId,85	/// Executor params for PoV estimating86	#[cfg(feature = "pov-estimate")]87	pub exec_params: uc_rpc::pov_estimate::ExecutorParams,88	/// Substrate Backend.89	#[cfg(feature = "pov-estimate")]90	pub backend: Arc<FullBackend>,9192	/// Ethereum Backend.93	pub eth_backend: Arc<fc_db::Backend<Block>>,94	/// Maximum number of logs in a query.95	pub max_past_logs: u32,96	/// Maximum fee history cache size.97	pub fee_history_limit: u64,98	/// Fee history cache.99	pub fee_history_cache: FeeHistoryCache,100	/// Cache for Ethereum block data.101	pub block_data_cache: Arc<EthBlockDataCacheTask<Block>>,102}103104pub fn overrides_handle<C, BE, R>(client: Arc<C>) -> Arc<OverrideHandle<Block>>105where106	C: ProvideRuntimeApi<Block> + StorageProvider<Block, BE> + AuxStore,107	C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError>,108	C: Send + Sync + 'static,109	C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,110	C::Api: up_rpc::UniqueApi<Block, <R as RuntimeInstance>::CrossAccountId, AccountId>,111	BE: Backend<Block> + 'static,112	BE::State: StateBackend<BlakeTwo256>,113	R: RuntimeInstance + Send + Sync + 'static,114{115	let mut overrides_map = BTreeMap::new();116	overrides_map.insert(117		EthereumStorageSchema::V1,118		Box::new(SchemaV1Override::new(client.clone()))119			as Box<dyn StorageOverride<_> + Send + Sync>,120	);121	overrides_map.insert(122		EthereumStorageSchema::V2,123		Box::new(SchemaV2Override::new(client.clone()))124			as Box<dyn StorageOverride<_> + Send + Sync>,125	);126	overrides_map.insert(127		EthereumStorageSchema::V3,128		Box::new(SchemaV3Override::new(client.clone()))129			as Box<dyn StorageOverride<_> + Send + Sync>,130	);131132	Arc::new(OverrideHandle {133		schemas: overrides_map,134		fallback: Box::new(RuntimeApiStorageOverride::new(client)),135	})136}137138/// Instantiate all Full RPC extensions.139pub fn create_full<C, P, SC, CA, R, A, B>(140	deps: FullDeps<C, P, SC, CA>,141	subscription_task_executor: SubscriptionTaskExecutor,142) -> Result<RpcModule<()>, Box<dyn std::error::Error + Send + Sync>>143where144	C: ProvideRuntimeApi<Block> + StorageProvider<Block, B> + AuxStore,145	C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError> + 'static,146	C: Send + Sync + 'static,147	C: BlockchainEvents<Block>,148	C::Api: substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Index>,149	C::Api: BlockBuilder<Block>,150	// C::Api: pallet_contracts_rpc::ContractsRuntimeApi<Block, AccountId, Balance, BlockNumber, Hash>,151	C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,152	C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,153	C::Api: fp_rpc::ConvertTransactionRuntimeApi<Block>,154	C::Api: up_rpc::UniqueApi<Block, <R as RuntimeInstance>::CrossAccountId, AccountId>,155	C::Api: app_promotion_rpc::AppPromotionApi<156		Block,157		BlockNumber,158		<R as RuntimeInstance>::CrossAccountId,159		AccountId,160	>,161	C::Api: up_pov_estimate_rpc::PovEstimateApi<Block>,162	B: sc_client_api::Backend<Block> + Send + Sync + 'static,163	B::State: sc_client_api::backend::StateBackend<sp_runtime::traits::HashFor<Block>>,164	P: TransactionPool<Block = Block> + 'static,165	CA: ChainApi<Block = Block> + 'static,166	R: RuntimeInstance + Send + Sync + 'static,167	<R as RuntimeInstance>::CrossAccountId: serde::Serialize,168	for<'de> <R as RuntimeInstance>::CrossAccountId: serde::Deserialize<'de>,169{170	use fc_rpc::{171		Eth, EthApiServer, EthDevSigner, EthFilter, EthFilterApiServer, EthPubSub,172		EthPubSubApiServer, EthSigner, Net, NetApiServer, Web3, Web3ApiServer,173	};174	use uc_rpc::{UniqueApiServer, Unique};175176	use uc_rpc::{AppPromotionApiServer, AppPromotion};177178	#[cfg(feature = "pov-estimate")]179	use uc_rpc::pov_estimate::{PovEstimateApiServer, PovEstimate};180181	// use pallet_contracts_rpc::{Contracts, ContractsApi};182	use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};183	use substrate_frame_rpc_system::{System, SystemApiServer};184185	let mut io = RpcModule::new(());186	let FullDeps {187		client,188		pool,189		graph,190		select_chain: _,191		fee_history_limit,192		fee_history_cache,193		block_data_cache,194		enable_dev_signer,195		is_authority,196		network,197		deny_unsafe,198		filter_pool,199200		runtime_id: _,201202		#[cfg(feature = "pov-estimate")]203		exec_params,204205		#[cfg(feature = "pov-estimate")]206		backend,207208		eth_backend,209		max_past_logs,210	} = deps;211212	io.merge(System::new(Arc::clone(&client), Arc::clone(&pool), deny_unsafe).into_rpc())?;213	io.merge(TransactionPayment::new(Arc::clone(&client)).into_rpc())?;214215	// io.extend_with(ContractsApi::to_delegate(Contracts::new(client.clone())));216217	let mut signers = Vec::new();218	if enable_dev_signer {219		signers.push(Box::new(EthDevSigner::new()) as Box<dyn EthSigner>);220	}221222	let overrides = overrides_handle::<_, _, R>(client.clone());223224	let execute_gas_limit_multiplier = 10;225	io.merge(226		Eth::new(227			client.clone(),228			pool.clone(),229			graph,230			Some(<R as RuntimeInstance>::get_transaction_converter()),231			network.clone(),232			signers,233			overrides.clone(),234			eth_backend.clone(),235			is_authority,236			block_data_cache.clone(),237			fee_history_cache,238			fee_history_limit,239			execute_gas_limit_multiplier,240		)241		.into_rpc(),242	)?;243244	io.merge(Unique::new(client.clone()).into_rpc())?;245246	io.merge(AppPromotion::new(client.clone()).into_rpc())?;247248	#[cfg(feature = "pov-estimate")]249	io.merge(250		PovEstimate::new(251			client.clone(),252			backend,253			deny_unsafe,254			exec_params,255			runtime_id,256		)257		.into_rpc(),258	)?;259260	if let Some(filter_pool) = filter_pool {261		io.merge(262			EthFilter::new(263				client.clone(),264				eth_backend,265				filter_pool,266				500_usize, // max stored filters267				max_past_logs,268				block_data_cache,269			)270			.into_rpc(),271		)?;272	}273274	io.merge(275		Net::new(276			client.clone(),277			network.clone(),278			// Whether to format the `peer_count` response as Hex (default) or not.279			true,280		)281		.into_rpc(),282	)?;283284	io.merge(Web3::new(client.clone()).into_rpc())?;285286	io.merge(287		EthPubSub::new(pool, client, network, subscription_task_executor, overrides).into_rpc(),288	)?;289290	Ok(io)291}