Documentation ¶
Index ¶
- func NewProvider(opts ...options.Option[SeatManager]) module.Provider[*engine.Engine, seatmanager.SeatManager]
- func WithOnlineCommitteeStartup(optsOnlineCommittee ...iotago.AccountID) options.Option[SeatManager]
- type SeatManager
- func (s *SeatManager) CommitteeInEpoch(epoch iotago.EpochIndex) (*account.SeatedAccounts, bool)
- func (s *SeatManager) CommitteeInSlot(slot iotago.SlotIndex) (*account.SeatedAccounts, bool)
- func (s *SeatManager) InitializeCommittee(epoch iotago.EpochIndex, activityTime time.Time) error
- func (s *SeatManager) OnlineCommittee() ds.Set[account.SeatIndex]
- func (s *SeatManager) ReuseCommittee(epoch iotago.EpochIndex, validators *account.Accounts) error
- func (s *SeatManager) RotateCommittee(epoch iotago.EpochIndex, candidates accounts.AccountsData) (*account.SeatedAccounts, error)
- func (s *SeatManager) SeatCountInEpoch(epoch iotago.EpochIndex) int
- func (s *SeatManager) SeatCountInSlot(slot iotago.SlotIndex) int
- func (s *SeatManager) Shutdown()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProvider ¶
func NewProvider(opts ...options.Option[SeatManager]) module.Provider[*engine.Engine, seatmanager.SeatManager]
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 ¶
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()
Click to show internal directories.
Click to hide internal directories.