Skip to content

Commit

Permalink
Merge branch 'main' into voss/fix-communication-WS-Engine
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpeterson91 authored Mar 16, 2024
2 parents 50cc727 + b587ed3 commit b9cb252
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 20 deletions.
10 changes: 5 additions & 5 deletions dappnode_package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "op-node.dnp.dappnode.eth",
"version": "0.1.0",
"upstreamVersion": "v1.1.4",
"upstreamRepo": "ethereum-optimism/op-node",
"version": "0.1.2",
"upstreamVersion": "v1.7.1",
"upstreamRepo": "ethereum-optimism/optimism",
"upstreamArg": "UPSTREAM_VERSION",
"shortDescription": "Optimism Rollup node",
"description": "The Optimism rollup node is the component responsible for deriving the L2 chain from L1 blocks (and their associated receipts)",
"author": "DAppNode Association <[email protected]> (https://github.com/dappnode)",
"categories": ["ETH2.0"],
"keywords": ["optimism", "rollup", "ethereum", "node"],
"type": "service",
"architectures": ["linux/amd64", "linux/arm64"],
"architectures": ["linux/amd64"],
"links": {
"homepage": "https://github.com/dappnode/DAppNodePackage-op-node#readme",
"api": "http://op-node.dappnode:9545"
Expand All @@ -36,7 +36,7 @@
},
"globalEnvs": [
{
"envs": ["EXECUTION_CLIENT_MAINNET", "OP_EXECUTION_CLIENT", "DOMAIN"],
"envs": ["EXECUTION_CLIENT_MAINNET", "CONSENSUS_CLIENT_MAINNET","OP_EXECUTION_CLIENT"],
"services": ["op-node"]
}
]
Expand Down
11 changes: 4 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ services:
build:
context: op-node
args:
UPSTREAM_VERSION: v1.1.4
ports:
- "9222:9222/udp"
- "9222:9222/tcp"
UPSTREAM_VERSION: v1.7.1
environment:
CUSTOM_L1_RPC: ""
EXTRA_OPTS: ""
- CUSTOM_L1_RPC
- CUSTOM_L1_BEACON_API
restart: unless-stopped
image: "op-node.op-node.dnp.dappnode.eth:0.1.0"
image: "op-node.op-node.dnp.dappnode.eth:0.1.2"
46 changes: 38 additions & 8 deletions op-node/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,39 @@ else
exit 1
fi

# If CUSTOM_L1_BEACON_API is set, use it. Otherwise, use the proper value depending on the _DAPPNODE_GLOBAL_CONSENSUS_CLIENT_MAINNET variable

if [ ! -z "$CUSTOM_L1_BEACON_API" ]; then
L1_BEACON_API=$CUSTOM_L1_BEACON_API
elif [ ! -z "$_DAPPNODE_GLOBAL_CONSENSUS_CLIENT_MAINNET" ]; then
case $_DAPPNODE_GLOBAL_CONSENSUS_CLIENT_MAINNET in
"lodestar.dnp.dappnode.eth")
L1_BEACON_API="http://beacon-chain.lodestar.dappnode:3500"
;;
"lighthouse.dnp.dappnode.eth")
L1_BEACON_API="http://beacon-chain.lighthouse.dappnode:3500"
;;
"prysm.dnp.dappnode.eth")
L1_BEACON_API="http://beacon-chain.prysm.dappnode:3500"
;;
"teku.dnp.dappnode.eth")
L1_BEACON_API="http://beacon-chain.teku.dappnode:3500"
;;
"nimbus.dnp.dappnode.eth")
L1_BEACON_API="http://nimbus.dappnode:4500"
;;
*)
echo "Unknown value for _DAPPNODE_GLOBAL_CONSENSUS_CLIENT_MAINNET: $_DAPPNODE_GLOBAL_CONSENSUS_CLIENT_MAINNET"
sleep 60
exit 1
;;
esac
else
echo "No L1_BEACON_API value set"
sleep 60
exit 1
fi

case $_DAPPNODE_GLOBAL_OP_EXECUTION_CLIENT in
"op-geth.dnp.dappnode.eth")
L2_ENGINE="ws://op-geth.dappnode:8551"
Expand All @@ -51,15 +84,12 @@ case $_DAPPNODE_GLOBAL_OP_EXECUTION_CLIENT in
esac

while true; do
op-node --network=mainnet \
--l1=${L1_RPC} \
op-node --network=op-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 \
--l1.beacon="$L1_BEACON_API" \
--l2="$L2_ENGINE" \
--l2.jwt-secret="$JWT_PATH" \
--rpc.addr=0.0.0.0 \
--rpc.port=9545 \
${EXTRA_OPTS}
Expand Down

0 comments on commit b9cb252

Please sign in to comment.