From 1033457540fa0694aecd591e28f4cce131bb162b Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Tue, 26 Nov 2024 21:38:38 +0000 Subject: [PATCH] fix: updated tanssi-node and simple container chain template node configs to work with next txpool --- client/service-container-chain/src/rpc.rs | 2 +- client/service-container-chain/src/service.rs | 13 +++++++++---- client/service-container-chain/src/spawner.rs | 4 ++-- node/src/service.rs | 4 ++-- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/client/service-container-chain/src/rpc.rs b/client/service-container-chain/src/rpc.rs index 2232eb00a..fec3bb165 100644 --- a/client/service-container-chain/src/rpc.rs +++ b/client/service-container-chain/src/rpc.rs @@ -134,7 +134,7 @@ pub mod generate_rpc_builder { pub type SyncingService = sc_network_sync::SyncingService; pub type TransactionPool = - sc_transaction_pool::FullPool>; + sc_transaction_pool::TransactionPoolHandle>; pub type CommandSink = futures::channel::mpsc::Sender>; pub type XcmSenders = (flume::Sender>, flume::Sender<(ParaId, Vec)>); diff --git a/client/service-container-chain/src/service.rs b/client/service-container-chain/src/service.rs index 96f4340e5..c3aba7c39 100644 --- a/client/service-container-chain/src/service.rs +++ b/client/service-container-chain/src/service.rs @@ -45,7 +45,7 @@ use { }, sc_telemetry::TelemetryHandle, sc_tracing::tracing::Instrument, - sc_transaction_pool::FullPool, + sc_transaction_pool::TransactionPoolHandle, sp_api::ProvideRuntimeApi, sp_consensus::EnableProofRecording, sp_consensus_aura::SlotDuration, @@ -147,8 +147,11 @@ pub type ParachainBackend = TFullBackend; pub type DevParachainBlockImport = OrchestratorParachainBlockImport>; pub type ParachainBlockImport = TParachainBlockImport, ParachainBackend>; -pub type ParachainProposerFactory = - ProposerFactory, ParachainClient, EnableProofRecording>; +pub type ParachainProposerFactory = ProposerFactory< + TransactionPoolHandle, + ParachainClient, + EnableProofRecording, +>; // Container chains types type ContainerChainExecutor = WasmExecutor; @@ -334,7 +337,9 @@ fn start_consensus_container( spawner: SpawnTaskHandle, relay_chain_interface: Arc, orchestrator_chain_interface: Arc, - transaction_pool: Arc>>, + transaction_pool: Arc< + sc_transaction_pool::TransactionPoolHandle>, + >, sync_oracle: Arc>, keystore: KeystorePtr, force_authoring: bool, diff --git a/client/service-container-chain/src/spawner.rs b/client/service-container-chain/src/spawner.rs index bcbf9b3b9..d01e87d32 100644 --- a/client/service-container-chain/src/spawner.rs +++ b/client/service-container-chain/src/spawner.rs @@ -44,7 +44,7 @@ use { sc_cli::{Database, SyncMode}, sc_network::config::MultiaddrWithPeerId, sc_service::SpawnTaskHandle, - sc_transaction_pool::FullPool, + sc_transaction_pool::TransactionPoolHandle, sp_api::ProvideRuntimeApi, sp_core::H256, sp_keystore::KeystorePtr, @@ -135,7 +135,7 @@ pub struct ContainerChainSpawnParams< #[derive(Clone)] pub struct CollationParams { pub collator_key: CollatorPair, - pub orchestrator_tx_pool: Option>>, + pub orchestrator_tx_pool: Option>>, pub orchestrator_client: Option>, pub orchestrator_para_id: ParaId, /// If this is `false`, then `orchestrator_tx_pool` and `orchestrator_client` must be `Some`. diff --git a/node/src/service.rs b/node/src/service.rs index a2425171a..68780f9c8 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -65,7 +65,7 @@ use { sc_network_sync::SyncingService, sc_service::{Configuration, KeystoreContainer, SpawnTaskHandle, TFullBackend, TaskManager}, sc_telemetry::TelemetryHandle, - sc_transaction_pool::FullPool, + sc_transaction_pool::TransactionPoolHandle, sp_api::StorageProof, sp_consensus::SyncOracle, sp_consensus_slots::Slot, @@ -516,7 +516,7 @@ fn start_consensus_orchestrator( overseer_handle: OverseerHandle, announce_block: Arc>) + Send + Sync>, proposer_factory: ParachainProposerFactory, - orchestrator_tx_pool: Arc>, + orchestrator_tx_pool: Arc>, ) -> (CancellationToken, futures::channel::oneshot::Receiver<()>) { let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client) .expect("start_consensus_orchestrator: slot duration should exist");