Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptorVerifier ¶
type AcceptorVerifier interface {
VerifyAcceptor(rec *consensusproto.RawRecord) (err error)
ShouldValidate() bool
}
type ConsensusPeersSource ¶ added in v0.12.2
type ConsensusPeersSource interface {
ConsensusPeers() []string
}
ConsensusPeersSource is the minimal view of nodeconf needed by the verifier. nodeconf.NodeConf satisfies this interface; tests can supply a trivial fake.
type RecordVerifier ¶
type RecordVerifier = AcceptorVerifier
func New ¶
func New(src ConsensusPeersSource) RecordVerifier
New returns a RecordVerifier that accepts only records whose AcceptorIdentity resolves to a peerId listed by src.ConsensusPeers(). Records signed by any other key — even with a well-formed Ed25519 signature — are rejected. The consensus node is assumed to use the same Ed25519 key for its peer identity and record acceptance (see any-sync-consensusnode/account/service.go).
func NewValidateFull ¶
func NewValidateFull() RecordVerifier
type ValidateFull ¶
type ValidateFull struct{}
func (*ValidateFull) ShouldValidate ¶
func (a *ValidateFull) ShouldValidate() bool
func (*ValidateFull) VerifyAcceptor ¶
func (a *ValidateFull) VerifyAcceptor(_ *consensusproto.RawRecord) error
Click to show internal directories.
Click to hide internal directories.