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

Pr/5326 #5349

Closed
wants to merge 2 commits into from
Closed

Pr/5326 #5349

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
3 changes: 3 additions & 0 deletions scripts/local_testnet/beacon_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ exec $lighthouse_binary \
--enr-tcp-port $tcp_port \
--enr-quic-port $quic_port \
--port $tcp_port \
--gui \
--http \
--http-allow-origin "*" \
--quic-port $quic_port \
--http-port $http_port \
--disable-packet-filter \
Expand Down
6 changes: 3 additions & 3 deletions scripts/local_testnet/setup_time.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ echo "slot_per_epoch=$SLOT_PER_EPOCH"
genesis_file=$1

# Update future hardforks time in the EL genesis file based on the CL genesis time
GENESIS_TIME=$(lcli pretty-ssz --spec $SPEC_PRESET --testnet-dir $TESTNET_DIR BeaconState $TESTNET_DIR/genesis.ssz | jq | grep -Po 'genesis_time": "\K.*\d')
GENESIS_TIME=$(lcli pretty-ssz --spec $SPEC_PRESET --testnet-dir $TESTNET_DIR BeaconState $TESTNET_DIR/genesis.ssz | jq | ggrep -Po 'genesis_time": "\K.*\d')
echo $GENESIS_TIME
CAPELLA_TIME=$((GENESIS_TIME + (CAPELLA_FORK_EPOCH * $SLOT_PER_EPOCH * SECONDS_PER_SLOT)))
echo $CAPELLA_TIME
sed -i 's/"shanghaiTime".*$/"shanghaiTime": '"$CAPELLA_TIME"',/g' $genesis_file
sed -i '' 's/"shanghaiTime".*$/"shanghaiTime": '"$CAPELLA_TIME"',/g' "$genesis_file"
CANCUN_TIME=$((GENESIS_TIME + (DENEB_FORK_EPOCH * $SLOT_PER_EPOCH * SECONDS_PER_SLOT)))
echo $CANCUN_TIME
sed -i 's/"cancunTime".*$/"cancunTime": '"$CANCUN_TIME"',/g' $genesis_file
sed -i '' 's/"cancunTime".*$/"cancunTime": '"$CANCUN_TIME"',/g' "$genesis_file"
cat $genesis_file

7 changes: 4 additions & 3 deletions scripts/local_testnet/start_local_testnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ sleeping 1
# Start beacon nodes
BN_udp_tcp_base=9000
BN_http_port_base=8000
VC_http_port_base=10000

EL_base_network=7000
EL_base_http=6000
Expand All @@ -132,8 +133,8 @@ done
sleeping 20

# Reset the `genesis.json` config file fork times.
sed -i 's/"shanghaiTime".*$/"shanghaiTime": 0,/g' $genesis_file
sed -i 's/"cancunTime".*$/"cancunTime": 0,/g' $genesis_file
sed -i '' 's/"shanghaiTime".*$/"shanghaiTime": 0,/g' "$genesis_file"
sed -i '' 's/"cancunTime".*$/"cancunTime": 0,/g' "$genesis_file"

for (( bn=1; bn<=$BN_COUNT; bn++ )); do
secret=$DATADIR/geth_datadir$bn/geth/jwtsecret
Expand All @@ -143,7 +144,7 @@ done

# Start requested number of validator clients
for (( vc=1; vc<=$VC_COUNT; vc++ )); do
execute_command_add_PID validator_node_$vc.log ./validator_client.sh $BUILDER_PROPOSALS -d $DEBUG_LEVEL $DATADIR/node_$vc http://localhost:$((BN_http_port_base + $vc))
execute_command_add_PID validator_node_$vc.log ./validator_client.sh $BUILDER_PROPOSALS -d $DEBUG_LEVEL $DATADIR/node_$vc http://localhost:$((BN_http_port_base + $vc)) $((VC_http_port_base + $vc))
done

echo "Started!"
3 changes: 3 additions & 0 deletions scripts/local_testnet/validator_client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ exec lighthouse \
--init-slashing-protection \
--beacon-nodes ${@:$OPTIND+1:1} \
--suggested-fee-recipient 0x690B9A9E9aa1C9dB991C7721a92d351Db4FaC990 \
--http \
--http-allow-origin "*" \
--http-port ${@:$OPTIND+2:1} \
$VC_ARGS
Loading