Documentation ¶
Index ¶
- Constants
- func GeneratePairsFromVrfHash(hash [32]byte, dictionarySize, pairCount int) (nums []int)
- 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(authorRnd uint64, dictionarySize, pairCount, pairIndex int) (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.ValidationResults, failed bool)
- func (vc *ValidationCeremony) FlipKeyWordPairs() []int
- func (vc *ValidationCeremony) GeneratePairs(seed []byte, dictionarySize, pairCount int) (nums []int, proof []byte)
- func (vc *ValidationCeremony) GetDecryptedFlip(key []byte) (publicPart []byte, privatePart []byte, err error)
- func (vc *ValidationCeremony) GetFlipKeys(addr common.Address, cidBytes []byte) (publicKey []byte, encryptedPrivateKey []byte, err error)
- func (vc *ValidationCeremony) GetFlipWords(cid []byte) (word1, word2 int, err error)
- func (vc *ValidationCeremony) GetLongFlipsToSolve(address common.Address) [][]byte
- func (vc *ValidationCeremony) GetShortFlipsToSolve(address common.Address) [][]byte
- func (vc *ValidationCeremony) Initialize(currentBlock *types.Block)
- func (vc *ValidationCeremony) IsFlipInMemory(key []byte) bool
- func (vc *ValidationCeremony) IsFlipReadyToSolve(key []byte) bool
- func (vc *ValidationCeremony) IsValidationReady() bool
- func (vc *ValidationCeremony) PrivateEncryptionKeyCandidates(addr common.Address) ([][]byte, error)
- func (vc *ValidationCeremony) SendPrivateEncryptionKeysPackage(data *types.PrivateFlipKeysPackage) error
- func (vc *ValidationCeremony) SendPublicEncryptionKey(key *types.PublicFlipKey) error
- 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 ( LotterySeedLag = 100 MaxFlipKeysPackageBroadcastDelaySec = 120 MaxShortAnswersBroadcastDelaySec = 60 // Flip keys will stop syncing with peers in FlipKeysSyncTimeFrame seconds after short session start FlipKeysSyncTimeFrame = 60 * 4 // seconds AllFlipsLoadingTime = time.Hour * 2 )
View Source
const (
CandidatesPerAuthor = 13
)
Variables ¶
This section is empty.
Functions ¶
func GeneratePairsFromVrfHash ¶ added in v0.24.1
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.ValidationResults, failed bool)
func (*ValidationCeremony) FlipKeyWordPairs ¶
func (vc *ValidationCeremony) FlipKeyWordPairs() []int
func (*ValidationCeremony) GeneratePairs ¶
func (vc *ValidationCeremony) GeneratePairs(seed []byte, dictionarySize, pairCount int) (nums []int, proof []byte)
func (*ValidationCeremony) GetDecryptedFlip ¶ added in v0.23.1
func (vc *ValidationCeremony) GetDecryptedFlip(key []byte) (publicPart []byte, privatePart []byte, err error)
func (*ValidationCeremony) GetFlipKeys ¶ added in v0.23.1
func (*ValidationCeremony) GetFlipWords ¶
func (vc *ValidationCeremony) GetFlipWords(cid []byte) (word1, word2 int, err error)
func (*ValidationCeremony) GetLongFlipsToSolve ¶
func (vc *ValidationCeremony) GetLongFlipsToSolve(address common.Address) [][]byte
func (*ValidationCeremony) GetShortFlipsToSolve ¶
func (vc *ValidationCeremony) GetShortFlipsToSolve(address common.Address) [][]byte
func (*ValidationCeremony) Initialize ¶
func (vc *ValidationCeremony) Initialize(currentBlock *types.Block)
func (*ValidationCeremony) IsFlipInMemory ¶ added in v0.23.1
func (vc *ValidationCeremony) IsFlipInMemory(key []byte) bool
func (*ValidationCeremony) IsFlipReadyToSolve ¶ added in v0.23.1
func (vc *ValidationCeremony) IsFlipReadyToSolve(key []byte) bool
func (*ValidationCeremony) IsValidationReady ¶ added in v0.23.1
func (vc *ValidationCeremony) IsValidationReady() bool
func (*ValidationCeremony) PrivateEncryptionKeyCandidates ¶ added in v0.23.1
func (vc *ValidationCeremony) PrivateEncryptionKeyCandidates(addr common.Address) ([][]byte, error)
func (*ValidationCeremony) SendPrivateEncryptionKeysPackage ¶ added in v0.23.1
func (vc *ValidationCeremony) SendPrivateEncryptionKeysPackage(data *types.PrivateFlipKeysPackage) error
func (*ValidationCeremony) SendPublicEncryptionKey ¶ added in v0.23.1
func (vc *ValidationCeremony) SendPublicEncryptionKey(key *types.PublicFlipKey) error
func (*ValidationCeremony) ShortSessionStarted ¶
func (vc *ValidationCeremony) ShortSessionStarted() bool
func (*ValidationCeremony) SubmitLongAnswers ¶
func (*ValidationCeremony) SubmitShortAnswers ¶
Click to show internal directories.
Click to hide internal directories.