manager

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consensus

type Consensus interface {
	Reader

	MoveToNewHeight()
	AddVote(vote *vote.Vote)
	SetProposal(prop *proposal.Proposal)
	IsDeprecated() bool
}

type Manager

type Manager interface {
	ManagerReader

	MoveToNewHeight()
	AddVote(vote *vote.Vote)
	SetProposal(prop *proposal.Proposal)
	IsDeprecated() bool
}

func MockingManager

func MockingManager(ts *testsuite.TestSuite, state *state.MockState,
	valKeys []*bls.ValidatorKey,
) (Manager, []*consensus.MockConsensus)

func NewManagerV1

func NewManagerV1(
	ctx context.Context,
	conf *consensus.Config,
	state state.Facade,
	valKeys []*bls.ValidatorKey,
	rewardAddrs []crypto.Address,
	broadcastPipe pipeline.Pipeline[message.Message],
) Manager

NewManagerV1 creates a new manager instance that manages a set of consensus instances, each associated with a validator key and a reward address. It is not thread-safe.

func NewManagerV2

func NewManagerV2(
	ctx context.Context,
	conf *consensusv2.Config,
	state state.Facade,
	valKeys []*bls.ValidatorKey,
	rewardAddrs []crypto.Address,
	broadcastPipe pipeline.Pipeline[message.Message],
) Manager

type ManagerReader

type ManagerReader interface {
	Instances() []Reader
	HandleQueryVote(height uint32, round int16) *vote.Vote
	HandleQueryProposal(height uint32, round int16) *proposal.Proposal
	Proposal() *proposal.Proposal
	HeightRound() (uint32, int16)
	HasActiveInstance() bool
}

type Reader

type Reader interface {
	ConsensusKey() *bls.PublicKey
	AllVotes() []*vote.Vote
	HandleQueryVote(height uint32, round int16) *vote.Vote
	HandleQueryProposal(height uint32, round int16) *proposal.Proposal
	Proposal() *proposal.Proposal
	HasVote(h hash.Hash) bool
	HeightRound() (uint32, int16)
	IsActive() bool
	IsProposer() bool
}

Jump to

Keyboard shortcuts

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