From 84314617b1685749595f136ee43b7e0cd5190e1c Mon Sep 17 00:00:00 2001 From: kant Date: Wed, 3 Jan 2024 21:08:32 -0800 Subject: [PATCH] Adding member node --- geth-poa/docker-compose.yml | 41 ++++++++++++++++++++++++++++++++++++- geth-poa/entrypoint.sh | 38 ++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 1 deletion(-) diff --git a/geth-poa/docker-compose.yml b/geth-poa/docker-compose.yml index 08caf8560b..f1a6da0316 100644 --- a/geth-poa/docker-compose.yml +++ b/geth-poa/docker-compose.yml @@ -97,7 +97,7 @@ services: primev_net: ipv4_address: '172.29.0.100' ports: - - 60603:60601 + - 60604:60601 volumes: - geth-data-node2:/data profiles: @@ -124,6 +124,44 @@ services: } ] + sl-node3: + build: + context: .. + dockerfile: geth-poa/Dockerfile + environment: + - GETH_NODE_TYPE=member + - BOOTNODE_ENDPOINT=enode://34a2a388ad31ca37f127bb9ffe93758ee711c5c2277dff6aff2e359bcf2c9509ea55034196788dbd59ed70861f523c1c03d54f1eabb2b4a5c1c129d966fe1e65@172.29.0.98:30301 + networks: + primev_net: + ipv4_address: '172.29.0.101' + ports: + - 60603:60601 + volumes: + - geth-data-node3:/data + profiles: + - settlement + labels: + com.datadoghq.ad.check_names: '["openmetrics"]' + com.datadoghq.ad.init_configs: '[{}]' + com.datadoghq.ad.instances: | + [ + { + "openmetrics_endpoint": "http://%%host%%:6060/debug/metrics/prometheus", + "namespace": "geth-poa", + "metrics": [ + "txpool*", + "trie*", + "system*", + "state*", + "rpc*", + "p2p*", + "eth*", + "chain*", + "clique*" + ] + } + ] + # L1 geth services only used for local dev l1-bootnode: build: @@ -326,6 +364,7 @@ volumes: geth-data-bootnode: geth-data-node1: geth-data-node2: + geth-data-node3: geth-data-l1-bootnode: geth-data-l1-first-signer: geth-data-l1-second-signer: diff --git a/geth-poa/entrypoint.sh b/geth-poa/entrypoint.sh index b06b00bda5..2ca0d81a83 100644 --- a/geth-poa/entrypoint.sh +++ b/geth-poa/entrypoint.sh @@ -125,6 +125,44 @@ elif [ "$GETH_NODE_TYPE" = "signer" ]; then --authrpc.vhosts="*" \ --txpool.accountqueue=512 \ --nat extip:$NODE_IP + +elif [ "$GETH_NODE_TYPE" = "member" ]; then + echo "Starting member node" + + exec geth \ + --verbosity="$VERBOSITY" \ + --datadir="$GETH_DATA_DIR" \ + --port 30311 \ + --syncmode=full \ + --gcmode=full \ + --state.scheme=path \ + --db.engine=pebble \ + --http \ + --http.corsdomain="*" \ + --http.vhosts="*" \ + --http.addr=0.0.0.0 \ + --http.port="$RPC_PORT" \ + --http.api=web3,debug,eth,txpool,net,engine \ + --bootnodes $BOOTNODE_ENDPOINT \ + --networkid=$CHAIN_ID \ + --password="$GETH_DATA_DIR"/password \ + --metrics \ + --metrics.addr=0.0.0.0 \ + --metrics.port=6060 \ + --pprof \ + --pprof.addr=0.0.0.0 \ + --pprof.port=60601 \ + --ws \ + --ws.addr=0.0.0.0 \ + --ws.port="$WS_PORT" \ + --ws.origins="*" \ + --ws.api=debug,eth,txpool,net,engine \ + --rpc.allow-unprotected-txs \ + --authrpc.addr="0.0.0.0" \ + --authrpc.port="8551" \ + --authrpc.vhosts="*" \ + --txpool.accountqueue=512 \ + --nat extip:$NODE_IP else echo "Invalid GETH_NODE_TYPE specified" fi