Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to pass extra arguments to the eth1, eth2 and validator container #57

Closed
wants to merge 2 commits into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,31 @@ if [ "$CLIENT" = "geth" ]; then
CMD="$CMD --port $ETH1_P2P_PORT"
fi

exec ${CMD} --http.vhosts '*'
exec ${CMD} --http.vhosts '*' ${ETH1_EXTRA_ARGS}

fi


# Infura startup
if [ "$CLIENT" = "infura" ]; then

exec /go/bin/rocketpool-pow-proxy --httpPort 8545 --wsPort 8546 --network goerli --projectId $INFURA_PROJECT_ID --providerType infura
exec /go/bin/rocketpool-pow-proxy --httpPort 8545 --wsPort 8546 --network goerli --projectId $INFURA_PROJECT_ID --providerType infura $ETH1_EXTRA_ARGS

fi


# Pocket startup
if [ "$CLIENT" = "pocket" ]; then

exec /go/bin/rocketpool-pow-proxy --httpPort 8545 --network eth-goerli --projectId $POCKET_PROJECT_ID --providerType pocket
exec /go/bin/rocketpool-pow-proxy --httpPort 8545 --network eth-goerli --projectId $POCKET_PROJECT_ID --providerType pocket $ETH1_EXTRA_ARGS

fi


# Custom provider startup
if [ "$CLIENT" = "custom" ]; then

exec /go/bin/rocketpool-pow-proxy --httpPort 8545 --wsPort 8546 --httpProviderUrl $HTTP_PROVIDER_URL --wsProviderUrl $WS_PROVIDER_URL --providerType=""
exec /go/bin/rocketpool-pow-proxy --httpPort 8545 --wsPort 8546 --httpProviderUrl $HTTP_PROVIDER_URL --wsProviderUrl $WS_PROVIDER_URL --providerType="" $ETH1_EXTRA_ARGS

fi

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [ "$CLIENT" = "lighthouse" ]; then
CMD="$CMD --metrics --metrics-address 0.0.0.0 --metrics-port $ETH2_METRICS_PORT --validator-monitor-auto"
fi

exec ${CMD}
exec ${CMD} ${ETH2_EXTRA_ARGS}

fi

Expand All @@ -45,7 +45,7 @@ if [ "$CLIENT" = "nimbus" ]; then
fi

# Graffiti breaks if it's in the CMD string instead of here because of spaces
exec ${CMD} --graffiti="$GRAFFITI"
exec ${CMD} --graffiti="$GRAFFITI" ${ETH2_EXTRA_ARGS}

fi

Expand All @@ -70,7 +70,7 @@ if [ "$CLIENT" = "prysm" ]; then
CMD="$CMD --disable-monitoring"
fi

exec ${CMD}
exec ${CMD} ${ETH2_EXTRA_ARGS}

fi

Expand All @@ -88,6 +88,6 @@ if [ "$CLIENT" = "teku" ]; then
CMD="$CMD --metrics-enabled=true --metrics-interface=0.0.0.0 --metrics-port=$ETH2_METRICS_PORT --metrics-host-allowlist=*"
fi

exec ${CMD}
exec ${CMD} ${ETH2_EXTRA_ARGS}

fi
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if [ "$CLIENT" = "lighthouse" ]; then
CMD="$CMD --metrics --metrics-address 0.0.0.0 --metrics-port $VALIDATOR_METRICS_PORT"
fi

exec ${CMD} --graffiti "$GRAFFITI"
exec ${CMD} --graffiti "$GRAFFITI" ${VALIDATOR_EXTRA_ARGS}

fi

Expand Down Expand Up @@ -49,7 +49,7 @@ if [ "$CLIENT" = "prysm" ]; then
CMD="$CMD --disable-account-metrics"
fi

exec ${CMD} --graffiti "$GRAFFITI"
exec ${CMD} --graffiti "$GRAFFITI" ${VALIDATOR_EXTRA_ARGS}

fi

