validators

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: GPL-3.0, LGPL-3.0 Imports: 5 Imported by: 3

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(chainContext *snow.Context) *State

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

The wrapped state will return the chainContext's Subnet 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