-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add nethermind to base * feat: add supported clients to readme * fix: add missing flags on nethermind config * Update version * Update commit * Update commit * Update nethermind/Dockerfile Co-authored-by: Michael de Hoog <[email protected]> * feat: add qemu to nethermind docker build * fix: update release/1.29.0 commit * fix: build on nethermind * fix: build on nethermind, buildx command * fix: build on nethermind, labels breaking buildx * fix: build on nethermind, labels breaking buildx again * fix: build on nethermind, buildx * fix: build on nethermind, buildx labels * fix: build on nethermind, buildx labels, now as cmd * fix: build on nethermind, buildx labels * fix: update with sed targetarch * fix: upgrade build action on nethermind to use buildx * fix: update dockerfile * fix: update commit release 1.29.0 * fix: update commit release 1.29.0 and solve docker build issues * fix: update pr action * feat: add workflow dispatch * feat: update nethermind to latest version * Update docker.yml * Update Nethermind version * More explicit version for base .NET container * Less explicit version for runtime * Remove Qemu pr.yml * Update docker.yml * Update pr.yml --------- Co-authored-by: Ben Adams <[email protected]> Co-authored-by: Michael de Hoog <[email protected]>
- Loading branch information
1 parent
c41489f
commit f038903
Showing
9 changed files
with
196 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
geth-data/ | ||
reth-data/ | ||
nethermind-data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/.idea/ | ||
/geth-data/ | ||
/reth-data/ | ||
/nethermind-data/ | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
FROM golang:1.21 AS op | ||
|
||
WORKDIR /app | ||
|
||
ENV REPO=https://github.com/ethereum-optimism/optimism.git | ||
ENV VERSION=v1.9.1 | ||
ENV COMMIT=4797ddb70e05d4952685bad53e608cb5606284e6 | ||
RUN git clone $REPO --branch op-node/$VERSION --single-branch . && \ | ||
git switch -c branch-$VERSION && \ | ||
bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' | ||
|
||
RUN cd op-node && \ | ||
make VERSION=$VERSION op-node | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:8.0.403-noble AS build | ||
|
||
ARG BUILD_CONFIG=release | ||
ARG TARGETARCH | ||
|
||
WORKDIR /app | ||
|
||
ENV REPO=https://github.com/NethermindEth/nethermind.git | ||
ENV VERSION=1.29.1 | ||
ENV COMMIT=dfea52404006c6ce1b133b98f324dbfcb62773e1 | ||
RUN git clone $REPO --branch $VERSION --single-branch . && \ | ||
git switch -c $VERSION | ||
RUN bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' | ||
RUN TARGETARCH=${TARGETARCH#linux/} && \ | ||
arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \ | ||
echo "Using architecture: $arch" && \ | ||
dotnet publish src/Nethermind/Nethermind.Runner -c $BUILD_CONFIG -a $arch -o /publish --sc false | ||
|
||
|
||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y jq curl supervisor && \ | ||
rm -rf /var/lib/apt/lists | ||
|
||
RUN mkdir -p /var/log/supervisor | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=build /publish ./ | ||
COPY --from=op /app/op-node/bin/op-node ./ | ||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf | ||
COPY nethermind/nethermind-entrypoint ./execution-entrypoint | ||
COPY op-node-entrypoint . | ||
|
||
CMD ["/usr/bin/supervisord"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/bin/bash | ||
set -eu | ||
|
||
# Default configurations | ||
NETHERMIND_DATA_DIR=${NETHERMIND_DATA_DIR:-/data} | ||
NETHERMIND_LOG_LEVEL=${NETHERMIND_LOG_LEVEL:-Info} | ||
NETWORK=${NETWORK:-mainnet} | ||
|
||
RPC_PORT="${RPC_PORT:-8545}" | ||
WS_PORT="${WS_PORT:-8546}" | ||
AUTHRPC_PORT="${AUTHRPC_PORT:-8551}" | ||
METRICS_PORT="${METRICS_PORT:-6060}" | ||
DISCOVERY_PORT="${DISCOVERY_PORT:-30303}" | ||
|
||
JWT_SECRET_FILE=${JWT_SECRET_FILE:-/tmp/jwt/jwtsecret} | ||
ADDITIONAL_ARGS="" | ||
|
||
# Check if required variables are set | ||
if [[ -z "$NETWORK" ]]; then | ||
echo "Expected NETWORK to be set" 1>&2 | ||
exit 1 | ||
fi | ||
|
||
# Create necessary directories | ||
mkdir -p "$NETHERMIND_DATA_DIR" | ||
|
||
# Write the JWT secret | ||
if [[ -z "${OP_NODE_L2_ENGINE_AUTH_RAW:-}" ]]; then | ||
echo "Expected OP_NODE_L2_ENGINE_AUTH_RAW to be set" 1>&2 | ||
exit 1 | ||
fi | ||
echo "$OP_NODE_L2_ENGINE_AUTH_RAW" > "$OP_NODE_L2_ENGINE_AUTH" | ||
|
||
# Additional arguments based on environment variables | ||
if [ "${OP_NETHERMIND_BOOTNODES+x}" = x ]; then | ||
ADDITIONAL_ARGS="$ADDITIONAL_ARGS --Network.Bootnodes=$OP_NETHERMIND_BOOTNODES" | ||
fi | ||
|
||
if [[ -n "${OP_NETHERMIND_ETHSTATS_ENABLED:-}" ]]; then | ||
ADDITIONAL_ARGS="$ADDITIONAL_ARGS --EthStats.Enabled=$OP_NETHERMIND_ETHSTATS_ENABLED" | ||
fi | ||
|
||
if [[ -n "${OP_NETHERMIND_ETHSTATS_ENDPOINT:-}" ]]; then | ||
ADDITIONAL_ARGS="$ADDITIONAL_ARGS --EthStats.NodeName=${OP_NETHERMIND_ETHSTATS_NODE_NAME:-NethermindNode} --EthStats.Endpoint=$OP_NETHERMIND_ETHSTATS_ENDPOINT" | ||
fi | ||
|
||
# Execute Nethermind | ||
exec ./nethermind \ | ||
--config="$OP_NODE_NETWORK" \ | ||
--datadir="$NETHERMIND_DATA_DIR" \ | ||
--Optimism.SequencerUrl=$OP_SEQUENCER_HTTP \ | ||
--log="$NETHERMIND_LOG_LEVEL" \ | ||
--JsonRpc.Enabled=true \ | ||
--JsonRpc.Host=0.0.0.0 \ | ||
--JsonRpc.WebSocketsPort="$WS_PORT" \ | ||
--JsonRpc.Port="$RPC_PORT" \ | ||
--JsonRpc.JwtSecretFile="$OP_NODE_L2_ENGINE_AUTH" \ | ||
--JsonRpc.EngineHost=0.0.0.0 \ | ||
--JsonRpc.EnginePort="$AUTHRPC_PORT" \ | ||
--HealthChecks.Enabled=true \ | ||
--Metrics.Enabled=true \ | ||
--Metrics.ExposePort="$METRICS_PORT" \ | ||
$ADDITIONAL_ARGS |