Expand All @@ -63,7 +63,7 @@ if [ "$CLIENT" = "teku" ]; then
CMD="$CMD --metrics-enabled=true --metrics-interface=0.0.0.0 --metrics-port=$VALIDATOR_METRICS_PORT --metrics-host-allowlist=*"
fi

exec ${CMD} --validators-graffiti="$GRAFFITI"
exec ${CMD} --validators-graffiti="$GRAFFITI" ${VALIDATOR_EXTRA_ARGS}

fi

3 changes: 3 additions & 0 deletions amd64/rp-smartnode-install/network/prater/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ services:
- GETH_CACHE_SIZE=${GETH_CACHE_SIZE}
- GETH_MAX_PEERS=${GETH_MAX_PEERS}
- ETH1_P2P_PORT=${ETH1_P2P_PORT}
- ETH1_EXTRA_ARGS=${ETH1_EXTRA_ARGS}
entrypoint: sh
command: "/setup/start-node.sh"
eth2:
Expand Down Expand Up @@ -51,6 +52,7 @@ services:
- ETH2_MAX_PEERS=${ETH2_MAX_PEERS}
- ENABLE_METRICS=${ENABLE_METRICS}
- ETH2_METRICS_PORT=${ETH2_METRICS_PORT}
- ETH2_EXTRA_ARGS=${ETH2_EXTRA_ARGS}
entrypoint: sh
command: "/setup/start-beacon.sh"
depends_on:
Expand All @@ -73,6 +75,7 @@ services:
- ROCKET_POOL_VERSION=${ROCKET_POOL_VERSION}
- ENABLE_METRICS=${ENABLE_METRICS}
- VALIDATOR_METRICS_PORT=${VALIDATOR_METRICS_PORT}
- VALIDATOR_EXTRA_ARGS=${ETH1_EXTRA_ARGS}
entrypoint: sh
command: "/setup/start-validator.sh"
depends_on:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,31 @@ if [ "$CLIENT" = "geth" ]; then
CMD="$CMD --port $ETH1_P2P_PORT"
fi

exec ${CMD} --http.vhosts '*'
exec ${CMD} --http.vhosts '*' ${ETH1_EXTRA_ARGS}

fi


# Infura startup
if [ "$CLIENT" = "infura" ]; then

exec /go/bin/rocketpool-pow-proxy --httpPort 8545 --wsPort 8546 --network goerli --projectId $INFURA_PROJECT_ID --providerType infura
exec /go/bin/rocketpool-pow-proxy --httpPort 8545 --wsPort 8546 --network goerli --projectId $INFURA_PROJECT_ID --providerType infura ${ETH1_EXTRA_ARGS}

fi


# Pocket startup
if [ "$CLIENT" = "pocket" ]; then

exec /go/bin/rocketpool-pow-proxy --httpPort 8545 --network eth-goerli --projectId $POCKET_PROJECT_ID --providerType pocket
exec /go/bin/rocketpool-pow-proxy --httpPort 8545 --network eth-goerli --projectId $POCKET_PROJECT_ID --providerType pocket ${ETH1_EXTRA_ARGS}

fi


# Custom provider startup
if [ "$CLIENT" = "custom" ]; then

exec /go/bin/rocketpool-pow-proxy --httpPort 8545 --wsPort 8546 --httpProviderUrl $HTTP_PROVIDER_URL --wsProviderUrl $WS_PROVIDER_URL --providerType=""
exec /go/bin/rocketpool-pow-proxy --httpPort 8545 --wsPort 8546 --httpProviderUrl $HTTP_PROVIDER_URL --wsProviderUrl $WS_PROVIDER_URL --providerType="" ${ETH1_EXTRA_ARGS}

fi

Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ if [ "$CLIENT" = "lighthouse" ]; then
CMD="$CMD --target-peers $ETH2_MAX_PEERS"
fi

