difftreelog
feat provide pending parachain inherent to ethereum
in: master
4 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -14979,6 +14979,7 @@
"cumulus-relay-chain-inprocess-interface",
"cumulus-relay-chain-interface",
"cumulus-relay-chain-minimal-node",
+ "cumulus-test-relay-sproof-builder",
"fc-api",
"fc-consensus",
"fc-db",
Cargo.tomldiffbeforeafterboth--- a/Cargo.toml
+++ b/Cargo.toml
@@ -109,6 +109,7 @@
cumulus-relay-chain-inprocess-interface = "0.10.0"
cumulus-relay-chain-interface = "0.10.0"
cumulus-relay-chain-minimal-node = "0.10.0"
+cumulus-test-relay-sproof-builder = "0.10.0"
parachains-common = { default-features = false, version = "10.0.0"}
frame-executive = { default-features = false, version = "31.0.0" }
frame-support = { default-features = false, version = "31.0.0" }
node/cli/Cargo.tomldiffbeforeafterboth--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -43,6 +43,7 @@
cumulus-relay-chain-interface = { workspace = true }
cumulus-relay-chain-minimal-node = { workspace = true }
cumulus-client-parachain-inherent = { workspace = true }
+cumulus-test-relay-sproof-builder = { workspace = true }
frame-benchmarking = { workspace = true }
frame-benchmarking-cli = { workspace = true }
opal-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