difftreelog
feat provide pending parachain inherent to ethereum
in: master
4 files changed
Cargo.lockdiffbeforeafterboth14979 "cumulus-relay-chain-inprocess-interface",14979 "cumulus-relay-chain-inprocess-interface",14980 "cumulus-relay-chain-interface",14980 "cumulus-relay-chain-interface",14981 "cumulus-relay-chain-minimal-node",14981 "cumulus-relay-chain-minimal-node",14982 "cumulus-test-relay-sproof-builder",14982 "fc-api",14983 "fc-api",14983 "fc-consensus",14984 "fc-consensus",14984 "fc-db",14985 "fc-db",Cargo.tomldiffbeforeafterboth109cumulus-relay-chain-inprocess-interface = "0.10.0"109cumulus-relay-chain-inprocess-interface = "0.10.0"110cumulus-relay-chain-interface = "0.10.0"110cumulus-relay-chain-interface = "0.10.0"111cumulus-relay-chain-minimal-node = "0.10.0"111cumulus-relay-chain-minimal-node = "0.10.0"112cumulus-test-relay-sproof-builder = "0.10.0"112parachains-common = { default-features = false, version = "10.0.0"}113parachains-common = { default-features = false, version = "10.0.0"}113frame-executive = { default-features = false, version = "31.0.0" }114frame-executive = { default-features = false, version = "31.0.0" }114frame-support = { default-features = false, version = "31.0.0" }115frame-support = { default-features = false, version = "31.0.0" }node/cli/Cargo.tomldiffbeforeafterboth43cumulus-relay-chain-interface = { workspace = true }43cumulus-relay-chain-interface = { workspace = true }44cumulus-relay-chain-minimal-node = { workspace = true }44cumulus-relay-chain-minimal-node = { workspace = true }45cumulus-client-parachain-inherent = { workspace = true }45cumulus-client-parachain-inherent = { workspace = true }46cumulus-test-relay-sproof-builder = { workspace = true }46frame-benchmarking = { workspace = true }47frame-benchmarking = { workspace = true }47frame-benchmarking-cli = { workspace = true }48frame-benchmarking-cli = { workspace = true }48opal-runtime = { workspace = true, optional = true }49opal-runtime = { workspace = true, optional = true }node/cli/src/service.rsdiffbeforeafterboth40 StartRelayChainTasksParams,40 StartRelayChainTasksParams,41};41};42use cumulus_primitives_core::ParaId;42use cumulus_primitives_core::ParaId;43use cumulus_primitives_parachain_inherent::ParachainInherentData;43use cumulus_relay_chain_interface::{OverseerHandle, RelayChainInterface};44use cumulus_relay_chain_interface::{OverseerHandle, RelayChainInterface};44use fc_mapping_sync::{kv::MappingSyncWorker, EthereumBlockNotificationSinks, SyncStrategy};45use fc_mapping_sync::{kv::MappingSyncWorker, EthereumBlockNotificationSinks, SyncStrategy};45use fc_rpc::{46use fc_rpc::{81 cumulus_client_service::storage_proof_size::HostFunctions,82 cumulus_client_service::storage_proof_size::HostFunctions,82);83);8485use cumulus_primitives_core::PersistedValidationData;86use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;838784use crate::{88use crate::{85 chain_spec::RuntimeIdentification,89 chain_spec::RuntimeIdentification,234 pub trait LookaheadApiDep: cumulus_primitives_aura::AuraUnincludedSegmentApi<Block> {}238 pub trait LookaheadApiDep: cumulus_primitives_aura::AuraUnincludedSegmentApi<Block> {}235);239);240241fn ethereum_parachain_inherent() -> ParachainInherentData {242 let (relay_parent_storage_root, relay_chain_state) =243 RelayStateSproofBuilder::default().into_state_root_and_proof();244 let vfp = PersistedValidationData {245 // This is a hack to make `cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases`246 // happy. Relay parent number can't be bigger than u32::MAX.247 relay_parent_number: u32::MAX,248 relay_parent_storage_root,249 ..Default::default()250 };251252 ParachainInherentData {253 validation_data: vfp,254 relay_chain_state,255 downward_messages: Default::default(),256 horizontal_messages: Default::default(),257 }258}236259237/// Starts a `ServiceBuilder` for a full service.260/// Starts a `ServiceBuilder` for a full service.238///261///534 overrides,557 overrides,535 sync: sync_service.clone(),558 sync: sync_service.clone(),536 pending_create_inherent_data_providers: |_, ()| async move { Ok(()) },559 pending_create_inherent_data_providers: |_, ()| async move {560 Ok((ethereum_parachain_inherent(),))561 },537 };562 };5385631122 sync: sync_service.clone(),1147 sync: sync_service.clone(),1123 // We don't have any inherents except parachain built-ins, which we can't even extract from inside `run_aura`.1148 // We don't have any inherents except parachain built-ins, which we can't even extract from inside `run_aura`.1124 pending_create_inherent_data_providers: |_, ()| async move { Ok(()) },1149 pending_create_inherent_data_providers: |_, ()| async move {1150 Ok((ethereum_parachain_inherent(),))1151 },1125 };1152 };11261153