mirror of
https://github.com/pezkuwichain/pezkuwi-runtime-templates.git
synced 2026-04-25 14:37:54 +00:00
Upgrade evm-template to polkadot-stable2503 (#417)
* init 2503 upgrade for evm template need to upgrade frontier forks * start upgrading frontier * wip upgrading tanssi deps and synchronizing deps therein * update tanssi wip * fix dep tree for evm template and move onto resolving errors * resolve 17 of 29 compilation errors 12 remaining most related to updating weight files * resolve weight related compilation errors and evm abstraction and proc macro require updates * impl DecodeWithMemTracking for custom origins 5 errors left requiring changes to astractions * update evm abstraction runtime compiles * node in progress frontier txpool requires more changes * update txpool for node and node release compiles * remove unused code commented out * fix tanssi registrar benchmarking compilation * fix pallet registrar benchmarks and unit tests * update tanssi runtime apis to have benchmark features * clean and fix some errors tests are recently requiring benchmark hidden impls oddly * combine ci steps for running test and checking benchmark compilation to see if output changes * update xcm core buyer 2412 dep to 2503 release ty @KitHat * rm conditional compilation for runtime benchmarks inside a few declarative macro definitions * apply clippy fix * move runtime benchmarks declarations for referenda conviction voting and assets common into the runtime not sure why only those require explicit feature declaration * break build but apply suggestions from @KitHat * fix build * fix toml sort * fix tanssi build
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -15,7 +15,6 @@ use sc_client_api::{
|
||||
use sc_network::service::traits::NetworkService;
|
||||
use sc_network_sync::SyncingService;
|
||||
use sc_rpc::SubscriptionTaskExecutor;
|
||||
use sc_transaction_pool::{ChainApi, Pool};
|
||||
use sc_transaction_pool_api::TransactionPool;
|
||||
use sp_api::{CallApiAt, ProvideRuntimeApi};
|
||||
use sp_block_builder::BlockBuilder as BlockBuilderApi;
|
||||
@@ -26,13 +25,13 @@ use sp_inherents::CreateInherentDataProviders;
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
|
||||
/// Extra dependencies for Ethereum compatibility.
|
||||
pub struct EthDeps<B: BlockT, C, P, A: ChainApi, CT, CIDP> {
|
||||
pub struct EthDeps<B: BlockT, C, P, CT, CIDP> {
|
||||
/// The client instance to use.
|
||||
pub client: Arc<C>,
|
||||
/// Transaction pool instance.
|
||||
pub pool: Arc<P>,
|
||||
/// Graph pool instance.
|
||||
pub graph: Arc<Pool<A>>,
|
||||
pub graph: Arc<P>,
|
||||
/// Ethereum transaction converter.
|
||||
pub converter: Option<CT>,
|
||||
/// The Node authority flag
|
||||
@@ -67,9 +66,9 @@ pub struct EthDeps<B: BlockT, C, P, A: ChainApi, CT, CIDP> {
|
||||
}
|
||||
|
||||
/// Instantiate Ethereum-compatible RPC extensions.
|
||||
pub fn create_eth<B, C, BE, P, A, CT, CIDP, EC>(
|
||||
pub fn create_eth<B, C, BE, P, CT, CIDP, EC>(
|
||||
mut io: RpcModule<()>,
|
||||
deps: EthDeps<B, C, P, A, CT, CIDP>,
|
||||
deps: EthDeps<B, C, P, CT, CIDP>,
|
||||
subscription_task_executor: SubscriptionTaskExecutor,
|
||||
pubsub_notification_sinks: Arc<
|
||||
fc_mapping_sync::EthereumBlockNotificationSinks<
|
||||
@@ -87,8 +86,7 @@ where
|
||||
C: HeaderBackend<B> + HeaderMetadata<B, Error = BlockChainError>,
|
||||
C: BlockchainEvents<B> + AuxStore + UsageProvider<B> + StorageProvider<B, BE> + 'static,
|
||||
BE: Backend<B> + 'static,
|
||||
P: TransactionPool<Block = B> + 'static,
|
||||
A: ChainApi<Block = B> + 'static,
|
||||
P: TransactionPool<Block = B, Hash = B::Hash> + 'static,
|
||||
CT: ConvertTransaction<<B as BlockT>::Extrinsic> + Send + Sync + 'static,
|
||||
CIDP: CreateInherentDataProviders<B, ()> + Send + 'static,
|
||||
EC: EthConfig<B, C>,
|
||||
@@ -128,7 +126,7 @@ where
|
||||
}
|
||||
|
||||
io.merge(
|
||||
Eth::<B, C, P, CT, BE, A, CIDP, EC>::new(
|
||||
Eth::<B, C, P, CT, BE, CIDP, EC>::new(
|
||||
client.clone(),
|
||||
pool.clone(),
|
||||
graph.clone(),
|
||||
|
||||
@@ -10,7 +10,6 @@ use std::sync::Arc;
|
||||
use evm_runtime_template::{opaque::Block, AccountId, Balance, Nonce};
|
||||
use sc_client_api::{backend::Backend, AuxStore, BlockchainEvents, StorageProvider, UsageProvider};
|
||||
use sc_rpc::SubscriptionTaskExecutor;
|
||||
use sc_transaction_pool::ChainApi;
|
||||
use sc_transaction_pool_api::TransactionPool;
|
||||
use sp_api::{CallApiAt, ProvideRuntimeApi};
|
||||
use sp_block_builder::BlockBuilder;
|
||||
@@ -26,13 +25,13 @@ use crate::rpc::eth::create_eth;
|
||||
pub type RpcExtension = jsonrpsee::RpcModule<()>;
|
||||
|
||||
/// Full client dependencies
|
||||
pub struct FullDeps<C, P, A: ChainApi, CT, CIDP> {
|
||||
pub struct FullDeps<C, P, CT, CIDP> {
|
||||
/// The client instance to use.
|
||||
pub client: Arc<C>,
|
||||
/// Transaction pool instance.
|
||||
pub pool: Arc<P>,
|
||||
/// Ethereum-compatibility specific dependencies.
|
||||
pub eth: EthDeps<Block, C, P, A, CT, CIDP>,
|
||||
pub eth: EthDeps<Block, C, P, CT, CIDP>,
|
||||
}
|
||||
|
||||
pub struct DefaultEthConfig<C, BE>(std::marker::PhantomData<(C, BE)>);
|
||||
@@ -48,8 +47,8 @@ where
|
||||
}
|
||||
|
||||
/// Instantiate all RPC extensions.
|
||||
pub fn create_full<C, P, A, CT, CIDP, BE>(
|
||||
deps: FullDeps<C, P, A, CT, CIDP>,
|
||||
pub fn create_full<C, P, CT, CIDP, BE>(
|
||||
deps: FullDeps<C, P, CT, CIDP>,
|
||||
subscription_task_executor: SubscriptionTaskExecutor,
|
||||
pubsub_notification_sinks: Arc<
|
||||
fc_mapping_sync::EthereumBlockNotificationSinks<
|
||||
@@ -75,8 +74,7 @@ where
|
||||
C::Api: BlockBuilder<Block>,
|
||||
C::Api: fp_rpc::ConvertTransactionRuntimeApi<Block>,
|
||||
C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,
|
||||
P: TransactionPool<Block = Block> + Sync + Send + 'static,
|
||||
A: ChainApi<Block = Block> + 'static,
|
||||
P: TransactionPool<Block = Block, Hash = sp_core::H256> + Sync + Send + 'static,
|
||||
CIDP: CreateInherentDataProviders<Block, ()> + Send + 'static,
|
||||
CT: fp_rpc::ConvertTransaction<<Block as BlockT>::Extrinsic> + Send + Sync + 'static,
|
||||
BE: Backend<Block> + 'static,
|
||||
@@ -89,7 +87,7 @@ where
|
||||
|
||||
module.merge(System::new(client.clone(), pool).into_rpc())?;
|
||||
module.merge(TransactionPayment::new(client).into_rpc())?;
|
||||
let module = create_eth::<_, _, _, _, _, _, _, DefaultEthConfig<C, BE>>(
|
||||
let module = create_eth::<_, _, _, _, _, _, DefaultEthConfig<C, BE>>(
|
||||
module,
|
||||
eth,
|
||||
subscription_task_executor,
|
||||
|
||||
@@ -297,7 +297,7 @@ async fn start_node_impl(
|
||||
#[cfg(not(feature = "tanssi"))]
|
||||
let slot_duration = sc_consensus_aura::slot_duration(&*client)?;
|
||||
|
||||
let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) =
|
||||
let (network, system_rpc_tx, tx_handler_controller, sync_service) =
|
||||
build_network(BuildNetworkParams {
|
||||
parachain_config: ¶chain_config,
|
||||
net_config,
|
||||
@@ -373,18 +373,11 @@ async fn start_node_impl(
|
||||
let overrides = overrides.clone();
|
||||
let fee_history_cache = fee_history_cache.clone();
|
||||
let pubsub_notification_sinks = pubsub_notification_sinks.clone();
|
||||
let graph_api = Arc::new(sc_transaction_pool::FullChainApi::new(
|
||||
client.clone(),
|
||||
None,
|
||||
&task_manager.spawn_essential_handle(),
|
||||
));
|
||||
let graph =
|
||||
Arc::new(sc_transaction_pool::Pool::new(Default::default(), true.into(), graph_api));
|
||||
Box::new(move |subscription_task_executor| {
|
||||
let eth = crate::rpc::EthDeps {
|
||||
client: client.clone(),
|
||||
pool: pool.clone(),
|
||||
graph: graph.clone(),
|
||||
graph: pool.clone(),
|
||||
converter: Some(TransactionConverter),
|
||||
is_authority: validator,
|
||||
enable_dev_signer,
|
||||
@@ -521,8 +514,6 @@ async fn start_node_impl(
|
||||
)?;
|
||||
}
|
||||
|
||||
start_network.start_network();
|
||||
|
||||
Ok((task_manager, client))
|
||||
}
|
||||
|
||||
@@ -623,6 +614,8 @@ fn start_consensus(
|
||||
collation_request_receiver: None,
|
||||
#[cfg(feature = "async-backing")]
|
||||
reinitialize: false,
|
||||
#[cfg(feature = "async-backing")]
|
||||
max_pov_percentage: None,
|
||||
};
|
||||
|
||||
#[cfg(not(feature = "async-backing"))]
|
||||
|
||||
Reference in New Issue
Block a user