shuffling

package
v0.8.4-2 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ShufflingEpoch

type ShufflingEpoch struct {
	Epoch      Epoch
	Shuffling  []ValidatorIndex              // the active validator indices, shuffled into their committee
	Committees [SHARD_COUNT][]ValidatorIndex // slices of Shuffling, 1 per slot. Committee can be nil slice.
}

With a high amount of shards, or low amount of validators, some shards may not have a committee this epoch.

type ShufflingFeature

type ShufflingFeature struct {
	Meta interface {
		meta.Versioning
		meta.EpochSeed
		meta.ActiveIndices
		meta.CommitteeCount
		meta.CrosslinkTiming
	}
}

func (*ShufflingFeature) LoadShufflingEpoch

func (f *ShufflingFeature) LoadShufflingEpoch(epoch Epoch) *ShufflingEpoch

func (*ShufflingFeature) LoadShufflingStatus

func (f *ShufflingFeature) LoadShufflingStatus() *ShufflingStatus

type ShufflingStatus

type ShufflingStatus struct {
	PreviousShuffling *ShufflingEpoch
	CurrentShuffling  *ShufflingEpoch
	NextShuffling     *ShufflingEpoch
}

TODO: may want to pool this to avoid large allocations in mainnet.

func (*ShufflingStatus) GetCrosslinkCommittee

func (shs *ShufflingStatus) GetCrosslinkCommittee(epoch Epoch, shard Shard) []ValidatorIndex

Jump to

Keyboard shortcuts

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