chkpvalidator

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewModule

NewModule returns a (passive) ChkpValidator module.

Types

type ChkpValidator

type ChkpValidator interface {

	// Verify verifies the validity of the checkpoint
	// Returns nil on success (i.e., if the given checkpoint is valid) and a non-nil error otherwise.
	// The epoch and memberships parameters must be given because the checkpoint validity checker must be able
	// to retrieve the membership for the given epoch in order to verify the signatures of the strong quorum
	// that certifies the stable the checkpoint
	Verify(chkp *checkpointpbtypes.StableCheckpoint, epochNr tt.EpochNr, memberships []*trantorpbtypes.Membership) error
}

The ChkpValidator interface represents an implementation of the checkpoint validity checker primitives inside the MirModule module. It is responsible for verifying the validity of checkpoints.

type ConservativeCV

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

func NewConservativeCV

func NewConservativeCV(
	configOffset int,
	ownID t.NodeID,
	hashImpl crypto.HashImpl,
	chkpVerifier checkpoint.Verifier,
) *ConservativeCV

NewConservativeCV returns a new ConservativeCV. This checkpoint validity checker simply rejects checkpoints whose signatures cannot be verified because the node does not know the membership of the relevant epoch yet/anymore.

func (*ConservativeCV) Verify

func (ccv *ConservativeCV) Verify(
	chkp *checkpointpbtypes.StableCheckpoint,
	epochNr tt.EpochNr,
	memberships []*trantorpbtypes.Membership,
) error

type ModuleConfig

type ModuleConfig struct {
	Self t.ModuleID
}

ModuleConfig sets the module ids.

type PermissiveCV

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

func NewPermissiveCV

func NewPermissiveCV(configOffset int, ownID t.NodeID, hashImpl crypto.HashImpl, chkpVerifier checkpoint.Verifier, logger logging.Logger) *PermissiveCV

NewPermissiveCV returns a new PermissiveCV. This checkpoint validity checker simply believes membership information of checkpoints whose membership cannot be verified because the node does not know the membership of the relevant epoch yet/anymore.

func (*PermissiveCV) Verify

func (pcv *PermissiveCV) Verify(chkp *checkpointpbtypes.StableCheckpoint, epochNr tt.EpochNr, memberships []*trantorpbtypes.Membership) error

Jump to

Keyboard shortcuts

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