verify

package
v0.0.0-...-f633857 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL