Skip to content

Commit

Permalink
remove electra related contracts & disable electra activation
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Jun 28, 2024
1 parent 3ec1d66 commit 2013e8d
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 144 deletions.
36 changes: 0 additions & 36 deletions apps/el-gen/genesis_besu.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,30 +103,6 @@
"balance": "0",
"nonce": "1",
"code": "0x3373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500"
},
# EIP-2935: Serve historical block hashes from state
"0x0aae40965e6800cd9b1f4b05ff21581047e3f91e": {
"balance": "0",
"nonce": "1",
"code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460575767ffffffffffffffff5f3511605357600143035f3511604b575f35612000014311604b57611fff5f3516545f5260205ff35b5f5f5260205ff35b5f5ffd5b5f35611fff60014303165500"
},
# EIP-7002: Execution layer triggerable withdrawals
"0x00A3ca265EBcb825B45F985A16CEFB49958cE017": {
"balance": "0",
"nonce": "1",
"code": "0x3373fffffffffffffffffffffffffffffffffffffffe146090573615156028575f545f5260205ff35b366038141561012e5760115f54600182026001905f5b5f82111560595781019083028483029004916001019190603e565b90939004341061012e57600154600101600155600354806003026004013381556001015f3581556001016020359055600101600355005b6003546002548082038060101160a4575060105b5f5b81811460dd5780604c02838201600302600401805490600101805490600101549160601b83528260140152906034015260010160a6565b910180921460ed579060025560f8565b90505f6002555f6003555b5f548061049d141561010757505f5b60015460028282011161011c5750505f610122565b01600290035b5f555f600155604c025ff35b5f5ffd",
"storage": {
"0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000049d"
}
},
# EIP-7251: Increase the MAX_EFFECTIVE_BALANCE
"0x00b42dbF2194e931E80326D950320f7d9Dbeac02": {
"balance": "0",
"nonce": "1",
"code": "0x3373fffffffffffffffffffffffffffffffffffffffe146098573615156028575f545f5260205ff35b36606014156101445760115f54600182026001905f5b5f82111560595781019083028483029004916001019190603e565b90939004341061014457600154600101600155600354806004026004013381556001015f35815560010160203581556001016040359055600101600355005b6003546002548082038060011160ac575060015b5f5b81811460f15780607402838201600402600401805490600101805490600101805490600101549260601b84529083601401528260340152906054015260010160ae565b9101809214610103579060025561010e565b90505f6002555f6003555b5f548061049d141561011d57505f5b6001546001828201116101325750505f610138565b01600190035b5f555f6001556074025ff35b5f5ffd",
"storage": {
"0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000049d"
}
}
},
"coinbase": "0x0000000000000000000000000000000000000000",
Expand Down Expand Up @@ -183,17 +159,5 @@ def add_alloc_entry(addr, account):
add_alloc_entry(addr, account)


if 'electra_fork_epoch' in data:
out['config']['pragueTime'] = \
int(data['genesis_timestamp']) + \
int(data['genesis_delay']) + \
(int(data['electra_fork_epoch']) * ( 32 if data['preset_base']=='mainnet' else 8 ) * int(data['slot_duration_in_seconds']))

if data['eof_activation_epoch'] != None:
out['config']['pragueEOFTime'] = \
int(data['genesis_timestamp']) + \
int(data['genesis_delay']) + \
int(data['eof_activation_epoch']) * ( 32 if data['preset_base']=='mainnet' else 8 ) * int(data['slot_duration_in_seconds'])

out['config']['ethash'] = {}
print(json.dumps(out, indent=' '))
65 changes: 0 additions & 65 deletions apps/el-gen/genesis_chainspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,30 +150,6 @@
"balance": "0",
"nonce": "1",
"code": "0x3373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500"
},
# EIP-2935: Serve historical block hashes from state
"0x0aae40965e6800cd9b1f4b05ff21581047e3f91e": {
"balance": "0",
"nonce": "1",
"code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460575767ffffffffffffffff5f3511605357600143035f3511604b575f35612000014311604b57611fff5f3516545f5260205ff35b5f5f5260205ff35b5f5ffd5b5f35611fff60014303165500"
},
# EIP-7002: Execution layer triggerable withdrawals
"0x00A3ca265EBcb825B45F985A16CEFB49958cE017": {
"balance": "0",
"nonce": "1",
"code": "0x3373fffffffffffffffffffffffffffffffffffffffe146090573615156028575f545f5260205ff35b366038141561012e5760115f54600182026001905f5b5f82111560595781019083028483029004916001019190603e565b90939004341061012e57600154600101600155600354806003026004013381556001015f3581556001016020359055600101600355005b6003546002548082038060101160a4575060105b5f5b81811460dd5780604c02838201600302600401805490600101805490600101549160601b83528260140152906034015260010160a6565b910180921460ed579060025560f8565b90505f6002555f6003555b5f548061049d141561010757505f5b60015460028282011161011c5750505f610122565b01600290035b5f555f600155604c025ff35b5f5ffd",
"storage": {
"0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000049d"
}
},
# EIP-7251: Increase the MAX_EFFECTIVE_BALANCE
"0x00b42dbF2194e931E80326D950320f7d9Dbeac02": {
"balance": "0",
"nonce": "1",
"code": "0x3373fffffffffffffffffffffffffffffffffffffffe146098573615156028575f545f5260205ff35b36606014156101445760115f54600182026001905f5b5f82111560595781019083028483029004916001019190603e565b90939004341061014457600154600101600155600354806004026004013381556001015f35815560010160203581556001016040359055600101600355005b6003546002548082038060011160ac575060015b5f5b81811460f15780607402838201600402600401805490600101805490600101805490600101549260601b84529083601401528260340152906054015260010160ae565b9101809214610103579060025561010e565b90505f6002555f6003555b5f548061049d141561011d57505f5b6001546001828201116101325750505f610138565b01600190035b5f555f6001556074025ff35b5f5ffd",
"storage": {
"0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000049d"
}
}
},
"nodes": []
Expand Down Expand Up @@ -223,46 +199,5 @@ def add_alloc_entry(addr, account):
for addr, account in data['additional_preloaded_contracts'].items():
add_alloc_entry(addr, account)

