Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions apps/el-gen/generate_genesis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ generate_genesis() {
# 5 - electra / prague
# 6 - fulu / osaka
# 7 - gloas / amsterdam
# 8 - eip7805 / eip7805
# 8 - heze / heze

if [ "$CHAIN_ID" == "1" ]; then
# mainnet shadowfork
Expand Down Expand Up @@ -74,7 +74,7 @@ generate_genesis() {
[ $has_fork -lt 6 ] && [ ! "$FULU_FORK_EPOCH" == "18446744073709551615" ] && genesis_add_fulu $tmp_dir
[ ! "$FULU_FORK_EPOCH" == "18446744073709551615" ] && genesis_add_bpos $tmp_dir 1 $max_bpos
[ $has_fork -lt 7 ] && [ ! "$GLOAS_FORK_EPOCH" == "18446744073709551615" ] && genesis_add_gloas $tmp_dir
[ $has_fork -lt 8 ] && [ ! "$EIP7805_FORK_EPOCH" == "18446744073709551615" ] && genesis_add_eip7805 $tmp_dir
[ $has_fork -lt 8 ] && [ ! "$HEZE_FORK_EPOCH" == "18446744073709551615" ] && genesis_add_heze $tmp_dir

# apply special chainspec blob schedule format
genesis_apply_blob_schedule $tmp_dir
Expand Down Expand Up @@ -816,32 +816,32 @@ genesis_add_gloas() {

}

# Adds EIP-7805 fork properties to genesis files
# Adds Heze fork properties to genesis files
# Enabled EIPs: 7805
# Args:
# $1: Temporary directory containing genesis files
genesis_add_eip7805() {
genesis_add_heze() {
local tmp_dir=$1
echo "Adding eip7805 genesis properties"
local eip7805_time=$(genesis_get_activation_time $EIP7805_FORK_EPOCH)
local eip7805_time_hex="0x$(printf "%x" $eip7805_time)"
local latest_blob_schedule=$(genesis_get_blob_schedule $tmp_dir $eip7805_time)
echo "Adding heze genesis properties"
local heze_time=$(genesis_get_activation_time $HEZE_FORK_EPOCH)
local heze_time_hex="0x$(printf "%x" $heze_time)"
local latest_blob_schedule=$(genesis_get_blob_schedule $tmp_dir $heze_time)

# genesis.json
genesis_add_json $tmp_dir/genesis.json '.config += {
"eip7805Time": '"$eip7805_time"'
"hezeTime": '"$heze_time"'
}'
genesis_add_json $tmp_dir/genesis.json '.config.blobSchedule += {
"eip7805": '"$latest_blob_schedule"'
"heze": '"$latest_blob_schedule"'
}'

# chainspec.json
genesis_add_json $tmp_dir/chainspec.json '.params += {
"eip7805TransitionTimestamp": "'$eip7805_time_hex'"
"eip7805TransitionTimestamp": "'$heze_time_hex'"
}'

# besu.json
genesis_add_json $tmp_dir/besu.json '.config += {
"eip7805Time": '"$eip7805_time"'
"hezeTime": '"$heze_time"'
}'
}
10 changes: 5 additions & 5 deletions config-example/cl/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ GLOAS_FORK_EPOCH: $GLOAS_FORK_EPOCH
# EIP7441
EIP7441_FORK_VERSION: $EIP7441_FORK_VERSION
EIP7441_FORK_EPOCH: $EIP7441_FORK_EPOCH
# EIP7805
EIP7805_FORK_VERSION: $EIP7805_FORK_VERSION
EIP7805_FORK_EPOCH: $EIP7805_FORK_EPOCH
# Heze
HEZE_FORK_VERSION: $HEZE_FORK_VERSION
HEZE_FORK_EPOCH: $HEZE_FORK_EPOCH
# EIP7928
EIP7928_FORK_VERSION: $EIP7928_FORK_VERSION
EIP7928_FORK_EPOCH: $EIP7928_FORK_EPOCH
Expand Down Expand Up @@ -109,7 +109,7 @@ CONTRIBUTION_DUE_BPS_GLOAS: $CONTRIBUTION_DUE_BPS_GLOAS
# 7500 basis points, 75% of SLOT_DURATION_MS
PAYLOAD_ATTESTATION_DUE_BPS: $PAYLOAD_ATTESTATION_DUE_BPS

# EIP7805
# Heze
# 7500 basis points, 75% of SLOT_DURATION_MS
VIEW_FREEZE_CUTOFF_BPS: $VIEW_FREEZE_CUTOFF_BPS
# 6667 basis points, ~67% of SLOT_DURATION_MS
Expand Down Expand Up @@ -231,7 +231,7 @@ EPOCHS_PER_SHUFFLING_PHASE: 256
# 2**1 (= 2) epochs
PROPOSER_SELECTION_GAP: 2

# EIP7805
# Heze
# 2**4 (= 16) inclusion lists
MAX_REQUEST_INCLUSION_LIST: 16
# 2**13 (= 8,192) bytes
Expand Down
4 changes: 2 additions & 2 deletions defaults/defaults.env
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export FULU_FORK_VERSION="${FULU_FORK_VERSION:-0x70000000}"
export FULU_FORK_EPOCH="${FULU_FORK_EPOCH:-0}"
export GLOAS_FORK_VERSION="${GLOAS_FORK_VERSION:-0x80000000}"
export GLOAS_FORK_EPOCH="${GLOAS_FORK_EPOCH:-18446744073709551615}"
export EIP7805_FORK_VERSION="${EIP7805_FORK_VERSION:-0x90000000}"
export EIP7805_FORK_EPOCH="${EIP7805_FORK_EPOCH:-18446744073709551615}"
export HEZE_FORK_VERSION="${HEZE_FORK_VERSION:-0x90000000}"
export HEZE_FORK_EPOCH="${HEZE_FORK_EPOCH:-18446744073709551615}"
export EIP7441_FORK_VERSION="${EIP7441_FORK_VERSION:-0xa0000000}"
export EIP7441_FORK_EPOCH="${EIP7441_FORK_EPOCH:-18446744073709551615}"
export WITHDRAWAL_TYPE="${WITHDRAWAL_TYPE:-0x00}"
Expand Down