Documentation
¶
Overview ¶
Package params defines important constants that are essential to Prysm services.
Code generated by hack/gen-logs.sh; DO NOT EDIT. This file is created and regenerated automatically. Anything added here might get removed.
Index ¶
- Constants
- Variables
- func ConfigForkVersions(b *BeaconChainConfig) map[[fieldparams.VersionLength]byte]int
- func ConfigToYaml(cfg *BeaconChainConfig) []byte
- func DenebEnabled() bool
- func ElectraEnabled() bool
- func EpochsDuration(count primitives.Epoch, b *BeaconChainConfig) time.Duration
- func FillTestVersions(c *BeaconChainConfig, b byte)
- func Fork(epoch primitives.Epoch) (*ethpb.Fork, error)
- func ForkDataFromDigest(digest [4]byte) ([fieldparams.VersionLength]byte, primitives.Epoch, error)
- func ForkDigest(epoch primitives.Epoch) [4]byte
- func ForkDigestUsingConfig(epoch primitives.Epoch, cfg *BeaconChainConfig) [4]byte
- func ForkFromConfig(cfg *BeaconChainConfig, epoch primitives.Epoch) *ethpb.Fork
- func FuluEnabled() bool
- func LastForkEpoch() primitives.Epoch
- func LoadChainConfigFile(path string, conf *BeaconChainConfig) error
- func LogDigests(b *BeaconChainConfig)
- func MaxRequestBlock(e primitives.Epoch) uint64
- func NextForkData(epoch primitives.Epoch) ([fieldparams.VersionLength]byte, primitives.Epoch)
- func OverrideBeaconConfig(c *BeaconChainConfig)
- func OverrideBeaconNetworkConfig(cfg *NetworkConfig)
- func ReplaceHexStringWithYAMLFormat(line string) []string
- func SecondsPerSlot(b *BeaconChainConfig) time.Duration
- func SetActive(c *BeaconChainConfig) error
- func SetActiveTestCleanup(t *testing.T, cfg *BeaconChainConfig)
- func SetActiveWithUndo(c *BeaconChainConfig) (func() error, error)
- func SetGenesisFork(t *testing.T, cfg *BeaconChainConfig, fork int)
- func SetupTestConfigCleanup(t testing.TB)
- func SlotBP() primitives.BP
- func SlotsDuration(count primitives.Slot, b *BeaconChainConfig) time.Duration
- func SlotsForEpochs(count primitives.Epoch, b *BeaconChainConfig) primitives.Slot
- func UseCustomNetworkConfig()
- func UseHoleskyNetworkConfig()
- func UseHoodiNetworkConfig()
- func UseSepoliaNetworkConfig()
- func WithinDAPeriod(block, current primitives.Epoch) bool
- type BeaconChainConfig
- func All() []*BeaconChainConfig
- func BeaconConfig() *BeaconChainConfig
- func ByName(name string) (*BeaconChainConfig, error)
- func ByVersion(version [fieldparams.VersionLength]byte) (*BeaconChainConfig, error)
- func E2EMainnetTestConfig() *BeaconChainConfig
- func E2ETestConfig() *BeaconChainConfig
- func HoleskyConfig() *BeaconChainConfig
- func HoodiConfig() *BeaconChainConfig
- func InteropConfig() *BeaconChainConfig
- func MainnetConfig() *BeaconChainConfig
- func MainnetTestConfig() *BeaconChainConfig
- func MinimalSpecConfig() *BeaconChainConfig
- func SepoliaConfig() *BeaconChainConfig
- func UnmarshalConfig(yamlFile []byte, conf *BeaconChainConfig) (*BeaconChainConfig, error)
- func UnmarshalConfigFile(path string, conf *BeaconChainConfig) (*BeaconChainConfig, error)
- func (b *BeaconChainConfig) ApplyOptions(opts ...Option)
- func (b *BeaconChainConfig) Copy() *BeaconChainConfig
- func (b *BeaconChainConfig) CurrentEpochAttestationsLength() uint64
- func (b *BeaconChainConfig) Eth1DataVotesLength() uint64
- func (b *BeaconChainConfig) ExecutionRequestLimits() enginev1.ExecutionRequestLimits
- func (b *BeaconChainConfig) InitializeForkSchedule()
- func (b *BeaconChainConfig) MaxBlobsPerBlock(slot primitives.Slot) int
- func (b *BeaconChainConfig) MaxBlobsPerBlockAtEpoch(epoch primitives.Epoch) int
- func (b *BeaconChainConfig) MaximumGossipClockDisparityDuration() time.Duration
- func (b *BeaconChainConfig) PreviousEpochAttestationsLength() uint64
- func (b *BeaconChainConfig) RespTimeoutDuration() time.Duration
- func (b *BeaconChainConfig) SlotComponentDuration(bp primitives.BP) time.Duration
- func (b *BeaconChainConfig) SlotDuration() time.Duration
- func (b *BeaconChainConfig) SlotDurationMillis() uint64
- func (b *BeaconChainConfig) TargetBlobsPerBlock(slot primitives.Slot) int
- func (b *BeaconChainConfig) TtfbTimeoutDuration() time.Duration
- func (b *BeaconChainConfig) VersionToForkEpochMap() map[int]primitives.Epoch
- type BlobScheduleEntry
- type IoConfig
- type NetworkConfig
- type NetworkSchedule
- type NetworkScheduleEntry
- func GetNetworkScheduleEntry(epoch primitives.Epoch) NetworkScheduleEntry
- func LastNetworkScheduleEntry() NetworkScheduleEntry
- func NextNetworkScheduleEntry(epoch primitives.Epoch) NetworkScheduleEntry
- func SortedForkSchedule() []NetworkScheduleEntry
- func SortedNetworkScheduleEntries() []NetworkScheduleEntry
- type Option
Constants ¶
const ( DevnetName = "devnet" EndToEndName = "end-to-end" EndToEndMainnetName = "end-to-end-mainnet" InteropName = "interop" MainnetName = "mainnet" MainnetTestName = "mainnet-test" MinimalName = "minimal" SepoliaName = "sepolia" HoleskyName = "holesky" HoodiName = "hoodi" )
const BasisPoints = primitives.BP(10000)
const (
EnvNameOverrideAccept = "PRYSM_API_OVERRIDE_ACCEPT"
)
Variables ¶
var ErrNoPreviousVersion = errors.New("no previous version")
ErrNoPreviousVersion indicates that a version prior to the given version could not be found, because the given version is the first one in the list
var ErrVersionNotFound = errors.New("could not find an entry in the fork schedule")
ErrVersionNotFound indicates the config package couldn't determine the version for an epoch using the fork schedule.
Functions ¶
func ConfigForkVersions ¶
func ConfigForkVersions(b *BeaconChainConfig) map[[fieldparams.VersionLength]byte]int
ConfigForkVersions returns a mapping between a fork version param and the version identifier from the runtime/version package.
func ConfigToYaml ¶
func ConfigToYaml(cfg *BeaconChainConfig) []byte
ConfigToYaml takes a provided config and outputs its contents in yaml. This allows prysm's custom configs to be read by other clients.
func DenebEnabled ¶
func DenebEnabled() bool
DenebEnabled centralizes the check to determine if code paths that are specific to deneb should be allowed to execute. This will make it easier to find call sites that do this kind of check and remove them post-deneb.
func ElectraEnabled ¶
func ElectraEnabled() bool
ElectraEnabled centralizes the check to determine if code paths that are specific to electra should be allowed to execute. This will make it easier to find call sites that do this kind of check and remove them post-electra.
func EpochsDuration ¶
func EpochsDuration(count primitives.Epoch, b *BeaconChainConfig) time.Duration
EpochsDuration returns the time duration of the given number of epochs.
func FillTestVersions ¶
func FillTestVersions(c *BeaconChainConfig, b byte)
FillTestVersions replaces the fork schedule in the given BeaconChainConfig with test values, using the given byte argument as the high byte (common across forks).
func Fork ¶
func Fork(epoch primitives.Epoch) (*ethpb.Fork, error)
Fork returns the fork version for the given epoch.
func ForkDataFromDigest ¶
func ForkDataFromDigest(digest [4]byte) ([fieldparams.VersionLength]byte, primitives.Epoch, error)
ForkDataFromDigest performs the inverse, where it tries to determine the fork version and epoch from a provided digest by looping through our current fork schedule.
func ForkDigest ¶
func ForkDigest(epoch primitives.Epoch) [4]byte
func ForkDigestUsingConfig ¶
func ForkDigestUsingConfig(epoch primitives.Epoch, cfg *BeaconChainConfig) [4]byte
ForkDigestUsingConfig retrieves the fork digest from the current schedule determined by the provided epoch.
func ForkFromConfig ¶
func ForkFromConfig(cfg *BeaconChainConfig, epoch primitives.Epoch) *ethpb.Fork
func FuluEnabled ¶
func FuluEnabled() bool
FuluEnabled centralizes the check to determine if code paths that are specific to Fulu should be allowed to execute. This will make it easier to find call sites that do this kind of check and remove them post-fulu.
func LastForkEpoch ¶
func LastForkEpoch() primitives.Epoch
LastForkEpoch returns the last valid fork epoch that exists in our fork schedule.
func LoadChainConfigFile ¶
func LoadChainConfigFile(path string, conf *BeaconChainConfig) error
LoadChainConfigFile load, convert hex values into valid param yaml format, unmarshal , and apply beacon chain config file.
func LogDigests ¶
func LogDigests(b *BeaconChainConfig)
func MaxRequestBlock ¶
func MaxRequestBlock(e primitives.Epoch) uint64
MaxRequestBlock determines the maximum number of blocks that can be requested in a single request for a given epoch. If the epoch is at or beyond config's `DenebForkEpoch`, a special limit defined for Deneb is used.
func NextForkData ¶
func NextForkData(epoch primitives.Epoch) ([fieldparams.VersionLength]byte, primitives.Epoch)
NextForkData retrieves the next fork data according to the provided current epoch.
func OverrideBeaconConfig ¶
func OverrideBeaconConfig(c *BeaconChainConfig)
OverrideBeaconConfig by replacing the config. The preferred pattern is to call BeaconConfig(), change the specific parameters, and then call OverrideBeaconConfig(c). Any subsequent calls to params.BeaconConfig() will return this new configuration.
func OverrideBeaconNetworkConfig ¶
func OverrideBeaconNetworkConfig(cfg *NetworkConfig)
OverrideBeaconNetworkConfig will override the network config with the added argument.
func ReplaceHexStringWithYAMLFormat ¶
ReplaceHexStringWithYAMLFormat will replace hex strings that the yaml parser will understand.
func SecondsPerSlot ¶
func SecondsPerSlot(b *BeaconChainConfig) time.Duration
SecondsPerSlot returns the time duration of a single slot.
func SetActive ¶
func SetActive(c *BeaconChainConfig) error
SetActive sets the given config as active (the config that will be returned by GetActive). SetActive will always overwrite any config with the same ConfigName before setting the updated value to active.
func SetActiveTestCleanup ¶
func SetActiveTestCleanup(t *testing.T, cfg *BeaconChainConfig)
SetActiveTestCleanup sets an active config, and adds a test cleanup hook to revert to the default config after the test completes.
func SetActiveWithUndo ¶
func SetActiveWithUndo(c *BeaconChainConfig) (func() error, error)
SetActiveWithUndo attempts to set the active config, and if successful, returns a callback function that can be used to revert the configset back to its previous state.
func SetGenesisFork ¶
func SetGenesisFork(t *testing.T, cfg *BeaconChainConfig, fork int)
func SetupTestConfigCleanup ¶
SetupTestConfigCleanup preserves configurations allowing to modify them within tests without any restrictions, everything is restored after the test.
func SlotBP ¶
func SlotBP() primitives.BP
SlotBP returns the duration of a slot expressed in milliseconds, represented as basis points of a slot.
func SlotsDuration ¶
func SlotsDuration(count primitives.Slot, b *BeaconChainConfig) time.Duration
SlotsDuration returns the time duration of the given number of slots.
func SlotsForEpochs ¶
func SlotsForEpochs(count primitives.Epoch, b *BeaconChainConfig) primitives.Slot
SlotsForEpochs returns the number of slots in the given number of epochs.
func UseCustomNetworkConfig ¶
func UseCustomNetworkConfig()
func UseHoleskyNetworkConfig ¶
func UseHoleskyNetworkConfig()
UseHoleskyNetworkConfig uses the Holesky beacon chain specific network config.
func UseHoodiNetworkConfig ¶
func UseHoodiNetworkConfig()
UseHoodiNetworkConfig uses the Hoodi beacon chain specific network config.
func UseSepoliaNetworkConfig ¶
func UseSepoliaNetworkConfig()
UseSepoliaNetworkConfig uses the Sepolia beacon chain specific network config.
func WithinDAPeriod ¶
func WithinDAPeriod(block, current primitives.Epoch) bool
WithinDAPeriod checks if the block epoch is within the data availability retention period.
Types ¶
type BeaconChainConfig ¶
type BeaconChainConfig struct {
// Constants (non-configurable)
GenesisSlot primitives.Slot `yaml:"GENESIS_SLOT"` // GenesisSlot represents the first canonical slot number of the beacon chain.
GenesisEpoch primitives.Epoch `yaml:"GENESIS_EPOCH"` // GenesisEpoch represents the first canonical epoch number of the beacon chain.
FarFutureEpoch primitives.Epoch `yaml:"FAR_FUTURE_EPOCH"` // FarFutureEpoch represents a epoch extremely far away in the future used as the default penalization epoch for validators.
FarFutureSlot primitives.Slot `yaml:"FAR_FUTURE_SLOT"` // FarFutureSlot represents a slot extremely far away in the future.
BaseRewardsPerEpoch uint64 `yaml:"BASE_REWARDS_PER_EPOCH"` // BaseRewardsPerEpoch is used to calculate the per epoch rewards.
DepositContractTreeDepth uint64 `yaml:"DEPOSIT_CONTRACT_TREE_DEPTH"` // DepositContractTreeDepth depth of the Merkle trie of deposits in the validator deposit contract on the PoW chain.
JustificationBitsLength uint64 `yaml:"JUSTIFICATION_BITS_LENGTH"` // JustificationBitsLength defines number of epochs to track when implementing k-finality in Casper FFG.
// Misc constants.
PresetBase string `yaml:"PRESET_BASE" spec:"true"` // PresetBase represents the underlying spec preset this config is based on.
ConfigName string `yaml:"CONFIG_NAME" spec:"true"` // ConfigName for allowing an easy human-readable way of knowing what chain is being used.
TargetCommitteeSize uint64 `yaml:"TARGET_COMMITTEE_SIZE" spec:"true"` // TargetCommitteeSize is the number of validators in a committee when the chain is healthy.
MaxValidatorsPerCommittee uint64 `yaml:"MAX_VALIDATORS_PER_COMMITTEE" spec:"true"` // MaxValidatorsPerCommittee defines the upper bound of the size of a committee.
MaxCommitteesPerSlot uint64 `yaml:"MAX_COMMITTEES_PER_SLOT" spec:"true"` // MaxCommitteesPerSlot defines the max amount of committee in a single slot.
MinPerEpochChurnLimit uint64 `yaml:"MIN_PER_EPOCH_CHURN_LIMIT" spec:"true"` // MinPerEpochChurnLimit is the minimum amount of churn allotted for validator rotations.
ChurnLimitQuotient uint64 `yaml:"CHURN_LIMIT_QUOTIENT" spec:"true"` // ChurnLimitQuotient is used to determine the limit of how many validators can rotate per epoch.
ShuffleRoundCount uint64 `yaml:"SHUFFLE_ROUND_COUNT" spec:"true"` // ShuffleRoundCount is used for retrieving the permuted index.
MinGenesisActiveValidatorCount uint64 `yaml:"MIN_GENESIS_ACTIVE_VALIDATOR_COUNT" spec:"true"` // MinGenesisActiveValidatorCount defines how many validator deposits needed to kick off beacon chain.
MinGenesisTime uint64 `yaml:"MIN_GENESIS_TIME" spec:"true"` // MinGenesisTime is the time that needed to pass before kicking off beacon chain.
TargetAggregatorsPerCommittee uint64 `yaml:"TARGET_AGGREGATORS_PER_COMMITTEE" spec:"true"` // TargetAggregatorsPerCommittee defines the number of aggregators inside one committee.
HysteresisQuotient uint64 `yaml:"HYSTERESIS_QUOTIENT" spec:"true"` // HysteresisQuotient defines the hysteresis quotient for effective balance calculations.
HysteresisDownwardMultiplier uint64 `yaml:"HYSTERESIS_DOWNWARD_MULTIPLIER" spec:"true"` // HysteresisDownwardMultiplier defines the hysteresis downward multiplier for effective balance calculations.
HysteresisUpwardMultiplier uint64 `yaml:"HYSTERESIS_UPWARD_MULTIPLIER" spec:"true"` // HysteresisUpwardMultiplier defines the hysteresis upward multiplier for effective balance calculations.
// Gwei value constants.
MinDepositAmount uint64 `yaml:"MIN_DEPOSIT_AMOUNT" spec:"true"` // MinDepositAmount is the minimum amount of Gwei a validator can send to the deposit contract at once (lower amounts will be reverted).
MinActivationBalance uint64 `yaml:"MIN_ACTIVATION_BALANCE" spec:"true"` // MinActivationBalance is the minimum amount of Gwei a validator must have to be activated in the beacon state.
MaxEffectiveBalance uint64 `yaml:"MAX_EFFECTIVE_BALANCE" spec:"true"` // MaxEffectiveBalance is the maximal amount of Gwei that is effective for staking.
EjectionBalance uint64 `yaml:"EJECTION_BALANCE" spec:"true"` // EjectionBalance is the minimal GWei a validator needs to have before ejected.
EffectiveBalanceIncrement uint64 `yaml:"EFFECTIVE_BALANCE_INCREMENT" spec:"true"` // EffectiveBalanceIncrement is used for converting the high balance into the low balance for validators.
// Initial value constants.
BLSWithdrawalPrefixByte byte `yaml:"BLS_WITHDRAWAL_PREFIX" spec:"true"` // BLSWithdrawalPrefixByte is used for BLS withdrawal and it's the first byte.
ETH1AddressWithdrawalPrefixByte byte `yaml:"ETH1_ADDRESS_WITHDRAWAL_PREFIX" spec:"true"` // ETH1AddressWithdrawalPrefixByte is used for withdrawals and it's the first byte.
CompoundingWithdrawalPrefixByte byte `yaml:"COMPOUNDING_WITHDRAWAL_PREFIX" spec:"true"` // CompoundingWithdrawalPrefixByteByte is used for compounding withdrawals and it's the first byte.
BuilderWithdrawalPrefixByte byte `yaml:"BUILDER_WITHDRAWAL_PREFIX" spec:"true"` // BuilderWithdrawalPrefixByte is used for builder withdrawals and it's the first byte.
BuilderIndexSelfBuild primitives.BuilderIndex `yaml:"BUILDER_INDEX_SELF_BUILD" spec:"true"` // BuilderIndexSelfBuild indicates proposer self-built payloads.
ZeroHash [32]byte // ZeroHash is used to represent a zeroed out 32 byte array.
// Time parameters constants.
GenesisDelay uint64 `yaml:"GENESIS_DELAY" spec:"true"` // GenesisDelay is the minimum number of seconds to delay starting the Ethereum Beacon Chain genesis. Must be at least 1 second.
MinAttestationInclusionDelay primitives.Slot `yaml:"MIN_ATTESTATION_INCLUSION_DELAY" spec:"true"` // MinAttestationInclusionDelay defines how many slots validator has to wait to include attestation for beacon block.
SecondsPerSlot uint64 `yaml:"SECONDS_PER_SLOT" spec:"true"` // SecondsPerSlot is how many seconds are in a single slot.
SlotDurationMilliseconds uint64 `yaml:"SLOT_DURATION_MS" spec:"true"` // SlotDurationMilliseconds is the slot time expressed in milliseconds.
SlotsPerEpoch primitives.Slot `yaml:"SLOTS_PER_EPOCH" spec:"true"` // SlotsPerEpoch is the number of slots in an epoch.
SqrRootSlotsPerEpoch primitives.Slot // SqrRootSlotsPerEpoch is a hard coded value where we take the square root of `SlotsPerEpoch` and round down.
MinSeedLookahead primitives.Epoch `yaml:"MIN_SEED_LOOKAHEAD" spec:"true"` // MinSeedLookahead is the duration of randao look ahead seed.
MaxSeedLookahead primitives.Epoch `yaml:"MAX_SEED_LOOKAHEAD" spec:"true"` // MaxSeedLookahead is the duration a validator has to wait for entry and exit in epoch.
EpochsPerEth1VotingPeriod primitives.Epoch `yaml:"EPOCHS_PER_ETH1_VOTING_PERIOD" spec:"true"` // EpochsPerEth1VotingPeriod defines how often the merkle root of deposit receipts get updated in beacon node on per epoch basis.
SlotsPerHistoricalRoot primitives.Slot `yaml:"SLOTS_PER_HISTORICAL_ROOT" spec:"true"` // SlotsPerHistoricalRoot defines how often the historical root is saved.
MinValidatorWithdrawabilityDelay primitives.Epoch `yaml:"MIN_VALIDATOR_WITHDRAWABILITY_DELAY" spec:"true"` // MinValidatorWithdrawabilityDelay is the shortest amount of time a validator has to wait to withdraw.
ShardCommitteePeriod primitives.Epoch `yaml:"SHARD_COMMITTEE_PERIOD" spec:"true"` // ShardCommitteePeriod is the minimum amount of epochs a validator must participate before exiting.
MinEpochsToInactivityPenalty primitives.Epoch `yaml:"MIN_EPOCHS_TO_INACTIVITY_PENALTY" spec:"true"` // MinEpochsToInactivityPenalty defines the minimum amount of epochs since finality to begin penalizing inactivity.
Eth1FollowDistance uint64 `yaml:"ETH1_FOLLOW_DISTANCE" spec:"true"` // Eth1FollowDistance is the number of eth1.0 blocks to wait before considering a new deposit for voting. This only applies after the chain as been started.
SecondsPerETH1Block uint64 `yaml:"SECONDS_PER_ETH1_BLOCK" spec:"true"` // SecondsPerETH1Block is the approximate time for a single eth1 block to be produced.
// Fork choice algorithm constants.
ProposerScoreBoost uint64 `yaml:"PROPOSER_SCORE_BOOST" spec:"true"` // ProposerScoreBoost defines a value that is a % of the committee weight for fork-choice boosting.
ReorgHeadWeightThreshold uint64 `yaml:"REORG_HEAD_WEIGHT_THRESHOLD" spec:"true"` // ReorgHeadWeightThreshold defines a value that is a % of the committee weight to consider a block weak and subject to being orphaned.
ReorgParentWeightThreshold uint64 `yaml:"REORG_PARENT_WEIGHT_THRESHOLD" spec:"true"` // ReorgParentWeightThreshold defines a value that is a % of the committee weight to consider a parent block strong and subject its child to being orphaned.
ReorgMaxEpochsSinceFinalization primitives.Epoch `yaml:"REORG_MAX_EPOCHS_SINCE_FINALIZATION" spec:"true"` // This defines a limit to consider safe to orphan a block if the network is finalizing
IntervalsPerSlot uint64 `yaml:"INTERVALS_PER_SLOT"` // IntervalsPerSlot defines the number of fork choice intervals in a slot defined in the fork choice spec.
ProposerReorgCutoffBPS primitives.BP `yaml:"PROPOSER_REORG_CUTOFF_BPS" spec:"true"` // ProposerReorgCutoffBPS defines the proposer reorg deadline in basis points of the slot.
AttestationDueBPS primitives.BP `yaml:"ATTESTATION_DUE_BPS" spec:"true"` // AttestationDueBPS defines the attestation due time in basis points of the slot.
AggregateDueBPS primitives.BP `yaml:"AGGREGATE_DUE_BPS" spec:"true"` // AggregateDueBPS defines the aggregate due time in basis points of the slot.
SyncMessageDueBPS primitives.BP `yaml:"SYNC_MESSAGE_DUE_BPS" spec:"true"` // SyncMessageDueBPS defines the sync message due time in basis points of the slot.
ContributionDueBPS primitives.BP `yaml:"CONTRIBUTION_DUE_BPS" spec:"true"` // ContributionDueBPS defines the contribution due time in basis points of the slot.
AttestationDueBPSGloas primitives.BP `yaml:"ATTESTATION_DUE_BPS_GLOAS" spec:"true"` // AttestationDueBPSGloas defines the attestation due time in basis points of the slot (Gloas).
AggregateDueBPSGloas primitives.BP `yaml:"AGGREGATE_DUE_BPS_GLOAS" spec:"true"` // AggregateDueBPSGloas defines the aggregate due time in basis points of the slot (Gloas).
SyncMessageDueBPSGloas primitives.BP `yaml:"SYNC_MESSAGE_DUE_BPS_GLOAS" spec:"true"` // SyncMessageDueBPSGloas defines the sync message due time in basis points of the slot (Gloas).
ContributionDueBPSGloas primitives.BP `yaml:"CONTRIBUTION_DUE_BPS_GLOAS" spec:"true"` // ContributionDueBPSGloas defines the contribution due time in basis points of the slot (Gloas).
// Ethereum PoW parameters.
DepositChainID uint64 `yaml:"DEPOSIT_CHAIN_ID" spec:"true"` // DepositChainID of the eth1 network. This used for replay protection.
DepositNetworkID uint64 `yaml:"DEPOSIT_NETWORK_ID" spec:"true"` // DepositNetworkID of the eth1 network. This used for replay protection.
DepositContractAddress string `yaml:"DEPOSIT_CONTRACT_ADDRESS" spec:"true"` // DepositContractAddress is the address of the deposit contract.
// Validator parameters.
RandomSubnetsPerValidator uint64 `yaml:"RANDOM_SUBNETS_PER_VALIDATOR" spec:"true"` // RandomSubnetsPerValidator specifies the amount of subnets a validator has to be subscribed to at one time.
EpochsPerRandomSubnetSubscription uint64 `yaml:"EPOCHS_PER_RANDOM_SUBNET_SUBSCRIPTION"` // EpochsPerRandomSubnetSubscription specifies the minimum duration a validator is connected to their subnet.
// State list lengths
EpochsPerHistoricalVector primitives.Epoch `yaml:"EPOCHS_PER_HISTORICAL_VECTOR" spec:"true"` // EpochsPerHistoricalVector defines max length in epoch to store old historical stats in beacon state.
EpochsPerSlashingsVector primitives.Epoch `yaml:"EPOCHS_PER_SLASHINGS_VECTOR" spec:"true"` // EpochsPerSlashingsVector defines max length in epoch to store old stats to recompute slashing witness.
HistoricalRootsLimit uint64 `yaml:"HISTORICAL_ROOTS_LIMIT" spec:"true"` // HistoricalRootsLimit defines max historical roots that can be saved in state before roll over.
ValidatorRegistryLimit uint64 `yaml:"VALIDATOR_REGISTRY_LIMIT" spec:"true"` // ValidatorRegistryLimit defines the upper bound of validators can participate in eth2.
// Reward and penalty quotients constants.
BaseRewardFactor uint64 `yaml:"BASE_REWARD_FACTOR" spec:"true"` // BaseRewardFactor is used to calculate validator per-slot interest rate.
WhistleBlowerRewardQuotient uint64 `yaml:"WHISTLEBLOWER_REWARD_QUOTIENT" spec:"true"` // WhistleBlowerRewardQuotient is used to calculate whistle blower reward.
ProposerRewardQuotient uint64 `yaml:"PROPOSER_REWARD_QUOTIENT" spec:"true"` // ProposerRewardQuotient is used to calculate the reward for proposers.
InactivityPenaltyQuotient uint64 `yaml:"INACTIVITY_PENALTY_QUOTIENT" spec:"true"` // InactivityPenaltyQuotient is used to calculate the penalty for a validator that is offline.
MinSlashingPenaltyQuotient uint64 `yaml:"MIN_SLASHING_PENALTY_QUOTIENT" spec:"true"` // MinSlashingPenaltyQuotient is used to calculate the minimum penalty to prevent DoS attacks.
ProportionalSlashingMultiplier uint64 `yaml:"PROPORTIONAL_SLASHING_MULTIPLIER" spec:"true"` // ProportionalSlashingMultiplier is used as a multiplier on slashed penalties.
// Max operations per block constants.
MaxProposerSlashings uint64 `yaml:"MAX_PROPOSER_SLASHINGS" spec:"true"` // MaxProposerSlashings defines the maximum number of slashings of proposers possible in a block.
MaxAttesterSlashings uint64 `yaml:"MAX_ATTESTER_SLASHINGS" spec:"true"` // MaxAttesterSlashings defines the maximum number of casper FFG slashings possible in a block.
MaxAttesterSlashingsElectra uint64 `yaml:"MAX_ATTESTER_SLASHINGS_ELECTRA" spec:"true"` // MaxAttesterSlashingsElectra defines the maximum number of casper FFG slashings possible in a block post Electra hard fork.
MaxAttestations uint64 `yaml:"MAX_ATTESTATIONS" spec:"true"` // MaxAttestations defines the maximum allowed attestations in a beacon block.
MaxAttestationsElectra uint64 `yaml:"MAX_ATTESTATIONS_ELECTRA" spec:"true"` // MaxAttestationsElectra defines the maximum allowed attestations in a beacon block post Electra hard fork.
MaxDeposits uint64 `yaml:"MAX_DEPOSITS" spec:"true"` // MaxDeposits defines the maximum number of validator deposits in a block.
MaxVoluntaryExits uint64 `yaml:"MAX_VOLUNTARY_EXITS" spec:"true"` // MaxVoluntaryExits defines the maximum number of validator exits in a block.
MaxWithdrawalsPerPayload uint64 `yaml:"MAX_WITHDRAWALS_PER_PAYLOAD" spec:"true"` // MaxWithdrawalsPerPayload defines the maximum number of withdrawals in a block.
MaxBlsToExecutionChanges uint64 `yaml:"MAX_BLS_TO_EXECUTION_CHANGES" spec:"true"` // MaxBlsToExecutionChanges defines the maximum number of BLS-to-execution-change objects in a block.
MaxValidatorsPerWithdrawalsSweep uint64 `yaml:"MAX_VALIDATORS_PER_WITHDRAWALS_SWEEP" spec:"true"` // MaxValidatorsPerWithdrawalsSweep bounds the size of the sweep searching for withdrawals per slot.
// BLS domain values.
DomainBeaconProposer [4]byte `yaml:"DOMAIN_BEACON_PROPOSER" spec:"true"` // DomainBeaconProposer defines the BLS signature domain for beacon proposal verification.
DomainRandao [4]byte `yaml:"DOMAIN_RANDAO" spec:"true"` // DomainRandao defines the BLS signature domain for randao verification.
DomainBeaconAttester [4]byte `yaml:"DOMAIN_BEACON_ATTESTER" spec:"true"` // DomainBeaconAttester defines the BLS signature domain for attestation verification.
DomainDeposit [4]byte `yaml:"DOMAIN_DEPOSIT" spec:"true"` // DomainDeposit defines the BLS signature domain for deposit verification.
DomainVoluntaryExit [4]byte `yaml:"DOMAIN_VOLUNTARY_EXIT" spec:"true"` // DomainVoluntaryExit defines the BLS signature domain for exit verification.
DomainSelectionProof [4]byte `yaml:"DOMAIN_SELECTION_PROOF" spec:"true"` // DomainSelectionProof defines the BLS signature domain for selection proof.
DomainAggregateAndProof [4]byte `yaml:"DOMAIN_AGGREGATE_AND_PROOF" spec:"true"` // DomainAggregateAndProof defines the BLS signature domain for aggregate and proof.
DomainSyncCommittee [4]byte `yaml:"DOMAIN_SYNC_COMMITTEE" spec:"true"` // DomainVoluntaryExit defines the BLS signature domain for sync committee.
DomainSyncCommitteeSelectionProof [4]byte `yaml:"DOMAIN_SYNC_COMMITTEE_SELECTION_PROOF" spec:"true"` // DomainSelectionProof defines the BLS signature domain for sync committee selection proof.
DomainContributionAndProof [4]byte `yaml:"DOMAIN_CONTRIBUTION_AND_PROOF" spec:"true"` // DomainAggregateAndProof defines the BLS signature domain for contribution and proof.
DomainApplicationMask [4]byte `yaml:"DOMAIN_APPLICATION_MASK" spec:"true"` // DomainApplicationMask defines the BLS signature domain for application mask.
DomainApplicationBuilder [4]byte `yaml:"DOMAIN_APPLICATION_BUILDER" spec:"true"` // DomainApplicationBuilder defines the BLS signature domain for application builder.
DomainBLSToExecutionChange [4]byte `yaml:"DOMAIN_BLS_TO_EXECUTION_CHANGE" spec:"true"` // DomainBLSToExecutionChange defines the BLS signature domain to change withdrawal addresses to ETH1 prefix
DomainBeaconBuilder [4]byte `yaml:"DOMAIN_BEACON_BUILDER" spec:"true"` // DomainBeaconBuilder defines the BLS signature domain for beacon block builder.
DomainPTCAttester [4]byte `yaml:"DOMAIN_PTC_ATTESTER" spec:"true"` // DomainPTCAttester defines the BLS signature domain for payload transaction committee attester.
// Prysm constants.
GenesisValidatorsRoot [32]byte // GenesisValidatorsRoot is the root hash of the genesis validators.
GweiPerEth uint64 // GweiPerEth is the amount of gwei corresponding to 1 eth.
BLSSecretKeyLength int // BLSSecretKeyLength defines the expected length of BLS secret keys in bytes.
BLSPubkeyLength int // BLSPubkeyLength defines the expected length of BLS public keys in bytes.
DefaultBufferSize int // DefaultBufferSize for channels across the Prysm repository.
ValidatorPrivkeyFileName string // ValidatorPrivKeyFileName specifies the string name of a validator private key file.
WithdrawalPrivkeyFileName string // WithdrawalPrivKeyFileName specifies the string name of a withdrawal private key file.
RPCSyncCheck time.Duration // Number of seconds to query the sync service, to find out if the node is synced or not.
EmptySignature [96]byte // EmptySignature is used to represent a zeroed out BLS Signature.
DefaultPageSize int // DefaultPageSize defines the default page size for RPC server request.
MaxPeersToSync int // MaxPeersToSync describes the limit for number of peers in round robin sync.
SlotsPerArchivedPoint primitives.Slot // SlotsPerArchivedPoint defines the number of slots per one archived point.
GenesisCountdownInterval time.Duration // How often to log the countdown until the genesis time is reached.
BeaconStateFieldCount int // BeaconStateFieldCount defines how many fields are in the Phase0 beacon state.
BeaconStateAltairFieldCount int // BeaconStateAltairFieldCount defines how many fields are in the beacon state post upgrade to Altair.
BeaconStateBellatrixFieldCount int // BeaconStateBellatrixFieldCount defines how many fields are in beacon state post upgrade to Bellatrix.
BeaconStateCapellaFieldCount int // BeaconStateCapellaFieldCount defines how many fields are in beacon state post upgrade to Capella.
BeaconStateDenebFieldCount int // BeaconStateDenebFieldCount defines how many fields are in beacon state post upgrade to Deneb.
BeaconStateElectraFieldCount int // BeaconStateElectraFieldCount defines how many fields are in beacon state post upgrade to Electra.
BeaconStateFuluFieldCount int // BeaconStateFuluFieldCount defines how many fields are in beacon state post upgrade to Fulu.
BeaconStateGloasFieldCount int // BeaconStateGloasFieldCount defines how many fields are in beacon state post upgrade to Gloas.
// Slasher constants.
WeakSubjectivityPeriod primitives.Epoch // WeakSubjectivityPeriod defines the time period expressed in number of epochs were proof of stake network should validate block headers and attestations for slashable events.
PruneSlasherStoragePeriod primitives.Epoch // PruneSlasherStoragePeriod defines the time period expressed in number of epochs were proof of stake network should prune attestation and block header store.
// Slashing protection constants.
SlashingProtectionPruningEpochs primitives.Epoch // SlashingProtectionPruningEpochs defines a period after which all prior epochs are pruned in the validator database.
// Fork-related values.
GenesisForkVersion []byte `yaml:"GENESIS_FORK_VERSION" spec:"true"` // GenesisForkVersion is used to track fork version between state transitions.
AltairForkVersion []byte `yaml:"ALTAIR_FORK_VERSION" spec:"true"` // AltairForkVersion is used to represent the fork version for altair.
AltairForkEpoch primitives.Epoch `yaml:"ALTAIR_FORK_EPOCH" spec:"true"` // AltairForkEpoch is used to represent the assigned fork epoch for altair.
BellatrixForkVersion []byte `yaml:"BELLATRIX_FORK_VERSION" spec:"true"` // BellatrixForkVersion is used to represent the fork version for bellatrix.
BellatrixForkEpoch primitives.Epoch `yaml:"BELLATRIX_FORK_EPOCH" spec:"true"` // BellatrixForkEpoch is used to represent the assigned fork epoch for bellatrix.
CapellaForkVersion []byte `yaml:"CAPELLA_FORK_VERSION" spec:"true"` // CapellaForkVersion is used to represent the fork version for capella.
CapellaForkEpoch primitives.Epoch `yaml:"CAPELLA_FORK_EPOCH" spec:"true"` // CapellaForkEpoch is used to represent the assigned fork epoch for capella.
DenebForkVersion []byte `yaml:"DENEB_FORK_VERSION" spec:"true"` // DenebForkVersion is used to represent the fork version for deneb.
DenebForkEpoch primitives.Epoch `yaml:"DENEB_FORK_EPOCH" spec:"true"` // DenebForkEpoch is used to represent the assigned fork epoch for deneb.
ElectraForkVersion []byte `yaml:"ELECTRA_FORK_VERSION" spec:"true"` // ElectraForkVersion is used to represent the fork version for electra.
ElectraForkEpoch primitives.Epoch `yaml:"ELECTRA_FORK_EPOCH" spec:"true"` // ElectraForkEpoch is used to represent the assigned fork epoch for electra.
FuluForkVersion []byte `yaml:"FULU_FORK_VERSION" spec:"true"` // FuluForkVersion is used to represent the fork version for fulu.
FuluForkEpoch primitives.Epoch `yaml:"FULU_FORK_EPOCH" spec:"true"` // FuluForkEpoch is used to represent the assigned fork epoch for fulu.
GloasForkEpoch primitives.Epoch `yaml:"GLOAS_FORK_EPOCH" spec:"true"` // GloasForkEpoch is used to represent the assigned fork epoch for gloas.
ForkVersionSchedule map[[fieldparams.VersionLength]byte]primitives.Epoch // Schedule of fork epochs by version.
ForkVersionNames map[[fieldparams.VersionLength]byte]string // Human-readable names of fork versions.
// Weak subjectivity values.
SafetyDecay uint64 // SafetyDecay is defined as the loss in the 1/3 consensus safety margin of the casper FFG mechanism.
// New values introduced in Altair hard fork 1.
// Participation flag indices.
TimelySourceFlagIndex uint8 `yaml:"TIMELY_SOURCE_FLAG_INDEX" spec:"true"` // TimelySourceFlagIndex is the source flag position of the participation bits.
TimelyTargetFlagIndex uint8 `yaml:"TIMELY_TARGET_FLAG_INDEX" spec:"true"` // TimelyTargetFlagIndex is the target flag position of the participation bits.
TimelyHeadFlagIndex uint8 `yaml:"TIMELY_HEAD_FLAG_INDEX" spec:"true"` // TimelyHeadFlagIndex is the head flag position of the participation bits.
// Incentivization weights.
TimelySourceWeight uint64 `yaml:"TIMELY_SOURCE_WEIGHT" spec:"true"` // TimelySourceWeight is the factor of how much source rewards receives.
TimelyTargetWeight uint64 `yaml:"TIMELY_TARGET_WEIGHT" spec:"true"` // TimelyTargetWeight is the factor of how much target rewards receives.
TimelyHeadWeight uint64 `yaml:"TIMELY_HEAD_WEIGHT" spec:"true"` // TimelyHeadWeight is the factor of how much head rewards receives.
SyncRewardWeight uint64 `yaml:"SYNC_REWARD_WEIGHT" spec:"true"` // SyncRewardWeight is the factor of how much sync committee rewards receives.
WeightDenominator uint64 `yaml:"WEIGHT_DENOMINATOR" spec:"true"` // WeightDenominator accounts for total rewards denomination.
ProposerWeight uint64 `yaml:"PROPOSER_WEIGHT" spec:"true"` // ProposerWeight is the factor of how much proposer rewards receives.
// Validator related.
TargetAggregatorsPerSyncSubcommittee uint64 `yaml:"TARGET_AGGREGATORS_PER_SYNC_SUBCOMMITTEE" spec:"true"` // TargetAggregatorsPerSyncSubcommittee for aggregating in sync committee.
SyncCommitteeSubnetCount uint64 `yaml:"SYNC_COMMITTEE_SUBNET_COUNT" spec:"true"` // SyncCommitteeSubnetCount for sync committee subnet count.
// Misc.
SyncCommitteeSize uint64 `yaml:"SYNC_COMMITTEE_SIZE" spec:"true"` // SyncCommitteeSize for light client sync committee size.
InactivityScoreBias uint64 `yaml:"INACTIVITY_SCORE_BIAS" spec:"true"` // InactivityScoreBias for calculating score bias penalties during inactivity
InactivityScoreRecoveryRate uint64 `yaml:"INACTIVITY_SCORE_RECOVERY_RATE" spec:"true"` // InactivityScoreRecoveryRate for recovering score bias penalties during inactivity.
EpochsPerSyncCommitteePeriod primitives.Epoch `yaml:"EPOCHS_PER_SYNC_COMMITTEE_PERIOD" spec:"true"` // EpochsPerSyncCommitteePeriod defines how many epochs per sync committee period.
// Updated penalty values. This moves penalty parameters toward their final, maximum security values.
// Note: We do not override previous configuration values but instead creates new values and replaces usage throughout.
InactivityPenaltyQuotientAltair uint64 `yaml:"INACTIVITY_PENALTY_QUOTIENT_ALTAIR" spec:"true"` // InactivityPenaltyQuotientAltair for penalties during inactivity post Altair hard fork.
MinSlashingPenaltyQuotientAltair uint64 `yaml:"MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR" spec:"true"` // MinSlashingPenaltyQuotientAltair for slashing penalties post Altair hard fork.
ProportionalSlashingMultiplierAltair uint64 `yaml:"PROPORTIONAL_SLASHING_MULTIPLIER_ALTAIR" spec:"true"` // ProportionalSlashingMultiplierAltair for slashing penalties' multiplier post Alair hard fork.
MinSlashingPenaltyQuotientBellatrix uint64 `yaml:"MIN_SLASHING_PENALTY_QUOTIENT_BELLATRIX" spec:"true"` // MinSlashingPenaltyQuotientBellatrix for slashing penalties post Bellatrix hard fork.
ProportionalSlashingMultiplierBellatrix uint64 `yaml:"PROPORTIONAL_SLASHING_MULTIPLIER_BELLATRIX" spec:"true"` // ProportionalSlashingMultiplierBellatrix for slashing penalties' multiplier post Bellatrix hard fork.
InactivityPenaltyQuotientBellatrix uint64 `yaml:"INACTIVITY_PENALTY_QUOTIENT_BELLATRIX" spec:"true"` // InactivityPenaltyQuotientBellatrix for penalties during inactivity post Bellatrix hard fork.
// Light client
MinSyncCommitteeParticipants uint64 `yaml:"MIN_SYNC_COMMITTEE_PARTICIPANTS" spec:"true"` // MinSyncCommitteeParticipants defines the minimum amount of sync committee participants for which the light client acknowledges the signature.
MaxRequestLightClientUpdates uint64 `yaml:"MAX_REQUEST_LIGHT_CLIENT_UPDATES" spec:"true"` // MaxRequestLightClientUpdates defines the maximum amount of light client updates that can be requested in a single request.
// Bellatrix
TerminalBlockHash common.Hash `yaml:"TERMINAL_BLOCK_HASH" spec:"true"` // TerminalBlockHash of beacon chain.
TerminalBlockHashActivationEpoch primitives.Epoch `yaml:"TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH" spec:"true"` // TerminalBlockHashActivationEpoch of beacon chain.
TerminalTotalDifficulty string `yaml:"TERMINAL_TOTAL_DIFFICULTY" spec:"true"` // TerminalTotalDifficulty is part of the experimental Bellatrix spec. This value is type is currently TBD.
MaxBytesPerTransaction uint64 `yaml:"MAX_BYTES_PER_TRANSACTION" spec:"true"` // MaxBytesPerTransaction is the maximum number of bytes a single transaction can have.
MaxTransactionsPerPayload uint64 `yaml:"MAX_TRANSACTIONS_PER_PAYLOAD" spec:"true"` // MaxTransactionsPerPayload is the maximum number of transactions a single execution payload can include.
BytesPerLogsBloom uint64 `yaml:"BYTES_PER_LOGS_BLOOM" spec:"true"` // BytesPerLogsBloom is the number of bytes that constitute a log bloom filter.
MaxExtraDataBytes uint64 `yaml:"MAX_EXTRA_DATA_BYTES" spec:"true"` // MaxExtraDataBytes is the maximum number of bytes for the execution payload's extra data field.
DefaultFeeRecipient common.Address // DefaultFeeRecipient where the transaction fee goes to.
EthBurnAddressHex string // EthBurnAddressHex is the constant eth address written in hex format to burn fees in that network. the default is 0x0
DefaultBuilderGasLimit uint64 // DefaultBuilderGasLimit is the default used to set the gaslimit for the Builder APIs, typically at around 30M wei.
// Mev-boost circuit breaker
MaxBuilderConsecutiveMissedSlots primitives.Slot // MaxBuilderConsecutiveMissedSlots defines the number of consecutive skip slot to fallback from using relay/builder to local execution engine for block construction.
MaxBuilderEpochMissedSlots primitives.Slot // MaxBuilderEpochMissedSlots is defining the number of total skip slot (per epoch rolling windows) to fallback from using relay/builder to local execution engine for block construction.
LocalBlockValueBoost uint64 // LocalBlockValueBoost is the value boost for local block construction. This is used to prioritize local block construction over relay/builder block construction.
MinBuilderBid uint64 // MinBuilderBid is the minimum value that the builder's block can have to be considered by this node.
MinBuilderDiff uint64 // MinBuilderDiff is the minimum value above the local block value that the builder has to bid to be considered by this node
// Execution engine timeout value
ExecutionEngineTimeoutValue uint64 // ExecutionEngineTimeoutValue defines the seconds to wait before timing out engine endpoints with execution payload execution semantics (newPayload, forkchoiceUpdated).
// Subnet value
BlobsidecarSubnetCount uint64 `yaml:"BLOB_SIDECAR_SUBNET_COUNT" spec:"true"` // BlobsidecarSubnetCount is the number of blobsidecar subnets used in the gossipsub protocol.
BlobsidecarSubnetCountElectra uint64 `yaml:"BLOB_SIDECAR_SUBNET_COUNT_ELECTRA" spec:"true"` // BlobsidecarSubnetCountElectra is the number of blobsidecar subnets used in the gossipsub protocol post Electra hard fork.
// Values introduced in Deneb hard fork
MaxPerEpochActivationChurnLimit uint64 `yaml:"MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT" spec:"true"` // MaxPerEpochActivationChurnLimit is the maximum amount of churn allotted for validator activation.
MinEpochsForBlobsSidecarsRequest primitives.Epoch `yaml:"MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS" spec:"true"` // MinEpochsForBlobsSidecarsRequest is the minimum number of epochs the node will keep the blobs for.
MaxRequestBlobSidecars uint64 `yaml:"MAX_REQUEST_BLOB_SIDECARS" spec:"true"` // MaxRequestBlobSidecars is the maximum number of blobs to request in a single request.
MaxRequestBlobSidecarsElectra uint64 `yaml:"MAX_REQUEST_BLOB_SIDECARS_ELECTRA" spec:"true"` // MaxRequestBlobSidecarsElectra is the maximum number of blobs to request in a single request after the electra epoch.
MaxRequestBlocksDeneb uint64 `yaml:"MAX_REQUEST_BLOCKS_DENEB" spec:"true"` // MaxRequestBlocksDeneb is the maximum number of blocks in a single request after the deneb epoch.
FieldElementsPerBlob uint64 `yaml:"FIELD_ELEMENTS_PER_BLOB" spec:"true"` // FieldElementsPerBlob is the number of field elements that constitute a single blob.
MaxBlobCommitmentsPerBlock uint64 `yaml:"MAX_BLOB_COMMITMENTS_PER_BLOCK" spec:"true"` // MaxBlobCommitmentsPerBlock is the maximum number of KZG commitments that a block can have.
KzgCommitmentInclusionProofDepth uint64 `yaml:"KZG_COMMITMENT_INCLUSION_PROOF_DEPTH" spec:"true"` // KzgCommitmentInclusionProofDepth is the depth of the merkle proof of a KZG commitment.
// Values introduced in Electra upgrade
MaxPerEpochActivationExitChurnLimit uint64 `yaml:"MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT" spec:"true"` // MaxPerEpochActivationExitChurnLimit represents the maximum combined activation and exit churn.
MinPerEpochChurnLimitElectra uint64 `yaml:"MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA" spec:"true"` // MinPerEpochChurnLimitElectra is the minimum amount of churn allotted for validator rotations for electra.
MaxEffectiveBalanceElectra uint64 `yaml:"MAX_EFFECTIVE_BALANCE_ELECTRA" spec:"true"` // MaxEffectiveBalanceElectra is the maximal amount of Gwei that is effective for staking, increased in electra.
MinSlashingPenaltyQuotientElectra uint64 `yaml:"MIN_SLASHING_PENALTY_QUOTIENT_ELECTRA" spec:"true"` // MinSlashingPenaltyQuotientElectra is used to calculate the minimum penalty to prevent DoS attacks, modified for electra.
WhistleBlowerRewardQuotientElectra uint64 `yaml:"WHISTLEBLOWER_REWARD_QUOTIENT_ELECTRA" spec:"true"` // WhistleBlowerRewardQuotientElectra is used to calculate whistle blower reward, modified in electra.
PendingDepositsLimit uint64 `yaml:"PENDING_DEPOSITS_LIMIT" spec:"true"` // PendingDepositsLimit is the maximum number of pending balance deposits allowed in the beacon state.
PendingPartialWithdrawalsLimit uint64 `yaml:"PENDING_PARTIAL_WITHDRAWALS_LIMIT" spec:"true"` // PendingPartialWithdrawalsLimit is the maximum number of pending partial withdrawals allowed in the beacon state.
PendingConsolidationsLimit uint64 `yaml:"PENDING_CONSOLIDATIONS_LIMIT" spec:"true"` // PendingConsolidationsLimit is the maximum number of pending validator consolidations allowed in the beacon state.
MaxConsolidationsRequestsPerPayload uint64 `yaml:"MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD" spec:"true"` // MaxConsolidationsRequestsPerPayload is the maximum number of consolidations in a block.
MaxPendingPartialsPerWithdrawalsSweep uint64 `yaml:"MAX_PENDING_PARTIALS_PER_WITHDRAWALS_SWEEP" spec:"true"` // MaxPendingPartialsPerWithdrawalsSweep is the maximum number of pending partial withdrawals to process per payload.
MaxPendingDepositsPerEpoch uint64 `yaml:"MAX_PENDING_DEPOSITS_PER_EPOCH" spec:"true"` // MaxPendingDepositsPerEpoch is the maximum number of pending deposits per epoch processing.
FullExitRequestAmount uint64 `yaml:"FULL_EXIT_REQUEST_AMOUNT" spec:"true"` // FullExitRequestAmount is the amount of Gwei required to request a full exit.
MaxWithdrawalRequestsPerPayload uint64 `yaml:"MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD" spec:"true"` // MaxWithdrawalRequestsPerPayload is the maximum number of execution layer withdrawal requests in each payload.
MaxDepositRequestsPerPayload uint64 `yaml:"MAX_DEPOSIT_REQUESTS_PER_PAYLOAD" spec:"true"` // MaxDepositRequestsPerPayload is the maximum number of execution layer deposits in each payload
UnsetDepositRequestsStartIndex uint64 `yaml:"UNSET_DEPOSIT_REQUESTS_START_INDEX" spec:"true"` // UnsetDepositRequestsStartIndex is used to check the start index for eip6110
// Values introduced in Fulu upgrade
SamplesPerSlot uint64 `yaml:"SAMPLES_PER_SLOT" spec:"true"` // SamplesPerSlot is the minimum number of samples for an honest node.
NumberOfCustodyGroups uint64 `yaml:"NUMBER_OF_CUSTODY_GROUPS" spec:"true"` // NumberOfCustodyGroups available for nodes to custody.
CustodyRequirement uint64 `yaml:"CUSTODY_REQUIREMENT" spec:"true"` // CustodyRequirement is minimum number of custody groups an honest node custodies and serves samples from.
MinEpochsForDataColumnSidecarsRequest primitives.Epoch `yaml:"MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS" spec:"true"` // MinEpochsForDataColumnSidecarsRequest is the minimum number of epochs the node will keep the data columns for.
DataColumnSidecarSubnetCount uint64 `yaml:"DATA_COLUMN_SIDECAR_SUBNET_COUNT" spec:"true"` // DataColumnSidecarSubnetCount is the number of data column sidecar subnets used in the gossipsub protocol
MaxRequestDataColumnSidecars uint64 `yaml:"MAX_REQUEST_DATA_COLUMN_SIDECARS" spec:"true"` // MaxRequestDataColumnSidecars is the maximum number of data column sidecars in a single request
ValidatorCustodyRequirement uint64 `yaml:"VALIDATOR_CUSTODY_REQUIREMENT" spec:"true"` // ValidatorCustodyRequirement is the minimum number of custody groups an honest node with validators attached custodies and serves samples from
BalancePerAdditionalCustodyGroup uint64 `yaml:"BALANCE_PER_ADDITIONAL_CUSTODY_GROUP" spec:"true"` // BalancePerAdditionalCustodyGroup is the balance increment corresponding to one additional group to custody.
// Values introduced in Gloas upgrade
BuilderPaymentThresholdNumerator uint64 `yaml:"BUILDER_PAYMENT_THRESHOLD_NUMERATOR" spec:"true"` // BuilderPaymentThresholdNumerator is the numerator for builder payment quorum threshold calculation.
BuilderPaymentThresholdDenominator uint64 `yaml:"BUILDER_PAYMENT_THRESHOLD_DENOMINATOR" spec:"true"` // BuilderPaymentThresholdDenominator is the denominator for builder payment quorum threshold calculation.
// Networking Specific Parameters
MaxPayloadSize uint64 `yaml:"MAX_PAYLOAD_SIZE" spec:"true"` // MAX_PAYLOAD_SIZE is the maximum allowed size of uncompressed payload in gossip messages and rpc chunks.
AttestationSubnetCount uint64 `yaml:"ATTESTATION_SUBNET_COUNT" spec:"true"` // AttestationSubnetCount is the number of attestation subnets used in the gossipsub protocol.
AttestationPropagationSlotRange primitives.Slot `yaml:"ATTESTATION_PROPAGATION_SLOT_RANGE" spec:"true"` // AttestationPropagationSlotRange is the maximum number of slots during which an attestation can be propagated.
MaxRequestBlocks uint64 `yaml:"MAX_REQUEST_BLOCKS" spec:"true"` // MaxRequestBlocks is the maximum number of blocks in a single request.
TtfbTimeout uint64 `yaml:"TTFB_TIMEOUT" spec:"true"` // TtfbTimeout is the maximum time to wait for first byte of request response (time-to-first-byte).
RespTimeout uint64 `yaml:"RESP_TIMEOUT" spec:"true"` // RespTimeout is the maximum time for complete response transfer.
MaximumGossipClockDisparity uint64 `yaml:"MAXIMUM_GOSSIP_CLOCK_DISPARITY" spec:"true"` // MaximumGossipClockDisparity is the maximum milliseconds of clock disparity assumed between honest nodes.
MessageDomainInvalidSnappy [4]byte `yaml:"MESSAGE_DOMAIN_INVALID_SNAPPY" spec:"true"` // MessageDomainInvalidSnappy is the 4-byte domain for gossip message-id isolation of invalid snappy messages.
MessageDomainValidSnappy [4]byte `yaml:"MESSAGE_DOMAIN_VALID_SNAPPY" spec:"true"` // MessageDomainValidSnappy is the 4-byte domain for gossip message-id isolation of valid snappy messages.
MinEpochsForBlockRequests uint64 `yaml:"MIN_EPOCHS_FOR_BLOCK_REQUESTS" spec:"true"` // MinEpochsForBlockRequests represents the minimum number of epochs for which we can serve block requests.
EpochsPerSubnetSubscription uint64 `yaml:"EPOCHS_PER_SUBNET_SUBSCRIPTION" spec:"true"` // EpochsPerSubnetSubscription specifies the minimum duration a validator is connected to their subnet.
AttestationSubnetExtraBits uint64 `yaml:"ATTESTATION_SUBNET_EXTRA_BITS" spec:"true"` // AttestationSubnetExtraBits is the number of extra bits of a NodeId to use when mapping to a subscribed subnet.
AttestationSubnetPrefixBits uint64 `yaml:"ATTESTATION_SUBNET_PREFIX_BITS" spec:"true"` // AttestationSubnetPrefixBits is defined as (ceillog2(ATTESTATION_SUBNET_COUNT) + ATTESTATION_SUBNET_EXTRA_BITS).
SubnetsPerNode uint64 `yaml:"SUBNETS_PER_NODE" spec:"true"` // SubnetsPerNode is the number of long-lived subnets a beacon node should be subscribed to.
NodeIdBits uint64 `yaml:"NODE_ID_BITS"` // NodeIdBits defines the bit length of a node id.
// Blobs Values
BlobSchedule []BlobScheduleEntry `yaml:"BLOB_SCHEDULE" spec:"true"`
// Deprecated_MaxBlobsPerBlock defines the max blobs that could exist in a block.
// Deprecated: This field is no longer supported. Avoid using it.
DeprecatedMaxBlobsPerBlock int `yaml:"MAX_BLOBS_PER_BLOCK" spec:"true"`
// DeprecatedMaxBlobsPerBlockElectra defines the max blobs that could exist in a block post Electra hard fork.
// Deprecated: This field is no longer supported. Avoid using it.
DeprecatedMaxBlobsPerBlockElectra int `yaml:"MAX_BLOBS_PER_BLOCK_ELECTRA" spec:"true"`
// DeprecatedTargetBlobsPerBlockElectra defines the target number of blobs per block post Electra hard fork.
// Deprecated: This field is no longer supported. Avoid using it.
DeprecatedTargetBlobsPerBlockElectra int `yaml:"TARGET_BLOBS_PER_BLOCK_ELECTRA"`
// contains filtered or unexported fields
}
BeaconChainConfig contains constant configs for node to participate in beacon chain.
func All ¶
func All() []*BeaconChainConfig
All returns a slice of every BeaconChainConfig contained in the configset.
func BeaconConfig ¶
func BeaconConfig() *BeaconChainConfig
BeaconConfig retrieves beacon chain config.
func ByName ¶
func ByName(name string) (*BeaconChainConfig, error)
ByName returns the BeaconChainConfig with the matching `ConfigName` field. The runtime ensures that each config name uniquely refers to a single BeaconChainConfig.
func ByVersion ¶
func ByVersion(version [fieldparams.VersionLength]byte) (*BeaconChainConfig, error)
ByVersion returns the BeaconChainConfig that has the given version in its ForkVersionSchedule. The configset ensures that each fork version schedule entry uniquely points to a single BeaconChainConfig.
func E2EMainnetTestConfig ¶
func E2EMainnetTestConfig() *BeaconChainConfig
func E2ETestConfig ¶
func E2ETestConfig() *BeaconChainConfig
E2ETestConfig retrieves the configurations made specifically for E2E testing. The config is loaded from testdata/e2e_config.yaml and cached.
WARNING: This config is only for testing, it is not meant for use outside of E2E.
func HoleskyConfig ¶
func HoleskyConfig() *BeaconChainConfig
HoleskyConfig defines the config for the Holesky beacon chain testnet.
func HoodiConfig ¶
func HoodiConfig() *BeaconChainConfig
HoodiConfig defines the config for the Hoodi beacon chain testnet.
func InteropConfig ¶
func InteropConfig() *BeaconChainConfig
InteropConfig provides a generic config suitable for interop testing.
func MainnetConfig ¶
func MainnetConfig() *BeaconChainConfig
MainnetConfig returns the configuration to be used in the main network.
func MainnetTestConfig ¶
func MainnetTestConfig() *BeaconChainConfig
MainnetTestConfig provides a version of the mainnet config that has a different name and a different fork choice schedule. This can be used in cases where we want to use config values that are consistent with mainnet, but won't conflict or cause the hard-coded genesis to be loaded.
func MinimalSpecConfig ¶
func MinimalSpecConfig() *BeaconChainConfig
MinimalSpecConfig retrieves the minimal config used in spec tests.
func SepoliaConfig ¶
func SepoliaConfig() *BeaconChainConfig
SepoliaConfig defines the config for the Sepolia beacon chain testnet.
func UnmarshalConfig ¶
func UnmarshalConfig(yamlFile []byte, conf *BeaconChainConfig) (*BeaconChainConfig, error)
func UnmarshalConfigFile ¶
func UnmarshalConfigFile(path string, conf *BeaconChainConfig) (*BeaconChainConfig, error)
func (*BeaconChainConfig) ApplyOptions ¶
func (b *BeaconChainConfig) ApplyOptions(opts ...Option)
func (*BeaconChainConfig) Copy ¶
func (b *BeaconChainConfig) Copy() *BeaconChainConfig
Copy returns a copy of the config object.
func (*BeaconChainConfig) CurrentEpochAttestationsLength ¶
func (b *BeaconChainConfig) CurrentEpochAttestationsLength() uint64
CurrentEpochAttestationsLength returns the maximum length of the pending attestation list for the current epoch, computed from the parameters in BeaconChainConfig.
func (*BeaconChainConfig) Eth1DataVotesLength ¶
func (b *BeaconChainConfig) Eth1DataVotesLength() uint64
Eth1DataVotesLength returns the maximum length of the votes on the Eth1 data, computed from the parameters in BeaconChainConfig.
func (*BeaconChainConfig) ExecutionRequestLimits ¶
func (b *BeaconChainConfig) ExecutionRequestLimits() enginev1.ExecutionRequestLimits
func (*BeaconChainConfig) InitializeForkSchedule ¶
func (b *BeaconChainConfig) InitializeForkSchedule()
InitializeForkSchedule initializes the scheduled forks and BPOs baked into the config.
func (*BeaconChainConfig) MaxBlobsPerBlock ¶
func (b *BeaconChainConfig) MaxBlobsPerBlock(slot primitives.Slot) int
MaxBlobsPerBlock returns the maximum number of blobs per block for the given slot.
func (*BeaconChainConfig) MaxBlobsPerBlockAtEpoch ¶
func (b *BeaconChainConfig) MaxBlobsPerBlockAtEpoch(epoch primitives.Epoch) int
MaxBlobsPerBlockAtEpoch returns the maximum number of blobs per block for the given epoch
func (*BeaconChainConfig) MaximumGossipClockDisparityDuration ¶
func (b *BeaconChainConfig) MaximumGossipClockDisparityDuration() time.Duration
MaximumGossipClockDisparityDuration returns the time duration of the clock disparity.
func (*BeaconChainConfig) PreviousEpochAttestationsLength ¶
func (b *BeaconChainConfig) PreviousEpochAttestationsLength() uint64
PreviousEpochAttestationsLength returns the maximum length of the pending attestation list for the previous epoch, computed from the parameters in BeaconChainConfig.
func (*BeaconChainConfig) RespTimeoutDuration ¶
func (b *BeaconChainConfig) RespTimeoutDuration() time.Duration
RespTimeoutDuration returns the time duration of the timeout.
func (*BeaconChainConfig) SlotComponentDuration ¶ added in v7.1.0
func (b *BeaconChainConfig) SlotComponentDuration(bp primitives.BP) time.Duration
SlotComponentDuration returns the duration representing the given portion (in basis points) of a slot.
func (*BeaconChainConfig) SlotDuration ¶ added in v7.1.0
func (b *BeaconChainConfig) SlotDuration() time.Duration
SlotDuration returns the configured slot duration as a time.Duration.
func (*BeaconChainConfig) SlotDurationMillis ¶ added in v7.1.0
func (b *BeaconChainConfig) SlotDurationMillis() uint64
SlotDurationMillis returns the configured slot duration in milliseconds.
func (*BeaconChainConfig) TargetBlobsPerBlock ¶
func (b *BeaconChainConfig) TargetBlobsPerBlock(slot primitives.Slot) int
TargetBlobsPerBlock returns the target number of blobs per block for the given slot, accounting for changes introduced by the Electra fork.
func (*BeaconChainConfig) TtfbTimeoutDuration ¶
func (b *BeaconChainConfig) TtfbTimeoutDuration() time.Duration
TtfbTimeoutDuration returns the time duration of the timeout.
func (*BeaconChainConfig) VersionToForkEpochMap ¶
func (b *BeaconChainConfig) VersionToForkEpochMap() map[int]primitives.Epoch
type BlobScheduleEntry ¶
type BlobScheduleEntry NetworkScheduleEntry
type IoConfig ¶
type IoConfig struct {
ReadWritePermissions os.FileMode
ReadWriteExecutePermissions os.FileMode
BoltTimeout time.Duration
}
IoConfig defines the shared io parameters.
func BeaconIoConfig ¶
func BeaconIoConfig() *IoConfig
BeaconIoConfig returns the current io config for the beacon chain.
type NetworkConfig ¶
type NetworkConfig struct {
// DiscoveryV5 Config
AttSubnetKey string // AttSubnetKey is the ENR key of the subnet bitfield.
SyncCommsSubnetKey string // SyncCommsSubnetKey is the ENR key of the sync committee subnet bitfield.
CustodyGroupCountKey string // CustodyGroupsCountKey is the ENR key of the custody group count.
MinimumPeersInSubnetSearch uint64 // PeersInSubnetSearch is the required amount of peers that we need to be able to lookup in a subnet search.
// Chain Network Config
ContractDeploymentBlock uint64 // ContractDeploymentBlock is the eth1 block in which the deposit contract is deployed.
BootstrapNodes []string // BootstrapNodes are the addresses of the bootnodes.
}
NetworkConfig defines the spec based network parameters.
func BeaconNetworkConfig ¶
func BeaconNetworkConfig() *NetworkConfig
BeaconNetworkConfig returns the current network config for the beacon chain.
func (*NetworkConfig) Copy ¶
func (c *NetworkConfig) Copy() *NetworkConfig
Copy returns Copy of the config object.
type NetworkSchedule ¶
type NetworkSchedule struct {
// contains filtered or unexported fields
}
func (*NetworkSchedule) LastEntry ¶
func (ns *NetworkSchedule) LastEntry() NetworkScheduleEntry
func (*NetworkSchedule) LastFork ¶
func (ns *NetworkSchedule) LastFork() NetworkScheduleEntry
LastFork is the last full fork (this is used by e2e testing)
func (*NetworkSchedule) Next ¶
func (ns *NetworkSchedule) Next(epoch primitives.Epoch) NetworkScheduleEntry
type NetworkScheduleEntry ¶
type NetworkScheduleEntry struct {
ForkVersion [fieldparams.VersionLength]byte `yaml:"-" json:"-"`
ForkDigest [4]byte `yaml:"-" json:"-"`
MaxBlobsPerBlock uint64 `yaml:"MAX_BLOBS_PER_BLOCK" json:"MAX_BLOBS_PER_BLOCK"`
Epoch primitives.Epoch `yaml:"EPOCH" json:"EPOCH"`
BPOEpoch primitives.Epoch `yaml:"-" json:"-"`
VersionEnum int `yaml:"-" json:"-"`
// contains filtered or unexported fields
}
func GetNetworkScheduleEntry ¶
func GetNetworkScheduleEntry(epoch primitives.Epoch) NetworkScheduleEntry
func LastNetworkScheduleEntry ¶
func LastNetworkScheduleEntry() NetworkScheduleEntry
func NextNetworkScheduleEntry ¶
func NextNetworkScheduleEntry(epoch primitives.Epoch) NetworkScheduleEntry
func SortedForkSchedule ¶
func SortedForkSchedule() []NetworkScheduleEntry
func SortedNetworkScheduleEntries ¶
func SortedNetworkScheduleEntries() []NetworkScheduleEntry
func (NetworkScheduleEntry) LogFields ¶
func (e NetworkScheduleEntry) LogFields() logrus.Fields
Source Files
¶
- basis_points.go
- config.go
- config_utils_prod.go
- configset.go
- errors.go
- fork.go
- init.go
- interop.go
- io_config.go
- loader.go
- log.go
- mainnet_config.go
- minimal_config.go
- network_config.go
- opts.go
- testnet_custom_network_config.go
- testnet_e2e_config.go
- testnet_holesky_config.go
- testnet_hoodi_config.go
- testnet_sepolia_config.go
- testutils.go
- values.go