Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into bugfix/4848-Correct…
Browse files Browse the repository at this point in the history
…-usage-of-chain-and-network-ids
  • Loading branch information
flcl42 committed Jan 11, 2023
2 parents ad149b5 + 193c1c3 commit 6968572
Show file tree
Hide file tree
Showing 1,192 changed files with 3,172 additions and 14,030 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

file_header_template = SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited\nSPDX-License-Identifier: LGPL-3.0-only
file_header_template = SPDX-FileCopyrightText: 2023 Demerzel Solutions Limited\nSPDX-License-Identifier: LGPL-3.0-only

###############################
# Other file type settings #
Expand Down
66 changes: 36 additions & 30 deletions .github/workflows/release-nethermind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jobs:
BUILD_TIMESTAMP: ${{ steps.build-runner.outputs.BUILD_TIMESTAMP }}
COMMIT_HASH: ${{ steps.build-runner.outputs.COMMIT_HASH }}
PACKAGE_PREFIX: ${{ steps.archive.outputs.PACKAGE_PREFIX }}
PRERELEASE: ${{ steps.build-runner.outputs.PRERELEASE }}
steps:
- name: Check out Nethermind repository
uses: actions/checkout@v3
with:
submodules: recursive
path: nethermind
ref: ${{ github.event.inputs.tag }}
- name: Check out Nethermind Launcher repository
Expand Down Expand Up @@ -60,14 +60,15 @@ jobs:
echo "BUILD_TIMESTAMP=$build_timestamp" >> $GITHUB_OUTPUT
echo "COMMIT_HASH=$commit_hash" >> $GITHUB_OUTPUT
echo "COMMIT_HASH_SHORT=$(echo $commit_hash | awk '{print substr($0,0,8);}')" >> $GITHUB_OUTPUT
echo "PRERELEASE=${{ contains(github.event.inputs.tag, '-') }}" >> $GITHUB_OUTPUT
$SCRIPTS_PATH/build-runner.sh ${{ github.event.inputs.tag }} $commit_hash $build_timestamp
- name: Build Nethermind.Cli
run: $SCRIPTS_PATH/build-cli.sh ${{ github.event.inputs.tag }} ${{ steps.build-runner.outputs.COMMIT_HASH }} ${{ steps.build-runner.outputs.BUILD_TIMESTAMP }}
- name: Build Nethermind.Launcher
run: $SCRIPTS_PATH/build-launcher.sh
- name: Build Nethermind.Launcher for Linux arm64
working-directory: nethermind
run: |
cd nethermind
docker buildx build --platform=linux/arm64 -t tmp-launcher -f Dockerfile.launcher . --load
docker run --platform=linux/arm64 -v $PWD:/opt/mount --rm tmp-launcher bash -c "cp /nethermind/Nethermind.Launcher /opt/mount/"
mv Nethermind.Launcher $GITHUB_WORKSPACE/$PUB_DIR/linux-arm64/Nethermind.Launcher
Expand All @@ -85,11 +86,23 @@ jobs:
${{ github.workspace }}/${{ env.PACKAGE_DIR }}/
${{ env.SCRIPTS_PATH }}/
key: packages-${{ steps.build-runner.outputs.COMMIT_HASH }}

approval:
name: Approve
runs-on: ubuntu-latest
needs: build
environment:
name: Releases
url: https://github.com/NethermindEth/nethermind/releases/tag/${{ github.event.inputs.tag }}
steps:
- name: Wait for approval
run: echo "Waiting for approval..."

update-homebrew:
name: Update Homebrew to the latest version
name: Update Homebrew formula
runs-on: ubuntu-latest
needs: build
needs: [approval, build]
if: needs.build.outputs.PRERELEASE == 'false'
steps:
- name: Restore packages from cache
uses: actions/cache@v3
Expand All @@ -103,7 +116,7 @@ jobs:
with:
repository: NethermindEth/homebrew-nethermind
path: homebrew-nethermind
- name: Update Homebrew file
- name: Update formula file
env:
PACKAGE_PREFIX: ${{ needs.build.outputs.PACKAGE_PREFIX }}
VERSION: ${{ github.event.inputs.tag }}
Expand All @@ -121,28 +134,18 @@ jobs:
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.REPOSITORY_DISPATCH_TOKEN }}
commit-message: Update Homebrew to latest release
commit-message: Update Homebrew formula
title: '[Release] Update Homebrew'
reviewers: falcoxyz, AntiD2ta, matilote
draft: false
path: homebrew-nethermind
add-paths: |
nethermind.rb
trigger-publish:
name: Trigger publish event to different sources
runs-on: ubuntu-latest
needs: update-homebrew
environment:
name: Releases
url: https://github.com/NethermindEth/nethermind/releases/tag/${{ github.event.inputs.tag }}
steps:
- run: echo "Just a middle-man job"

