Documentation ¶
Overview ¶
Package benchmark contains useful helpers for pregenerating filled data structures such as blocks/states for benchmarks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AttestationsPerEpoch = uint64(128)
AttestationsPerEpoch represents the requested amount attestations in an epoch. This affects the amount of attestations in a fully attested for block and the amount of attestations in the state per epoch, so a full 2 epochs should result in twice this amount of attestations in the state. Default is 128.
var BState1EpochFileName = fmt.Sprintf("bState1Epoch-%dAtts-%dVals.ssz", AttestationsPerEpoch, ValidatorCount)
BState1EpochFileName is the generated beacon state after 1 skipped epoch file name.
var BstateEpochFileName = fmt.Sprintf("bState2Epochs-%dAtts-%dVals.ssz", AttestationsPerEpoch, ValidatorCount)
BstateEpochFileName is the generated beacon state after 2 full epochs file name.
var FullBlockFileName = fmt.Sprintf("fullBlock-%dAtts-%dVals.ssz", AttestationsPerEpoch, ValidatorCount)
FullBlockFileName is the generated full block file name.
var GenesisFileName = fmt.Sprintf("bStateGenesis-%dAtts-%dVals.ssz", AttestationsPerEpoch, ValidatorCount)
GenesisFileName is the generated genesis beacon state file name.
var ValidatorCount = uint64(16384)
ValidatorCount is for declaring how many validators the benchmarks will be performed with. Default is 16384 or 524K ETH staked.
Functions ¶
func PreGenFullBlock ¶
func PreGenFullBlock() (*ethpb.SignedBeaconBlock, error)
PreGenFullBlock unmarshals the pre-generated signed beacon block containing an epochs worth of attestations and returns it.
func PreGenState1Epoch ¶
func PreGenState1Epoch() (state.BeaconState, error)
PreGenState1Epoch unmarshals the pre-generated beacon state after 1 epoch of block processing and returns it.
func PreGenstateFullEpochs ¶
func PreGenstateFullEpochs() (state.BeaconState, error)
PreGenstateFullEpochs unmarshals the pre-generated beacon state after 2 epoch of full block processing and returns it.
func SetBenchmarkConfig ¶
func SetBenchmarkConfig() (func(), error)
SetBenchmarkConfig changes the beacon config to match the requested amount of attestations set to AttestationsPerEpoch.
Types ¶
This section is empty.