Expand description
Logic for checking GRANDPA Finality Proofs.
Adapted copy of substrate/client/finality-grandpa/src/justification.rs. If origin will ever be moved to the sp_consensus_grandpa, we should reuse that implementation.
Structs§
- Ancestry
Chain - Votes ancestries with useful methods.
- Equivocations
Collector - Structure that can extract equivocations from multiple GRANDPA justifications.
- Grandpa
Equivocations Finder - Helper struct for finding equivocations in GRANDPA proofs.
- Grandpa
Justification - A GRANDPA Justification is a proof that a given header was finalized at a certain height and with a certain set of authorities.
- Justification
Verification Context - The context needed for validating GRANDPA finality proofs.
Enums§
- Error
- Justification verification error.
- Justification
Verification Error - Justification verification error.
- Precommit
Error - Justification verification error.
Functions§
- decode_
justification_ target - Decode justification target.
- required_
justification_ precommits - Given GRANDPA authorities set size, return number of valid authorities votes that the justification must have to be valid.
- verify_
and_ optimize_ justification - Verify and optimize given justification by removing unknown and duplicate votes.
- verify_
justification - Verify that justification, that is generated by given authority set, finalizes given header.