validators

package
v1.13.3 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2025 License: GPL-3.0, LGPL-3.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

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

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

func NewState

func NewState(state validators.State, mySubnetID 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 [mySubnetID's] validator set instead of the Primary Network when the Primary Network SubnetID is passed in.

func (*State) GetValidatorSet

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

Jump to

Keyboard shortcuts

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