seed

package
v0.29.16-skip-indicies... Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

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