Help us shape the future of Go! Take the 2026 Go Developer Survey

validators

package
v1.104.56 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: GPL-3.0, LGPL-3.0, LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsensusStateWrapper added in v0.8.8

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

ConsensusStateWrapper wraps consensuscontext.ValidatorState to implement validators.State

func NewConsensusStateWrapper added in v0.8.8

func NewConsensusStateWrapper(vs consensuscontext.ValidatorState) *ConsensusStateWrapper

NewConsensusStateWrapper creates a new wrapper

func (*ConsensusStateWrapper) GetCurrentHeight added in v0.8.8

func (w *ConsensusStateWrapper) GetCurrentHeight(ctx context.Context) (uint64, error)

GetCurrentHeight implements validators.State

func (*ConsensusStateWrapper) GetCurrentValidatorSet added in v0.8.8

func (w *ConsensusStateWrapper) GetCurrentValidatorSet(ctx context.Context, chainID ids.ID) (map[ids.NodeID]*validators.GetValidatorOutput, error)

GetCurrentValidatorSet implements validators.State

func (*ConsensusStateWrapper) GetMinimumHeight added in v0.8.8

func (w *ConsensusStateWrapper) GetMinimumHeight(ctx context.Context) (uint64, error)

GetMinimumHeight implements validators.State

func (*ConsensusStateWrapper) GetNetworkID added in v0.8.16

func (w *ConsensusStateWrapper) GetNetworkID(ctx context.Context, chainID ids.ID) (ids.ID, error)

GetNetworkID implements validators.State

func (*ConsensusStateWrapper) GetValidatorSet added in v0.8.8

func (w *ConsensusStateWrapper) GetValidatorSet(ctx context.Context, height uint64, chainID ids.ID) (map[ids.NodeID]*validators.GetValidatorOutput, error)

GetValidatorSet implements validators.State

type State

type State struct {
	validators.State
	// contains filtered or unexported fields
}

State provides a special case used to handle Lux Warp Message verification for messages sent from the Primary Network. Chains have strictly fewer validators than the Primary Network, so we require signatures from a threshold of the RECEIVING chain validator set rather than the full Primary Network since the receiving chain already relies on a majority of its validators being correct.

func NewState

func NewState(state validators.State, myChainID ids.ID, sourceChainID ids.ID, requirePrimaryNetworkSigners bool) *State

NewState returns a wrapper of validators.State which special cases the handling of the Primary Network.

The wrapped state will return the [myChainID's] validator set instead of the Primary Network when the Primary Network ChainID is passed in.

func (*State) GetValidatorSet

func (s *State) GetValidatorSet(
	ctx context.Context,
	height uint64,
	chainID ids.ID,
) (map[ids.NodeID]*validators.GetValidatorOutput, error)

func (*State) GetWarpValidatorSet added in v0.8.33

func (s *State) GetWarpValidatorSet(
	ctx context.Context,
	height uint64,
	chainID ids.ID,
) (*validators.WarpSet, error)

GetWarpValidatorSet returns the warp validator set with BLS public keys for signature aggregation. This applies the same Primary Network handling as GetValidatorSet.

Jump to

Keyboard shortcuts

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