Documentation ¶
Index ¶
- Constants
- func GetAuthorsDistribution(candidates []*candidate, seed []byte, shortFlipsCount int) (authorsPerCandidate map[int][]int, candidatesPerAuthor map[int][]int)
- func GetFlipsDistribution(candidatesCount int, authorsPerCandidate map[int][]int, ...) (shortFlipsPerCandidate [][]int, longFlipsPerCandidate [][]int)
- func GetWords(seed []byte, proof []byte, pubKeyData []byte, ...) (word1, word2 int, err error)
- func NewQualification(epochDb *database.EpochDb) *qualification
- type FlipQualification
- type FlipStatus
- type Queue
- type ValidationCeremony
- func (vc *ValidationCeremony) ApplyNewEpoch(height uint64, appState *appstate.AppState, ...) (identitiesCount int, authors *types.ValidationAuthors, failed bool)
- func (vc *ValidationCeremony) FlipKeyWordPairs() []int
- func (vc *ValidationCeremony) GeneratePairs(seed []byte, dictionarySize, pairCount int, epoch uint16) (nums []int, proof []byte)
- func (vc *ValidationCeremony) GetFlipWords(cid []byte) (word1, word2 int, err error)
- func (vc *ValidationCeremony) GetLongFlipsToSolve() [][]byte
- func (vc *ValidationCeremony) GetShortFlipsToSolve() [][]byte
- func (vc *ValidationCeremony) Initialize(currentBlock *types.Block)
- func (vc *ValidationCeremony) LongSessionFlipsCount() uint
- func (vc *ValidationCeremony) ShortSessionBeginTime() time.Time
- func (vc *ValidationCeremony) ShortSessionFlipsCount() uint
- func (vc *ValidationCeremony) ShortSessionStarted() bool
- func (vc *ValidationCeremony) SubmitLongAnswers(answers *types.Answers) (common.Hash, error)
- func (vc *ValidationCeremony) SubmitShortAnswers(answers *types.Answers) (common.Hash, error)
Constants ¶
View Source
const ( MinTotalScore = 0.75 MinShortScore = 0.6 MinLongScore = 0.75 MinHumanTotalScore = 0.92 MinFlipsForVerified = 13 MinFlipsForHuman = 24 StakeToBalanceCoef = 0.75 )
View Source
const ( GeneticRelationLength = 3 CandidatesPerAuthor = 13 )
View Source
const (
LotterySeedLag = 100
)
Variables ¶
This section is empty.
Functions ¶
func GetAuthorsDistribution ¶
func GetFlipsDistribution ¶
func NewQualification ¶
Types ¶
type FlipQualification ¶
type FlipQualification struct {
// contains filtered or unexported fields
}
type FlipStatus ¶
type FlipStatus byte
const ( NotQualified FlipStatus = 0 Qualified FlipStatus = 1 WeaklyQualified FlipStatus = 2 QualifiedByNone FlipStatus = 3 )
type ValidationCeremony ¶
type ValidationCeremony struct {
// contains filtered or unexported fields
}
func NewValidationCeremony ¶
func (*ValidationCeremony) ApplyNewEpoch ¶
func (vc *ValidationCeremony) ApplyNewEpoch(height uint64, appState *appstate.AppState, statsCollector collector.StatsCollector) (identitiesCount int, authors *types.ValidationAuthors, failed bool)
func (*ValidationCeremony) FlipKeyWordPairs ¶
func (vc *ValidationCeremony) FlipKeyWordPairs() []int
func (*ValidationCeremony) GeneratePairs ¶
func (*ValidationCeremony) GetFlipWords ¶
func (vc *ValidationCeremony) GetFlipWords(cid []byte) (word1, word2 int, err error)
func (*ValidationCeremony) GetLongFlipsToSolve ¶
func (vc *ValidationCeremony) GetLongFlipsToSolve() [][]byte
func (*ValidationCeremony) GetShortFlipsToSolve ¶
func (vc *ValidationCeremony) GetShortFlipsToSolve() [][]byte
func (*ValidationCeremony) Initialize ¶
func (vc *ValidationCeremony) Initialize(currentBlock *types.Block)
func (*ValidationCeremony) LongSessionFlipsCount ¶
func (vc *ValidationCeremony) LongSessionFlipsCount() uint
func (*ValidationCeremony) ShortSessionBeginTime ¶
func (vc *ValidationCeremony) ShortSessionBeginTime() time.Time
func (*ValidationCeremony) ShortSessionFlipsCount ¶
func (vc *ValidationCeremony) ShortSessionFlipsCount() uint
func (*ValidationCeremony) ShortSessionStarted ¶
func (vc *ValidationCeremony) ShortSessionStarted() bool
func (*ValidationCeremony) SubmitLongAnswers ¶
func (*ValidationCeremony) SubmitShortAnswers ¶
Click to show internal directories.
Click to hide internal directories.