Skip to content

Commit

Permalink
fix: updated tanssi-node and simple container chain template node con…
Browse files Browse the repository at this point in the history
…figs to work with next txpool
  • Loading branch information
Aleksandar Brayanov committed Nov 26, 2024
1 parent 4ce3058 commit 1033457
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion client/service-container-chain/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ pub mod generate_rpc_builder {

pub type SyncingService = sc_network_sync::SyncingService<Block>;
pub type TransactionPool<RuntimeApi> =
sc_transaction_pool::FullPool<Block, ContainerChainClient<RuntimeApi>>;
sc_transaction_pool::TransactionPoolHandle<Block, ContainerChainClient<RuntimeApi>>;
pub type CommandSink =
futures::channel::mpsc::Sender<sc_consensus_manual_seal::EngineCommand<Hash>>;
pub type XcmSenders = (flume::Sender<Vec<u8>>, flume::Sender<(ParaId, Vec<u8>)>);
Expand Down
13 changes: 9 additions & 4 deletions client/service-container-chain/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -147,8 +147,11 @@ pub type ParachainBackend = TFullBackend<Block>;
pub type DevParachainBlockImport = OrchestratorParachainBlockImport<Arc<ParachainClient>>;
pub type ParachainBlockImport =
TParachainBlockImport<Block, Arc<ParachainClient>, ParachainBackend>;
pub type ParachainProposerFactory =
ProposerFactory<FullPool<Block, ParachainClient>, ParachainClient, EnableProofRecording>;
pub type ParachainProposerFactory = ProposerFactory<
TransactionPoolHandle<Block, ParachainClient>,
ParachainClient,
EnableProofRecording,
>;

// Container chains types
type ContainerChainExecutor = WasmExecutor<ParachainHostFunctions>;
Expand Down Expand Up @@ -334,7 +337,9 @@ fn start_consensus_container<RuntimeApi: MinimalContainerRuntimeApi>(
spawner: SpawnTaskHandle,
relay_chain_interface: Arc<dyn RelayChainInterface>,
orchestrator_chain_interface: Arc<dyn OrchestratorChainInterface>,
transaction_pool: Arc<sc_transaction_pool::FullPool<Block, ContainerChainClient<RuntimeApi>>>,
transaction_pool: Arc<
sc_transaction_pool::TransactionPoolHandle<Block, ContainerChainClient<RuntimeApi>>,
>,
sync_oracle: Arc<SyncingService<Block>>,
keystore: KeystorePtr,
force_authoring: bool,
Expand Down
4 changes: 2 additions & 2 deletions client/service-container-chain/src/spawner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -135,7 +135,7 @@ pub struct ContainerChainSpawnParams<
#[derive(Clone)]
pub struct CollationParams {
pub collator_key: CollatorPair,
pub orchestrator_tx_pool: Option<Arc<FullPool<OpaqueBlock, ParachainClient>>>,
pub orchestrator_tx_pool: Option<Arc<TransactionPoolHandle<OpaqueBlock, ParachainClient>>>,
pub orchestrator_client: Option<Arc<ParachainClient>>,
pub orchestrator_para_id: ParaId,
/// If this is `false`, then `orchestrator_tx_pool` and `orchestrator_client` must be `Some`.
Expand Down
4 changes: 2 additions & 2 deletions node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -516,7 +516,7 @@ fn start_consensus_orchestrator(
overseer_handle: OverseerHandle,
announce_block: Arc<dyn Fn(Hash, Option<Vec<u8>>) + Send + Sync>,
proposer_factory: ParachainProposerFactory,
orchestrator_tx_pool: Arc<FullPool<Block, ParachainClient>>,
orchestrator_tx_pool: Arc<TransactionPoolHandle<Block, ParachainClient>>,
) -> (CancellationToken, futures::channel::oneshot::Receiver<()>) {
let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)
.expect("start_consensus_orchestrator: slot duration should exist");
Expand Down

0 comments on commit 1033457

Please sign in to comment.