sybilprotectionv1

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: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithInitialCommittee

func WithInitialCommittee(committee accounts.AccountsData) options.Option[SybilProtection]

WithInitialCommittee registers the passed committee on a given slot. This is needed to generate Genesis snapshot with some initial committee.

func WithSeatManagerProvider

func WithSeatManagerProvider(seatManagerProvider module.Provider[*engine.Engine, seatmanager.SeatManager]) options.Option[SybilProtection]

Types

type SybilProtection

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

func (*SybilProtection) CommitSlot

func (o *SybilProtection) CommitSlot(slot iotago.SlotIndex) (committeeRoot iotago.Identifier, rewardsRoot iotago.Identifier, err error)

func (*SybilProtection) DelegatorReward

func (o *SybilProtection) DelegatorReward(validatorID iotago.AccountID, delegatedAmount iotago.BaseToken, epochStart iotago.EpochIndex, epochEnd iotago.EpochIndex, claimingEpoch iotago.EpochIndex) (delegatorReward iotago.Mana, firstRewardEpoch iotago.EpochIndex, lastRewardEpoch iotago.EpochIndex, err error)

func (*SybilProtection) EligibleValidators

func (o *SybilProtection) EligibleValidators(epoch iotago.EpochIndex) (accounts.AccountsData, error)

EligibleValidators returns the currently known list of recently active validator candidates for the given epoch.

func (*SybilProtection) Export

func (o *SybilProtection) Export(writer io.WriteSeeker, targetSlot iotago.SlotIndex) error

func (*SybilProtection) Import

func (o *SybilProtection) Import(reader io.ReadSeeker) error

func (*SybilProtection) IsCandidateActive

func (o *SybilProtection) IsCandidateActive(validatorID iotago.AccountID, epoch iotago.EpochIndex) (bool, error)

IsCandidateActive returns true if the given validator is currently active.

func (*SybilProtection) OrderedRegisteredCandidateValidatorsList

func (o *SybilProtection) OrderedRegisteredCandidateValidatorsList(epoch iotago.EpochIndex) ([]*api.ValidatorResponse, error)

OrderedRegisteredCandidateValidatorsList returns the currently known list of registered validator candidates for the given epoch.

func (*SybilProtection) PoolRewardsForAccount

func (o *SybilProtection) PoolRewardsForAccount(accountID iotago.AccountID) (
	poolRewardsForAccount iotago.Mana,
	exists bool,
	err error,
)

func (*SybilProtection) Reset

func (o *SybilProtection) Reset()

Reset resets the component to a clean state as if it was created at the last commitment.

func (*SybilProtection) SeatManager

func (o *SybilProtection) SeatManager() seatmanager.SeatManager

func (*SybilProtection) Shutdown

func (o *SybilProtection) Shutdown()

func (*SybilProtection) TrackBlock

func (o *SybilProtection) TrackBlock(block *blocks.Block)

func (*SybilProtection) ValidatorReward

func (o *SybilProtection) ValidatorReward(validatorID iotago.AccountID, stakingFeature *iotago.StakingFeature, claimingEpoch iotago.EpochIndex) (validatorReward iotago.Mana, firstRewardEpoch iotago.EpochIndex, lastRewardEpoch iotago.EpochIndex, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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