mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-04-19 03:01:06 -04:00
ePBS configuration constants
This commit is contained in:
@@ -14,6 +14,7 @@ const (
|
||||
CurrentEpochAttestationsLength = 4096 // MAX_ATTESTATIONS * SLOTS_PER_EPOCH
|
||||
SlashingsLength = 8192 // EPOCHS_PER_SLASHINGS_VECTOR
|
||||
SyncCommitteeLength = 512 // SYNC_COMMITTEE_SIZE
|
||||
PTCSize = 512 // PTC_SIZE [New in ePBS]
|
||||
RootLength = 32 // RootLength defines the byte length of a Merkle root.
|
||||
BLSSignatureLength = 96 // BLSSignatureLength defines the byte length of a BLSSignature.
|
||||
BLSPubkeyLength = 48 // BLSPubkeyLength defines the byte length of a BLSSignature.
|
||||
@@ -28,6 +29,8 @@ const (
|
||||
MaxWithdrawalsPerPayload = 16 // MaxWithdrawalsPerPayloadLength defines the maximum number of withdrawals that can be included in a payload.
|
||||
MaxBlobsPerBlock = 6 // MaxBlobsPerBlock defines the maximum number of blobs with respect to consensus rule can be included in a block.
|
||||
MaxBlobCommitmentsPerBlock = 4096 // MaxBlobCommitmentsPerBlock defines the theoretical limit of blobs can be included in a block.
|
||||
MaxPayloadAttestationsPerBlock = 4 // MAX_PAYLOAD_ATTESTATIONS [New in ePBS]
|
||||
MaxTransactionsPerInclusionList = 1024 // MAX_TRANSACTIONS_PER_INCLUSION_LIST [New in ePBS]
|
||||
LogMaxBlobCommitments = 12 // Log_2 of MaxBlobCommitmentsPerBlock
|
||||
BlobLength = 131072 // BlobLength defines the byte length of a blob.
|
||||
BlobSize = 131072 // defined to match blob.size in bazel ssz codegen
|
||||
|
||||
@@ -14,6 +14,7 @@ const (
|
||||
CurrentEpochAttestationsLength = 1024 // MAX_ATTESTATIONS * SLOTS_PER_EPOCH
|
||||
SlashingsLength = 64 // EPOCHS_PER_SLASHINGS_VECTOR
|
||||
SyncCommitteeLength = 32 // SYNC_COMMITTEE_SIZE
|
||||
PTCSize = 32 // PTC_SIZE [New in ePBS]
|
||||
RootLength = 32 // RootLength defines the byte length of a Merkle root.
|
||||
BLSSignatureLength = 96 // BLSSignatureLength defines the byte length of a BLSSignature.
|
||||
BLSPubkeyLength = 48 // BLSPubkeyLength defines the byte length of a BLSSignature.
|
||||
@@ -28,6 +29,8 @@ const (
|
||||
MaxWithdrawalsPerPayload = 4 // MaxWithdrawalsPerPayloadLength defines the maximum number of withdrawals that can be included in a payload.
|
||||
MaxBlobsPerBlock = 6 // MaxBlobsPerBlock defines the maximum number of blobs with respect to consensus rule can be included in a block.
|
||||
MaxBlobCommitmentsPerBlock = 16 // MaxBlobCommitmentsPerBlock defines the theoretical limit of blobs can be included in a block.
|
||||
MaxPayloadAttestationsPerBlock = 4 // MAX_PAYLOAD_ATTESTATIONS [New in ePBS]
|
||||
MaxTransactionsPerInclusionList = 16 // MAX_TRANSACTIONS_PER_INCLUSION_LIST [New in ePBS]
|
||||
LogMaxBlobCommitments = 4 // Log_2 of MaxBlobCommitmentsPerBlock
|
||||
BlobLength = 131072 // BlobLength defines the byte length of a blob.
|
||||
BlobSize = 131072 // defined to match blob.size in bazel ssz codegen
|
||||
|
||||
@@ -126,6 +126,8 @@ type BeaconChainConfig struct {
|
||||
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
|
||||
DomainConsolidation [4]byte `yaml:"DOMAIN_CONSOLIDATION" spec:"true"`
|
||||
DomainBeaconBuilder [4]byte `yaml:"DOMAIN_BEACON_BULDER" spec:"false"` // DomainBeaconBuilder defines the BLS signature domain used by builders [New in ePBS]
|
||||
DomainPTCAttester [4]byte `yaml:"DOMAIN_PTC_ATTESTER" spec:"false"` // DomainPTCAttester defines the BLS signature domain used by PTC members [New in ePBS]
|
||||
|
||||
// Prysm constants.
|
||||
GweiPerEth uint64 // GweiPerEth is the amount of gwei corresponding to 1 eth.
|
||||
@@ -166,6 +168,8 @@ type BeaconChainConfig struct {
|
||||
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 deneb.
|
||||
ElectraForkEpoch primitives.Epoch `yaml:"ELECTRA_FORK_EPOCH" spec:"true"` // ElectraForkEpoch is used to represent the assigned fork epoch for deneb.
|
||||
EPBSForkVersion []byte // EPBSForkVersion is used to represent the fork version for ePBS.
|
||||
EPBSForkEpoch primitives.Epoch // EPBSForkEpoch is used to represent the assigned fork epoch for ePBS.
|
||||
|
||||
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.
|
||||
@@ -314,6 +318,7 @@ func ConfigForkVersions(b *BeaconChainConfig) map[[fieldparams.VersionLength]byt
|
||||
bytesutil.ToBytes4(b.CapellaForkVersion): version.Capella,
|
||||
bytesutil.ToBytes4(b.DenebForkVersion): version.Deneb,
|
||||
bytesutil.ToBytes4(b.ElectraForkVersion): version.Electra,
|
||||
bytesutil.ToBytes4(b.EPBSForkVersion): version.EPBS,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@ const (
|
||||
mainnetDenebForkEpoch = 269568 // March 13, 2024, 13:55:35 UTC
|
||||
// Electra Fork Epoch for mainnet config
|
||||
mainnetElectraForkEpoch = math.MaxUint64 // Far future / to be defined
|
||||
// ePBS Fork Epoch for mainnet config.
|
||||
mainnetEPBSForkEpoch = math.MaxUint64
|
||||
)
|
||||
|
||||
var mainnetNetworkConfig = &NetworkConfig{
|
||||
@@ -216,6 +218,8 @@ var mainnetBeaconConfig = &BeaconChainConfig{
|
||||
DenebForkEpoch: mainnetDenebForkEpoch,
|
||||
ElectraForkVersion: []byte{5, 0, 0, 0},
|
||||
ElectraForkEpoch: mainnetElectraForkEpoch,
|
||||
EPBSForkVersion: []byte{6, 0, 0, 0},
|
||||
EPBSForkEpoch: mainnetEPBSForkEpoch,
|
||||
|
||||
// New values introduced in Altair hard fork 1.
|
||||
// Participation flag indices.
|
||||
@@ -335,6 +339,7 @@ func FillTestVersions(c *BeaconChainConfig, b byte) {
|
||||
c.CapellaForkVersion = make([]byte, fieldparams.VersionLength)
|
||||
c.DenebForkVersion = make([]byte, fieldparams.VersionLength)
|
||||
c.ElectraForkVersion = make([]byte, fieldparams.VersionLength)
|
||||
c.EPBSForkVersion = make([]byte, fieldparams.VersionLength)
|
||||
|
||||
c.GenesisForkVersion[fieldparams.VersionLength-1] = b
|
||||
c.AltairForkVersion[fieldparams.VersionLength-1] = b
|
||||
@@ -342,6 +347,7 @@ func FillTestVersions(c *BeaconChainConfig, b byte) {
|
||||
c.CapellaForkVersion[fieldparams.VersionLength-1] = b
|
||||
c.DenebForkVersion[fieldparams.VersionLength-1] = b
|
||||
c.ElectraForkVersion[fieldparams.VersionLength-1] = b
|
||||
c.EPBSForkVersion[fieldparams.VersionLength-1] = b
|
||||
|
||||
c.GenesisForkVersion[0] = 0
|
||||
c.AltairForkVersion[0] = 1
|
||||
@@ -349,4 +355,5 @@ func FillTestVersions(c *BeaconChainConfig, b byte) {
|
||||
c.CapellaForkVersion[0] = 3
|
||||
c.DenebForkVersion[0] = 4
|
||||
c.ElectraForkVersion[0] = 5
|
||||
c.EPBSForkVersion[0] = 6
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ const (
|
||||
Capella
|
||||
Deneb
|
||||
Electra
|
||||
EPBS
|
||||
)
|
||||
|
||||
var versionToString = map[int]string{
|
||||
@@ -18,6 +19,7 @@ var versionToString = map[int]string{
|
||||
Capella: "capella",
|
||||
Deneb: "deneb",
|
||||
Electra: "electra",
|
||||
EPBS: "epbs",
|
||||
}
|
||||
|
||||
// stringToVersion and allVersions are populated in init()
|
||||
|
||||
Reference in New Issue
Block a user