if 'electra_fork_epoch' in data:
out['params']['eip2537TransitionTimestamp']= hex(
int(data['genesis_timestamp']) +
int(data['genesis_delay']) +
int(data['electra_fork_epoch']) * ( 32 if data['preset_base']=='mainnet' else 8 ) * int(data['slot_duration_in_seconds'])
)
out['params']['eip2935TransitionTimestamp']= hex(
int(data['genesis_timestamp']) +
int(data['genesis_delay']) +
int(data['electra_fork_epoch']) * ( 32 if data['preset_base']=='mainnet' else 8 ) * int(data['slot_duration_in_seconds'])
)

out['params']['eip6110TransitionTimestamp']= hex(
int(data['genesis_timestamp']) +
int(data['genesis_delay']) +
int(data['electra_fork_epoch']) * ( 32 if data['preset_base']=='mainnet' else 8 ) * int(data['slot_duration_in_seconds'])
)
out['params']['eip7002TransitionTimestamp']= hex(
int(data['genesis_timestamp']) +
int(data['genesis_delay']) +
int(data['electra_fork_epoch']) * ( 32 if data['preset_base']=='mainnet' else 8 ) * int(data['slot_duration_in_seconds'])
)

out['params']['eip7251TransitionTimestamp']= hex(
int(data['genesis_timestamp']) +
int(data['genesis_delay']) +
int(data['electra_fork_epoch']) * ( 32 if data['preset_base']=='mainnet' else 8 ) * int(data['slot_duration_in_seconds'])
)

out['params']['eip7702TransitionTimestamp']= hex(
int(data['genesis_timestamp']) +
int(data['genesis_delay']) +
int(data['electra_fork_epoch']) * ( 32 if data['preset_base']=='mainnet' else 8 ) * int(data['slot_duration_in_seconds'])
)

if data['eof_activation_epoch'] != None:
out['params']['eip7692TransitionTimestamp'] = hex(
int(data['genesis_timestamp']) + \
int(data['genesis_delay']) + \
int(data['eof_activation_epoch']) * ( 32 if data['preset_base']=='mainnet' else 8 ) * int(data['slot_duration_in_seconds'])
)

