seed

package
v0.30.3-archive-node Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const RandomSourceLength = crypto.SignatureLenBLSBLS12381

Variables

View Source
var (
	// ProtocolConsensusLeaderSelection is the customizer for consensus leader selection
	ProtocolConsensusLeaderSelection = customizerFromIndices([]uint16{0, 1, 1})
	// ProtocolVerificationChunkAssignment is the customizer for verification nodes determines chunk assignment
	ProtocolVerificationChunkAssignment = customizerFromIndices([]uint16{0, 2, 0})
)

Functions

func ExecutionChunk added in v0.25.0

func ExecutionChunk(chunkIndex uint16) []byte

ExecutionChunk returns the indices for i-th chunk

func FromParentQCSignature added in v0.25.0

func FromParentQCSignature(sigData []byte) ([]byte, error)

FromParentQCSignature extracts the source of randomness from the given QC sigData. The sigData is an RLP encoded structure that is part of QuorumCertificate.

func PRGFromRandomSource added in v0.25.0

func PRGFromRandomSource(randomSource []byte, customizer []byte) (random.Rand, error)

PRGFromRandomSource returns a PRG seeded by the source of randomness of the protocol. The customizer is used to generate a task-specific PRG (customizer in this implementation is up to 12-bytes long).

The function hashes the input random source to obtain the PRG seed. Hashing is required to uniformize the entropy over the output.

func ProtocolCollectorClusterLeaderSelection added in v0.25.0

func ProtocolCollectorClusterLeaderSelection(clusterIndex uint) []byte

ProtocolCollectorClusterLeaderSelection returns the indices for the leader selection for the i-th collector cluster

Types

This section is empty.

Jump to

Keyboard shortcuts

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