mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 06:21:02 +00:00
Bump xcm v3 + substrate
* Bumping substrate/polkadot/cumulus * Update Cargo.lock * Fixes * Fixes for mmr * Bump clap * Fix for millau - added CompatibilityMode * Fixes for rialto-parachain * Align everywhere branch='master' and just use overrides from main Cargo.toml
This commit is contained in:
committed by
Bastian Köcher
parent
a979340e49
commit
2c0b6b73e0
@@ -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"
|
||||
|
||||
|
||||
@@ -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<TaskManager, ServiceError>
|
||||
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,
|
||||
},
|
||||
)?;
|
||||
|
||||
|
||||
@@ -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"] }
|
||||
|
||||
@@ -785,11 +785,11 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_mmr_primitives::MmrApi<Block, mmr::Hash> for Runtime {
|
||||
fn generate_proof(leaf_index: u64)
|
||||
impl sp_mmr_primitives::MmrApi<Block, mmr::Hash, BlockNumber> for Runtime {
|
||||
fn generate_proof(block_number: BlockNumber)
|
||||
-> Result<(EncodableOpaqueLeaf, MmrProof<mmr::Hash>), 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<pallet_mmr::primitives::LeafIndex>)
|
||||
fn generate_batch_proof(block_numbers: Vec<BlockNumber>)
|
||||
-> Result<(Vec<mmr::EncodableOpaqueLeaf>, mmr::BatchProof<mmr::Hash>), 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<mmr::LeafIndex>,
|
||||
leaves_count: mmr::LeafIndex,
|
||||
block_numbers: Vec<BlockNumber>,
|
||||
best_known_block_number: BlockNumber
|
||||
) -> Result<(Vec<mmr::EncodableOpaqueLeaf>, mmr::BatchProof<mmr::Hash>), 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
|
||||
|
||||
Reference in New Issue
Block a user