diff --git a/bridges/bin/millau/node/Cargo.toml b/bridges/bin/millau/node/Cargo.toml index a7a2f86ea3..a8d03c6f1a 100644 --- a/bridges/bin/millau/node/Cargo.toml +++ b/bridges/bin/millau/node/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/paritytech/parity-bridges-common/" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] -clap = { version = "3.1", features = ["derive"] } +clap = { version = "4.0.9", features = ["derive"] } jsonrpsee = { version = "0.15.1", features = ["server"] } serde_json = "1.0.79" diff --git a/bridges/bin/millau/node/src/service.rs b/bridges/bin/millau/node/src/service.rs index 72a1036c64..e23e1fa56c 100644 --- a/bridges/bin/millau/node/src/service.rs +++ b/bridges/bin/millau/node/src/service.rs @@ -19,7 +19,7 @@ use jsonrpsee::RpcModule; use millau_runtime::{self, opaque::Block, RuntimeApi}; use sc_client_api::BlockBackend; -use sc_consensus_aura::{ImportQueueParams, SlotProportion, StartAuraParams}; +use sc_consensus_aura::{CompatibilityMode, ImportQueueParams, SlotProportion, StartAuraParams}; pub use sc_executor::NativeElseWasmExecutor; use sc_finality_grandpa::SharedVoterState; use sc_keystore::LocalKeystore; @@ -159,6 +159,7 @@ pub fn new_partial( registry: config.prometheus_registry(), check_for_equivocation: Default::default(), telemetry: telemetry.as_ref().map(|x| x.handle()), + compatibility_mode: CompatibilityMode::None, })?; Ok(sc_service::PartialComponents { @@ -374,6 +375,7 @@ pub fn new_full(mut config: Configuration) -> Result block_proposal_slot_portion: SlotProportion::new(2f32 / 3f32), max_block_proposal_slot_portion: None, telemetry: telemetry.as_ref().map(|x| x.handle()), + compatibility_mode: CompatibilityMode::None, }, )?; diff --git a/bridges/bin/millau/runtime/Cargo.toml b/bridges/bin/millau/runtime/Cargo.toml index dfab9588d5..b297dedfa5 100644 --- a/bridges/bin/millau/runtime/Cargo.toml +++ b/bridges/bin/millau/runtime/Cargo.toml @@ -64,11 +64,10 @@ sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } # Polkadot Dependencies - -pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false } -xcm = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false } -xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false } -xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } +xcm = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } +xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } +xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } [dev-dependencies] bridge-runtime-common = { path = "../../runtime-common", features = ["integrity-test"] } diff --git a/bridges/bin/millau/runtime/src/lib.rs b/bridges/bin/millau/runtime/src/lib.rs index 1f60e91f59..09f17cf6cf 100644 --- a/bridges/bin/millau/runtime/src/lib.rs +++ b/bridges/bin/millau/runtime/src/lib.rs @@ -785,11 +785,11 @@ impl_runtime_apis! { } } - impl sp_mmr_primitives::MmrApi for Runtime { - fn generate_proof(leaf_index: u64) + impl sp_mmr_primitives::MmrApi for Runtime { + fn generate_proof(block_number: BlockNumber) -> Result<(EncodableOpaqueLeaf, MmrProof), MmrError> { - Mmr::generate_batch_proof(vec![leaf_index]) + Mmr::generate_batch_proof(vec![block_number]) .and_then(|(leaves, proof)| Ok(( mmr::EncodableOpaqueLeaf::from_leaf(&leaves[0]), mmr::BatchProof::into_single_leaf_proof(proof)? @@ -823,18 +823,18 @@ impl_runtime_apis! { Ok(Mmr::mmr_root()) } - fn generate_batch_proof(leaf_indices: Vec) + fn generate_batch_proof(block_numbers: Vec) -> Result<(Vec, mmr::BatchProof), mmr::Error> { - Mmr::generate_batch_proof(leaf_indices) + Mmr::generate_batch_proof(block_numbers) .map(|(leaves, proof)| (leaves.into_iter().map(|leaf| mmr::EncodableOpaqueLeaf::from_leaf(&leaf)).collect(), proof)) } fn generate_historical_batch_proof( - leaf_indices: Vec, - leaves_count: mmr::LeafIndex, + block_numbers: Vec, + best_known_block_number: BlockNumber ) -> Result<(Vec, mmr::BatchProof), mmr::Error> { - Mmr::generate_historical_batch_proof(leaf_indices, leaves_count).map( + Mmr::generate_historical_batch_proof(block_numbers, best_known_block_number).map( |(leaves, proof)| { ( leaves diff --git a/bridges/bin/rialto-parachain/node/Cargo.toml b/bridges/bin/rialto-parachain/node/Cargo.toml index 1b37cb3a3f..03d1a28c6a 100644 --- a/bridges/bin/rialto-parachain/node/Cargo.toml +++ b/bridges/bin/rialto-parachain/node/Cargo.toml @@ -17,7 +17,7 @@ default = [] runtime-benchmarks = ['rialto-parachain-runtime/runtime-benchmarks'] [dependencies] -clap = { version = "3.1", features = ["derive"] } +clap = { version = "4.0.9", features = ["derive"] } log = '0.4.17' codec = { package = 'parity-scale-codec', version = '3.1.5' } serde = { version = '1.0', features = ['derive'] } @@ -48,6 +48,7 @@ sc-network = { git = "https://github.com/paritytech/substrate", branch = "master sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-service = { git = "https://github.com/paritytech/substrate", branch = "master", features = ['wasmtime'] } +sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -66,17 +67,18 @@ sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "mast sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" } # Cumulus dependencies -cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "gav-xcm-v3" } -cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "gav-xcm-v3" } -cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "gav-xcm-v3" } -cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "gav-xcm-v3" } -cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "gav-xcm-v3" } -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "gav-xcm-v3" } -cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "gav-xcm-v3" } -cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "gav-xcm-v3" } -cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus", branch = "gav-xcm-v3" } +cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "master" } +cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "master" } +cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "master" } +cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "master" } +cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "master" } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "master" } +cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "master" } +cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "master" } +cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus", branch = "master" } +cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/cumulus", branch = "master" } # Polkadot dependencies -polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3" } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3" } -polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3" } +polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "master" } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "master" } +polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "master" } diff --git a/bridges/bin/rialto-parachain/node/src/service.rs b/bridges/bin/rialto-parachain/node/src/service.rs index 8d722b3caa..7dc25f6550 100644 --- a/bridges/bin/rialto-parachain/node/src/service.rs +++ b/bridges/bin/rialto-parachain/node/src/service.rs @@ -30,14 +30,16 @@ use rialto_parachain_runtime::RuntimeApi; // Cumulus Imports use cumulus_client_cli::CollatorOptions; use cumulus_client_consensus_aura::{AuraConsensus, BuildAuraConsensusParams, SlotProportion}; -use cumulus_client_consensus_common::ParachainConsensus; +use cumulus_client_consensus_common::{ParachainBlockImport, ParachainConsensus}; use cumulus_client_network::BlockAnnounceValidator; use cumulus_client_service::{ prepare_node_config, start_collator, start_full_node, StartCollatorParams, StartFullNodeParams, }; use cumulus_primitives_core::ParaId; use cumulus_relay_chain_inprocess_interface::build_inprocess_relay_chain; -use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface}; +use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface, RelayChainResult}; +use cumulus_relay_chain_minimal_node::build_minimal_relay_chain_node; +use polkadot_service::CollatorPair; // Substrate Imports use sc_executor::{NativeElseWasmExecutor, NativeExecutionDispatch}; @@ -187,6 +189,27 @@ where Ok(params) } +async fn build_relay_chain_interface( + polkadot_config: Configuration, + parachain_config: &Configuration, + telemetry_worker_handle: Option, + task_manager: &mut TaskManager, + collator_options: CollatorOptions, + hwbench: Option, +) -> RelayChainResult<(Arc<(dyn RelayChainInterface + 'static)>, Option)> { + match collator_options.relay_chain_rpc_url { + Some(relay_chain_url) => + build_minimal_relay_chain_node(polkadot_config, task_manager, relay_chain_url).await, + None => build_inprocess_relay_chain( + polkadot_config, + parachain_config, + telemetry_worker_handle, + task_manager, + hwbench, + ), + } +} + /// Start a node with the given parachain `Configuration` and relay chain `Configuration`. /// /// This is the actual implementation that is abstract over the executor and the runtime api. @@ -267,13 +290,15 @@ where let (mut telemetry, telemetry_worker_handle) = params.other; let mut task_manager = params.task_manager; - let (relay_chain_interface, collator_key) = build_inprocess_relay_chain( + let (relay_chain_interface, collator_key) = build_relay_chain_interface( polkadot_config, ¶chain_config, telemetry_worker_handle, &mut task_manager, + collator_options, None, ) + .await .map_err(|e| match e { RelayChainError::ServiceError(polkadot_service::Error::Sub(x)) => x, s => s.to_string().into(), @@ -367,7 +392,6 @@ where relay_chain_interface, relay_chain_slot_duration, import_queue, - collator_options, }; start_full_node(params)?; @@ -402,7 +426,7 @@ pub fn parachain_build_import_queue( _, _, >(cumulus_client_consensus_aura::ImportQueueParams { - block_import: client.clone(), + block_import: ParachainBlockImport::new(client.clone()), client, create_inherent_data_providers: move |_, _| async move { let time = sp_timestamp::InherentDataProvider::from_system_time(); @@ -497,7 +521,7 @@ pub async fn start_node( Ok((slot, time, parachain_inherent)) } }, - block_import: client.clone(), + block_import: ParachainBlockImport::new(client.clone()), para_client: client, backoff_authoring_blocks: Option::<()>::None, sync_oracle, diff --git a/bridges/bin/rialto-parachain/runtime/Cargo.toml b/bridges/bin/rialto-parachain/runtime/Cargo.toml index de30671626..467fbd3699 100644 --- a/bridges/bin/rialto-parachain/runtime/Cargo.toml +++ b/bridges/bin/rialto-parachain/runtime/Cargo.toml @@ -60,21 +60,21 @@ pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } # Cumulus Dependencies -cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", branch = "gav-xcm-v3", default-features = false } -cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "gav-xcm-v3", default-features = false } -cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "gav-xcm-v3", default-features = false } -cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "gav-xcm-v3", default-features = false } -cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "gav-xcm-v3", default-features = false } -cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "gav-xcm-v3", default-features = false } -cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "gav-xcm-v3", default-features = false } -parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "gav-xcm-v3", default-features = false } +cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", branch = "master", default-features = false } +cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "master", default-features = false } +cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "master", default-features = false } +cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "master", default-features = false } +cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "master", default-features = false } +cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "master", default-features = false } +cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "master", default-features = false } +parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "master", default-features = false } # Polkadot Dependencies -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false } -xcm = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false } -xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false } -xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false } -pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } +xcm = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } +xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } +xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } [features] default = ['std'] diff --git a/bridges/bin/rialto/node/Cargo.toml b/bridges/bin/rialto/node/Cargo.toml index 688279afc7..82b073896d 100644 --- a/bridges/bin/rialto/node/Cargo.toml +++ b/bridges/bin/rialto/node/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/paritytech/parity-bridges-common/" license = "GPL-3.0-or-later WITH Classpath-exception-2.0" [dependencies] -clap = { version = "3.1", features = ["derive"] } +clap = { version = "4.0.9", features = ["derive"] } serde_json = "1.0.79" # Bridge dependencies @@ -33,11 +33,10 @@ sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master" } # Polkadot Dependencies - -polkadot-node-core-pvf = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3" } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3" } -polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false, features = [ "full-node", "polkadot-native" ] } +polkadot-node-core-pvf = { git = "https://github.com/paritytech/polkadot", branch = "master" } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "master" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "master" } +polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false, features = [ "full-node", "polkadot-native" ] } [build-dependencies] substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/bridges/bin/rialto/runtime/Cargo.toml b/bridges/bin/rialto/runtime/Cargo.toml index fe2ab903b0..8b043d3788 100644 --- a/bridges/bin/rialto/runtime/Cargo.toml +++ b/bridges/bin/rialto/runtime/Cargo.toml @@ -60,14 +60,13 @@ sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } # Polkadot (parachain) Dependencies - -pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false } -polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false } -xcm = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false } -xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false } -xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } +polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } +xcm = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } +xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } +xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } [dev-dependencies] bridge-runtime-common = { path = "../../runtime-common", features = ["integrity-test"] } diff --git a/bridges/bin/rialto/runtime/src/lib.rs b/bridges/bin/rialto/runtime/src/lib.rs index ff7ad88725..53b0f821f3 100644 --- a/bridges/bin/rialto/runtime/src/lib.rs +++ b/bridges/bin/rialto/runtime/src/lib.rs @@ -637,11 +637,11 @@ impl_runtime_apis! { } } - impl sp_mmr_primitives::MmrApi for Runtime { - fn generate_proof(leaf_index: u64) + impl sp_mmr_primitives::MmrApi for Runtime { + fn generate_proof(block_number: BlockNumber) -> Result<(EncodableOpaqueLeaf, MmrProof), MmrError> { - Mmr::generate_batch_proof(vec![leaf_index]) + Mmr::generate_batch_proof(vec![block_number]) .and_then(|(leaves, proof)| Ok(( mmr::EncodableOpaqueLeaf::from_leaf(&leaves[0]), mmr::BatchProof::into_single_leaf_proof(proof)? @@ -679,18 +679,18 @@ impl_runtime_apis! { Ok(Mmr::mmr_root()) } - fn generate_batch_proof(leaf_indices: Vec) + fn generate_batch_proof(block_numbers: Vec) -> Result<(Vec, mmr::BatchProof), mmr::Error> { - Mmr::generate_batch_proof(leaf_indices) + Mmr::generate_batch_proof(block_numbers) .map(|(leaves, proof)| (leaves.into_iter().map(|leaf| mmr::EncodableOpaqueLeaf::from_leaf(&leaf)).collect(), proof)) } fn generate_historical_batch_proof( - leaf_indices: Vec, - leaves_count: mmr::LeafIndex, + block_numbers: Vec, + best_known_block_number: BlockNumber ) -> Result<(Vec, mmr::BatchProof), mmr::Error> { - Mmr::generate_historical_batch_proof(leaf_indices, leaves_count).map( + Mmr::generate_historical_batch_proof(block_numbers, best_known_block_number).map( |(leaves, proof)| { ( leaves diff --git a/bridges/bin/rialto/runtime/src/parachains.rs b/bridges/bin/rialto/runtime/src/parachains.rs index 583358e503..960931a0b3 100644 --- a/bridges/bin/rialto/runtime/src/parachains.rs +++ b/bridges/bin/rialto/runtime/src/parachains.rs @@ -186,6 +186,12 @@ impl polkadot_runtime_common::paras_registrar::WeightInfo for ZeroWeights { fn swap() -> Weight { Weight::from_ref_time(0) } + fn schedule_code_upgrade(_: u32) -> Weight { + Weight::from_ref_time(0) + } + fn set_current_head(_: u32) -> Weight { + Weight::from_ref_time(0) + } } impl polkadot_runtime_common::slots::WeightInfo for ZeroWeights { diff --git a/bridges/bin/runtime-common/Cargo.toml b/bridges/bin/runtime-common/Cargo.toml index 3f717b05c6..2fb64a5b73 100644 --- a/bridges/bin/runtime-common/Cargo.toml +++ b/bridges/bin/runtime-common/Cargo.toml @@ -36,11 +36,10 @@ sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", d sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } # Polkadot dependencies - -pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false } -xcm = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false } -xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false } -xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false } +pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } +xcm = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } +xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } +xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } [dev-dependencies] millau-runtime = { path = "../millau/runtime" } diff --git a/bridges/primitives/runtime/src/storage_proof.rs b/bridges/primitives/runtime/src/storage_proof.rs index 277456709f..e1465d2fa1 100644 --- a/bridges/primitives/runtime/src/storage_proof.rs +++ b/bridges/primitives/runtime/src/storage_proof.rs @@ -118,11 +118,8 @@ pub fn craft_valid_storage_proof() -> (sp_core::H256, StorageProof) { state_version, )); let root = backend.storage_root(std::iter::empty(), state_version).0; - let proof = StorageProof::new( - prove_read(backend, &[&b"key1"[..], &b"key2"[..], &b"key4"[..], &b"key22"[..]]) - .unwrap() - .iter_nodes(), - ); + let proof = + prove_read(backend, &[&b"key1"[..], &b"key2"[..], &b"key4"[..], &b"key22"[..]]).unwrap(); (root, proof) } diff --git a/bridges/relays/bin-substrate/Cargo.toml b/bridges/relays/bin-substrate/Cargo.toml index ab10efc63c..a3b5ef9213 100644 --- a/bridges/relays/bin-substrate/Cargo.toml +++ b/bridges/relays/bin-substrate/Cargo.toml @@ -51,12 +51,11 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master sp-version = { git = "https://github.com/paritytech/substrate", branch = "master" } # Polkadot Dependencies - -polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3" } -polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3" } -polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3" } -polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3" } -xcm = { git = "https://github.com/paritytech/polkadot", branch = "gav-xcm-v3", default-features = false } +polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "master" } +polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "master" } +polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", branch = "master" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "master" } +xcm = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false } [dev-dependencies] diff --git a/bridges/relays/client-substrate/src/metrics/storage_proof_overhead.rs b/bridges/relays/client-substrate/src/metrics/storage_proof_overhead.rs index 42793fe7c5..6e0b74020b 100644 --- a/bridges/relays/client-substrate/src/metrics/storage_proof_overhead.rs +++ b/bridges/relays/client-substrate/src/metrics/storage_proof_overhead.rs @@ -62,7 +62,7 @@ impl StorageProofOverheadMetric { .client .prove_storage(vec![StorageKey(CODE.to_vec())], best_header_hash) .await?; - let storage_proof_size: usize = storage_proof.clone().iter_nodes().map(|n| n.len()).sum(); + let storage_proof_size: usize = storage_proof.iter_nodes().map(|n| n.len()).sum(); let storage_value_reader = bp_runtime::StorageProofChecker::::new( *best_header.state_root(), diff --git a/bridges/relays/lib-substrate-relay/src/messages_source.rs b/bridges/relays/lib-substrate-relay/src/messages_source.rs index 632c36a51b..c02db3fb48 100644 --- a/bridges/relays/lib-substrate-relay/src/messages_source.rs +++ b/bridges/relays/lib-substrate-relay/src/messages_source.rs @@ -322,7 +322,7 @@ where .source_client .prove_storage(storage_keys, id.1) .await? - .iter_nodes() + .into_iter_nodes() .collect(); let proof = FromBridgedChainMessagesProof { bridged_header_hash: id.1, diff --git a/bridges/relays/lib-substrate-relay/src/messages_target.rs b/bridges/relays/lib-substrate-relay/src/messages_target.rs index 955f35942c..ed4d040b5d 100644 --- a/bridges/relays/lib-substrate-relay/src/messages_target.rs +++ b/bridges/relays/lib-substrate-relay/src/messages_target.rs @@ -230,7 +230,7 @@ where .target_client .prove_storage(vec![inbound_data_key], id.1) .await? - .iter_nodes() + .into_iter_nodes() .collect(); let proof = FromBridgedChainMessagesDeliveryProof { bridged_header_hash: id.1, diff --git a/bridges/relays/lib-substrate-relay/src/parachains/source.rs b/bridges/relays/lib-substrate-relay/src/parachains/source.rs index c23ac87947..2cae7f1a22 100644 --- a/bridges/relays/lib-substrate-relay/src/parachains/source.rs +++ b/bridges/relays/lib-substrate-relay/src/parachains/source.rs @@ -159,7 +159,7 @@ where .client .prove_storage(vec![storage_key.clone()], at_block.1) .await? - .iter_nodes() + .into_iter_nodes() .collect(); // why we're reading parachain head here once again (it has already been read at the