nonvalidator

package
v0.0.0-...-652700b Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Storage                    common.Storage
	Comm                       common.Communication
	SignatureAggregatorCreator common.SignatureAggregatorCreator

	Logger common.Logger

	// How many sequences we allow to look past our next sequence to commit
	MaxSequenceWindow uint64

	// our node ID
	ID common.NodeID

	StartTime time.Time

	// RandomSource is used by the replication state to pick which nodes to
	// request sequences from. If nil, a cryptographically secure source is used.
	RandomSource *rand.Rand

	// TransitionToValidator is called when our non-validator indexes the highest known epoch
	// and it is in the validator set
	TransitionToValidator func(epoch uint64, validators common.Nodes)
}

type NonValidator

type NonValidator struct {
	Config
	// contains filtered or unexported fields
}

func NewNonValidator

func NewNonValidator(config Config) (*NonValidator, error)

NewNonValidator creates a NonValidator with the given `config`.

func (*NonValidator) AdvanceTime

func (n *NonValidator) AdvanceTime(t time.Time)

func (*NonValidator) HandleMessage

func (n *NonValidator) HandleMessage(msg *common.Message, from common.NodeID) error

func (*NonValidator) Start

func (n *NonValidator) Start()

func (*NonValidator) Stop

func (n *NonValidator) Stop()

Jump to

Keyboard shortcuts

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