am_dist

package
v0.7.0-alpha.11 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

The algorithm here follows the specification `WaspChainAccessNodesV4.tla`. The specification actions are mapped to GPA inputs here as follows:

  • ChainActivate -- first reception of inputAccessNodes.
  • ChainDeactivate -- inputChainDisabled.
  • AccessNodeAdd -- inputAccessNodes, then compare with info we had before.
  • AccessNodeDel -- inputAccessNodes, then compare with info we had before.
  • Reboot -- inputTrustedNodes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInputAccessNodes

func NewInputAccessNodes(chainID isc.ChainID, accessNodes []*cryptolib.PublicKey) gpa.Input

func NewInputChainDisabled

func NewInputChainDisabled(chainID isc.ChainID) gpa.Input

func NewInputTrustedNodes

func NewInputTrustedNodes(trustedNodes []*cryptolib.PublicKey) gpa.Input

Types

type AccessMgr

type AccessMgr interface {
	AsGPA() gpa.GPA
}

func NewAccessMgr

func NewAccessMgr(
	pubKeyToNodeID func(*cryptolib.PublicKey) gpa.NodeID,
	serversUpdatedCB func(chainID isc.ChainID, servers []*cryptolib.PublicKey),
	dismissPeerCB func(*cryptolib.PublicKey),
	log *logger.Logger,
) AccessMgr

type Output

type Output interface {
	ChainServerNodes(chainID isc.ChainID) []*cryptolib.PublicKey
}

Jump to

Keyboard shortcuts

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