Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcceptableStateProofWeight ¶
func AcceptableStateProofWeight(votersHdr *bookkeeping.BlockHeader, firstValid basics.Round, logger logging.Logger) uint64
AcceptableStateProofWeight computes the acceptable signed weight of a state proof if it were to appear in a transaction with a particular firstValid round. Earlier rounds require a smaller proof. votersHdr specifies the block that contains the vector commitment of the voters for this state proof (and thus the state proof is for the interval (votersHdr.Round(), votersHdr.Round()+StateProofInterval].
logger must not be nil; use at least logging.Base()
func GetProvenWeight ¶
func GetProvenWeight(votersHdr *bookkeeping.BlockHeader, latestRoundInProofHdr *bookkeeping.BlockHeader) (uint64, error)
GetProvenWeight computes the parameters for proving or verifying a state proof for the interval (votersHdr, latestRoundInProofHdr], using voters from block votersHdr.
func ValidateStateProof ¶
func ValidateStateProof(verificationContext *ledgercore.StateProofVerificationContext, stateProof *stateproof.StateProof, atRound basics.Round, msg *stateproofmsg.Message) error
ValidateStateProof checks that a state proof is valid.
Types ¶
This section is empty.