Skip to content

Commit

Permalink
refactor: parametrize node key for signer and member nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrekucci committed Sep 23, 2024
1 parent 6811ee9 commit 59430ea
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions geth-poa/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ fi

if [ "$GETH_NODE_TYPE" = "bootnode" ]; then
echo "Starting bootnode"

# Generate boot.key
echo "$BOOT_KEY" > $GETH_DATA_DIR/boot.key

exec "$GETH_BIN_PATH" \
Expand Down Expand Up @@ -130,8 +128,10 @@ if [ "$GETH_NODE_TYPE" = "bootnode" ]; then

elif [ "$GETH_NODE_TYPE" = "signer" ]; then
echo "Starting signer node"
echo "BOOTNODE_ENDPOINT is set to: $BOOTNODE_ENDPOINT"
GETH_PORT="${GETH_PORT:-30311}"
echo "$BOOT_KEY" > $GETH_DATA_DIR/boot.key

echo "BOOTNODE_ENDPOINT is set to: $BOOTNODE_ENDPOINT"
GETH_PORT="${GETH_PORT:-30311}"

exec "$GETH_BIN_PATH" \
--verbosity="$GETH_VERBOSITY" \
Expand All @@ -157,6 +157,7 @@ elif [ "$GETH_NODE_TYPE" = "signer" ]; then
--miner.etherbase=$BLOCK_SIGNER_ADDRESS \
--allow-insecure-unlock \
--nousb \
--nodekey $GETH_DATA_DIR/boot.key \
--netrestrict $NET_RESTRICT \
--metrics \
--metrics.addr="$NODE_IP" \
Expand All @@ -180,6 +181,7 @@ elif [ "$GETH_NODE_TYPE" = "signer" ]; then

elif [ "$GETH_NODE_TYPE" = "member" ]; then
echo "Starting member node"
echo "$BOOT_KEY" > $GETH_DATA_DIR/boot.key
echo "BOOTNODE_ENDPOINT is set to: $BOOTNODE_ENDPOINT"
GETH_PORT="${GETH_PORT:-30311}"

Expand All @@ -202,6 +204,7 @@ elif [ "$GETH_NODE_TYPE" = "member" ]; then
--bootnodes $BOOTNODE_ENDPOINT \
--networkid=$CHAIN_ID \
--password="$GETH_DATA_DIR"/password \
--nodekey $GETH_DATA_DIR/boot.key \
--metrics \
--metrics.addr="$NODE_IP" \
--metrics.port=6060 \
Expand Down

0 comments on commit 59430ea

Please sign in to comment.