node

package
v2.0.5-testnet Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: Apache-2.0, MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteProposalFile

func WriteProposalFile(filepath string, proposal ProposalFile) error

Types

type LocalNode

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

LocalNode ...

func NewLocalNode

func NewLocalNode(i int, bindAddr string, cfg cfg.Config) *LocalNode

func (*LocalNode) AcceptReshare

func (l *LocalNode) AcceptReshare() error

func (*LocalNode) ChainInfo

func (l *LocalNode) ChainInfo(_ string) bool

func (*LocalNode) CtrlAddr

func (l *LocalNode) CtrlAddr() string

func (*LocalNode) ExecuteLeaderDKG

func (l *LocalNode) ExecuteLeaderDKG() error

func (*LocalNode) ExecuteLeaderReshare

func (l *LocalNode) ExecuteLeaderReshare() error

func (*LocalNode) GetBeacon

func (l *LocalNode) GetBeacon(_ string, round uint64) (ret *drand.PublicRandResponse, cmd string)

func (*LocalNode) GetGroup

func (l *LocalNode) GetGroup() *key.Group

func (*LocalNode) Identity

func (l *LocalNode) Identity() (*pdkg.Participant, error)

func (*LocalNode) Index

func (l *LocalNode) Index() int

func (*LocalNode) JoinDKG

func (l *LocalNode) JoinDKG() error

func (*LocalNode) JoinReshare

func (l *LocalNode) JoinReshare(oldGroup key.Group) error

func (*LocalNode) Ping

func (l *LocalNode) Ping() bool

func (*LocalNode) PrintLog

func (l *LocalNode) PrintLog()

func (*LocalNode) PrivateAddr

func (l *LocalNode) PrivateAddr() string

func (*LocalNode) PublicAddr

func (l *LocalNode) PublicAddr() string

func (*LocalNode) Start

func (l *LocalNode) Start(dbEngineType chain.StorageType, pgDSN func() string, memDBSize int) error

func (*LocalNode) StartLeaderDKG

func (l *LocalNode) StartLeaderDKG(thr int, catchupPeriod int, joiners []*pdkg.Participant) error

func (*LocalNode) StartLeaderReshare

func (l *LocalNode) StartLeaderReshare(thr int, catchupPeriod int, joiners []*pdkg.Participant, remainers []*pdkg.Participant, leavers []*pdkg.Participant) error

func (*LocalNode) Stop

func (l *LocalNode) Stop()

func (*LocalNode) WaitDKGComplete

func (l *LocalNode) WaitDKGComplete(epoch uint32, timeout time.Duration) (*key.Group, error)

func (*LocalNode) WritePublic

func (l *LocalNode) WritePublic(p string)

type Node

type Node interface {
	Start(dbEngineType chain.StorageType, pgDSN func() string, memDBSize int) error
	PrivateAddr() string
	CtrlAddr() string
	PublicAddr() string
	Index() int
	StartLeaderDKG(thr int, catchupPeriod int, joiners []*pdkg.Participant) error
	StartLeaderReshare(thr int, catchupPeriod int, joiners []*pdkg.Participant, remainers []*pdkg.Participant, leavers []*pdkg.Participant) error
	ExecuteLeaderDKG() error
	ExecuteLeaderReshare() error
	JoinDKG() error
	AcceptReshare() error
	JoinReshare(oldGroup key.Group) error
	WaitDKGComplete(epoch uint32, timeout time.Duration) (*key.Group, error)
	GetGroup() *key.Group
	ChainInfo(group string) bool
	Ping() bool
	GetBeacon(groupPath string, round uint64) (*drand.PublicRandResponse, string)
	WritePublic(path string)
	Identity() (*pdkg.Participant, error)
	Stop()
	PrintLog()
}

type NodeProc

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

func NewNode

func NewNode(i int, cfg cfg.Config) *NodeProc

func (*NodeProc) AcceptReshare

func (n *NodeProc) AcceptReshare() error

func (*NodeProc) ChainInfo

func (n *NodeProc) ChainInfo(_ string) bool

func (*NodeProc) CtrlAddr

func (n *NodeProc) CtrlAddr() string

func (*NodeProc) ExecuteLeaderDKG

func (n *NodeProc) ExecuteLeaderDKG() error

func (*NodeProc) ExecuteLeaderReshare

func (n *NodeProc) ExecuteLeaderReshare() error

func (*NodeProc) GetBeacon

func (n *NodeProc) GetBeacon(groupPath string, round uint64) (*drand.PublicRandResponse, string)

func (*NodeProc) GetGroup

func (n *NodeProc) GetGroup() *key.Group

func (*NodeProc) Identity

func (n *NodeProc) Identity() (*pdkg.Participant, error)

func (*NodeProc) Index

func (n *NodeProc) Index() int

func (*NodeProc) JoinDKG

func (n *NodeProc) JoinDKG() error

func (*NodeProc) JoinReshare

func (n *NodeProc) JoinReshare(oldGroup key.Group) error

func (*NodeProc) Ping

func (n *NodeProc) Ping() bool

func (*NodeProc) PrintLog

func (n *NodeProc) PrintLog()

func (*NodeProc) PrivateAddr

func (n *NodeProc) PrivateAddr() string

func (*NodeProc) PublicAddr

func (n *NodeProc) PublicAddr() string

func (*NodeProc) Start

func (n *NodeProc) Start(dbEngineType chain.StorageType, pgDSN func() string, memDBSize int) error

func (*NodeProc) StartLeaderDKG

func (n *NodeProc) StartLeaderDKG(thr int, _ int, joiners []*pdkg.Participant) error

func (*NodeProc) StartLeaderReshare

func (n *NodeProc) StartLeaderReshare(thr int, catchupPeriod int, joiners []*pdkg.Participant, remainers []*pdkg.Participant, leavers []*pdkg.Participant) error

func (*NodeProc) Stop

func (n *NodeProc) Stop()

func (*NodeProc) UpdateBinary

func (n *NodeProc) UpdateBinary(binary string, isCandidate bool)

UpdateBinary updates the binary this node uses for control, to e.g. simulate an upgrade

func (*NodeProc) WaitDKGComplete

func (n *NodeProc) WaitDKGComplete(epoch uint32, timeout time.Duration) (*key.Group, error)

func (*NodeProc) WritePublic

func (n *NodeProc) WritePublic(path string)

type ProposalFile

type ProposalFile struct {
	Joining   []*drand.Participant
	Leaving   []*drand.Participant
	Remaining []*drand.Participant
}

Jump to

Keyboard shortcuts

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