mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 21:01: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
@@ -35,7 +35,6 @@ frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch =
|
||||
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
node-inspect = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
pallet-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
pallet-mmr-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
@@ -66,6 +65,7 @@ sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch =
|
||||
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-offchain = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-session = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
@@ -76,10 +76,10 @@ substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate
|
||||
|
||||
# Polkadot Dependencies
|
||||
|
||||
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" ] }
|
||||
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" ] }
|
||||
|
||||
[build-dependencies]
|
||||
substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||
|
||||
@@ -67,6 +67,7 @@ pub enum Subcommand {
|
||||
Inspect(node_inspect::cli::InspectCmd),
|
||||
|
||||
/// Benchmark runtime pallets.
|
||||
#[clap(subcommand)]
|
||||
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
|
||||
|
||||
/// FOR INTERNAL USE: analog of the "prepare-worker" command of the polkadot binary.
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::cli::{Cli, Subcommand};
|
||||
use frame_benchmarking_cli::BenchmarkCmd;
|
||||
use rialto_runtime::{Block, RuntimeApi};
|
||||
use sc_cli::{ChainSpec, Role, RuntimeVersion, SubstrateCli};
|
||||
|
||||
@@ -86,18 +87,22 @@ 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, 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, 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(),
|
||||
|
||||
@@ -12,7 +12,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features =
|
||||
hex-literal = "0.3"
|
||||
libsecp256k1 = { version = "0.7", optional = true, default-features = false, features = ["hmac"] }
|
||||
log = { version = "0.4.14", default-features = false }
|
||||
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-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 }
|
||||
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||
@@ -58,6 +57,7 @@ sp-core = { git = "https://github.com/paritytech/substrate", branch = "master",
|
||||
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-io = { 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 }
|
||||
@@ -68,9 +68,9 @@ sp-version = { git = "https://github.com/paritytech/substrate", branch = "master
|
||||
|
||||
# Polkadot (parachain) Dependencies
|
||||
|
||||
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 }
|
||||
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 }
|
||||
|
||||
[dev-dependencies]
|
||||
bridge-runtime-common = { path = "../../runtime-common", features = ["integrity-test"] }
|
||||
@@ -108,7 +108,7 @@ std = [
|
||||
"pallet-bridge-messages/std",
|
||||
"pallet-grandpa/std",
|
||||
"pallet-mmr/std",
|
||||
"pallet-mmr-primitives/std",
|
||||
"sp-mmr-primitives/std",
|
||||
"pallet-shift-session-manager/std",
|
||||
"pallet-sudo/std",
|
||||
"pallet-timestamp/std",
|
||||
|
||||
@@ -40,13 +40,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_authority_discovery::AuthorityId as AuthorityDiscoveryId;
|
||||
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::{AccountIdLookup, Block as BlockT, Keccak256, NumberFor, OpaqueKeys},
|
||||
@@ -305,10 +305,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! {
|
||||
@@ -360,9 +369,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_rialto::WeightToFee;
|
||||
type LengthToFee = bp_rialto::WeightToFee;
|
||||
type FeeMultiplierUpdate = pallet_transaction_payment::TargetedFeeAdjustment<
|
||||
Runtime,
|
||||
TargetBlockFullness,
|
||||
@@ -610,7 +619,7 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_mmr_primitives::MmrApi<Block, Hash> for Runtime {
|
||||
impl sp_mmr_primitives::MmrApi<Block, Hash> for Runtime {
|
||||
fn generate_proof(leaf_index: u64)
|
||||
-> Result<(EncodableOpaqueLeaf, MmrProof<Hash>), MmrError>
|
||||
{
|
||||
@@ -641,6 +650,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<Hash, MmrError> {
|
||||
Ok(Mmr::mmr_root())
|
||||
}
|
||||
}
|
||||
|
||||
impl bp_millau::MillauFinalityApi<Block> for Runtime {
|
||||
@@ -715,7 +728,7 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl polkadot_primitives::v2::ParachainHost<Block, Hash, BlockNumber> for Runtime {
|
||||
impl polkadot_primitives::runtime_api::ParachainHost<Block, Hash, BlockNumber> for Runtime {
|
||||
fn validators() -> Vec<polkadot_primitives::v2::ValidatorId> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v2::validators::<Runtime>()
|
||||
}
|
||||
@@ -809,6 +822,10 @@ impl_runtime_apis! {
|
||||
{
|
||||
polkadot_runtime_parachains::runtime_api_impl::v2::validation_code_hash::<Runtime>(para_id, assumption)
|
||||
}
|
||||
|
||||
fn staging_get_disputes() -> Vec<(polkadot_primitives::v2::SessionIndex, polkadot_primitives::v2::CandidateHash, polkadot_primitives::v2::DisputeState<BlockNumber>)> {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_authority_discovery::AuthorityDiscoveryApi<Block> for Runtime {
|
||||
|
||||
Reference in New Issue
Block a user