mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-02-01 08:35:24 -05:00
Compare commits
14 Commits
e2e-debugg
...
hardcode_g
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
765e7f86f1 | ||
|
|
181c53ec0b | ||
|
|
1a838f6fa9 | ||
|
|
19e545adf8 | ||
|
|
15247d5fa6 | ||
|
|
7523057a3f | ||
|
|
6976474e1c | ||
|
|
39e73b783e | ||
|
|
1359c247d9 | ||
|
|
a93a0e6110 | ||
|
|
a0b91d0d90 | ||
|
|
3f359e851b | ||
|
|
f7dc1740ff | ||
|
|
894f9cc8c3 |
@@ -22,6 +22,7 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve
|
|||||||
- Electra: Add electra objects to beacon API.
|
- Electra: Add electra objects to beacon API.
|
||||||
- Electra: Updated block publishing beacon APIs to support Electra.
|
- Electra: Updated block publishing beacon APIs to support Electra.
|
||||||
- "Submitted builder validator registration settings for custom builders" log message moved to debug level.
|
- "Submitted builder validator registration settings for custom builders" log message moved to debug level.
|
||||||
|
- config: Genesis validator root is now hardcoded in params.BeaconConfig()
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,10 @@ go_library(
|
|||||||
],
|
],
|
||||||
embedsrcs = ["mainnet.ssz.snappy"],
|
embedsrcs = ["mainnet.ssz.snappy"],
|
||||||
importpath = "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/genesis",
|
importpath = "github.com/prysmaticlabs/prysm/v5/beacon-chain/state/genesis",
|
||||||
visibility = ["//beacon-chain/db:__subpackages__"],
|
visibility = [
|
||||||
|
"//beacon-chain/db:__subpackages__",
|
||||||
|
"//config/params:go_default_test",
|
||||||
|
],
|
||||||
deps = [
|
deps = [
|
||||||
"//beacon-chain/state:go_default_library",
|
"//beacon-chain/state:go_default_library",
|
||||||
"//beacon-chain/state/state-native:go_default_library",
|
"//beacon-chain/state/state-native:go_default_library",
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ go_test(
|
|||||||
gotags = ["develop"],
|
gotags = ["develop"],
|
||||||
tags = ["CI_race_detection"],
|
tags = ["CI_race_detection"],
|
||||||
deps = [
|
deps = [
|
||||||
|
"//beacon-chain/state/genesis:go_default_library",
|
||||||
"//consensus-types/primitives:go_default_library",
|
"//consensus-types/primitives:go_default_library",
|
||||||
"//encoding/bytesutil:go_default_library",
|
"//encoding/bytesutil:go_default_library",
|
||||||
"//io/file:go_default_library",
|
"//io/file:go_default_library",
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ type BeaconChainConfig struct {
|
|||||||
DomainConsolidation [4]byte `yaml:"DOMAIN_CONSOLIDATION" spec:"true"`
|
DomainConsolidation [4]byte `yaml:"DOMAIN_CONSOLIDATION" spec:"true"`
|
||||||
|
|
||||||
// Prysm constants.
|
// 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.
|
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.
|
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.
|
BLSPubkeyLength int // BLSPubkeyLength defines the expected length of BLS public keys in bytes.
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
package params_test
|
package params_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/prysmaticlabs/prysm/v5/beacon-chain/state/genesis"
|
||||||
"github.com/prysmaticlabs/prysm/v5/config/params"
|
"github.com/prysmaticlabs/prysm/v5/config/params"
|
||||||
"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives"
|
"github.com/prysmaticlabs/prysm/v5/consensus-types/primitives"
|
||||||
"github.com/prysmaticlabs/prysm/v5/testing/require"
|
"github.com/prysmaticlabs/prysm/v5/testing/require"
|
||||||
@@ -92,3 +94,14 @@ func TestConfig_WithinDAPeriod(t *testing.T) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestConfigGenesisValidatorRoot(t *testing.T) {
|
||||||
|
g, err := genesis.State(params.MainnetName)
|
||||||
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
gvr := g.GenesisValidatorsRoot()
|
||||||
|
|
||||||
|
if !bytes.Equal(gvr, params.BeaconConfig().GenesisValidatorsRoot[:]) {
|
||||||
|
t.Fatal("mainnet params genesis validator root does not match the mainnet genesis state value")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -174,6 +174,7 @@ var mainnetBeaconConfig = &BeaconChainConfig{
|
|||||||
DomainConsolidation: bytesutil.Uint32ToBytes4(0x0B000000),
|
DomainConsolidation: bytesutil.Uint32ToBytes4(0x0B000000),
|
||||||
|
|
||||||
// Prysm constants.
|
// Prysm constants.
|
||||||
|
GenesisValidatorsRoot: [32]byte{75, 54, 61, 185, 78, 40, 97, 32, 215, 110, 185, 5, 52, 15, 221, 78, 84, 191, 233, 240, 107, 243, 63, 246, 207, 90, 210, 127, 81, 27, 254, 149},
|
||||||
GweiPerEth: 1000000000,
|
GweiPerEth: 1000000000,
|
||||||
BLSSecretKeyLength: 32,
|
BLSSecretKeyLength: 32,
|
||||||
BLSPubkeyLength: 48,
|
BLSPubkeyLength: 48,
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ func HoleskyConfig() *BeaconChainConfig {
|
|||||||
cfg.MinGenesisTime = 1695902100
|
cfg.MinGenesisTime = 1695902100
|
||||||
cfg.GenesisDelay = 300
|
cfg.GenesisDelay = 300
|
||||||
cfg.ConfigName = HoleskyName
|
cfg.ConfigName = HoleskyName
|
||||||
|
cfg.GenesisValidatorsRoot = [32]byte{145, 67, 170, 124, 97, 90, 127, 113, 21, 226, 182, 170, 195, 25, 192, 53, 41, 223, 130, 66, 174, 112, 95, 186, 157, 243, 155, 121, 197, 159, 168, 177}
|
||||||
cfg.GenesisForkVersion = []byte{0x01, 0x01, 0x70, 0x00}
|
cfg.GenesisForkVersion = []byte{0x01, 0x01, 0x70, 0x00}
|
||||||
cfg.SecondsPerETH1Block = 14
|
cfg.SecondsPerETH1Block = 14
|
||||||
cfg.DepositChainID = 17000
|
cfg.DepositChainID = 17000
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ func SepoliaConfig() *BeaconChainConfig {
|
|||||||
cfg.MinGenesisTime = 1655647200
|
cfg.MinGenesisTime = 1655647200
|
||||||
cfg.GenesisDelay = 86400
|
cfg.GenesisDelay = 86400
|
||||||
cfg.MinGenesisActiveValidatorCount = 1300
|
cfg.MinGenesisActiveValidatorCount = 1300
|
||||||
|
cfg.GenesisValidatorsRoot = [32]byte{216, 234, 23, 31, 60, 148, 174, 162, 30, 188, 66, 161, 237, 97, 5, 42, 207, 63, 146, 9, 192, 14, 78, 251, 170, 221, 172, 9, 237, 155, 128, 120}
|
||||||
cfg.ConfigName = SepoliaName
|
cfg.ConfigName = SepoliaName
|
||||||
cfg.GenesisForkVersion = []byte{0x90, 0x00, 0x00, 0x69}
|
cfg.GenesisForkVersion = []byte{0x90, 0x00, 0x00, 0x69}
|
||||||
cfg.SecondsPerETH1Block = 14
|
cfg.SecondsPerETH1Block = 14
|
||||||
|
|||||||
Reference in New Issue
Block a user