pprepvalidator

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstanceParams

func InstanceParams(
	membership *trantorpbtypes.Membership,
) *factorypbtypes.GeneratorParams

func NewModule

NewModule returns a passive module for the PreprepareValidator module.

func NewPprepValidatorChkpFactory

func NewPprepValidatorChkpFactory(mc ModuleConfig,
	hashImpl crypto.HashImpl,
	chkpVerifier checkpoint.Verifier,
	configOffset int,
	logger logging.Logger,
) modules.PassiveModule

Types

type CheckpointPreprepareValidator

type CheckpointPreprepareValidator struct {
	HashImpl     crypto.HashImpl
	CertVerifier checkpoint.Verifier
	Membership   *trantorpbtypes.Membership
	// contains filtered or unexported fields
}

func NewCheckpointValidityChecker

func NewCheckpointValidityChecker(
	hashImpl crypto.HashImpl,
	certVerifier checkpoint.Verifier,
	membership *trantorpbtypes.Membership,
	configOffset int,
	logger logging.Logger,
) *CheckpointPreprepareValidator

func (*CheckpointPreprepareValidator) Check

type ModuleConfig

type ModuleConfig struct {
	Self t.ModuleID
}

ModuleConfig sets the module ids.

type PermissivePreprepareValidator

type PermissivePreprepareValidator struct{}

func NewPermissiveValidityChecker

func NewPermissiveValidityChecker() *PermissivePreprepareValidator

func (*PermissivePreprepareValidator) Check

type PreprepareValidator

type PreprepareValidator interface {

	// Check verifies the validity of the checkpoint
	// Returns nil on success (i.e., if the given signature is valid) and a non-nil error otherwise.
	Check(preprepare *pbftpbtypes.Preprepare) error
}

PreprepareValidator is the interface of an external checker of validity of proposed data.

Jump to

Keyboard shortcuts

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