print(json.dumps(out, indent=' '))
36 changes: 0 additions & 36 deletions apps/el-gen/genesis_geth.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,30 +103,6 @@
"balance": "0",
"nonce": "1",
"code": "0x3373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500"
},
# EIP-2935: Serve historical block hashes from state
"0x0aae40965e6800cd9b1f4b05ff21581047e3f91e": {
"balance": "0",
"nonce": "1",
"code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460575767ffffffffffffffff5f3511605357600143035f3511604b575f35612000014311604b57611fff5f3516545f5260205ff35b5f5f5260205ff35b5f5ffd5b5f35611fff60014303165500"
},
# EIP-7002: Execution layer triggerable withdrawals
"0x00A3ca265EBcb825B45F985A16CEFB49958cE017": {
"balance": "0",
"nonce": "1",
"code": "0x3373fffffffffffffffffffffffffffffffffffffffe146090573615156028575f545f5260205ff35b366038141561012e5760115f54600182026001905f5b5f82111560595781019083028483029004916001019190603e565b90939004341061012e57600154600101600155600354806003026004013381556001015f3581556001016020359055600101600355005b6003546002548082038060101160a4575060105b5f5b81811460dd5780604c02838201600302600401805490600101805490600101549160601b83528260140152906034015260010160a6565b910180921460ed579060025560f8565b90505f6002555f6003555b5f548061049d141561010757505f5b60015460028282011161011c5750505f610122565b01600290035b5f555f600155604c025ff35b5f5ffd",
"storage": {
"0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000049d"
}
},
# EIP-7251: Increase the MAX_EFFECTIVE_BALANCE
"0x00b42dbF2194e931E80326D950320f7d9Dbeac02": {
"balance": "0",
"nonce": "1",
"code": "0x3373fffffffffffffffffffffffffffffffffffffffe146098573615156028575f545f5260205ff35b36606014156101445760115f54600182026001905f5b5f82111560595781019083028483029004916001019190603e565b90939004341061014457600154600101600155600354806004026004013381556001015f35815560010160203581556001016040359055600101600355005b6003546002548082038060011160ac575060015b5f5b81811460f15780607402838201600402600401805490600101805490600101805490600101549260601b84529083601401528260340152906054015260010160ae565b9101809214610103579060025561010e565b90505f6002555f6003555b5f548061049d141561011d57505f5b6001546001828201116101325750505f610138565b01600190035b5f555f6001556074025ff35b5f5ffd",
"storage": {
"0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000049d"
}
}
},
"coinbase": "0x0000000000000000000000000000000000000000",
Expand Down Expand Up @@ -181,16 +157,4 @@ def add_alloc_entry(addr, account):
for addr, account in data['additional_preloaded_contracts'].items():
add_alloc_entry(addr, account)

if 'electra_fork_epoch' in data:
out['config']['pragueTime'] = \
int(data['genesis_timestamp']) + \
int(data['genesis_delay']) + \
int(data['electra_fork_epoch']) * ( 32 if data['preset_base']=='mainnet' else 8 ) * int(data['slot_duration_in_seconds'])

if data['eof_activation_epoch'] != None:
out['config']['pragueEOFTime'] = \
int(data['genesis_timestamp']) + \
int(data['genesis_delay']) + \
int(data['eof_activation_epoch']) * ( 32 if data['preset_base']=='mainnet' else 8 ) * int(data['slot_duration_in_seconds'])

print(json.dumps(out, indent=' '))
4 changes: 2 additions & 2 deletions config-example/cl/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ DENEB_FORK_EPOCH: 0

# Electra
ELECTRA_FORK_VERSION: $ELECTRA_FORK_VERSION
ELECTRA_FORK_EPOCH: $ELECTRA_FORK_EPOCH
ELECTRA_FORK_EPOCH: 18446744073709551615

# EIP7594 - Peerdas
EIP7594_FORK_VERSION: $EIP7594_FORK_VERSION
EIP7594_FORK_EPOCH: $EIP7594_FORK_EPOCH
EIP7594_FORK_EPOCH: 18446744073709551615

# Time parameters
# ---------------------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions config-example/el/genesis-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,3 @@ genesis_timestamp: ${GENESIS_TIMESTAMP}
genesis_delay: ${GENESIS_DELAY}
genesis_gaslimit: ${GENESIS_GASLIMIT}
slot_duration_in_seconds: ${SLOT_DURATION_IN_SECONDS}
electra_fork_epoch: ${ELECTRA_FORK_EPOCH}
eof_activation_epoch: ${EOF_ACTIVATION_EPOCH}
3 changes: 0 additions & 3 deletions defaults/defaults.env
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ export BELLATRIX_FORK_VERSION="${BELLATRIX_FORK_VERSION:-0x30000000}"
export CAPELLA_FORK_VERSION="${CAPELLA_FORK_VERSION:-0x40000000}"
export DENEB_FORK_VERSION="${DENEB_FORK_VERSION:-0x50000000}"
export ELECTRA_FORK_VERSION="${ELECTRA_FORK_VERSION:-0x60000000}"
export ELECTRA_FORK_EPOCH="${ELECTRA_FORK_EPOCH:-2000}"
export EIP7594_FORK_VERSION="${EIP7594_FORK_VERSION:-0x70000000}"
export EIP7594_FORK_EPOCH="${EIP7594_FORK_EPOCH:-99999}"
#export EOF_ACTIVATION_EPOCH="${EOF_ACTIVATION_EPOCH:-99999}"
export WITHDRAWAL_TYPE="${WITHDRAWAL_TYPE:-0x00}"
export WITHDRAWAL_ADDRESS="${WITHDRAWAL_ADDRESS:-0xf97e180c050e5Ab072211Ad2C213Eb5AEE4DF134}"
export BEACON_STATIC_ENR="${BEACON_STATIC_ENR:-enr:-Iq4QJk4WqRkjsX5c2CXtOra6HnxN-BMXnWhmhEQO9Bn9iABTJGdjUOurM7Btj1ouKaFkvTRoju5vz2GPmVON2dffQKGAX53x8JigmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIyk}"
Expand Down

0 comments on commit 2013e8d

Please sign in to comment.