Skip to content

Commit

Permalink
feat: setup RIP-7560 devnet environment
Browse files Browse the repository at this point in the history
  • Loading branch information
kangsorang committed Oct 16, 2024
1 parent 65a1b18 commit 6d15b1b
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,5 @@ tests/spec-tests/
/alexfdata/prysmctl
/alexfdata/validator
/alexfdata/genesis.ssz

/db
2 changes: 1 addition & 1 deletion circleciconfig.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Eth]
Rip7560MaxBundleSize = 0
Rip7560MaxBundleGas = 0
Rip7560PullUrls = ["http://localhost:3001/rpc"]
Rip7560PullUrls = ["http://localhost:7560/rpc"]
Rip7560AcceptPush = false
1 change: 1 addition & 0 deletions config/test-jwt-secret.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
688f5d737bad920bdfb2fc2f488d6b6209eebda1dae949a8de91398d932c517a
11 changes: 11 additions & 0 deletions prepare-dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
VERBOSITY=${GETH_VERBOSITY:-3}

echo "
--dev
--dev.gaslimit=30000000
--http
--http.api=eth,net,web3,personal,debug
--http.port=8545
--rpc.allow-unprotected-txs
--config=circleciconfig.toml
" | pbcopy
49 changes: 49 additions & 0 deletions prepare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
VERBOSITY=${GETH_VERBOSITY:-3}
GETH_DATA_DIR=./db
GETH_CHAINDATA_DIR="$GETH_DATA_DIR/geth/chaindata"
GENESIS_FILE_PATH="${GENESIS_FILE_PATH:-../.devnet/genesis-l2.json}"
CHAIN_ID=$(cat "$GENESIS_FILE_PATH" | jq -r .config.chainId)
RPC_PORT="${RPC_PORT:-38545}"
WS_PORT="${WS_PORT:-38546}"

if [ ! -d "$GETH_CHAINDATA_DIR" ]; then
echo "$GETH_CHAINDATA_DIR missing, running init"
echo "Initializing genesis."
./build/bin/geth --verbosity="$VERBOSITY" init \
--state.scheme=hash \
--datadir="$GETH_DATA_DIR" \
"$GENESIS_FILE_PATH"
else
echo "$GETH_CHAINDATA_DIR exists."
fi

echo "
--datadir=$GETH_DATA_DIR
--verbosity=$VERBOSITY
--http
--http.corsdomain=*
--http.vhosts=*
--http.addr=0.0.0.0
--http.port=$RPC_PORT
--http.api=web3,debug,eth,txpool,net,engine
--ws
--ws.addr=0.0.0.0
--ws.port=$WS_PORT
--ws.origins=*
--ws.api=debug,eth,txpool,net,engine
--syncmode=full
--nodiscover
--maxpeers=0
--networkid=$CHAIN_ID
--rpc.allow-unprotected-txs
--authrpc.addr=0.0.0.0
--authrpc.port=38551
--authrpc.vhosts=*
--authrpc.jwtsecret=./config/test-jwt-secret.txt
--gcmode=archive
--metrics
--metrics.addr=0.0.0.0
--metrics.port=36060
--miner.recommit=1s
--config=circleciconfig.toml
" | pbcopy

0 comments on commit 6d15b1b

Please sign in to comment.