Skip to content

Commit

Permalink
feat: add fusaka support (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasbusa authored Oct 9, 2024
1 parent 57a93b3 commit 3fb916c
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
6 changes: 3 additions & 3 deletions apps/el-gen/genesis_besu.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,11 @@ def add_alloc_entry(addr, account):
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'] = \
if 'fulu_fork_epoch' in data:
out['config']['osakaTime'] = \
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'])
int(data['fulu_fork_epoch']) * ( 32 if data['preset_base']=='mainnet' else 8 ) * int(data['slot_duration_in_seconds'])

out['config']['ethash'] = {}
print(json.dumps(out, indent=' '))
4 changes: 2 additions & 2 deletions apps/el-gen/genesis_chainspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,11 @@ def add_alloc_entry(addr, account):
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:
if 'fulu_fork_epoch' in data:
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'])
int(data['fulu_fork_epoch']) * ( 32 if data['preset_base']=='mainnet' else 8 ) * int(data['slot_duration_in_seconds'])
)

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 @@ -187,10 +187,10 @@ def add_alloc_entry(addr, account):
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'] = \
if 'fulu_fork_epoch' in data:
out['config']['osakaTime'] = \
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'])
int(data['fulu_fork_epoch']) * ( 32 if data['preset_base']=='mainnet' else 8 ) * int(data['slot_duration_in_seconds'])

print(json.dumps(out, indent=' '))
4 changes: 4 additions & 0 deletions config-example/cl/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ DENEB_FORK_EPOCH: 0
ELECTRA_FORK_VERSION: $ELECTRA_FORK_VERSION
ELECTRA_FORK_EPOCH: $ELECTRA_FORK_EPOCH

# Fulu
FULU_FORK_VERSION: $FULU_FORK_VERSION
FULU_FORK_EPOCH: $FULU_FORK_EPOCH

# EIP7594 - Peerdas
EIP7594_FORK_VERSION: $EIP7594_FORK_VERSION
EIP7594_FORK_EPOCH: $EIP7594_FORK_EPOCH
Expand Down
2 changes: 1 addition & 1 deletion config-example/el/genesis-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ 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}
fulu_fork_epoch: ${FULU_FORK_EPOCH}
3 changes: 2 additions & 1 deletion defaults/defaults.env
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ 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 FULU_FORK_VERSION="${FULU_FORK_VERSION:-0x70000000}"
export FULU_FORK_EPOCH="${FULU_FORK_EPOCH:-99999}"
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 3fb916c

Please sign in to comment.