Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 6c9309c
Author: Ruben Buniatyan <rubo@users.noreply.github.com>
Date:   Thu Jan 4 23:14:46 2024 +0100

    Fix solution builds and add debug build configuration (#6456)

commit 4cb9a94
Author: Kamil Chodoła <43241881+kamilchodola@users.noreply.github.com>
Date:   Thu Jan 4 20:54:08 2024 +0100

    Bump version to 1.26.0-unstable (#6443)

    * Bump version to 1.25.0

    * Change already to 1.26.0

    ---------

    Co-authored-by: Kamil Chodoła <kamil@nethermind.io>

commit 61245df
Author: Ben Adams <thundercat@illyriad.co.uk>
Date:   Thu Jan 4 14:43:09 2024 +0000

    Use the empty account cache as cache (#6452)

    * Use the empty account cache as cache

    * Rename

commit a7cbe27
Author: Marcin Sobczak <77129288+marcindsobczak@users.noreply.github.com>
Date:   Thu Jan 4 10:32:12 2024 +0100

    Fix `BlobGasUsed` and `ExcessBlobGas` in Cancun genesis (#6446)

    * try hotfix

    * try with default 0

    * another approach

    * try

    * requested simplification

commit ab3711c
Author: Ahmad Bitar <33181301+smartprogrammer93@users.noreply.github.com>
Date:   Thu Jan 4 11:28:31 2024 +0300

    fix debug build (#6447)

commit 95d966c
Author: Kamil Chodoła <43241881+kamilchodola@users.noreply.github.com>
Date:   Wed Jan 3 17:46:02 2024 +0100

    Fix checkout paths (#6451)

    Co-authored-by: Kamil Chodoła <kamil@nethermind.io>

commit 805f942
Author: Kamil Chodoła <43241881+kamilchodola@users.noreply.github.com>
Date:   Wed Jan 3 17:10:18 2024 +0100

    Fix permission on build files (#6450)

    Co-authored-by: Kamil Chodoła <kamil@nethermind.io>

commit 299d3c6
Author: Kamil Chodoła <43241881+kamilchodola@users.noreply.github.com>
Date:   Wed Jan 3 16:34:52 2024 +0100

    Fix Release Action (#6449)

commit 0e6ffe7
Author: Ben Adams <thundercat@illyriad.co.uk>
Date:   Wed Jan 3 08:02:40 2024 +0000

    Return to NoGCRegion now runtime bug is fixed (#6381)

    * Return to NoGCRegion now runtime bug is fixed

    * Remove other comment

commit 292acdd
Author: Ben Adams <thundercat@illyriad.co.uk>
Date:   Wed Jan 3 07:01:54 2024 +0000

    Speed up trie node traversal (#6436)

commit d3c0443
Author: Ben Adams <thundercat@illyriad.co.uk>
Date:   Wed Jan 3 06:59:20 2024 +0000

    Gas price estimation as float (#6445)

commit cbc3e67
Author: Amirul Ashraf <asdacap@gmail.com>
Date:   Tue Jan 2 22:16:21 2024 +0800

    Fix/flush on snap finish (#6444)

    * Flush on snap finish

    * Added test

commit a3caae8
Author: Ruben Buniatyan <rubo@users.noreply.github.com>
Date:   Tue Jan 2 12:25:31 2024 +0100

    Update packages (#6437)

    * Update packages

    * Update packages

    * Update line endings

commit 7bb1a4d
Author: Ruben Buniatyan <rubo@users.noreply.github.com>
Date:   Tue Jan 2 01:06:10 2024 +0100

    Update file header (#6442)

commit 6f2698c
Author: Nikita Mescheryakov <root@nikitam.io>
Date:   Mon Jan 1 21:13:10 2024 +0300

    Optimism canyon (#6374)

    * Receipts

    * Create2Deployer

    * Fix null value

    * Refactor 1559

    * Canyon eip 1559

    * Refactor

    * MarkAsFailed

    * Revert TxProcessor

    * Fix tests

    * Fix tests

    * decoder

    * Fix configs

    * base-goerli regolith timestamp

    * Fix elasticity multiplier

    * Check tx type

commit 344c568
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Mon Jan 1 11:00:30 2024 +0100

    Updating Fast Sync config files (#6441)

    Co-authored-by: LukaszRozmej <LukaszRozmej@users.noreply.github.com>

commit 087b06a
Author: Ben Adams <thundercat@illyriad.co.uk>
Date:   Fri Dec 29 23:49:48 2023 +0000

    Remove db throttling (#6438)

commit c4767a4
Author: Ahmad Bitar <33181301+smartprogrammer93@users.noreply.github.com>
Date:   Fri Dec 29 19:18:11 2023 +0300

    [Fix] Potential fix to missing tx index sometimes (related to reorgs) (#6422)

    * fixes

    * update unit tests to reflect reorg

    ---------

    Co-authored-by: Ahmad Mazen Radwan Bitar <am.bitar@diyarme.com>

commit 6a9c76d
Author: Marek Moraczyński <marekm2504@gmail.com>
Date:   Fri Dec 29 16:44:14 2023 +0100

    Fixed FinalTotalDifficulty based on genesis (#6435)

    * Fixed FinalTotalDifficulty based on genesis

    * Fix whitespace

    * Fix test setup

commit f601ede
Author: Ben Adams <thundercat@illyriad.co.uk>
Date:   Fri Dec 29 05:11:17 2023 +0000

    Make CappedArray readonly (#6434)

commit 075365a
Author: Ben Adams <thundercat@illyriad.co.uk>
Date:   Thu Dec 28 23:08:43 2023 +0000

    Reduce lock contention (#6417)

    * Reduce TxPool lock contention

    * Reduce lock contention with added spice

    * Use McsLock for LruCache

    * Whitespace

    * Calculate hashes in parallel

    * Name clash with extension and invalid round trip check

    * Add tests

    * Fix

    * Use monitor signalling to wake up sleeping threads

    * Additional comments

    * throttle db read/writes

    * Less contention on the priority lock

    * Whitespace

    * Boost forkchoice

commit d8debc6
Author: Lautaro Emanuel <31224949+emlautarom1@users.noreply.github.com>
Date:   Thu Dec 28 16:37:17 2023 -0300

    Fix node restart on `gnosis-cancun` (#6423)

    * first draft

    * add more things

    * fix metric

    * fix

    * add tests

    * add serializers and tests

    * simplification

    * adjust network and rpc tests

    * post-merge fixes

    * enable eth68

    * adjust tests

    * fix

    * Use blob gas instead of count

    * Shuffle 4844 constants, add GetMaxBlobsPerBlock

    * Replace `Keccak` with `Hash256`

    * fix PeerInfoExtensions

    * fix StateSyncDownloader

    * fix GetNodeDataTrieNodeRecovery

    * improve switching capabilities

    * `WasProcessed = true` for Genesis `BlockInfo`

    * Add tests

    ---------

    Co-authored-by: Marcin Sobczak <marcindsobczak@gmail.com>
    Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>
    Co-authored-by: Alexey Osipov <me@flcl.me>

commit 2a66d41
Author: Amirul Ashraf <asdacap@gmail.com>
Date:   Thu Dec 28 22:22:28 2023 +0800

    Fix metric not working (#6432)

commit c81d577
Author: Marek Moraczyński <marekm2504@gmail.com>
Date:   Thu Dec 28 14:49:34 2023 +0100

    Fix TotalDifficulty for post-merge networks in genesis (#6407)

    * Fix TotalDifficulty for post-merge devnets

    * Fix whitespaces

    * test fixes

commit dd613af
Author: Marcin Sobczak <77129288+marcindsobczak@users.noreply.github.com>
Date:   Thu Dec 28 14:46:09 2023 +0100

    Update configs tests, add FastSyncCatchUpHeightDelta for holesky (#6431)

    * adjust config tests

    * add high FastSyncCatchUpHeightDelta for holesky

    * fix one more test

commit fe807bb
Author: Marcin Sobczak <77129288+marcindsobczak@users.noreply.github.com>
Date:   Thu Dec 28 11:54:35 2023 +0100

    Enable blob txs support in goerli configs (#6430)

    * enable blob support for goerli

    * add config test

commit 2402d5a
Author: Lukasz Rozmej <lukasz.rozmej@gmail.com>
Date:   Thu Dec 28 11:40:47 2023 +0100

    fix memory guard and slice (#6396)

    * fix memory guard and slice

    * Trim or pad variable length bytes (as Geth does)

    * fix ArgumentException

    * whitespace

commit ada8cc9
Author: Amirul Ashraf <asdacap@gmail.com>
Date:   Thu Dec 28 17:39:11 2023 +0800

    Reimplement KestrelMetricServer (#6429)

commit be00812
Author: Amirul Ashraf <asdacap@gmail.com>
Date:   Thu Dec 28 17:13:06 2023 +0800

    Feature/exit on blocknumber (#6428)

    * Exit on block number

    * Some minor log

commit 2ad33cc
Author: Ahmad Bitar <33181301+smartprogrammer93@users.noreply.github.com>
Date:   Thu Dec 28 11:45:40 2023 +0300

    [Cancun]{Spec} Goerli config and fix for `ChainSpecBasedSpecProvider` (#6409)

    * init

    * format

    * format

    * Empty-Commit

    * make tests granular

    * Remove timestamp consecutive block transition. Keep first timestamp transition past block.

    * change approach to test fix

    * fixes

    * fix future fork info

    * Fully separate block forks from timtestamp ones (#6419)

    ---------

    Co-authored-by: lukasz.rozmej <lukasz.rozmej@gmail.com>
    Co-authored-by: MarekM25 <marekm2504@gmail.com>
    Co-authored-by: Alexey <me@flcl.me>

commit 0ad72e9
Author: Ben Adams <thundercat@illyriad.co.uk>
Date:   Wed Dec 27 16:39:14 2023 +0000

    Don't use exceptions for flow control during sync (#6425)

    * Don't use exceptions for flow control during sync

    * Fix header caching

    * Fix time reporting

    * Better progress time

commit 7e6c340
Author: Ben Adams <thundercat@illyriad.co.uk>
Date:   Wed Dec 27 09:39:01 2023 +0000

    Update Chain size test (#6426)

commit 8fa3263
Author: Marcin Sobczak <77129288+marcindsobczak@users.noreply.github.com>
Date:   Wed Dec 27 10:26:37 2023 +0100

    Blob txs reorgs (#6254)

    * add column for processed txs

    * add feature of returning keys only

    * adjust BlobTxStorage

    * cosmetics

    * add logic for storing processed blob txs and removing finalized

    * rename

    * fix

    * add tests

    * cosmetics

    * add sender recovery for reorganized blob txs

    * requested change

    * one more place

    * postmerge fix

    * fix saving of processed blob txs

    * optimize saving processed txs

    * readd blob support config

    * fix whitespace

    * fix test

    * fix tests parallelism?

    * add more logs

    * fix blob txs metric

    * refactor BlobTxStorage

    * optimize collecting blob txs from processed block

    * Create IBlobTxStorage and separate blob specific methods from ITxStorage

    * use batch when cleaning processed txs db

    * fix

    * fix file encoding

    * fix init when blob support or reorgs disabled

    * fix signing test txs

    * add regression test

    * fix tests

    * one more regression test

    * post-merge fix

    * add test for readding reorganized blob txs

    * improve test

    * one more check in test

    * Remove unnecessary list

    Sleep -> Task in test

    * cosmetic

    * compress 3 bool flags to 1 enum

    * fix file encoding

    * fix whitespaces

    ---------

    Co-authored-by: lukasz.rozmej <lukasz.rozmej@gmail.com>

commit f3ed968
Author: Lautaro Emanuel <31224949+emlautarom1@users.noreply.github.com>
Date:   Tue Dec 26 11:09:44 2023 -0300

    Upgrade Kute (#6366)

    * Introduce filter limits

    - Filters can include optional limits

    * Report progress at the start

    - Fixes progress not updating

    * Initial response validator

    - Verifies that the response does not contain an 'error' field

    * Include more examples of filters and limits

    * Perform validation outside time measurement

    * Add 'TracerValidator'

    - Responses can be stored into a new file

    * Document 'TracerValidator'

    - Disabled by default
    - Response tracing is ignored in dry mode

    * Make config help text more consistent

    * Capitalize

    * Change name of tracing to verbose

    * Update README.md

    * Use `-r|--responses` to store responses

    * Invert condition

    - Append if file exists
    - Create one if not

    * Make 'IJsonRpcValidator' take also request into consideration

    * Validate 'NewPayload' responses using custom strategy

    - 'TracerValidator' is no longer a decorator

    * Separate 'ResponseTracer' from Validator

    - Tracer should be independent
    - Add File and Null tracers
    - Simplify services setup

    * Validate and trace batch responses

    * Add TickSucceeded

    * Add temp sampleSize

    * Tick succeeded on batches too

    * Use 'CompleteReservoir' for sampling

    - Removes need for hack/magic numbers

    * Remove whitespace

    * Remove `IAuth` from `NullJsonRpcSubmitter`

    ---------

    Co-authored-by: Kamil Chodoła <43241881+kamilchodola@users.noreply.github.com>
    Co-authored-by: Kamil Chodoła <kamil@nethermind.io>

commit 1df2cf4
Author: Ben Adams <thundercat@illyriad.co.uk>
Date:   Tue Dec 26 12:01:45 2023 +0000

    Remove duplicate calls to FindHeader in eth_getLogs (#6421)

    * Remove duplicate calls to FindHeader in eth_getLogs

    * Check cancellation token

    * Fix tests due to params change

commit 3fa5ba5
Author: Ben Adams <thundercat@illyriad.co.uk>
Date:   Tue Dec 26 08:50:53 2023 +0000

    Remove Duplicate call to TryGetPendingTransaction in RPC (#6420)

commit 02221a9
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Mon Dec 25 12:58:27 2023 +0100

    Updating Fast Sync config files (#6416)

    Co-authored-by: LukaszRozmej <LukaszRozmej@users.noreply.github.com>

commit 716a791
Author: Amirul Ashraf <asdacap@gmail.com>
Date:   Mon Dec 25 07:40:00 2023 +0800

    Fix double write during full pruning (#6415)

    * Fix double write during full pruning

    * Missed a null condition

commit 1c0ce55
Author: Ben Adams <thundercat@illyriad.co.uk>
Date:   Sun Dec 24 15:26:38 2023 +0000

    RateLimiter: Remove unneeded async statemachine (#6418)

    * RateLimiter: Remove unneeded async statemachine

    * Fix test

commit 3bd89b3
Author: Ruben Buniatyan <rubo@users.noreply.github.com>
Date:   Sat Dec 23 01:37:38 2023 +0100

    Fix POSDAO tests workflow (#6414)

commit aa6800c
Author: Ben Adams <thundercat@illyriad.co.uk>
Date:   Fri Dec 22 10:53:34 2023 +0000

    Fix unbounded memory growth in DoubleArrayConverter (#6412)

    * Fix unbounded memory growth in DoubleArrayConverter

    * Whitespace

commit bb1840f
Author: Ben Adams <thundercat@illyriad.co.uk>
Date:   Fri Dec 22 02:58:40 2023 +0000

    Throw less expensive exceptions from Evm (#6406)

    * Reduce Evm eceptions

    * Less exceptions

    * Less exceptions

    * Whitespace

    * Remove signed benchmark

    * Moar

commit b86383f
Author: Ben Adams <thundercat@illyriad.co.uk>
Date:   Fri Dec 22 00:20:27 2023 +0000

    Increase regex cache size (#6408)

commit 90416e5
Author: Ruben Buniatyan <rubo@users.noreply.github.com>
Date:   Thu Dec 21 23:57:12 2023 +0100

    Remove Nethermind launcher build (#6404)

commit 536e2f7
Author: Ruben Buniatyan <rubo@users.noreply.github.com>
Date:   Thu Dec 21 21:08:48 2023 +0100

    Revise and improve diagnostics Dockerfile (#6398)

commit 76c73a1
Author: Ayman Bouchareb <Ayman.bouchareb@outlook.fr>
Date:   Thu Dec 21 14:09:54 2023 +0100

    Add new RPC methods debug_getRawBlock, debug_getRawReceipts, debug_getRawHeader, debug_getRawTransaction (#6368)

    * Fix peer header when no peers to show (#4411)

    * Fix peer header when no peers to show

    * Only order once

    * Better fix maybe

    * Applying lukasz suggestion

    * Revise product version (#4322)

    * Replace submodules with packages (#4374)

    * Add optional argument Address in parity_pendingTransactions (#4413)

    * Add enough projects to build benchmark runner (#4431)

    * Fix peer header when no peers to show (#4411)

    * Fix peer header when no peers to show

    * Only order once

    * Better fix maybe

    * Applying lukasz suggestion

    * Revise product version (#4322)

    * Replace submodules with packages (#4374)

    * Add optional argument Address in parity_pendingTransactions (#4413)

    * Add enough projects to build benchmark runner (#4431)

    * Fix develop branch

    * Exit early on error (#4220)

    Exit early on error in steps except for step with "mustInitialize" set to false.

    * Fix peer header when no peers to show (#4411)

    * Fix peer header when no peers to show

    * Only order once

    * Better fix maybe

    * Applying lukasz suggestion

    * Revise product version (#4322)

    * Replace submodules with packages (#4374)

    * Add optional argument Address in parity_pendingTransactions (#4413)

    * Add enough projects to build benchmark runner (#4431)

    * Fix develop branch

    * Exit early on error (#4220)

    Exit early on error in steps except for step with "mustInitialize" set to false.

    * Changes to BlockForRPC class : Ignored Author field in JsonDeserialization

    * Changes to TransactionForRPC class : Ignored 'data' field in JsonDeserialization if null or empty, and Assigned ChainId from Signature.ChainId if tx.ChainId is null

    * Changes to [DebugBridge, IDebugBridge] files : Added utility functions to get Transactions and Receipts per block

    * Changes to [DebugRpcModule, IDebugRpcModule] files : Added missing debug Functions [getRawBlock, getRawBlockHeader, getRawReceipts, getRawTransaction]

    * Changes to TransactionForRPC class : Ignored 'data' field in JsonDeserialization if null or empty, and Assigned ChainId from Signature.ChainId if tx.ChainId is null

    * Changes to ProofConverter class : stripped leading zeros from value field, and stripped leading zeros while keeping lenght even in key

    * Changes to [DebugRpcModule, IDebugRpcModule] files : new Debug functions only accept Keccak inputs

    * Changes to [DebugRpcModule, IDebugRpcModule] files : fix getRawReceipts

    * Changes to [Rlp, ReceiptStorageDecoder] files : added parameterless constructor to RSD, and added a selector method to decorder in RLP

    * Changes to [ReceiptMessageDecoder] files : added IRlpObjectDecoder interface to RMD

    * Changes to [Rlp] files : changed Decoder selection strategy to depend on custom attribute

    * Changes to [DebugRpcModule] files : added custom RlpBehaviour to Rlp.Encode in debug_getRawReceipts

    * Changes to [EthRpcModule.cs] files : deactivated optimization for eth_createaAccessList

    * fix merge issues

    * fix failing tests

    * fixed ws
    removed added file

    * fix merge issue

    * revert script changes

    * remove non related changes from PR

    ---------

    Co-authored-by: smartprogrammer93 <33181301+smartprogrammer93@users.noreply.github.com>
    Co-authored-by: Ruben Buniatyan <rubo@users.noreply.github.com>
    Co-authored-by: Alexey <me@flcl.me>
    Co-authored-by: DCeleda <dceleda@hotmail.com>
    Co-authored-by: Amirul Ashraf <asdacap@gmail.com>
  • Loading branch information
ak88 committed Jan 5, 2024
1 parent 51b2871 commit bdb7254
Show file tree
Hide file tree
Showing 216 changed files with 3,997 additions and 1,342 deletions.
26 changes: 13 additions & 13 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

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

[*.cs]
indent_size = 4
Expand All @@ -34,31 +34,31 @@ dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case

dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =
dotnet_naming_symbols.interface.required_modifiers =

dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.required_modifiers =
dotnet_naming_symbols.types.required_modifiers =

dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =
dotnet_naming_symbols.non_field_members.required_modifiers =

# Naming styles

dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_style_operator_placement_when_wrapping = beginning_of_line
dotnet_style_coalesce_expression = true:suggestion
Expand Down Expand Up @@ -88,4 +88,4 @@ csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_var_for_built_in_types = true:silent
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_elsewhere = false:suggestion
csharp_style_var_elsewhere = false:suggestion
50 changes: 17 additions & 33 deletions .github/workflows/build-nethermind-packages.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,49 @@
name: Build Nethermind packages

on:
on:
workflow_dispatch:

jobs:
build:
name: Build Nethermind packages
runs-on: ubuntu-latest
env:
env:
PACKAGE_DIR: pkg
PACKAGE_RETENTION: 7
PUB_DIR: pub
steps:
- name: Check out Nethermind repository
- name: Check out repository
uses: actions/checkout@v4
with:
path: nethermind
- name: Check out Nethermind Launcher repository
uses: actions/checkout@v4
with:
repository: NethermindEth/nethermind.launcher
path: launcher
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: nethermind/global.json
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 14
- name: Install npm packages
run: npm i -g pkg @vercel/ncc
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Build Nethermind.Runner
id: build-runner
run: |
cd nethermind
build_timestamp=$(date '+%s')
echo "build-timestamp=$build_timestamp" >> $GITHUB_OUTPUT
echo "commit-hash=${GITHUB_SHA:0:8}" >> $GITHUB_OUTPUT
scripts/deployment/build-runner.sh $GITHUB_SHA $build_timestamp
- name: Build Nethermind.Cli
run: nethermind/scripts/deployment/build-cli.sh $GITHUB_SHA ${{ steps.build-runner.outputs.build-timestamp }}
- name: Build Nethermind launcher
run: nethermind/scripts/deployment/build-launcher.sh
- name: Build Nethermind launcher for Linux arm64
run: scripts/deployment/build-cli.sh $GITHUB_SHA ${{ steps.build-runner.outputs.build-timestamp }}
- name: Bundle Nethermind launcher
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
json=$(curl -s https://api.github.com/repos/nethermindeth/nethermind.launcher/releases/latest)
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux-x64"))')
curl -sSL $url -o $PUB_DIR/linux-x64/nethermind-launcher
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux-arm64"))')
curl -sSL $url -o $PUB_DIR/linux-arm64/nethermind-launcher
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("windows-x64"))')
curl -sSL $url -o $PUB_DIR/win-x64/nethermind-launcher.exe
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos-x64"))')
curl -sSL $url -o $PUB_DIR/osx-x64/nethermind-launcher
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos-arm64"))')
curl -sSL $url -o $PUB_DIR/osx-arm64/nethermind-launcher
- name: Archive packages
env:
PACKAGE_PREFIX: nethermind-preview-${{ steps.build-runner.outputs.commit-hash }}
run: |
echo "PACKAGE_PREFIX=$PACKAGE_PREFIX" >> $GITHUB_ENV
nethermind/scripts/deployment/archive-packages.sh
scripts/deployment/archive-packages.sh
- name: Upload Nethermind Linux x64 package
uses: actions/upload-artifact@v4
with:
Expand Down
32 changes: 7 additions & 25 deletions .github/workflows/build-solutions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,20 @@ on:
push:
branches: [master]

defaults:
run:
working-directory: src/Nethermind

env:
BUILD_CONFIG: release
DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION: 1
TERM: xterm

jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
config: [release, debug]
solution: [Nethermind, EthereumTests, Benchmarks]
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: true
- name: Install Linux packages
run: sudo apt-get update && sudo apt-get install libsnappy-dev
submodules: ${{ matrix.solution == 'EthereumTests' }}
- name: Set up .NET
uses: actions/setup-dotnet@v4
- name: Install dependencies
run: |
dotnet restore Nethermind.sln
dotnet restore EthereumTests.sln
dotnet restore Benchmarks.sln
- name: Build Nethermind.sln
run: dotnet build Nethermind.sln -c ${{ env.BUILD_CONFIG }} --no-restore
- name: Build EthereumTests.sln
run: dotnet build EthereumTests.sln -c ${{ env.BUILD_CONFIG }} --no-restore
- name: Build Benchmarks.sln
run: dotnet build Benchmarks.sln -c ${{ env.BUILD_CONFIG }} --no-restore
- name: Build ${{ matrix.solution }}.sln
run: dotnet build src/Nethermind/${{ matrix.solution }}.sln -c ${{ matrix.config }}
2 changes: 1 addition & 1 deletion .github/workflows/posdao-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,5 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
name: posdao-logs
name: posdao-logs-${{ matrix.branch }}
path: posdao-logs/*
51 changes: 16 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Release

on:
on:
workflow_dispatch:
inputs:
tag:
Expand All @@ -16,7 +16,7 @@ env:
PACKAGE_DIR: pkg
PACKAGE_RETENTION: 7
PUB_DIR: pub
SCRIPTS_PATH: ${{ github.workspace }}/nethermind/scripts/deployment
SCRIPTS_PATH: ${{ github.workspace }}/scripts/deployment

jobs:
build:
Expand All @@ -27,30 +27,10 @@ jobs:
package-prefix: ${{ steps.archive.outputs.package-prefix }}
prerelease: ${{ steps.build-runner.outputs.prerelease }}
steps:
- name: Check out Nethermind repository
uses: actions/checkout@v4
with:
path: nethermind
- name: Check out Nethermind Launcher repository
- name: Check out repository
uses: actions/checkout@v4
with:
repository: NethermindEth/nethermind.launcher
path: launcher
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: nethermind/global.json
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 14
- name: Install npm packages
run: npm i -g pkg @vercel/ncc
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Build Nethermind.Runner
id: build-runner
run: |
Expand All @@ -61,14 +41,19 @@ jobs:
$SCRIPTS_PATH/build-runner.sh $GITHUB_SHA $build_timestamp
- name: Build Nethermind.Cli
run: $SCRIPTS_PATH/build-cli.sh $GITHUB_SHA ${{ 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
- name: Bundle Nethermind launcher
run: |
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
json=$(curl -s https://api.github.com/repos/nethermindeth/nethermind.launcher/releases/latest)
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux-x64"))')
curl -sSL $url -o $PUB_DIR/linux-x64/nethermind-launcher
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux-arm64"))')
curl -sSL $url -o $PUB_DIR/linux-arm64/nethermind-launcher
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("windows-x64"))')
curl -sSL $url -o $PUB_DIR/win-x64/nethermind-launcher.exe
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos-x64"))')
curl -sSL $url -o $PUB_DIR/osx-x64/nethermind-launcher
url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("macos-arm64"))')
curl -sSL $url -o $PUB_DIR/osx-arm64/nethermind-launcher
- name: Archive packages
id: archive
env:
Expand Down Expand Up @@ -112,7 +97,7 @@ jobs:
name: ${{ steps.archive.outputs.package-prefix }}-ref-assemblies-package
path: ${{ github.workspace }}/${{ env.PACKAGE_DIR }}/*ref-assemblies*
retention-days: ${{ env.PACKAGE_RETENTION }}

approval:
name: Approve
runs-on: ubuntu-latest
Expand All @@ -131,8 +116,6 @@ jobs:
steps:
- name: Check out Nethermind repository
uses: actions/checkout@v4
with:
path: nethermind
- name: Download artifacts
uses: actions/download-artifact@v4
with:
Expand All @@ -156,8 +139,6 @@ jobs:
steps:
- name: Check out Nethermind repository
uses: actions/checkout@v4
with:
path: nethermind
- name: Download artifacts
uses: actions/download-artifact@v4
with:
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: 2023 Demerzel Solutions Limited
// SPDX-FileCopyrightText: 2024 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only
```

Expand Down
25 changes: 11 additions & 14 deletions Dockerfile.diag
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,39 @@ ARG BUILD_TIMESTAMP
ARG CI
ARG COMMIT_HASH
ARG TARGETARCH
ARG TARGETOS

COPY .git .git
COPY src/Nethermind src/Nethermind

RUN arch=$([ "$TARGETARCH" = "amd64" ] && echo "x64" || echo "$TARGETARCH") && \
jb_version=2023.3.0 && \
dotnet tool install JetBrains.dotTrace.GlobalTools --version $jb_version --tool-path /tmp && \
dotnet add src/Nethermind/Nethermind.Runner package JetBrains.dotMemory.Console.$TARGETOS-$arch \
--version $jb_version --package-directory /tmp && \
dotnet add src/Nethermind/Nethermind.Runner package JetBrains.dotMemory.Console.linux-$arch \
--package-directory /tmp && \
dotnet publish src/Nethermind/Nethermind.Runner -c $BUILD_CONFIG -a $arch -o /publish --sc false \
-p:BuildTimestamp=$BUILD_TIMESTAMP -p:Commit=$COMMIT_HASH

RUN dotnet tool install --tool-path /dotnetcore-tools dotnet-trace && \
dotnet tool install --tool-path /dotnetcore-tools dotnet-dump && \
dotnet tool install --tool-path /dotnetcore-tools dotnet-gcdump
RUN dotnet tool install -g dotnet-dump && \
dotnet tool install -g dotnet-gcdump && \
dotnet tool install -g dotnet-trace && \
dotnet tool install -g JetBrains.dotTrace.GlobalTools

FROM --platform=$TARGETPLATFORM mcr.microsoft.com/dotnet/aspnet:8.0-jammy

WORKDIR /nethermind

VOLUME /nethermind/diag
VOLUME /nethermind/keystore
VOLUME /nethermind/logs
VOLUME /nethermind/nethermind_db

EXPOSE 8545 8551 30303

COPY --from=build /publish .
COPY --from=build /dotnetcore-tools /opt/dotnetcore-tools
COPY --from=build /tmp/jetbrains.dotmemory.console.* /opt/tools
COPY --from=build /tmp/dottrace /opt/tools
COPY --from=build /tmp/.store /opt/tools/.store
COPY --from=build /root/.dotnet/tools /opt/diag-tools
COPY --from=build /tmp/jetbrains.dotmemory.console.*/**/tools /opt/diag-tools/dotmemory

ENV PATH="/opt/dotnetcore-tools:${PATH}"
ENV PATH="$PATH:/opt/diag-tools:/opt/diag-tools/dotmemory"

RUN apt-get update && apt-get -y install libsnappy-dev procps && \
RUN apt-get update && apt-get -y install libsnappy-dev && \
rm -rf /var/lib/apt/lists/*

ENTRYPOINT ["./nethermind"]
17 changes: 0 additions & 17 deletions Dockerfile.launcher

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/deployment/build-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e

output_path=$GITHUB_WORKSPACE/$PUB_DIR

cd $GITHUB_WORKSPACE/nethermind/src/Nethermind/Nethermind.Cli
cd $GITHUB_WORKSPACE/src/Nethermind/Nethermind.Cli

echo "Building Nethermind CLI"

Expand Down
Loading

0 comments on commit bdb7254

Please sign in to comment.