mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 23:21:02 +00:00
Switch to gav-xcm-v3 branch to be able to test bridges + XCMv3 integration (#1378)
* switch to gav-xcm-v3 branch (wip) * add comment * play with CI * keep playing with CI * play with CI * trigger CI * Revert "trigger CI" This reverts commit fc35ac648fe6a3ea8e710a2e07dfee7d8762c6c4.
This commit is contained in:
committed by
Bastian Köcher
parent
cf15c0d91b
commit
c538a39816
@@ -67,5 +67,6 @@ pub enum Subcommand {
|
||||
Inspect(node_inspect::cli::InspectCmd),
|
||||
|
||||
/// Benchmark runtime pallets.
|
||||
#[clap(subcommand)]
|
||||
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ use crate::{
|
||||
service,
|
||||
service::new_partial,
|
||||
};
|
||||
use frame_benchmarking_cli::BenchmarkCmd;
|
||||
use millau_runtime::{Block, RuntimeApi};
|
||||
use sc_cli::{ChainSpec, RuntimeVersion, SubstrateCli};
|
||||
use sc_service::PartialComponents;
|
||||
@@ -77,18 +78,23 @@ pub fn run() -> sc_cli::Result<()> {
|
||||
));
|
||||
|
||||
match &cli.subcommand {
|
||||
Some(Subcommand::Benchmark(cmd)) =>
|
||||
if cfg!(feature = "runtime-benchmarks") {
|
||||
let runner = cli.create_runner(cmd)?;
|
||||
|
||||
runner.sync_run(|config| cmd.run::<Block, service::ExecutorDispatch>(config))
|
||||
} else {
|
||||
println!(
|
||||
"Benchmarking wasn't enabled when building the node. \
|
||||
You can enable it with `--features runtime-benchmarks`."
|
||||
);
|
||||
Ok(())
|
||||
},
|
||||
Some(Subcommand::Benchmark(cmd)) => {
|
||||
let runner = cli.create_runner(cmd)?;
|
||||
match cmd {
|
||||
BenchmarkCmd::Pallet(cmd) =>
|
||||
if cfg!(feature = "runtime-benchmarks") {
|
||||
runner
|
||||
.sync_run(|config| cmd.run::<Block, service::ExecutorDispatch>(config))
|
||||
} else {
|
||||
println!(
|
||||
"Benchmarking wasn't enabled when building the node. \
|
||||
You can enable it with `--features runtime-benchmarks`."
|
||||
);
|
||||
Ok(())
|
||||
},
|
||||
_ => Err("Unsupported benchmarking subcommand".into()),
|
||||
}
|
||||
},
|
||||
Some(Subcommand::Key(cmd)) => cmd.run(&cli),
|
||||
Some(Subcommand::Sign(cmd)) => cmd.run(),
|
||||
Some(Subcommand::Verify(cmd)) => cmd.run(),
|
||||
|
||||
@@ -392,8 +392,9 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
|
||||
if role.is_authority() { Some(keystore_container.sync_keystore()) } else { None };
|
||||
|
||||
let beefy_params = beefy_gadget::BeefyParams {
|
||||
client,
|
||||
client: client.clone(),
|
||||
backend,
|
||||
runtime: client,
|
||||
key_store: keystore.clone(),
|
||||
network: network.clone(),
|
||||
signed_commitment_sender: beefy_commitment_link,
|
||||
@@ -407,7 +408,7 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
|
||||
task_manager.spawn_essential_handle().spawn_blocking(
|
||||
"beefy-gadget",
|
||||
None,
|
||||
beefy_gadget::start_beefy_gadget::<_, _, _, _>(beefy_params),
|
||||
beefy_gadget::start_beefy_gadget::<_, _, _, _, _>(beefy_params),
|
||||
);
|
||||
|
||||
let grandpa_config = sc_finality_grandpa::Config {
|
||||
|
||||
@@ -11,7 +11,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||
hex-literal = "0.3"
|
||||
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
|
||||
libsecp256k1 = { version = "0.7", optional = true, default-features = false, features = ["hmac"] }
|
||||
scale-info = { version = "2.0.1", default-features = false, features = ["derive"] }
|
||||
scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
|
||||
serde = { version = "1.0", optional = true, features = ["derive"] }
|
||||
|
||||
# Bridge dependencies
|
||||
@@ -44,7 +44,6 @@ pallet-beefy = { git = "https://github.com/paritytech/substrate", branch = "mast
|
||||
pallet-beefy-mmr = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-mmr = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
pallet-sudo = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
@@ -57,6 +56,7 @@ sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch =
|
||||
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
|
||||
@@ -39,13 +39,13 @@ use bridge_runtime_common::messages::{
|
||||
use pallet_grandpa::{
|
||||
fg_primitives, AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList,
|
||||
};
|
||||
use pallet_mmr_primitives::{
|
||||
DataOrHash, EncodableOpaqueLeaf, Error as MmrError, LeafDataProvider, Proof as MmrProof,
|
||||
};
|
||||
use pallet_transaction_payment::{FeeDetails, Multiplier, RuntimeDispatchInfo};
|
||||
use sp_api::impl_runtime_apis;
|
||||
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
|
||||
use sp_core::{crypto::KeyTypeId, OpaqueMetadata};
|
||||
use sp_mmr_primitives::{
|
||||
DataOrHash, EncodableOpaqueLeaf, Error as MmrError, LeafDataProvider, Proof as MmrProof,
|
||||
};
|
||||
use sp_runtime::{
|
||||
create_runtime_str, generic, impl_opaque_keys,
|
||||
traits::{Block as BlockT, IdentityLookup, Keccak256, NumberFor, OpaqueKeys},
|
||||
@@ -61,7 +61,10 @@ use sp_version::RuntimeVersion;
|
||||
pub use frame_support::{
|
||||
construct_runtime, parameter_types,
|
||||
traits::{Currency, ExistenceRequirement, Imbalance, KeyOwnerProofSystem},
|
||||
weights::{constants::WEIGHT_PER_SECOND, DispatchClass, IdentityFee, RuntimeDbWeight, Weight},
|
||||
weights::{
|
||||
constants::WEIGHT_PER_SECOND, ConstantMultiplier, DispatchClass, IdentityFee,
|
||||
RuntimeDbWeight, Weight,
|
||||
},
|
||||
StorageValue,
|
||||
};
|
||||
|
||||
@@ -278,10 +281,19 @@ parameter_types! {
|
||||
pub LeafVersion: MmrLeafVersion = MmrLeafVersion::new(0, 0);
|
||||
}
|
||||
|
||||
pub struct BeefyDummyDataProvider;
|
||||
|
||||
impl beefy_primitives::mmr::BeefyDataProvider<()> for BeefyDummyDataProvider {
|
||||
fn extra_data() -> () {
|
||||
()
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_beefy_mmr::Config for Runtime {
|
||||
type LeafVersion = LeafVersion;
|
||||
type BeefyAuthorityToMerkleLeaf = pallet_beefy_mmr::BeefyEcdsaToEthereum;
|
||||
type ParachainHeads = ();
|
||||
type LeafExtra = ();
|
||||
type BeefyDataProvider = BeefyDummyDataProvider;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
@@ -333,9 +345,9 @@ parameter_types! {
|
||||
|
||||
impl pallet_transaction_payment::Config for Runtime {
|
||||
type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, ()>;
|
||||
type TransactionByteFee = TransactionByteFee;
|
||||
type OperationalFeeMultiplier = OperationalFeeMultiplier;
|
||||
type WeightToFee = bp_millau::WeightToFee;
|
||||
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
|
||||
type FeeMultiplierUpdate = pallet_transaction_payment::TargetedFeeAdjustment<
|
||||
Runtime,
|
||||
TargetBlockFullness,
|
||||
@@ -669,7 +681,7 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_mmr_primitives::MmrApi<Block, MmrHash> for Runtime {
|
||||
impl sp_mmr_primitives::MmrApi<Block, MmrHash> for Runtime {
|
||||
fn generate_proof(leaf_index: u64)
|
||||
-> Result<(EncodableOpaqueLeaf, MmrProof<MmrHash>), MmrError>
|
||||
{
|
||||
@@ -700,6 +712,10 @@ impl_runtime_apis! {
|
||||
let node = DataOrHash::Data(leaf.into_opaque_leaf());
|
||||
pallet_mmr::verify_leaf_proof::<MmrHashing, _>(root, node, proof)
|
||||
}
|
||||
|
||||
fn mmr_root() -> Result<MmrHash, MmrError> {
|
||||
Ok(Mmr::mmr_root())
|
||||
}
|
||||
}
|
||||
|
||||
impl fg_primitives::GrandpaApi<Block> for Runtime {
|
||||
|
||||
Reference in New Issue
Block a user