mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-21 15:35:42 +00:00
Add mmr_root() to pallet-mmr API to expose root from state (companion for substrate#11183) (#5276)
* Add mmr_root() to pallet-mmr API to expose root from state
* use the right MmrApi primitives
* bridges: use correct mmr primitives
* rococo: beefy-mmr deposit mmr root digest
* fix lockfile
* update lockfile for {"substrate"}
Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+205
-189
File diff suppressed because it is too large
Load Diff
@@ -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-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-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 = { 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-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-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-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-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-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-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-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-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 }
|
sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -114,6 +114,7 @@ std = [
|
|||||||
"sp-core/std",
|
"sp-core/std",
|
||||||
"sp-finality-grandpa/std",
|
"sp-finality-grandpa/std",
|
||||||
"sp-inherents/std",
|
"sp-inherents/std",
|
||||||
|
"sp-mmr-primitives/std",
|
||||||
"sp-offchain/std",
|
"sp-offchain/std",
|
||||||
"sp-runtime/std",
|
"sp-runtime/std",
|
||||||
"sp-session/std",
|
"sp-session/std",
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ use bridge_runtime_common::messages::{
|
|||||||
use pallet_grandpa::{
|
use pallet_grandpa::{
|
||||||
fg_primitives, AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList,
|
fg_primitives, AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList,
|
||||||
};
|
};
|
||||||
use pallet_mmr_primitives::{
|
use sp_mmr_primitives::{
|
||||||
DataOrHash, EncodableOpaqueLeaf, Error as MmrError, LeafDataProvider, Proof as MmrProof,
|
DataOrHash, EncodableOpaqueLeaf, Error as MmrError, LeafDataProvider, Proof as MmrProof,
|
||||||
};
|
};
|
||||||
use pallet_transaction_payment::{FeeDetails, Multiplier, RuntimeDispatchInfo};
|
use pallet_transaction_payment::{FeeDetails, Multiplier, RuntimeDispatchInfo};
|
||||||
@@ -680,7 +680,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)
|
fn generate_proof(leaf_index: u64)
|
||||||
-> Result<(EncodableOpaqueLeaf, MmrProof<MmrHash>), MmrError>
|
-> Result<(EncodableOpaqueLeaf, MmrProof<MmrHash>), MmrError>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
frame-system-rpc-runtime-api = { 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" }
|
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-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 = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
@@ -51,6 +50,7 @@ sc-executor = { git = "https://github.com/paritytech/substrate", branch = "maste
|
|||||||
sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sc-finality-grandpa-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
|
sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master"}
|
||||||
sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
|
|||||||
@@ -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-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-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 = { 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-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-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 }
|
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-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-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-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-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-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 }
|
sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -108,7 +108,6 @@ std = [
|
|||||||
"pallet-bridge-messages/std",
|
"pallet-bridge-messages/std",
|
||||||
"pallet-grandpa/std",
|
"pallet-grandpa/std",
|
||||||
"pallet-mmr/std",
|
"pallet-mmr/std",
|
||||||
"pallet-mmr-primitives/std",
|
|
||||||
"pallet-shift-session-manager/std",
|
"pallet-shift-session-manager/std",
|
||||||
"pallet-sudo/std",
|
"pallet-sudo/std",
|
||||||
"pallet-timestamp/std",
|
"pallet-timestamp/std",
|
||||||
@@ -127,6 +126,7 @@ std = [
|
|||||||
"sp-finality-grandpa/std",
|
"sp-finality-grandpa/std",
|
||||||
"sp-inherents/std",
|
"sp-inherents/std",
|
||||||
"sp-io/std",
|
"sp-io/std",
|
||||||
|
"sp-mmr-primitives/std",
|
||||||
"sp-offchain/std",
|
"sp-offchain/std",
|
||||||
"sp-runtime/std",
|
"sp-runtime/std",
|
||||||
"sp-session/std",
|
"sp-session/std",
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ use bridge_runtime_common::messages::{
|
|||||||
use pallet_grandpa::{
|
use pallet_grandpa::{
|
||||||
fg_primitives, AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList,
|
fg_primitives, AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList,
|
||||||
};
|
};
|
||||||
use pallet_mmr_primitives::{
|
use sp_mmr_primitives::{
|
||||||
DataOrHash, EncodableOpaqueLeaf, Error as MmrError, LeafDataProvider, Proof as MmrProof,
|
DataOrHash, EncodableOpaqueLeaf, Error as MmrError, LeafDataProvider, Proof as MmrProof,
|
||||||
};
|
};
|
||||||
use pallet_transaction_payment::{FeeDetails, Multiplier, RuntimeDispatchInfo};
|
use pallet_transaction_payment::{FeeDetails, Multiplier, RuntimeDispatchInfo};
|
||||||
@@ -626,7 +626,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)
|
fn generate_proof(leaf_index: u64)
|
||||||
-> Result<(EncodableOpaqueLeaf, MmrProof<Hash>), MmrError>
|
-> Result<(EncodableOpaqueLeaf, MmrProof<Hash>), MmrError>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,14 +28,13 @@ sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch =
|
|||||||
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
sp-offchain = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "master" }
|
sp-offchain = { package = "sp-offchain", git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
|
sp-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
|
|
||||||
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
sc-service = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sc-service = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
|
|
||||||
pallet-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
|
||||||
|
|
||||||
beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
beefy-primitives = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
|
|
||||||
# Polkadot Runtimes
|
# Polkadot Runtimes
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ pub trait RuntimeApiCollection:
|
|||||||
+ ParachainHost<Block>
|
+ ParachainHost<Block>
|
||||||
+ sp_block_builder::BlockBuilder<Block>
|
+ sp_block_builder::BlockBuilder<Block>
|
||||||
+ frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce>
|
+ frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce>
|
||||||
+ pallet_mmr_primitives::MmrApi<Block, <Block as BlockT>::Hash>
|
+ sp_mmr_primitives::MmrApi<Block, <Block as BlockT>::Hash>
|
||||||
+ pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
|
+ pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
|
||||||
+ sp_api::Metadata<Block>
|
+ sp_api::Metadata<Block>
|
||||||
+ sp_offchain::OffchainWorkerApi<Block>
|
+ sp_offchain::OffchainWorkerApi<Block>
|
||||||
@@ -149,7 +149,7 @@ where
|
|||||||
+ ParachainHost<Block>
|
+ ParachainHost<Block>
|
||||||
+ sp_block_builder::BlockBuilder<Block>
|
+ sp_block_builder::BlockBuilder<Block>
|
||||||
+ frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce>
|
+ frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce>
|
||||||
+ pallet_mmr_primitives::MmrApi<Block, <Block as BlockT>::Hash>
|
+ sp_mmr_primitives::MmrApi<Block, <Block as BlockT>::Hash>
|
||||||
+ pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
|
+ pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>
|
||||||
+ sp_api::Metadata<Block>
|
+ sp_api::Metadata<Block>
|
||||||
+ sp_offchain::OffchainWorkerApi<Block>
|
+ sp_offchain::OffchainWorkerApi<Block>
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "maste
|
|||||||
pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
pallet-mmr-primitives = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
|
||||||
|
|
||||||
# Substrate Other
|
# Substrate Other
|
||||||
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
|
|||||||
@@ -1116,6 +1116,7 @@ where
|
|||||||
let beefy_params = beefy_gadget::BeefyParams {
|
let beefy_params = beefy_gadget::BeefyParams {
|
||||||
client: client.clone(),
|
client: client.clone(),
|
||||||
backend: backend.clone(),
|
backend: backend.clone(),
|
||||||
|
runtime: client.clone(),
|
||||||
key_store: keystore_opt.clone(),
|
key_store: keystore_opt.clone(),
|
||||||
network: network.clone(),
|
network: network.clone(),
|
||||||
signed_commitment_sender: beefy_links.0,
|
signed_commitment_sender: beefy_links.0,
|
||||||
@@ -1125,7 +1126,7 @@ where
|
|||||||
protocol_name: beefy_protocol_name,
|
protocol_name: beefy_protocol_name,
|
||||||
};
|
};
|
||||||
|
|
||||||
let gadget = beefy_gadget::start_beefy_gadget::<_, _, _, _>(beefy_params);
|
let gadget = beefy_gadget::start_beefy_gadget::<_, _, _, _, _>(beefy_params);
|
||||||
|
|
||||||
// Wococo's purpose is to be a testbed for BEEFY, so if it fails we'll
|
// Wococo's purpose is to be a testbed for BEEFY, so if it fails we'll
|
||||||
// bring the node down with it to make sure it is noticed.
|
// bring the node down with it to make sure it is noticed.
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ offchain-primitives = { package = "sp-offchain", git = "https://github.com/parit
|
|||||||
sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
sp-arithmetic = { package = "sp-arithmetic", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-arithmetic = { package = "sp-arithmetic", 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-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-runtime = { 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-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -55,7 +56,6 @@ pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "m
|
|||||||
pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-membership = { 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-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-nicks = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-nicks = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -161,6 +161,7 @@ std = [
|
|||||||
"pallet-vesting/std",
|
"pallet-vesting/std",
|
||||||
"pallet-babe/std",
|
"pallet-babe/std",
|
||||||
"pallet-xcm/std",
|
"pallet-xcm/std",
|
||||||
|
"sp-mmr-primitives/std",
|
||||||
"sp-runtime/std",
|
"sp-runtime/std",
|
||||||
"sp-staking/std",
|
"sp-staking/std",
|
||||||
"frame-system/std",
|
"frame-system/std",
|
||||||
@@ -177,7 +178,6 @@ std = [
|
|||||||
"sp-npos-elections/std",
|
"sp-npos-elections/std",
|
||||||
"beefy-primitives/std",
|
"beefy-primitives/std",
|
||||||
"kusama-runtime-constants/std",
|
"kusama-runtime-constants/std",
|
||||||
"pallet-mmr-primitives/std",
|
|
||||||
"xcm/std",
|
"xcm/std",
|
||||||
"xcm-executor/std",
|
"xcm-executor/std",
|
||||||
"xcm-builder/std",
|
"xcm-builder/std",
|
||||||
|
|||||||
@@ -62,10 +62,10 @@ use frame_support::{
|
|||||||
use frame_system::EnsureRoot;
|
use frame_system::EnsureRoot;
|
||||||
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
|
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
|
||||||
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
|
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
|
||||||
use pallet_mmr_primitives as mmr;
|
|
||||||
use pallet_session::historical as session_historical;
|
use pallet_session::historical as session_historical;
|
||||||
use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
|
use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
|
||||||
use sp_core::OpaqueMetadata;
|
use sp_core::OpaqueMetadata;
|
||||||
|
use sp_mmr_primitives as mmr;
|
||||||
use sp_runtime::{
|
use sp_runtime::{
|
||||||
create_runtime_str, generic, impl_opaque_keys,
|
create_runtime_str, generic, impl_opaque_keys,
|
||||||
traits::{
|
traits::{
|
||||||
@@ -1795,6 +1795,12 @@ sp_api::impl_runtime_apis! {
|
|||||||
// dummy implementation due to lack of MMR pallet.
|
// dummy implementation due to lack of MMR pallet.
|
||||||
Err(mmr::Error::Verify)
|
Err(mmr::Error::Verify)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn mmr_root() -> Result<Hash, mmr::Error> {
|
||||||
|
// dummy implementation due to lack of MMR pallet.
|
||||||
|
Err(mmr::Error::Verify)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fg_primitives::GrandpaApi<Block> for Runtime {
|
impl fg_primitives::GrandpaApi<Block> for Runtime {
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/parit
|
|||||||
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-std = { 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-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-runtime = { 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-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -52,7 +53,6 @@ pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "m
|
|||||||
pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-membership = { 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-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-nicks = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-nicks = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -119,6 +119,7 @@ std = [
|
|||||||
"block-builder-api/std",
|
"block-builder-api/std",
|
||||||
"offchain-primitives/std",
|
"offchain-primitives/std",
|
||||||
"sp-std/std",
|
"sp-std/std",
|
||||||
|
"sp-mmr-primitives/std",
|
||||||
"frame-support/std",
|
"frame-support/std",
|
||||||
"frame-executive/std",
|
"frame-executive/std",
|
||||||
"pallet-authority-discovery/std",
|
"pallet-authority-discovery/std",
|
||||||
@@ -167,7 +168,6 @@ std = [
|
|||||||
"frame-try-runtime/std",
|
"frame-try-runtime/std",
|
||||||
"sp-npos-elections/std",
|
"sp-npos-elections/std",
|
||||||
"beefy-primitives/std",
|
"beefy-primitives/std",
|
||||||
"pallet-mmr-primitives/std",
|
|
||||||
"frame-election-provider-support/std",
|
"frame-election-provider-support/std",
|
||||||
"pallet-xcm/std",
|
"pallet-xcm/std",
|
||||||
"xcm/std",
|
"xcm/std",
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ use frame_support::{
|
|||||||
use frame_system::EnsureRoot;
|
use frame_system::EnsureRoot;
|
||||||
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
|
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
|
||||||
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
|
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
|
||||||
use pallet_mmr_primitives as mmr;
|
|
||||||
use pallet_session::historical as session_historical;
|
use pallet_session::historical as session_historical;
|
||||||
use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
|
use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
|
||||||
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
|
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
|
||||||
@@ -65,6 +64,7 @@ use primitives::v2::{
|
|||||||
ValidationCodeHash, ValidatorId, ValidatorIndex,
|
ValidationCodeHash, ValidatorId, ValidatorIndex,
|
||||||
};
|
};
|
||||||
use sp_core::OpaqueMetadata;
|
use sp_core::OpaqueMetadata;
|
||||||
|
use sp_mmr_primitives as mmr;
|
||||||
use sp_runtime::{
|
use sp_runtime::{
|
||||||
create_runtime_str,
|
create_runtime_str,
|
||||||
curve::PiecewiseLinear,
|
curve::PiecewiseLinear,
|
||||||
@@ -1943,6 +1943,11 @@ sp_api::impl_runtime_apis! {
|
|||||||
// dummy implementation due to lack of MMR pallet.
|
// dummy implementation due to lack of MMR pallet.
|
||||||
Err(mmr::Error::Verify)
|
Err(mmr::Error::Verify)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn mmr_root() -> Result<Hash, mmr::Error> {
|
||||||
|
// dummy implementation due to lack of MMR pallet.
|
||||||
|
Err(mmr::Error::Verify)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fg_primitives::GrandpaApi<Block> for Runtime {
|
impl fg_primitives::GrandpaApi<Block> for Runtime {
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ frame-support = { git = "https://github.com/paritytech/substrate", branch = "mas
|
|||||||
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-api = { 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-io = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-std = { package = "sp-std", 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-runtime = { 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 }
|
sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -44,7 +45,6 @@ pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "
|
|||||||
pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-membership = { 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 = { 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-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -118,7 +118,6 @@ std = [
|
|||||||
"pallet-sudo/std",
|
"pallet-sudo/std",
|
||||||
"pallet-membership/std",
|
"pallet-membership/std",
|
||||||
"pallet-mmr/std",
|
"pallet-mmr/std",
|
||||||
"pallet-mmr-primitives/std",
|
|
||||||
"pallet-indices/std",
|
"pallet-indices/std",
|
||||||
"pallet-im-online/std",
|
"pallet-im-online/std",
|
||||||
"pallet-session/std",
|
"pallet-session/std",
|
||||||
@@ -137,6 +136,7 @@ std = [
|
|||||||
"sp-api/std",
|
"sp-api/std",
|
||||||
"sp-core/std",
|
"sp-core/std",
|
||||||
"sp-io/std",
|
"sp-io/std",
|
||||||
|
"sp-mmr-primitives/std",
|
||||||
"sp-runtime/std",
|
"sp-runtime/std",
|
||||||
"sp-session/std",
|
"sp-session/std",
|
||||||
"sp-staking/std",
|
"sp-staking/std",
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ use frame_support::{
|
|||||||
use frame_system::EnsureRoot;
|
use frame_system::EnsureRoot;
|
||||||
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
|
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
|
||||||
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
|
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
|
||||||
use pallet_mmr_primitives as mmr;
|
|
||||||
use pallet_session::historical as session_historical;
|
use pallet_session::historical as session_historical;
|
||||||
use pallet_transaction_payment::{CurrencyAdapter, FeeDetails, RuntimeDispatchInfo};
|
use pallet_transaction_payment::{CurrencyAdapter, FeeDetails, RuntimeDispatchInfo};
|
||||||
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
|
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
|
||||||
@@ -51,6 +50,7 @@ use runtime_common::{
|
|||||||
use runtime_parachains::{self, runtime_api_impl::v2 as runtime_api_impl};
|
use runtime_parachains::{self, runtime_api_impl::v2 as runtime_api_impl};
|
||||||
use scale_info::TypeInfo;
|
use scale_info::TypeInfo;
|
||||||
use sp_core::{OpaqueMetadata, RuntimeDebug, H256};
|
use sp_core::{OpaqueMetadata, RuntimeDebug, H256};
|
||||||
|
use sp_mmr_primitives as mmr;
|
||||||
use sp_runtime::{
|
use sp_runtime::{
|
||||||
create_runtime_str, generic, impl_opaque_keys,
|
create_runtime_str, generic, impl_opaque_keys,
|
||||||
traits::{
|
traits::{
|
||||||
@@ -1371,7 +1371,7 @@ sp_api::impl_runtime_apis! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_mmr_primitives::MmrApi<Block, Hash> for Runtime {
|
impl mmr::MmrApi<Block, Hash> for Runtime {
|
||||||
fn generate_proof(leaf_index: u64)
|
fn generate_proof(leaf_index: u64)
|
||||||
-> Result<(mmr::EncodableOpaqueLeaf, mmr::Proof<Hash>), mmr::Error>
|
-> Result<(mmr::EncodableOpaqueLeaf, mmr::Proof<Hash>), mmr::Error>
|
||||||
{
|
{
|
||||||
@@ -1383,7 +1383,7 @@ sp_api::impl_runtime_apis! {
|
|||||||
-> Result<(), mmr::Error>
|
-> Result<(), mmr::Error>
|
||||||
{
|
{
|
||||||
pub type Leaf = <
|
pub type Leaf = <
|
||||||
<Runtime as pallet_mmr::Config>::LeafData as mmr::LeafDataProvider
|
<Runtime as pallet_mmr::Config>::LeafData as pallet_mmr::LeafDataProvider
|
||||||
>::LeafData;
|
>::LeafData;
|
||||||
|
|
||||||
let leaf: Leaf = leaf
|
let leaf: Leaf = leaf
|
||||||
@@ -1402,6 +1402,10 @@ sp_api::impl_runtime_apis! {
|
|||||||
let node = mmr::DataOrHash::Data(leaf.into_opaque_leaf());
|
let node = mmr::DataOrHash::Data(leaf.into_opaque_leaf());
|
||||||
pallet_mmr::verify_leaf_proof::<MmrHashing, _>(root, node, proof)
|
pallet_mmr::verify_leaf_proof::<MmrHashing, _>(root, node, proof)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn mmr_root() -> Result<Hash, mmr::Error> {
|
||||||
|
Ok(Mmr::mmr_root())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl bp_rococo::RococoFinalityApi<Block> for Runtime {
|
impl bp_rococo::RococoFinalityApi<Block> for Runtime {
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ sp-io = { git = "https://github.com/paritytech/substrate", branch = "master", de
|
|||||||
sp-runtime = { 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-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-core = { 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-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
frame-election-provider-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -41,7 +42,6 @@ pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/parityt
|
|||||||
frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
frame-executive = { 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-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-indices = { 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-nicks = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-nicks = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-offences = { 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-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ use frame_support::{
|
|||||||
traits::{Everything, KeyOwnerProofSystem},
|
traits::{Everything, KeyOwnerProofSystem},
|
||||||
};
|
};
|
||||||
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
|
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
|
||||||
use pallet_mmr_primitives as mmr;
|
|
||||||
use pallet_session::historical as session_historical;
|
use pallet_session::historical as session_historical;
|
||||||
use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
|
use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
|
||||||
use polkadot_runtime_parachains::reward_points::RewardValidatorsWithEraPoints;
|
use polkadot_runtime_parachains::reward_points::RewardValidatorsWithEraPoints;
|
||||||
@@ -57,6 +56,7 @@ use runtime_common::{
|
|||||||
SlowAdjustingFeeUpdate,
|
SlowAdjustingFeeUpdate,
|
||||||
};
|
};
|
||||||
use sp_core::OpaqueMetadata;
|
use sp_core::OpaqueMetadata;
|
||||||
|
use sp_mmr_primitives as mmr;
|
||||||
use sp_runtime::{
|
use sp_runtime::{
|
||||||
create_runtime_str,
|
create_runtime_str,
|
||||||
curve::PiecewiseLinear,
|
curve::PiecewiseLinear,
|
||||||
@@ -930,6 +930,12 @@ sp_api::impl_runtime_apis! {
|
|||||||
// dummy implementation due to lack of MMR pallet.
|
// dummy implementation due to lack of MMR pallet.
|
||||||
Err(mmr::Error::Verify)
|
Err(mmr::Error::Verify)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn mmr_root() -> Result<Hash, mmr::Error> {
|
||||||
|
// dummy implementation due to lack of MMR pallet.
|
||||||
|
Err(mmr::Error::Verify)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fg_primitives::GrandpaApi<Block> for Runtime {
|
impl fg_primitives::GrandpaApi<Block> for Runtime {
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ offchain-primitives = { package = "sp-offchain", git = "https://github.com/parit
|
|||||||
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-std = { package = "sp-std", 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-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-runtime = { 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-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -52,7 +53,6 @@ pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "m
|
|||||||
pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-membership = { 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-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-nicks = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-nicks = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
|
||||||
@@ -135,7 +135,6 @@ std = [
|
|||||||
"pallet-im-online/std",
|
"pallet-im-online/std",
|
||||||
"pallet-indices/std",
|
"pallet-indices/std",
|
||||||
"pallet-membership/std",
|
"pallet-membership/std",
|
||||||
"pallet-mmr-primitives/std",
|
|
||||||
"beefy-primitives/std",
|
"beefy-primitives/std",
|
||||||
"pallet-multisig/std",
|
"pallet-multisig/std",
|
||||||
"pallet-nicks/std",
|
"pallet-nicks/std",
|
||||||
@@ -156,6 +155,7 @@ std = [
|
|||||||
"pallet-babe/std",
|
"pallet-babe/std",
|
||||||
"pallet-bags-list/std",
|
"pallet-bags-list/std",
|
||||||
"frame-executive/std",
|
"frame-executive/std",
|
||||||
|
"sp-mmr-primitives/std",
|
||||||
"sp-runtime/std",
|
"sp-runtime/std",
|
||||||
"sp-staking/std",
|
"sp-staking/std",
|
||||||
"frame-system/std",
|
"frame-system/std",
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ use frame_support::{
|
|||||||
use frame_system::EnsureRoot;
|
use frame_system::EnsureRoot;
|
||||||
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
|
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};
|
||||||
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
|
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
|
||||||
use pallet_mmr_primitives as mmr;
|
|
||||||
use pallet_session::historical as session_historical;
|
use pallet_session::historical as session_historical;
|
||||||
use pallet_transaction_payment::{CurrencyAdapter, FeeDetails, RuntimeDispatchInfo};
|
use pallet_transaction_payment::{CurrencyAdapter, FeeDetails, RuntimeDispatchInfo};
|
||||||
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
|
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
|
||||||
@@ -58,6 +57,7 @@ use runtime_parachains::{
|
|||||||
};
|
};
|
||||||
use scale_info::TypeInfo;
|
use scale_info::TypeInfo;
|
||||||
use sp_core::{OpaqueMetadata, RuntimeDebug};
|
use sp_core::{OpaqueMetadata, RuntimeDebug};
|
||||||
|
use sp_mmr_primitives as mmr;
|
||||||
use sp_runtime::{
|
use sp_runtime::{
|
||||||
create_runtime_str,
|
create_runtime_str,
|
||||||
curve::PiecewiseLinear,
|
curve::PiecewiseLinear,
|
||||||
@@ -1326,7 +1326,7 @@ sp_api::impl_runtime_apis! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_mmr_primitives::MmrApi<Block, Hash> for Runtime {
|
impl mmr::MmrApi<Block, Hash> for Runtime {
|
||||||
fn generate_proof(_leaf_index: u64)
|
fn generate_proof(_leaf_index: u64)
|
||||||
-> Result<(mmr::EncodableOpaqueLeaf, mmr::Proof<Hash>), mmr::Error>
|
-> Result<(mmr::EncodableOpaqueLeaf, mmr::Proof<Hash>), mmr::Error>
|
||||||
{
|
{
|
||||||
@@ -1349,6 +1349,11 @@ sp_api::impl_runtime_apis! {
|
|||||||
// dummy implementation due to lack of MMR pallet.
|
// dummy implementation due to lack of MMR pallet.
|
||||||
Err(mmr::Error::Verify)
|
Err(mmr::Error::Verify)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn mmr_root() -> Result<Hash, mmr::Error> {
|
||||||
|
// dummy implementation due to lack of MMR pallet.
|
||||||
|
Err(mmr::Error::Verify)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl fg_primitives::GrandpaApi<Block> for Runtime {
|
impl fg_primitives::GrandpaApi<Block> for Runtime {
|
||||||
|
|||||||
Reference in New Issue
Block a user