<<<<<<< HEAD
exec ${CMD} ${ETH2_EXTRA_ARGS}
=======
if [ "$ENABLE_METRICS" -eq "1" ]; then
CMD="$CMD --metrics --metrics-address 0.0.0.0 --metrics-port $ETH2_METRICS_PORT --validator-monitor-auto"
fi

exec ${CMD}
>>>>>>> master

fi

Expand All @@ -45,7 +49,7 @@ if [ "$CLIENT" = "nimbus" ]; then
fi

# Graffiti breaks if it's in the CMD string instead of here because of spaces
exec ${CMD} --graffiti="$GRAFFITI"
exec ${CMD} --graffiti="$GRAFFITI" ${ETH2_EXTRA_ARGS}

fi

Expand All @@ -70,7 +74,7 @@ if [ "$CLIENT" = "prysm" ]; then
CMD="$CMD --disable-monitoring"
fi

exec ${CMD}
exec ${CMD} ${ETH2_EXTRA_ARGS}

fi

Expand All @@ -88,6 +92,6 @@ if [ "$CLIENT" = "teku" ]; then
CMD="$CMD --metrics-enabled=true --metrics-interface=0.0.0.0 --metrics-port=$ETH2_METRICS_PORT --metrics-host-allowlist=*"
fi

exec ${CMD}
exec ${CMD} ${ETH2_EXTRA_ARGS}

fi
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if [ "$CLIENT" = "lighthouse" ]; then
CMD="$CMD --metrics --metrics-address 0.0.0.0 --metrics-port $VALIDATOR_METRICS_PORT"
fi

exec ${CMD} --graffiti "$GRAFFITI"
exec ${CMD} --graffiti "$GRAFFITI" ${VALIDATOR_EXTRA_ARGS}

fi

Expand Down Expand Up @@ -49,7 +49,7 @@ if [ "$CLIENT" = "prysm" ]; then
CMD="$CMD --disable-account-metrics"
fi

exec ${CMD} --graffiti "$GRAFFITI"
exec ${CMD} --graffiti "$GRAFFITI" ${VALIDATOR_EXTRA_ARGS}

fi

Expand All @@ -63,7 +63,7 @@ if [ "$CLIENT" = "teku" ]; then
CMD="$CMD --metrics-enabled=true --metrics-interface=0.0.0.0 --metrics-port=$VALIDATOR_METRICS_PORT --metrics-host-allowlist=*"
fi

exec ${CMD} --validators-graffiti="$GRAFFITI"
exec ${CMD} --validators-graffiti="$GRAFFITI" ${VALIDATOR_EXTRA_ARGS}

fi

3 changes: 3 additions & 0 deletions arm64/rp-smartnode-install/network/prater/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ services:
- GETH_CACHE_SIZE=${GETH_CACHE_SIZE}
- GETH_MAX_PEERS=${GETH_MAX_PEERS}
- ETH1_P2P_PORT=${ETH1_P2P_PORT}
- ETH1_EXTRA_ARGS=${ETH1_EXTRA_ARGS}
entrypoint: sh
command: "/setup/start-node.sh"
eth2:
Expand Down Expand Up @@ -51,6 +52,7 @@ services:
- ETH2_MAX_PEERS=${ETH2_MAX_PEERS}
- ENABLE_METRICS=${ENABLE_METRICS}
- ETH2_METRICS_PORT=${ETH2_METRICS_PORT}
- ETH2_EXTRA_ARGS=${ETH2_EXTRA_ARGS}
entrypoint: sh
command: "/setup/start-beacon.sh"
depends_on:
Expand All @@ -73,6 +75,7 @@ services:
- ROCKET_POOL_VERSION=${ROCKET_POOL_VERSION}
- ENABLE_METRICS=${ENABLE_METRICS}
- VALIDATOR_METRICS_PORT=${VALIDATOR_METRICS_PORT}
- VALIDATOR_EXTRA_ARGS=${VALIDATOR_EXTRA_ARGS}
entrypoint: sh
command: "/setup/start-validator.sh"
depends_on:
Expand Down