Crate pallet_bridge_grandpa

Source
Expand description

Substrate GRANDPA Pallet

This pallet is an on-chain GRANDPA light client for Substrate based chains.

This pallet achieves this by trustlessly verifying GRANDPA finality proofs on-chain. Once verified, finalized headers are stored in the pallet, thereby creating a sparse header chain. This sparse header chain can be used as a source of truth for other higher-level applications.

The pallet is responsible for tracking GRANDPA validator set hand-offs. We only import headers with justifications signed by the current validator set we know of. The header is inspected for a ScheduledChanges digest item, which is then used to update to next validator set.

Since this pallet only tracks finalized headers it does not deal with forks. Forks can only occur if the GRANDPA validator set on the bridged chain is either colluding or there is a severe bug causing resulting in an equivocation. Such events are outside the scope of this pallet. Shall the fork occur on the bridged chain governance intervention will be required to re-initialize the bridge and track the right fork.

Re-exports§

pub use weights::WeightInfo;
pub use weights_ext::WeightInfoExt;
pub use pallet::*;

Modules§

pallet
The pallet module in each FRAME pallet hosts the most important items needed to construct this pallet.
weights
Module, containing weights for this pallet. Autogenerated weights for pallet_bridge_grandpa
weights_ext
Weight-related utilities.

Structs§

StoredAuthoritySet
A bounded GRANDPA Authority List and ID.
SubmitFinalityProofHelper
Helper struct that provides methods for working with the SubmitFinalityProof call.
VerifiedSubmitFinalityProofInfo
Verified SubmitFinalityProofInfo<N>.

Constants§

LOG_TARGET
The target that will be used when publishing logs related to this pallet.

Traits§

CallSubType
Trait representing a call that is a sub type of this pallet’s call.

Type Aliases§

BridgedBlockHash
Block hash of the bridged chain.
BridgedBlockHasher
Hasher of the bridged chain.
BridgedBlockId
Block id of the bridged chain.
BridgedBlockNumber
Block number of the bridged chain.
BridgedChain
Bridged chain from the pallet configuration.
BridgedHeader
Header of the bridged chain.
BridgedStoredHeaderData
Header data of the bridged chain that is stored at this chain by this pallet.
GrandpaChainHeaders
Bridge GRANDPA pallet as header chain.