publish-github:
name: Publish packages to GitHub Releases
name: Publish to GitHub
runs-on: ubuntu-latest
needs: trigger-publish
needs: [approval, build]
steps:
- name: Restore packages from cache
uses: actions/cache@v3
Expand All @@ -157,12 +160,14 @@ jobs:
GIT_TAG: ${{ github.event.inputs.tag }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PACKAGE_PREFIX: ${{ needs.build.outputs.PACKAGE_PREFIX }}
PRERELEASE: ${{ needs.build.outputs.PRERELEASE }}
run: $SCRIPTS_PATH/publish-github.sh

publish-downloads:
name: Publish packages to Downloads page
name: Publish to Downloads page
runs-on: ubuntu-latest
needs: trigger-publish
needs: [approval, build]
if: needs.build.outputs.PRERELEASE == 'false'
steps:
- name: Restore packages from cache
uses: actions/cache@v3
Expand All @@ -184,17 +189,16 @@ jobs:
run: $SCRIPTS_PATH/publish-downloads.sh

publish-dockers:
name: Publish Docker images to Docker Hub
name: Publish to Docker Hub
runs-on: ubuntu-latest
needs: trigger-publish
needs: [approval, build]
env:
DOCKER_IMAGE: nethermind/nethermind
steps:
- name: Check out Nethermind repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.tag }}
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
Expand All @@ -204,24 +208,25 @@ jobs:
if: success()
run: |
echo "${{ secrets.DOCKER_ACCESS_TOKEN }}" | docker login --username "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Build and push image to Docker registry (major) / trigger DAppNode build
if: ${{ !contains(github.event.inputs.tag, '-') }}
- name: Build and push image to Docker Hub / Trigger DAppNode build
if: needs.build.outputs.PRERELEASE == 'false'
run: |
docker buildx build --platform=linux/amd64,linux/arm64 -t "${{ env.DOCKER_IMAGE }}:latest" -t "${{ env.DOCKER_IMAGE }}:${{ github.event.inputs.tag }}" -f Dockerfile --build-arg COMMIT_HASH=${{ needs.build.outputs.COMMIT_HASH }} --build-arg BUILD_TIMESTAMP=${{ needs.build.outputs.BUILD_TIMESTAMP }} . --push
curl -s -X POST -u "${{ secrets.REPOSITORY_DISPATCH_TOKEN }}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" -d '{"event_type":"dappnode","client_payload":{"tag":"${{ github.event.inputs.tag }}"}}' https://api.github.com/repos/$GITHUB_REPOSITORY/dispatches
- name: Build and push image to Docker registry (patch)
if: ${{ contains(github.event.inputs.tag, '-') }}
- name: Build and push image to Docker Hub
if: needs.build.outputs.PRERELEASE == 'true'
run: |
docker buildx build --platform=linux/amd64,linux/arm64 -t "${{ env.DOCKER_IMAGE }}:${{ github.event.inputs.tag }}" -f Dockerfile --build-arg COMMIT_HASH=${{ needs.build.outputs.COMMIT_HASH }} --build-arg BUILD_TIMESTAMP=${{ needs.build.outputs.BUILD_TIMESTAMP }} . --push
docker buildx build --platform=linux/amd64,linux/arm64 -t "${{ env.DOCKER_IMAGE }}:unstable" -t "${{ env.DOCKER_IMAGE }}:${{ github.event.inputs.tag }}" -f Dockerfile --build-arg COMMIT_HASH=${{ needs.build.outputs.COMMIT_HASH }} --build-arg BUILD_TIMESTAMP=${{ needs.build.outputs.BUILD_TIMESTAMP }} . --push
- name: Clear Docker cache
if: always()
run: |
rm -f $HOME/.docker/config.json
publish-ppa:
name: Publish Nethermind to PPA repository
name: Publish to PPA
runs-on: ubuntu-latest
needs: trigger-publish
needs: [approval, build]
if: needs.build.outputs.PRERELEASE == 'false'
env:
PPA_GPG_KEYID: ${{ secrets.PPA_GPG_KEYID }}
VERSION: ${{ github.event.inputs.tag }}
Expand All @@ -244,6 +249,7 @@ jobs:
uses: actions/checkout@v3
with:
path: nethermind
ref: ${{ github.event.inputs.tag }}
- name: Publish to PPA
run: |
chmod +x $SCRIPTS_PATH/publish-ppa.sh
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
path = src/bench_precompiles
url = https://github.com/shamatar/bench_precompiles.git
[submodule "gitbook/docs"]
path = gitbook/docs
path = src/Nethermind/Nethermind.GitBook/docs
url = https://github.com/NethermindEth/docs.git
[submodule "src/ethereum-tests"]
path = src/ethereum-tests
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Branch names must follow `snake_case` pattern. Follow the pattern `<projectIfAny
The following notice must be included as a header in all source files if possible.

```
// SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited
// SPDX-FileCopyrightText: 2023 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only
```

Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
[![Tests](https://github.com/nethermindeth/nethermind/actions/workflows/run-nethermind-tests.yml/badge.svg)](https://github.com/nethermindeth/nethermind/actions/workflows/run-nethermind-tests.yml)
[![Chat on Discord](https://img.shields.io/discord/629004402170134531?style=social&logo=discord)](https://discord.gg/GXJFaYk)
[![Follow us on Twitter](https://img.shields.io/twitter/follow/nethermindeth?style=social&label=Follow)](https://twitter.com/nethermindeth)
[![Ask on Discourse](https://img.shields.io/discourse/posts?style=social&label=Community&logo=discourse&server=https%3A%2F%2Fcommunity.nethermind.io)](https://community.nethermind.io/c/nethermind-client)

Nethermind is a high-performance, highly configurable full Ethereum protocol client built on .NET that runs on Linux, Windows, and macOS, and supports Clique, Aura, Ethash, and Proof-of-Stake consensus algorithms. Nethermind offers very fast sync speeds and support for external plug-ins. Enjoy reliable access to rich on-chain data thanks to high-performance JSON-RPC based on the Kestrel web server. Healthy node monitoring is secured with a Grafana dashboard and Seq enterprise logging.
Nethermind is a high-performance, highly configurable full Ethereum protocol execution client built on .NET that runs on Linux, Windows, and macOS, and supports Clique, Aura, and Ethash. Nethermind offers very fast sync speeds and support for external plugins. Enjoy reliable access to rich on-chain data thanks to high-performance JSON-RPC based on the Kestrel web server. Healthy node monitoring is secured with Grafana analytics and Seq logging.

## Documentation

Expand All @@ -24,14 +25,15 @@ Nethermind documentation is available at [docs.nethermind.io](https://docs.nethe

Release builds are available on the [Releases page](https://github.com/nethermindeth/nethermind/releases) and at [downloads.nethermind.io](https://downloads.nethermind.io).

#### Using PPA
#### On Linux using PPA

1. `sudo add-apt-repository ppa:nethermindeth/nethermind`
1. `sudo add-apt-repository ppa:nethermindeth/nethermind` \
If command not found: `sudo apt install software-properties-common`
2. `sudo apt install nethermind`
3. To run the launcher: `nethermind`
4. To run the runner: `nethermind -c mainnet`

#### Using Homebrew
#### On macOS using Homebrew

1. `brew tap nethermindeth/nethermind`
2. `brew install nethermind`
Expand All @@ -50,7 +52,7 @@ In case of any Docker image need to be updated in the repository, you can update
docker inspect --format='{{index .RepoDigests 0}}' <image_name>
```

The output must show the image digest, and then you can copy that output to the `FROM` tag in the Dockerfile.
The output should show the image digest, and then you can copy that to the `FROM` tag in the Dockerfile.

## Build from source

Expand All @@ -59,7 +61,6 @@ The output must show the image digest, and then you can copy that output to the
#### Windows

- [Install .NET](https://dotnet.microsoft.com/en-us/download?initial-os=windows)
- For some versions of Windows, you may need to install [Visual C++ Redistributable](https://docs.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist).

#### macOS

Expand Down
44 changes: 0 additions & 44 deletions benchmarking/benchmark.sh

This file was deleted.

Loading

0 comments on commit 6968572

Please sign in to comment.