From 806751de624f8a7008efdceb93e9d3c5a6b15554 Mon Sep 17 00:00:00 2001 From: Voss Date: Tue, 28 Nov 2023 15:09:10 -0600 Subject: [PATCH 1/4] fix extra opts, add l1 rpc trust settings --- docker-compose.yml | 3 ++- op-node/entrypoint.sh | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index d1c2fb6..67a0dff 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,6 +6,7 @@ services: args: UPSTREAM_VERSION: v1.1.4 environment: - - CUSTOM_L1_RPC + CUSTOM_L1_RPC: "" + EXTRA_OPTS: "" restart: unless-stopped image: "op-node.op-node.dnp.dappnode.eth:0.1.0" diff --git a/op-node/entrypoint.sh b/op-node/entrypoint.sh index 7e2062b..006e1a8 100755 --- a/op-node/entrypoint.sh +++ b/op-node/entrypoint.sh @@ -3,19 +3,24 @@ # If CUSTOM_L1_RPC is set, use it. Otherwise, use the proper value depending on the _DAPPNODE_GLOBAL_EXECUTION_CLIENT_MAINNET variable if [ ! -z "$CUSTOM_L1_RPC" ]; then L1_RPC=$CUSTOM_L1_RPC + L1_RPC_TRUST=false elif [ ! -z "$_DAPPNODE_GLOBAL_EXECUTION_CLIENT_MAINNET" ]; then case $_DAPPNODE_GLOBAL_EXECUTION_CLIENT_MAINNET in "geth.dnp.dappnode.eth") L1_RPC="http://geth.dappnode:8545" + L1_RPC_TRUST=true ;; "nethermind.public.dappnode.eth") L1_RPC="http://nethermind.public.dappnode:8545" + L1_RPC_TRUST=true ;; "erigon.dnp.dappnode.eth") L1_RPC="http://erigon.dappnode:8545" + L1_RPC_TRUST=true ;; "besu.public.dappnode.eth") L1_RPC="http://besu.public.dappnode:8545" + L1_RPC_TRUST=true ;; *) echo "Unknown value for _DAPPNODE_GLOBAL_EXECUTION_CLIENT_MAINNET: $_DAPPNODE_GLOBAL_EXECUTION_CLIENT_MAINNET" @@ -48,11 +53,12 @@ esac while true; do op-node --network=mainnet \ --l1="$L1_RPC" \ + --l1.trust.rpc=$L1_RPC_TRUST \ --l2="$L2_ENGINE" \ --l2.jwt-secret="$JWT_PATH" \ --rpc.addr=0.0.0.0 \ --rpc.port=9545 \ - ${EXTRA_FLAGS} + ${EXTRA_OPTS} STATUS=$? From 5d69ad64012bb9c29a08b03dc4159ddd80bedd0b Mon Sep 17 00:00:00 2001 From: Voss Date: Tue, 28 Nov 2023 15:30:44 -0600 Subject: [PATCH 2/4] fix flag name removed extra `.` in the l1 rpc trust flag --- op-node/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op-node/entrypoint.sh b/op-node/entrypoint.sh index 006e1a8..ee99009 100755 --- a/op-node/entrypoint.sh +++ b/op-node/entrypoint.sh @@ -53,7 +53,7 @@ esac while true; do op-node --network=mainnet \ --l1="$L1_RPC" \ - --l1.trust.rpc=$L1_RPC_TRUST \ + --l1.trustrpc=$L1_RPC_TRUST \ --l2="$L2_ENGINE" \ --l2.jwt-secret="$JWT_PATH" \ --rpc.addr=0.0.0.0 \ From dfd6833206feb4baba4e0083f198653cb51d7052 Mon Sep 17 00:00:00 2001 From: Voss Date: Tue, 28 Nov 2023 17:08:25 -0600 Subject: [PATCH 3/4] add p2p config --- dappnode_package.json | 2 +- docker-compose.yml | 7 +++++-- op-node/entrypoint.sh | 4 ++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dappnode_package.json b/dappnode_package.json index 0442a6b..956ea9a 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -36,7 +36,7 @@ }, "globalEnvs": [ { - "envs": ["EXECUTION_CLIENT_MAINNET", "OP_EXECUTION_CLIENT"], + "envs": ["EXECUTION_CLIENT_MAINNET", "OP_EXECUTION_CLIENT", "DOMAIN"], "services": ["op-node"] } ] diff --git a/docker-compose.yml b/docker-compose.yml index 67a0dff..5f666cc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,8 +5,11 @@ services: context: op-node args: UPSTREAM_VERSION: v1.1.4 + ports: + - "9222:9222/udp" + - "9222:9222/tcp" environment: - CUSTOM_L1_RPC: "" - EXTRA_OPTS: "" + CUSTOM_L1_RPC: "" + EXTRA_OPTS: "" restart: unless-stopped image: "op-node.op-node.dnp.dappnode.eth:0.1.0" diff --git a/op-node/entrypoint.sh b/op-node/entrypoint.sh index ee99009..bfba731 100755 --- a/op-node/entrypoint.sh +++ b/op-node/entrypoint.sh @@ -56,6 +56,10 @@ while true; do --l1.trustrpc=$L1_RPC_TRUST \ --l2="$L2_ENGINE" \ --l2.jwt-secret="$JWT_PATH" \ + --p2p.advertise.ip="${_DAPPNODE_GLOBAL_DOMAIN}" \ + --p2p.listen.ip=0.0.0.0 \ + --p2p.listen.tcp=9222 \ + --p2p.listen.udp=9222 \ --rpc.addr=0.0.0.0 \ --rpc.port=9545 \ ${EXTRA_OPTS} From 50cc727a354717a42725da39ffd92d4f7da5b460 Mon Sep 17 00:00:00 2001 From: Voss Date: Fri, 8 Dec 2023 21:03:51 -0600 Subject: [PATCH 4/4] new branch commit --- op-node/entrypoint.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/op-node/entrypoint.sh b/op-node/entrypoint.sh index bfba731..bfa782c 100755 --- a/op-node/entrypoint.sh +++ b/op-node/entrypoint.sh @@ -3,7 +3,7 @@ # If CUSTOM_L1_RPC is set, use it. Otherwise, use the proper value depending on the _DAPPNODE_GLOBAL_EXECUTION_CLIENT_MAINNET variable if [ ! -z "$CUSTOM_L1_RPC" ]; then L1_RPC=$CUSTOM_L1_RPC - L1_RPC_TRUST=false + L1_RPC_TRUST=true elif [ ! -z "$_DAPPNODE_GLOBAL_EXECUTION_CLIENT_MAINNET" ]; then case $_DAPPNODE_GLOBAL_EXECUTION_CLIENT_MAINNET in "geth.dnp.dappnode.eth") @@ -36,11 +36,11 @@ fi case $_DAPPNODE_GLOBAL_OP_EXECUTION_CLIENT in "op-geth.dnp.dappnode.eth") - L2_ENGINE="http://op-geth.dappnode:8551" + L2_ENGINE="ws://op-geth.dappnode:8551" JWT_PATH="/security/op-geth/jwtsecret.hex" ;; "op-erigon.dnp.dappnode.eth") - L2_ENGINE="http://op-erigon.dappnode:8551" + L2_ENGINE="ws://op-erigon.dappnode:8551" JWT_PATH="/security/op-erigon/jwtsecret.hex" ;; *) @@ -52,10 +52,10 @@ esac while true; do op-node --network=mainnet \ - --l1="$L1_RPC" \ + --l1=${L1_RPC} \ --l1.trustrpc=$L1_RPC_TRUST \ - --l2="$L2_ENGINE" \ - --l2.jwt-secret="$JWT_PATH" \ + --l2=${L2_ENGINE} \ + --l2.jwt-secret=${JWT_PATH} \ --p2p.advertise.ip="${_DAPPNODE_GLOBAL_DOMAIN}" \ --p2p.listen.ip=0.0.0.0 \ --p2p.listen.tcp=9222 \