Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewModule ¶
func NewModule(mc ModuleConfig, cv ChkpValidator) modules.PassiveModule
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 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