Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Experiment] Attempt Prague for localstack #641

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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
6 changes: 2 additions & 4 deletions docker/config/l1-node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ RUN apk add --no-cache git && git clone https://github.com/protolambda/eth2-test
&& cd eth2-testnet-genesis \
&& go install .

COPY ./generate-genesis.sh /generate-genesis.sh

FROM alpine:3.20.3

RUN apk add --no-cache bash
RUN apk add --no-cache bash

COPY --from=builder /generate-genesis.sh /config/generate-genesis.sh
COPY --from=builder /go/bin/eth2-testnet-genesis /usr/local/bin/
COPY ./generate-genesis.sh /config/generate-genesis.sh

ENTRYPOINT [ "/bin/sh" , "/config/generate-genesis.sh" ]
7 changes: 7 additions & 0 deletions docker/config/l1-node/cl/network-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ CAPELLA_FORK_EPOCH: 0
DENEB_FORK_VERSION: 0x50000038
DENEB_FORK_EPOCH: 0

ELECTRA_FORK_VERSION: 0x60000038
ELECTRA_FORK_EPOCH: 1
MAX_BLOBS_PER_BLOCK_ELECTRA: 9
MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA: 128000000000
BLOB_SIDECAR_SUBNET_COUNT_ELECTRA: 9
MAX_REQUEST_BLOB_SIDECARS_ELECTRA: 1152

# Time parameters
# ---------------------------------------------------------------
# 1 seconds
Expand Down
3 changes: 2 additions & 1 deletion docker/config/l1-node/el/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"terminalTotalDifficulty": 0,
"shanghaiTime": 0,
"ethash": {},
"cancunTime": 0
"cancunTime": 0,
"pragueTime": 0
},
"alloc": {
"0x0000000000000000000000000000000000000000": {
Expand Down
4 changes: 4 additions & 0 deletions docker/config/l1-node/generate-genesis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,16 @@ if [ -z "$genesis_time" ] || [ -z "$l1_genesis" ] || [ -z "$network_config" ] ||
fi

echo "Genesis time set to: $genesis_time"
# Hacky workaround for limitation that Teku cannot begin with genesis state of Electra (Prague)
prague_time=$((genesis_time + 32))
echo "Prague time set to: $prague_time"

mkdir -p $output_dir
cp $l1_genesis $output_dir/genesis.json
cp $network_config $output_dir/$(basename -- $network_config)

sed -i -E 's/"timestamp": "[0-9]+"/"timestamp": "'"$genesis_time"'"/' $output_dir/genesis.json
sed -i -E 's/"pragueTime": 0/"pragueTime": '"$prague_time"'/' $output_dir/genesis.json
sed -i 's/\$GENESIS_TIME/'"$genesis_time"'/g' $output_dir/$(basename -- $network_config)

/usr/local/bin/eth2-testnet-genesis deneb --config $output_dir/$(basename -- $network_config) --mnemonics $mnemonics --tranches-dir $output_dir/tranches --state-output $output_dir/genesis.ssz --eth1-config $output_dir/genesis.json
Loading