diff --git a/.changeset/sour-onions-burn.md b/.changeset/sour-onions-burn.md new file mode 100644 index 0000000000000..6c202ac41998a --- /dev/null +++ b/.changeset/sour-onions-burn.md @@ -0,0 +1,5 @@ +--- +'@eth-optimism/l2geth': patch +--- + +Update `scripts/start.sh` to parse the websocket port and pass to geth at runtime diff --git a/l2geth/scripts/start.sh b/l2geth/scripts/start.sh index 2da703a772813..e7d7fad14e860 100755 --- a/l2geth/scripts/start.sh +++ b/l2geth/scripts/start.sh @@ -17,6 +17,7 @@ ROLLUP_POLL_INTERVAL=15s ROLLUP_TIMESTAMP_REFRESH=3m CACHE=1024 RPC_PORT=8545 +WS_PORT=8546 VERBOSITY=3 USAGE=" @@ -84,6 +85,15 @@ while (( "$#" )); do exit 1 fi ;; + --wsport) + if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then + WS_PORT="$2" + shift 2 + else + echo "Error: Argument for $1 is missing" >&2 + exit 1 + fi + ;; --eth1.ctcdeploymentheight) if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then ETH1_CTC_DEPLOYMENT_HEIGHT="$2" @@ -222,7 +232,7 @@ cmd="$cmd --rpccorsdomain '*'" cmd="$cmd --rpcvhosts '*'" cmd="$cmd --ws" cmd="$cmd --wsaddr 0.0.0.0" -cmd="$cmd --wsport 8546" +cmd="$cmd --wsport $WS_PORT" cmd="$cmd --wsorigins '*'" cmd="$cmd --rpcapi 'eth,net,rollup,web3,debug'" cmd="$cmd --gasprice 0"