mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 04:01:02 +00:00
* Grandpa: Store the authority set changes
This commit is contained in:
committed by
Bastian Köcher
parent
f42b883745
commit
bccd6e893e
@@ -16,7 +16,7 @@
|
||||
|
||||
//! Types used to connect to the Kusama chain.
|
||||
|
||||
use bp_kusama::{AccountInfoStorageMapKeyProvider, KUSAMA_ACCEPTED_GRANDPA_FINALITY_PROOFS_METHOD};
|
||||
use bp_kusama::{AccountInfoStorageMapKeyProvider, KUSAMA_SYNCED_HEADERS_GRANDPA_INFO_METHOD};
|
||||
use bp_runtime::ChainId;
|
||||
use relay_substrate_client::{
|
||||
Chain, ChainWithBalances, ChainWithGrandpa, RelayChain, UnderlyingChainProvider,
|
||||
@@ -50,8 +50,8 @@ impl Chain for Kusama {
|
||||
}
|
||||
|
||||
impl ChainWithGrandpa for Kusama {
|
||||
const ACCEPTED_FINALITY_PROOFS_METHOD: &'static str =
|
||||
KUSAMA_ACCEPTED_GRANDPA_FINALITY_PROOFS_METHOD;
|
||||
const SYNCED_HEADERS_GRANDPA_INFO_METHOD: &'static str =
|
||||
KUSAMA_SYNCED_HEADERS_GRANDPA_INFO_METHOD;
|
||||
}
|
||||
|
||||
impl ChainWithBalances for Kusama {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! Types used to connect to the Millau-Substrate chain.
|
||||
|
||||
use bp_messages::MessageNonce;
|
||||
use bp_millau::MILLAU_ACCEPTED_GRANDPA_FINALITY_PROOFS_METHOD;
|
||||
use bp_millau::MILLAU_SYNCED_HEADERS_GRANDPA_INFO_METHOD;
|
||||
use bp_runtime::ChainId;
|
||||
use codec::{Compact, Decode, Encode};
|
||||
use relay_substrate_client::{
|
||||
@@ -67,8 +67,8 @@ impl Chain for Millau {
|
||||
}
|
||||
|
||||
impl ChainWithGrandpa for Millau {
|
||||
const ACCEPTED_FINALITY_PROOFS_METHOD: &'static str =
|
||||
MILLAU_ACCEPTED_GRANDPA_FINALITY_PROOFS_METHOD;
|
||||
const SYNCED_HEADERS_GRANDPA_INFO_METHOD: &'static str =
|
||||
MILLAU_SYNCED_HEADERS_GRANDPA_INFO_METHOD;
|
||||
}
|
||||
|
||||
impl ChainWithBalances for Millau {
|
||||
|
||||
@@ -16,9 +16,7 @@
|
||||
|
||||
//! Types used to connect to the Polkadot chain.
|
||||
|
||||
use bp_polkadot::{
|
||||
AccountInfoStorageMapKeyProvider, POLKADOT_ACCEPTED_GRANDPA_FINALITY_PROOFS_METHOD,
|
||||
};
|
||||
use bp_polkadot::{AccountInfoStorageMapKeyProvider, POLKADOT_SYNCED_HEADERS_GRANDPA_INFO_METHOD};
|
||||
use bp_runtime::ChainId;
|
||||
use relay_substrate_client::{
|
||||
Chain, ChainWithBalances, ChainWithGrandpa, RelayChain, UnderlyingChainProvider,
|
||||
@@ -52,8 +50,8 @@ impl Chain for Polkadot {
|
||||
}
|
||||
|
||||
impl ChainWithGrandpa for Polkadot {
|
||||
const ACCEPTED_FINALITY_PROOFS_METHOD: &'static str =
|
||||
POLKADOT_ACCEPTED_GRANDPA_FINALITY_PROOFS_METHOD;
|
||||
const SYNCED_HEADERS_GRANDPA_INFO_METHOD: &'static str =
|
||||
POLKADOT_SYNCED_HEADERS_GRANDPA_INFO_METHOD;
|
||||
}
|
||||
|
||||
impl ChainWithBalances for Polkadot {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! Types used to connect to the Rialto-Substrate chain.
|
||||
|
||||
use bp_messages::MessageNonce;
|
||||
use bp_rialto::RIALTO_ACCEPTED_GRANDPA_FINALITY_PROOFS_METHOD;
|
||||
use bp_rialto::RIALTO_SYNCED_HEADERS_GRANDPA_INFO_METHOD;
|
||||
use bp_runtime::ChainId;
|
||||
use codec::{Compact, Decode, Encode};
|
||||
use relay_substrate_client::{
|
||||
@@ -52,8 +52,8 @@ impl Chain for Rialto {
|
||||
}
|
||||
|
||||
impl ChainWithGrandpa for Rialto {
|
||||
const ACCEPTED_FINALITY_PROOFS_METHOD: &'static str =
|
||||
RIALTO_ACCEPTED_GRANDPA_FINALITY_PROOFS_METHOD;
|
||||
const SYNCED_HEADERS_GRANDPA_INFO_METHOD: &'static str =
|
||||
RIALTO_SYNCED_HEADERS_GRANDPA_INFO_METHOD;
|
||||
}
|
||||
|
||||
impl RelayChain for Rialto {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
//! Types used to connect to the Rococo-Substrate chain.
|
||||
|
||||
use bp_rococo::ROCOCO_ACCEPTED_GRANDPA_FINALITY_PROOFS_METHOD;
|
||||
use bp_rococo::ROCOCO_SYNCED_HEADERS_GRANDPA_INFO_METHOD;
|
||||
use bp_runtime::ChainId;
|
||||
use relay_substrate_client::{
|
||||
Chain, ChainWithBalances, ChainWithGrandpa, RelayChain, UnderlyingChainProvider,
|
||||
@@ -50,8 +50,8 @@ impl Chain for Rococo {
|
||||
}
|
||||
|
||||
impl ChainWithGrandpa for Rococo {
|
||||
const ACCEPTED_FINALITY_PROOFS_METHOD: &'static str =
|
||||
ROCOCO_ACCEPTED_GRANDPA_FINALITY_PROOFS_METHOD;
|
||||
const SYNCED_HEADERS_GRANDPA_INFO_METHOD: &'static str =
|
||||
ROCOCO_SYNCED_HEADERS_GRANDPA_INFO_METHOD;
|
||||
}
|
||||
|
||||
impl ChainWithBalances for Rococo {
|
||||
|
||||
@@ -79,12 +79,12 @@ pub trait RelayChain: Chain {
|
||||
/// Keep in mind that parachains are relying on relay chain GRANDPA, so they should not implement
|
||||
/// this trait.
|
||||
pub trait ChainWithGrandpa: Chain + UnderlyingChainWithGrandpaProvider {
|
||||
/// Name of the runtime API method that is returning the GRANDPA justifications accepted
|
||||
/// by the `submit_finality_proofs` extrinsic in the queried block.
|
||||
/// Name of the runtime API method that is returning the GRANDPA info associated with the
|
||||
/// headers accepted by the `submit_finality_proofs` extrinsic in the queried block.
|
||||
///
|
||||
/// Keep in mind that this method is normally provided by the other chain, which is
|
||||
/// bridged with this chain.
|
||||
const ACCEPTED_FINALITY_PROOFS_METHOD: &'static str;
|
||||
const SYNCED_HEADERS_GRANDPA_INFO_METHOD: &'static str;
|
||||
}
|
||||
|
||||
/// Substrate-based parachain from minimal relay-client point of view.
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! Types used to connect to the Westend chain.
|
||||
|
||||
use bp_runtime::ChainId;
|
||||
use bp_westend::WESTEND_ACCEPTED_GRANDPA_FINALITY_PROOFS_METHOD;
|
||||
use bp_westend::WESTEND_SYNCED_HEADERS_GRANDPA_INFO_METHOD;
|
||||
use relay_substrate_client::{
|
||||
Chain, ChainWithBalances, ChainWithGrandpa, RelayChain, UnderlyingChainProvider,
|
||||
};
|
||||
@@ -50,8 +50,8 @@ impl Chain for Westend {
|
||||
}
|
||||
|
||||
impl ChainWithGrandpa for Westend {
|
||||
const ACCEPTED_FINALITY_PROOFS_METHOD: &'static str =
|
||||
WESTEND_ACCEPTED_GRANDPA_FINALITY_PROOFS_METHOD;
|
||||
const SYNCED_HEADERS_GRANDPA_INFO_METHOD: &'static str =
|
||||
WESTEND_SYNCED_HEADERS_GRANDPA_INFO_METHOD;
|
||||
}
|
||||
|
||||
impl RelayChain for Westend {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//! Types used to connect to the Wococo-Substrate chain.
|
||||
|
||||
use bp_runtime::ChainId;
|
||||
use bp_wococo::WOCOCO_ACCEPTED_GRANDPA_FINALITY_PROOFS_METHOD;
|
||||
use bp_wococo::WOCOCO_SYNCED_HEADERS_GRANDPA_INFO_METHOD;
|
||||
use relay_substrate_client::{
|
||||
Chain, ChainWithBalances, ChainWithGrandpa, RelayChain, UnderlyingChainProvider,
|
||||
};
|
||||
@@ -50,8 +50,8 @@ impl Chain for Wococo {
|
||||
}
|
||||
|
||||
impl ChainWithGrandpa for Wococo {
|
||||
const ACCEPTED_FINALITY_PROOFS_METHOD: &'static str =
|
||||
WOCOCO_ACCEPTED_GRANDPA_FINALITY_PROOFS_METHOD;
|
||||
const SYNCED_HEADERS_GRANDPA_INFO_METHOD: &'static str =
|
||||
WOCOCO_SYNCED_HEADERS_GRANDPA_INFO_METHOD;
|
||||
}
|
||||
|
||||
impl ChainWithBalances for Wococo {
|
||||
|
||||
Reference in New Issue
Block a user