git.delta.rocks / unique-network / refs/commits / 750f6e16db9b

difftreelog

fix lookahead collator build

Yaroslav Bolyukin2023-10-13parent: #71be677.patch.diff
in: master

6 files changed

modifiedCargo.lockdiffbeforeafterboth
6450 "cumulus-pallet-parachain-system",6450 "cumulus-pallet-parachain-system",
6451 "cumulus-pallet-xcm",6451 "cumulus-pallet-xcm",
6452 "cumulus-pallet-xcmp-queue",6452 "cumulus-pallet-xcmp-queue",
6453 "cumulus-primitives-aura",
6453 "cumulus-primitives-core",6454 "cumulus-primitives-core",
6454 "cumulus-primitives-timestamp",6455 "cumulus-primitives-timestamp",
6455 "cumulus-primitives-utility",6456 "cumulus-primitives-utility",
8109 "pallet-evm-coder-substrate",8110 "pallet-evm-coder-substrate",
8110 "pallet-nonfungible",8111 "pallet-nonfungible",
8111 "pallet-refungible",8112 "pallet-refungible",
8113 "pallet-structure",
8112 "parity-scale-codec",8114 "parity-scale-codec",
8113 "scale-info",8115 "scale-info",
8114 "sp-core",8116 "sp-core",
8115 "sp-io",8117 "sp-io",
8116 "sp-runtime",8118 "sp-runtime",
8117 "sp-std",8119 "sp-std",
8120 "up-common",
8118 "up-data-structs",8121 "up-data-structs",
8119]8122]
81208123
14732 "cumulus-client-consensus-proposer",14735 "cumulus-client-consensus-proposer",
14733 "cumulus-client-network",14736 "cumulus-client-network",
14734 "cumulus-client-service",14737 "cumulus-client-service",
14738 "cumulus-primitives-aura",
14735 "cumulus-primitives-core",14739 "cumulus-primitives-core",
14736 "cumulus-primitives-parachain-inherent",14740 "cumulus-primitives-parachain-inherent",
14737 "cumulus-relay-chain-inprocess-interface",14741 "cumulus-relay-chain-inprocess-interface",
modifiedCargo.tomldiffbeforeafterboth
100cumulus-pallet-parachain-system = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }100cumulus-pallet-parachain-system = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
101cumulus-pallet-xcm = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }101cumulus-pallet-xcm = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
102cumulus-pallet-xcmp-queue = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }102cumulus-pallet-xcmp-queue = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
103cumulus-primitives-aura = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
103cumulus-primitives-core = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }104cumulus-primitives-core = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
104cumulus-primitives-parachain-inherent = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }105cumulus-primitives-parachain-inherent = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
105cumulus-primitives-timestamp = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }106cumulus-primitives-timestamp = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
modifiednode/cli/Cargo.tomldiffbeforeafterboth
36cumulus-client-consensus-proposer = { workspace = true }36cumulus-client-consensus-proposer = { workspace = true }
37cumulus-client-network = { workspace = true }37cumulus-client-network = { workspace = true }
38cumulus-client-service = { workspace = true }38cumulus-client-service = { workspace = true }
39cumulus-primitives-aura = { workspace = true }
39cumulus-primitives-core = { workspace = true }40cumulus-primitives-core = { workspace = true }
40cumulus-primitives-parachain-inherent = { features = ["std"], workspace = true }41cumulus-primitives-parachain-inherent = { features = ["std"], workspace = true }
41cumulus-relay-chain-inprocess-interface = { workspace = true }42cumulus-relay-chain-inprocess-interface = { workspace = true }
114 'unique-runtime?/gov-test-timings',115 'unique-runtime?/gov-test-timings',
115]116]
116lookahead = []117lookahead = [
118 'opal-runtime/lookahead'
119]
117pov-estimate = [120pov-estimate = [
118 'opal-runtime/pov-estimate',121 'opal-runtime/pov-estimate',
modifiednode/cli/src/service.rsdiffbeforeafterboth
221 {221 {
222 }222 }
223);223);
224#[cfg(not(feature = "lookahead"))]
225ez_bounds!(
226 pub trait LookaheadApiDep {}
227);
228#[cfg(feature = "lookahead")]
229ez_bounds!(
230 pub trait LookaheadApiDep: cumulus_primitives_aura::AuraUnincludedSegmentApi<Block> {}
231);
224232
225/// Starts a `ServiceBuilder` for a full service.233/// Starts a `ServiceBuilder` for a full service.
226///234///
358 + Sync366 + Sync
359 + 'static,367 + 'static,
360 RuntimeApi::RuntimeApi: RuntimeApiDep<Runtime> + 'static,368 RuntimeApi::RuntimeApi: RuntimeApiDep<Runtime> + 'static,
369 RuntimeApi::RuntimeApi: LookaheadApiDep,
361 Runtime: RuntimeInstance,370 Runtime: RuntimeInstance,
362 ExecutorDispatch: NativeExecutionDispatch + 'static,371 ExecutorDispatch: NativeExecutionDispatch + 'static,
363{372{
687 announce_block: Arc<dyn Fn(Hash, Option<Vec<u8>>) + Send + Sync>,696 announce_block: Arc<dyn Fn(Hash, Option<Vec<u8>>) + Send + Sync>,
688}697}
689698
699// Clones ignored for optional lookahead collator
700#[allow(clippy::redundant_clone)]
690pub fn start_consensus<ExecutorDispatch, RuntimeApi, Runtime>(701pub fn start_consensus<ExecutorDispatch, RuntimeApi, Runtime>(
691 client: Arc<FullClient<RuntimeApi, ExecutorDispatch>>,702 client: Arc<FullClient<RuntimeApi, ExecutorDispatch>>,
692 transaction_pool: Arc<703 transaction_pool: Arc<
701 + Sync712 + Sync
702 + 'static,713 + 'static,
703 RuntimeApi::RuntimeApi: RuntimeApiDep<Runtime> + 'static,714 RuntimeApi::RuntimeApi: RuntimeApiDep<Runtime> + 'static,
715 RuntimeApi::RuntimeApi: LookaheadApiDep,
704 Runtime: RuntimeInstance,716 Runtime: RuntimeInstance,
705{717{
706 let StartConsensusParameters {718 let StartConsensusParameters {
735 client.clone(),747 client.clone(),
736 );748 );
737749
738 let block_import = ParachainBlockImport::new(client.clone(), backend);750 let block_import = ParachainBlockImport::new(client.clone(), backend.clone());
739751
740 let params = BuildAuraConsensusParams {752 let params = BuildAuraConsensusParams {
741 create_inherent_data_providers: move |_, ()| async move { Ok(()) },753 create_inherent_data_providers: move |_, ()| async move { Ok(()) },
742 block_import,754 block_import,
743 para_client: client,755 para_client: client.clone(),
744 #[cfg(feature = "lookahead")]756 #[cfg(feature = "lookahead")]
745 para_backend: backend,757 para_backend: backend,
746 para_id,758 para_id,
751 proposer,763 proposer,
752 collator_service,764 collator_service,
753 // With async-baking, we allowed to be both slower (longer authoring) and faster (multiple para blocks per relay block)765 // With async-baking, we allowed to be both slower (longer authoring) and faster (multiple para blocks per relay block)
766 #[cfg(not(feature = "lookahead"))]
754 authoring_duration: Duration::from_millis(500),767 authoring_duration: Duration::from_millis(500),
768 #[cfg(feature = "lookahead")]
769 authoring_duration: Duration::from_millis(1500),
755 overseer_handle,770 overseer_handle,
756 #[cfg(feature = "lookahead")]771 #[cfg(feature = "lookahead")]
757 code_hash_provider: || {},772 code_hash_provider: move |block_hash| {
773 client
774 .code_at(block_hash)
775 .ok()
776 .map(cumulus_primitives_core::relay_chain::ValidationCode)
777 .map(|c| c.hash())
778 },
758 collator_key,779 collator_key,
759 relay_chain_slot_duration,780 relay_chain_slot_duration,
762 task_manager.spawn_essential_handle().spawn(783 task_manager.spawn_essential_handle().spawn(
763 "aura",784 "aura",
764 None,785 None,
786 #[cfg(not(feature = "lookahead"))]
765 run_aura::<_, AuraAuthorityPair, _, _, _, _, _, _, _>(params),787 run_aura::<_, AuraAuthorityPair, _, _, _, _, _, _, _>(params),
788 #[cfg(feature = "lookahead")]
789 run_aura::<_, AuraAuthorityPair, _, _, _, _, _, _, _, _, _>(params),
766 );790 );
767 Ok(())791 Ok(())
768}792}
modifiedruntime/common/runtime_apis.rsdiffbeforeafterboth
679 }679 }
680 }680 }
681
682 #[cfg(feature = "lookahead")]
683 impl cumulus_primitives_aura::AuraUnincludedSegmentApi<Block> for Runtime {
684 fn can_build_upon(
685 _included_hash: <Block as BlockT>::Hash,
686 _slot: cumulus_primitives_aura::Slot,
687 ) -> bool {
688 // FIXME: Limit velocity
689 true
690 }
691 }
681692
682 /// Should never be used, yet still required because of https://github.com/paritytech/polkadot-sdk/issues/27693 /// Should never be used, yet still required because of https://github.com/paritytech/polkadot-sdk/issues/27
683 /// Not allowed to panic, because rpc may be called using native runtime, thus causing thread panic.694 /// Not allowed to panic, because rpc may be called using native runtime, thus causing thread panic.
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
69 'cumulus-pallet-parachain-system/std',69 'cumulus-pallet-parachain-system/std',
70 'cumulus-pallet-xcm/std',70 'cumulus-pallet-xcm/std',
71 'cumulus-pallet-xcmp-queue/std',71 'cumulus-pallet-xcmp-queue/std',
72 'cumulus-primitives-aura/std',
72 'cumulus-primitives-core/std',73 'cumulus-primitives-core/std',
73 'cumulus-primitives-utility/std',74 'cumulus-primitives-utility/std',
74 'frame-executive/std',75 'frame-executive/std',
230preimage = []231preimage = []
231refungible = []232refungible = []
232session-test-timings = []233session-test-timings = []
234lookahead = []
233235
234################################################################################236################################################################################
235# local dependencies237# local dependencies
240cumulus-pallet-parachain-system = { workspace = true }242cumulus-pallet-parachain-system = { workspace = true }
241cumulus-pallet-xcm = { workspace = true }243cumulus-pallet-xcm = { workspace = true }
242cumulus-pallet-xcmp-queue = { workspace = true }244cumulus-pallet-xcmp-queue = { workspace = true }
245cumulus-primitives-aura = { workspace = true }
243cumulus-primitives-core = { workspace = true }246cumulus-primitives-core = { workspace = true }
244cumulus-primitives-timestamp = { workspace = true }247cumulus-primitives-timestamp = { workspace = true }
245cumulus-primitives-utility = { workspace = true }248cumulus-primitives-utility = { workspace = true }