validation

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: AGPL-3.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const DefaultRequiredApprovalsForSealValidation = 0

DefaultRequiredApprovalsForSealValidation is the default number of approvals that should be present and valid for each chunk. Setting this to 0 will disable counting of chunk approvals this can be used temporarily to ease the migration to new chunk based sealing. TODO:

  • This value is for the happy path (requires just one approval per chunk).
  • Full protocol should be +2/3 of all currently staked verifiers.

Variables

This section is empty.

Functions

func IntegrityCheck

func IntegrityCheck(receipt *flow.ExecutionReceipt) (flow.StateCommitment, flow.StateCommitment, error)

check the receipt's data integrity by checking its result has both final statecommitment and initial statecommitment

func IsUnverifiableError added in v0.15.0

func IsUnverifiableError(err error) bool

IsUnverifiableError returns whether the given error is an UnverifiableError error

func NewApprovalValidator added in v0.15.0

func NewApprovalValidator(state protocol.State, verifier module.Verifier) *approvalValidator

func NewReceiptValidator

func NewReceiptValidator(state protocol.State, index storage.Index, results storage.ExecutionResults, verifier module.Verifier) *receiptValidator

func NewSealValidator

func NewSealValidator(state protocol.State, headers storage.Headers, payloads storage.Payloads, seals storage.Seals,
	assigner module.ChunkAssigner, verifier module.Verifier, requiredApprovalsForSealVerification uint, metrics module.ConsensusMetrics) *sealValidator

func NewUnverifiableError added in v0.15.0

func NewUnverifiableError(previousResultID flow.Identifier) error

Types

type GetPreviousResult

type GetPreviousResult func(*flow.ExecutionResult) (*flow.ExecutionResult, error)

Functor that is used to retrieve parent of ExecutionResult.

type UnverifiableError added in v0.15.0

type UnverifiableError struct {
	// contains filtered or unexported fields
}

func (UnverifiableError) Error added in v0.15.0

func (e UnverifiableError) Error() string

func (UnverifiableError) Unwrap added in v0.15.0

func (e UnverifiableError) Unwrap() error

Jump to

Keyboard shortcuts

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