Skip to content

Commit

Permalink
Merge pull request #33 from ethpandaops/add-dencun
Browse files Browse the repository at this point in the history
Adding dencun support
  • Loading branch information
parithosh authored Jun 7, 2023
2 parents 57e39f9 + 643c25a commit 3c2b30e
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 35 deletions.
4 changes: 2 additions & 2 deletions apps/el-gen/genesis_besu.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"londonBlock":0,
"preMergeForkBlock":0,
"terminalTotalDifficulty":0,
"shanghaiTime": int(data['genesis_timestamp']) + int(data['genesis_delay']) + (int(data['capella_fork_epoch']) * 32 * 12),
"shanghaiTime": int(data['genesis_timestamp']) + int(data['genesis_delay']) + (int(data['capella_fork_epoch']) * 32 * 12),
},
"alloc": {
# Allocate 1 wei to all possible pre-compiles.
Expand Down Expand Up @@ -117,5 +117,5 @@
out["alloc"][key] = {"balance": weival}

out['config']['ethash'] = {}
out['config']['shanghaiTime'] = int(data['genesis_timestamp']) + int(data['genesis_delay']) + (int(data['capella_fork_epoch']) * 32 * 12)
out['config']['cancunTime'] = int(data['genesis_timestamp']) + int(data['genesis_delay']) + (int(data['dencun_fork_epoch']) * 32 * 12)
print(json.dumps(out, indent=' '))
5 changes: 1 addition & 4 deletions apps/el-gen/genesis_chainspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,5 @@
weival = value.replace('ETH', '0' * 18)
out["accounts"][key] = {"balance": weival}

out['params']['eip4895TransitionTimestamp']= hex(int(data['genesis_timestamp']) + int(data['genesis_delay']) + (int(data['capella_fork_epoch']) * 32 * 12))
out['params']['eip3855TransitionTimestamp']= hex(int(data['genesis_timestamp']) + int(data['genesis_delay']) + (int(data['capella_fork_epoch']) * 32 * 12))
out['params']['eip3651TransitionTimestamp']= hex(int(data['genesis_timestamp']) + int(data['genesis_delay']) + (int(data['capella_fork_epoch']) * 32 * 12))
out['params']['eip3860TransitionTimestamp']= hex(int(data['genesis_timestamp']) + int(data['genesis_delay']) + (int(data['capella_fork_epoch']) * 32 * 12))
out['params']['eip4844TransitionTimestamp']= hex(int(data['genesis_timestamp']) + int(data['genesis_delay']) + (int(data['dencun_fork_epoch']) * 32 * 12))
print(json.dumps(out, indent=' '))
6 changes: 3 additions & 3 deletions apps/el-gen/genesis_geth.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"mergeForkBlock":0,
"terminalTotalDifficulty":0,
"terminalTotalDifficultyPassed": True,
"shanghaiTime": 0,
},
"shanghaiTime": int(data['genesis_timestamp']) + int(data['genesis_delay']) + (int(data['capella_fork_epoch']) * 32 * 12),
},
"alloc": {
# Allocate 1 wei to all possible pre-compiles.
# See https://github.com/ethereum/EIPs/issues/716 "SpuriousDragon RIPEMD bug"
Expand Down Expand Up @@ -115,5 +115,5 @@
weival = value.replace('ETH', '0' * 18)
out["alloc"][key] = {"balance": weival}

out['config']['shanghaiTime'] = int(data['genesis_timestamp']) + int(data['genesis_delay']) + (int(data['capella_fork_epoch']) * 32 * 12)
out['config']['cancunTime'] = int(data['genesis_timestamp']) + int(data['genesis_delay']) + (int(data['dencun_fork_epoch']) * 32 * 12)
print(json.dumps(out, indent=' '))
2 changes: 1 addition & 1 deletion apps/el-gen/goerli/besu_genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"londonBlock": 5062605,
"mergeForkBlock": 99999999,
"terminalTotalDifficulty": 10790000,
"shanghaiTime": 0,
"shanghaiTime": 1678832736,
"trustedCheckpoint": {
"sectionIndex": 66,
"sectionHead": "0xeea3a7b2cb275956f3049dd27e6cdacd8a6ef86738d593d556efee5361019475",
Expand Down
8 changes: 4 additions & 4 deletions apps/el-gen/goerli/chainspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
"eip3529Transition": "0x4D3FCD",
"eip3541Transition": "0x4D3FCD",
"terminalTotalDifficulty": "0xa4a470",
"eip4895TransitionTimestamp": "0x0",
"eip3855TransitionTimestamp": "0x0",
"eip3651TransitionTimestamp": "0x0",
"eip3860TransitionTimestamp": "0x0",
"eip3651TransitionTimestamp": "0x6410F460",
"eip3855TransitionTimestamp": "0x6410F460",
"eip3860TransitionTimestamp": "0x6410F460",
"eip4895TransitionTimestamp": "0x6410F460",
"gasLimitBoundDivisor": "0x400",
"maxCodeSize": "0x6000",
"maxCodeSizeTransition": "0x0",
Expand Down
2 changes: 1 addition & 1 deletion apps/el-gen/goerli/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"londonBlock": 5062605,
"mergeForkBlock": 99999999,
"terminalTotalDifficulty": 10790000,
"shanghaiTime": 0,
"shanghaiTime": 1678832736,
"trustedCheckpoint": {
"sectionIndex": 66,
"sectionHead": "0xeea3a7b2cb275956f3049dd27e6cdacd8a6ef86738d593d556efee5361019475",
Expand Down
2 changes: 1 addition & 1 deletion apps/el-gen/mainnet/besu_genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"grayGlacierBlock": 15050000,
"mergeForkBlock": 16675026,
"terminalTotalDifficulty": 58750000000000000000000,
"shanghaiTime": 0,
"shanghaiTime": 1681338455,
"ethash": {},
"discovery": {
"dns": "enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net",
Expand Down
8 changes: 4 additions & 4 deletions apps/el-gen/mainnet/chainspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@
"eip3529Transition": "0xC5D488",
"eip3541Transition": "0xC5D488",
"totalDifficulty": "0x0c70d808a128d7380000",
"eip4895TransitionTimestamp": "0x0",
"eip3855TransitionTimestamp": "0x0",
"eip3651TransitionTimestamp": "0x0",
"eip3860TransitionTimestamp": "0x0"
"eip4895TransitionTimestamp": "0x64373057",
"eip3855TransitionTimestamp": "0x64373057",
"eip3651TransitionTimestamp": "0x64373057",
"eip3860TransitionTimestamp": "0x64373057"
},
"genesis": {
"seal": {
Expand Down
2 changes: 1 addition & 1 deletion apps/el-gen/mainnet/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"grayGlacierBlock": 15050000,
"mergeForkBlock": 16675026,
"terminalTotalDifficulty": 58750000000000000000000,
"shanghaiTime": 0,
"shanghaiTime": 1681338455,
"ethash": {}
},
"nonce": "0x42",
Expand Down
2 changes: 1 addition & 1 deletion apps/el-gen/sepolia/besu_genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"londonBlock": 0,
"mergeForkBlock": 1735371,
"terminalTotalDifficulty": 17000000000000000,
"shanghaiTime": 0,
"shanghaiTime": 1677557088

},
"alloc": {
Expand Down
9 changes: 4 additions & 5 deletions apps/el-gen/sepolia/chainspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@
"eip3541Transition": "0x0",
"terminalTotalDifficulty": "0x3c6568f12e8000",
"mergeForkIdTransition": "0x1A7ACB",
"eip4895TransitionTimestamp": "0x0",
"eip3855TransitionTimestamp": "0x0",
"eip3651TransitionTimestamp": "0x0",
"eip3860TransitionTimestamp": "0x0",

"eip4895TransitionTimestamp": "0x63FD7D60",
"eip3855TransitionTimestamp": "0x63FD7D60",
"eip3651TransitionTimestamp": "0x63FD7D60",
"eip3860TransitionTimestamp": "0x63FD7D60"
},
"genesis": {
"seal": {
Expand Down
2 changes: 1 addition & 1 deletion apps/el-gen/sepolia/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"londonBlock": 0,
"mergeForkBlock": 1735371,
"terminalTotalDifficulty": 17000000000000000,
"shanghaiTime": 0,
"shanghaiTime": 1677557088

},
"alloc": {
Expand Down
6 changes: 3 additions & 3 deletions config-example/cl/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: 18446744073709551615
CAPELLA_FORK_VERSION: $CAPELLA_FORK_VERSION
CAPELLA_FORK_EPOCH: $CAPELLA_FORK_EPOCH

# EIP4844
EIP4844_FORK_VERSION: $EIP4844_FORK_VERSION
EIP4844_FORK_EPOCH: $EIP4844_FORK_EPOCH
# DENEB
DENEB_FORK_VERSION: $DENEB_FORK_VERSION
DENEB_FORK_EPOCH: $DENEB_FORK_EPOCH

# Time parameters
# ---------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion config-example/el/genesis-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ el_premine:
el_premine_addrs: {}
genesis_timestamp: ${GENESIS_TIMESTAMP}
genesis_delay: ${GENESIS_DELAY}
capella_fork_epoch: ${CAPELLA_FORK_EPOCH}
capella_fork_epoch: ${CAPELLA_FORK_EPOCH}
dencun_fork_epoch: ${DENCUN_FORK_EPOCH}
4 changes: 2 additions & 2 deletions config-example/values.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export ALTAIR_FORK_VERSION="0x20000000"
export BELLATRIX_FORK_VERSION="0x30000000"
export CAPELLA_FORK_VERSION="0x40000000"
export CAPELLA_FORK_EPOCH="10000"
export EIP4844_FORK_VERSION="0x50000000"
export EIP4844_FORK_EPOCH="18446744073709551615"
export DENEB_FORK_VERSION="0x50000000"
export DENEB_FORK_EPOCH="18446744073709551615"
export WITHDRAWAL_TYPE="0x00"
export WITHDRAWAL_ADDRESS=0xf97e180c050e5Ab072211Ad2C213Eb5AEE4DF134
export BEACON_STATIC_ENR="enr:-Iq4QJk4WqRkjsX5c2CXtOra6HnxN-BMXnWhmhEQO9Bn9iABTJGdjUOurM7Btj1ouKaFkvTRoju5vz2GPmVON2dffQKGAX53x8JigmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIyk"
Expand Down
3 changes: 2 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ gen_shared_files(){
set -x
# Shared files
mkdir -p /data/custom_config_data
cp /apps/trusted_setup.txt /data/custom_config_data/trusted_setup.txt
wget -O /data/custom_config_data/trusted_setup.txt https://raw.githubusercontent.com/ethereum/c-kzg-4844/main/src/trusted_setup.txt
wget -O /data/custom_config_data/trusted_setup.json https://raw.githubusercontent.com/ethereum/consensus-specs/dev/presets/mainnet/trusted_setups/testing_trusted_setups.json
if ! [ -f "/data/el/jwtsecret" ] || [ -f "/data/cl/jwtsecret" ]; then
mkdir -p /data/el
mkdir -p /data/cl
Expand Down

0 comments on commit 3c2b30e

Please sign in to comment.