topstakers

package
v1.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProvider

NewProvider returns a new sybil protection provider that uses the ProofOfStake module.

func WithOnlineCommitteeStartup

func WithOnlineCommitteeStartup(optsOnlineCommittee ...iotago.AccountID) options.Option[SeatManager]

Types

type SeatManager

type SeatManager struct {
	module.Module
	// contains filtered or unexported fields
}

SeatManager is a sybil protection module for the engine that manages the weights of actors according to their stake.

func (*SeatManager) CommitteeInEpoch

func (s *SeatManager) CommitteeInEpoch(epoch iotago.EpochIndex) (*account.SeatedAccounts, bool)

CommitteeInEpoch returns the set of validators selected to be part of the committee in the given epoch.

func (*SeatManager) CommitteeInSlot

func (s *SeatManager) CommitteeInSlot(slot iotago.SlotIndex) (*account.SeatedAccounts, bool)

CommitteeInSlot returns the set of validators selected to be part of the committee in the given slot.

func (*SeatManager) InitializeCommittee

func (s *SeatManager) InitializeCommittee(epoch iotago.EpochIndex, activityTime time.Time) error

func (*SeatManager) OnlineCommittee

func (s *SeatManager) OnlineCommittee() ds.Set[account.SeatIndex]

OnlineCommittee returns the set of validators selected to be part of the committee that has been seen recently.

func (*SeatManager) ReuseCommittee

func (s *SeatManager) ReuseCommittee(epoch iotago.EpochIndex, validators *account.Accounts) error

func (*SeatManager) RotateCommittee

func (s *SeatManager) RotateCommittee(epoch iotago.EpochIndex, candidates accounts.AccountsData) (*account.SeatedAccounts, error)

func (*SeatManager) SeatCountInEpoch

func (s *SeatManager) SeatCountInEpoch(epoch iotago.EpochIndex) int

func (*SeatManager) SeatCountInSlot

func (s *SeatManager) SeatCountInSlot(slot iotago.SlotIndex) int

func (*SeatManager) Shutdown

func (s *SeatManager) Shutdown()

Jump to

Keyboard shortcuts

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