validator

package
v0.14.7 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Validator

type Validator[V types.Hashable[H], H types.Hash, A types.Addr] interface {
	// ProposalInit initialises the pending state according to the proposal
	ProposalInit(pInit *types.ProposalInit) error

	// BlockInfo sets the pending header according to the proposal header
	BlockInfo(blockInfo *types.BlockInfo)

	// TransactionBatch executes the provided transactions, and stores the result in the pending state
	TransactionBatch(txn []types.Transaction) error

	// ProposalCommitment checks the set of proposed commitments against those generated locally.
	ProposalCommitment(proposalCommitment *types.ProposalCommitment) error

	// ProposalFin compares the provided commitment with that generated locally
	ProposalFin(proposalFin types.ProposalFin) error
}

Validator is used to validate new proposals. There are two potential flows, and functions must be called in order: Flow 1) Non-empty proposal - ProposalInit(), BlockInfo(), TransactionBatch(), ProposalCommitment(), ProposalFin() Flow 2) Empty proposal - ProposalInit(), ProposalCommitment(), ProposalFin()

func New

func New[V types.Hashable[H], H types.Hash, A types.Addr](builder *builder.Builder) Validator[V, H, A]

Jump to

Keyboard shortcuts

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