-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add Nethermind #329
Open
stdevMac
wants to merge
40
commits into
base-org:main
Choose a base branch
from
NethermindEth:feat/add_nethermind
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add Nethermind #329
Changes from 7 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
fb6630c
feat: add nethermind to base
stdevMac 2805814
feat: add supported clients to readme
stdevMac 6d69a82
fix: add missing flags on nethermind config
stdevMac 0c9c0d0
Update version
benaadams a66f08f
Update commit
benaadams d03608d
Update commit
benaadams 1018327
Update nethermind/Dockerfile
benaadams bbab781
feat: add qemu to nethermind docker build
stdevMac d6a8829
Merge pull request #1 from NethermindEth/feat/add_nethermind
stdevMac 7188de1
fix: update release/1.29.0 commit
stdevMac 0889f2b
Merge pull request #2 from NethermindEth/feat/add_nethermind
stdevMac 85c9f6b
fix: build on nethermind
stdevMac a926e31
Merge pull request #3 from NethermindEth/feat/add_nethermind
stdevMac 5140551
fix: build on nethermind, buildx command
stdevMac 642d542
Merge pull request #4 from NethermindEth/feat/add_nethermind
stdevMac f2feba6
fix: build on nethermind, labels breaking buildx
stdevMac 70cc93e
Merge pull request #5 from NethermindEth/feat/add_nethermind
stdevMac fa24cec
fix: build on nethermind, labels breaking buildx again
stdevMac ce8149c
Merge pull request #6 from NethermindEth/feat/add_nethermind
stdevMac 52f7c07
fix: build on nethermind, buildx
stdevMac 94c66df
Merge pull request #7 from NethermindEth/feat/add_nethermind
stdevMac 4acf6e1
fix: build on nethermind, buildx labels
stdevMac 2d1df56
Merge pull request #8 from NethermindEth/feat/add_nethermind
stdevMac 313cc0a
fix: build on nethermind, buildx labels, now as cmd
stdevMac b869967
Merge pull request #9 from NethermindEth/feat/add_nethermind
stdevMac d5528dd
fix: build on nethermind, buildx labels
stdevMac 9ffcd44
Merge pull request #10 from NethermindEth/feat/add_nethermind
stdevMac b277f17
fix: update with sed targetarch
stdevMac 09e009e
Merge pull request #11 from NethermindEth/feat/add_nethermind
stdevMac 531d0e0
fix: upgrade build action on nethermind to use buildx
stdevMac 2863682
Merge pull request #12 from NethermindEth/feat/add_nethermind
stdevMac 8a051cd
fix: update dockerfile
stdevMac b340a7f
Merge pull request #14 from NethermindEth/feat/add_nethermind
stdevMac 937e206
fix: update commit release 1.29.0
stdevMac 9fd1617
Merge pull request #15 from NethermindEth/feat/add_nethermind
stdevMac 0eaafdf
fix: update commit release 1.29.0 and solve docker build issues
benaadams 7f028a0
fix: update pr action
stdevMac db7b3f4
feat: add workflow dispatch
stdevMac 7f99fbe
feat: update nethermind to latest version
stdevMac af3625e
Merge remote-tracking branch 'neth/main' into feat/add_nethermind
stdevMac File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,49 @@ | ||
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-noble AS build | ||
|
||
ARG BUILD_CONFIG=release | ||
ARG TARGETARCH | ||
|
||
WORKDIR /app | ||
|
||
ENV REPO=https://github.com/NethermindEth/nethermind.git | ||
ENV VERSION=1.29.0 | ||
ENV COMMIT=917f5349517118bf5c73c362c3902d61e68e5b40 | ||
RUN git clone $REPO --branch release/$VERSION --single-branch . && \ | ||
git switch -c branch-$VERSION && \ | ||
bash -c '[ "$(git rev-parse HEAD)" = "$COMMIT" ]' | ||
|
||
RUN arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \ | ||
dotnet publish src/Nethermind/Nethermind.Runner -c $BUILD_CONFIG -a $arch -o /publish --sc false | ||
|
||
|
||
FROM mcr.microsoft.com/dotnet/aspnet:8.0-noble | ||
|
||
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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we depend on a tagged commit rather than a branch (perhaps when the
1.29.0
release is tagged)? Otherwise new commits on that branch will break the build.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, shipping this week likely
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to switch to tag rather than branch