Skip to content
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
2 changes: 1 addition & 1 deletion dappnode_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"globalEnvs": [
{
"envs": ["EXECUTION_CLIENT_MAINNET", "OP_EXECUTION_CLIENT"],
"envs": ["EXECUTION_CLIENT_MAINNET", "OP_EXECUTION_CLIENT", "DOMAIN"],
"services": ["op-node"]
}
]
Expand Down
6 changes: 5 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ services:
context: op-node
args:
UPSTREAM_VERSION: v1.1.4
ports:
- "9222:9222/udp"
- "9222:9222/tcp"
environment:
- CUSTOM_L1_RPC
CUSTOM_L1_RPC: ""
EXTRA_OPTS: ""
restart: unless-stopped
image: "op-node.op-node.dnp.dappnode.eth:0.1.0"
16 changes: 13 additions & 3 deletions op-node/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -31,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"
;;
*)
Expand All @@ -48,11 +53,16 @@ esac
while true; do
op-node --network=mainnet \
--l1="$L1_RPC" \
--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_FLAGS}
${EXTRA_OPTS}

STATUS=$?

Expand Down