Skip to content

Commit

Permalink
merge base branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Demuirgos committed Oct 11, 2024
2 parents 8d27dd8 + 77daef5 commit 39e8a95
Show file tree
Hide file tree
Showing 444 changed files with 15,048 additions and 2,967 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build-tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build tools

on:
merge_group:
types: [checks_requested]
pull_request:
branches: [master]
push:
branches: [master]

jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config: [release]
project:
- DocGen/DocGen.sln
- HiveCompare/HiveCompare.sln
- HiveConsensusWorkflowGenerator/HiveConsensusWorkflowGenerator.csproj
- Nethermind.Tools.Kute/Nethermind.Tools.Kute.csproj
- SendBlobs/SendBlobs.sln
- TxParser/TxParser.csproj
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v4
- name: Build ${{ matrix.project }}
working-directory: tools
run: dotnet build ./${{ matrix.project }} -c ${{ matrix.config }}
1 change: 1 addition & 0 deletions .github/workflows/nethermind-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
- Nethermind.Overseer.Test
- Nethermind.Runner.Test
- Nethermind.Serialization.Ssz.Test
- Nethermind.Shutter.Test
- Nethermind.Sockets.Test
- Nethermind.Specs.Test
- Nethermind.State.Test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-supported-chains.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version: '1.21.0'
go-version: 'stable'
check-latest: true
cache: true

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ jobs:
global-json-file: n/global.json
- name: Build DocGen
working-directory: n
run: dotnet build tools/docgen/DocGen.csproj -c release -o docgen
run: dotnet build tools/DocGen/DocGen.csproj -c release -o DocGen
- name: Generate docs
run: n/docgen/DocGen $GITHUB_WORKSPACE/d --config --jsonrpc --metrics
run: n/DocGen/DocGen $GITHUB_WORKSPACE/d --config --jsonrpc --metrics
- name: Tag a new version
if: github.event_name == 'release' && !github.event.release.prerelease
working-directory: d
run: |
npm i
npm run docusaurus docs:version v${{ github.event.release.tag_name }}
npm run docusaurus docs:version ${{ github.event.release.tag_name }}
- name: Create a pull request
working-directory: d
env:
Expand Down
2 changes: 1 addition & 1 deletion src/Nethermind/Chains/base-mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"eip2930Transition": "0x0",
"eip1559Transition": "0x0",
"eip1559FeeCollectorTransition": "0x0",
"eip1559FeeCollector": "0x4200000000000000000000000000000000000019",
"feeCollector": "0x4200000000000000000000000000000000000019",
"eip1559ElasticityMultiplier": "0x6",
"eip1559BaseFeeMaxChangeDenominator": "0x32",
"eip3198Transition": "0x0",
Expand Down
2 changes: 1 addition & 1 deletion src/Nethermind/Chains/base-sepolia.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"eip2930Transition": "0x0",
"eip1559Transition": "0x0",
"eip1559FeeCollectorTransition": "0x0",
"eip1559FeeCollector": "0x4200000000000000000000000000000000000019",
"feeCollector": "0x4200000000000000000000000000000000000019",
"eip1559ElasticityMultiplier": "0xa",
"eip1559BaseFeeMaxChangeDenominator": "0x32",
"eip3198Transition": "0x0",
Expand Down
3 changes: 2 additions & 1 deletion src/Nethermind/Chains/chiado.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"eip3529Transition": "0x0",
"eip3541Transition": "0x0",
"eip1559Transition": "0x0",
"beaconChainGenesisTimestamp": "0x6343ee4c",
"eip3651TransitionTimestamp": "0x646e0e4c",
"eip3855TransitionTimestamp": "0x646e0e4c",
"eip3860TransitionTimestamp": "0x646e0e4c",
Expand All @@ -75,7 +76,7 @@
"eip6780TransitionTimestamp": "0x65ba8e4c",
"eip1559BaseFeeMaxChangeDenominator": "0x8",
"eip1559ElasticityMultiplier": "0x2",
"eip1559FeeCollector": "0x1559000000000000000000000000000000000000",
"feeCollector": "0x1559000000000000000000000000000000000000",
"eip1559FeeCollectorTransition": 0,
"eip4844BlobGasPriceUpdateFraction": "0x10fafa",
"eip4844MaxBlobGasPerBlock": "0x40000",
Expand Down
1 change: 1 addition & 0 deletions src/Nethermind/Chains/foundation.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@
"eip3198Transition": "0xC5D488",
"eip3529Transition": "0xC5D488",
"eip3541Transition": "0xC5D488",
"beaconChainGenesisTimestamp": "0x5fc63057",
"eip3651TransitionTimestamp": "0x64373057",
"eip3855TransitionTimestamp": "0x64373057",
"eip3860TransitionTimestamp": "0x64373057",
Expand Down
3 changes: 2 additions & 1 deletion src/Nethermind/Chains/gnosis.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"eip3529Transition": 19040000,
"eip3541Transition": 19040000,
"eip1559Transition": 19040000,
"beaconChainGenesisTimestamp": "0x61b10dbc",
"eip3651TransitionTimestamp": "0x64c8edbc",
"eip3855TransitionTimestamp": "0x64c8edbc",
"eip3860TransitionTimestamp": "0x64c8edbc",
Expand All @@ -82,7 +83,7 @@
"eip1559BaseFeeMaxChangeDenominator": "0x8",
"eip1559ElasticityMultiplier": "0x2",
"eip1559BaseFeeInitialValue": "0x3b9aca00",
"eip1559FeeCollector": "0x6BBe78ee9e474842Dbd4AB4987b3CeFE88426A92",
"feeCollector": "0x6BBe78ee9e474842Dbd4AB4987b3CeFE88426A92",
"eip1559FeeCollectorTransition": 19040000,
"eip4844BlobGasPriceUpdateFraction": "0x10fafa",
"eip4844MaxBlobGasPerBlock": "0x40000",
Expand Down
76 changes: 32 additions & 44 deletions src/Nethermind/Chains/hive.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"eip155Transition": "0x0",
"maxCodeSizeTransition": "0x0",
"maxCodeSize": 24576,
"maximumExtraDataSize": 102400,
"maximumExtraDataSize": "0x400",
"eip140Transition": "0x0",
"eip211Transition": "0x0",
"eip214Transition": "0x0",
Expand All @@ -51,57 +51,45 @@
"eip3529Transition": "0x0",
"eip3541Transition": "0x0",
"eip3198Transition": "0x0",
"MergeForkIdTransition": "0x64",
"networkID": "0x7",
"chainID": "0x7"
"eip3651TransitionTimestamp": "0x0",
"eip3855TransitionTimestamp": "0x0",
"eip3860TransitionTimestamp": "0x0",
"eip4895TransitionTimestamp": "0x0",
"eip4844TransitionTimestamp": "0x0",
"eip4788TransitionTimestamp": "0x0",
"eip1153TransitionTimestamp": "0x0",
"eip5656TransitionTimestamp": "0x0",
"eip6780TransitionTimestamp": "0x0",
"eip7702TransitionTimestamp": "0x0",
"chainID": "0x1"
},
"genesis": {
"seal": {
"ethereum": {
"nonce": "0x0000000000000000"
"nonce": "0x0000000000000000",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
},
"difficulty": "0x30000",
"difficulty": "0x00",
"author": "0x0000000000000000000000000000000000000000",
"timestamp": "0x1234",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000658bdf435d810c91414ec09147daa6db624063790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x2fefd8"
"timestamp": "0x00",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x00",
"gasLimit": "0x016345785d8a0000",
"baseFeePerGas": "0x07"
},
"accounts": {
"0xcf49fda3be353c69b41ed96333cd24302da4556f": {
"balance": "0x123450000000000000000"
},
"0x0161e041aad467a890839d5b08b138c1e6373072": {
"balance": "0x123450000000000000000"
},
"0x87da6a8c6e9eff15d703fc2773e32f6af8dbe301": {
"balance": "0x123450000000000000000"
},
"0xb97de4b8c857e4f6bc354f226dc3249aaee49209": {
"balance": "0x123450000000000000000"
},
"0xc5065c9eeebe6df2c2284d046bfc906501846c51": {
"balance": "0x123450000000000000000"
},
"0x0000000000000000000000000000000000000314": {
"balance": "0x0",
"code": "0x60606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a223e05d1461006a578063abd1a0cf1461008d578063abfced1d146100d4578063e05c914a14610110578063e6768b451461014c575b610000565b346100005761007761019d565b6040518082815260200191505060405180910390f35b34610000576100be600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506101a3565b6040518082815260200191505060405180910390f35b346100005761010e600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506101ed565b005b346100005761014a600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610236565b005b346100005761017960048080359060200190919080359060200190919080359060200190919050506103c4565b60405180848152602001838152602001828152602001935050505060405180910390f35b60005481565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5050565b7f6031a8d62d7c95988fa262657cd92107d90ed96e08d8f867d32f26edfe85502260405180905060405180910390a17f47e2689743f14e97f7dcfa5eec10ba1dff02f83b3d1d4b9c07b206cbbda66450826040518082815260200191505060405180910390a1817fa48a6b249a5084126c3da369fbc9b16827ead8cb5cdc094b717d3f1dcd995e2960405180905060405180910390a27f7890603b316f3509577afd111710f9ebeefa15e12f72347d9dffd0d65ae3bade81604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a18073ffffffffffffffffffffffffffffffffffffffff167f7efef9ea3f60ddc038e50cccec621f86a0195894dc0520482abf8b5c6b659e4160405180905060405180910390a28181604051808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a05b5050565b6000600060008585859250925092505b935093509390505600a165627a7a72305820aaf842d0d0c35c45622c5263cbb54813d2974d3999c8c38551d7c613ea2bc1170029",
"storage": {
"0x0000000000000000000000000000000000000000000000000000000000000000": "0x1234",
"0x6661e9d6d8b923d5bbaab1b96e1dd51ff6ea2a93520fdc9eb75d059238b8c5e9": "0x01"
}
},
"0x0000000000000000000000000000000000000315": {
"balance": "0x9999999999999999999999999999999",
"code": "0x60606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063ef2769ca1461003e575b610000565b3461000057610078600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061007a565b005b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051809050600060405180830381858888f1935050505015610106578173ffffffffffffffffffffffffffffffffffffffff167f30a3c50752f2552dcc2b93f5b96866280816a986c0c0408cb6778b9fa198288f826040518082815260200191505060405180910390a25b5b50505600a165627a7a72305820637991fabcc8abad4294bf2bb615db78fbec4edff1635a2647d3894e2daf6a610029"
},
"0x0000000000000000000000000000000000000316": {
"balance": "0x0",
"code": "0x444355"
},
"0x0000000000000000000000000000000000000317": {
"balance": "0x0",
"code": "0x600160003555"
"0x000f3df6d732807ef1319fb7b8bb8522d0beac02": {
"nonce": "0x01",
"balance": "0x00",
"code": "0x3373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500",
"storage": {}
},
"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
"nonce": "0x00",
"balance": "0x1d6329f1c35ca4bfabb9f5610000000000",
"code": "0x",
"storage": {}
},
"0x0000000000000000000000000000000000000001": {
"builtin": {
Expand Down Expand Up @@ -206,4 +194,4 @@
}
}
}
}
}
1 change: 1 addition & 0 deletions src/Nethermind/Chains/holesky.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"eip3198Transition": "0x0",
"eip3529Transition": "0x0",
"eip3541Transition": "0x0",
"beaconChainGenesisTimestamp": "0x65156994",
"eip3651TransitionTimestamp": "0x6516eac0",
"eip3855TransitionTimestamp": "0x6516eac0",
"eip3860TransitionTimestamp": "0x6516eac0",
Expand Down
2 changes: 1 addition & 1 deletion src/Nethermind/Chains/op-mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"eip2930Transition": "0x3C45B0",
"eip1559Transition": "0x645C277",
"eip1559FeeCollectorTransition": "0x645C277",
"eip1559FeeCollector": "0x4200000000000000000000000000000000000019",
"feeCollector": "0x4200000000000000000000000000000000000019",
"eip1559ElasticityMultiplier": "0x6",
"eip1559BaseFeeMaxChangeDenominator": "0x32",
"eip3198Transition": "0x645C277",
Expand Down
2 changes: 1 addition & 1 deletion src/Nethermind/Chains/op-sepolia.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"eip2930Transition": "0x0",
"eip1559Transition": "0x0",
"eip1559FeeCollectorTransition": "0x0",
"eip1559FeeCollector": "0x4200000000000000000000000000000000000019",
"feeCollector": "0x4200000000000000000000000000000000000019",
"eip1559ElasticityMultiplier": "0x6",
"eip1559BaseFeeMaxChangeDenominator": "0x32",
"eip3198Transition": "0x0",
Expand Down
2 changes: 1 addition & 1 deletion src/Nethermind/Chains/poacore.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"eip1559BaseFeeInitialValue": "0x3b9aca00",
"eip1559BaseFeeMinValue": "0x2540be400",
"eip1559BaseFeeMinValueTransition": 24199500,
"eip1559FeeCollector": "0x517F3AcfF3aFC2fb45e574718bca6F919b798e10",
"feeCollector": "0x517F3AcfF3aFC2fb45e574718bca6F919b798e10",
"eip1559FeeCollectorTransition": 24090200
},
"genesis": {
Expand Down
1 change: 1 addition & 0 deletions src/Nethermind/Chains/sepolia.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"eip3541Transition": "0x0",
"terminalTotalDifficulty": "3C6568F12E8000",
"mergeForkIdTransition": "0x1A7ACB",
"beaconChainGenesisTimestamp": "0x62b07d60",
"eip4895TransitionTimestamp": "0x63FD7D60",
"eip3855TransitionTimestamp": "0x63FD7D60",
"eip3651TransitionTimestamp": "0x63FD7D60",
Expand Down
7 changes: 4 additions & 3 deletions src/Nethermind/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
<PackageVersion Include="FastEnum" Version="1.8.0" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="FluentAssertions.Json" Version="6.1.0" />
<PackageVersion Include="Google.Protobuf" Version="3.27.2" />
<PackageVersion Include="Google.Protobuf.Tools" Version="3.27.2" />
<PackageVersion Include="Google.Protobuf" Version="3.28.0" />
<PackageVersion Include="Google.Protobuf.Tools" Version="3.28.0" />
<PackageVersion Include="Grpc" Version="2.46.6" />
<PackageVersion Include="Grpc.Tools" Version="2.65.0" />
<PackageVersion Include="HexMate" Version="0.0.3" />
Expand All @@ -44,13 +44,14 @@
<PackageVersion Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageVersion Include="Nethermind.Crypto.Bls" Version="1.0.2" />
<PackageVersion Include="Nethermind.Crypto.Bls" Version="1.0.3" />
<PackageVersion Include="Nethermind.Crypto.Pairings" Version="1.1.1" />
<PackageVersion Include="Nethermind.Crypto.SecP256k1" Version="1.2.2" />
<PackageVersion Include="Nethermind.DotNetty.Buffers" Version="1.0.1" />
<PackageVersion Include="Nethermind.DotNetty.Handlers" Version="1.0.1" />
<PackageVersion Include="Nethermind.DotNetty.Transport" Version="1.0.1" />
<PackageVersion Include="Nethermind.Gmp" Version="1.0.1" />
<PackageVersion Include="Nethermind.Libp2p" Version="1.0.0-preview.33" />
<PackageVersion Include="Nethermind.Numerics.Int256" Version="1.2.0" />
<PackageVersion Include="Nito.Collections.Deque" Version="1.2.1" />
<PackageVersion Include="NLog" Version="5.3.2" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// SPDX-FileCopyrightText: 2024 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only

using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Ethereum.Test.Base;
using NUnit.Framework;

namespace Ethereum.Blockchain.Pyspec.Test;

[TestFixture]
[Parallelizable(ParallelScope.All)]
[Explicit("These tests are not ready yet")]
public class PragueBlockChainTests : BlockchainTestBase
{
[TestCaseSource(nameof(LoadTests))]
public async Task Test(BlockchainTest test) => await RunTest(test);

private static IEnumerable<BlockchainTest> LoadTests()
{
TestsSourceLoader loader = new(new LoadPyspecTestsStrategy(), $"fixtures/blockchain_tests/prague");
return loader.LoadTests().OfType<BlockchainTest>();
}
}
22 changes: 22 additions & 0 deletions src/Nethermind/Ethereum.Blockchain.Pyspec.Test/PragueStateTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System.Collections.Generic;
using System.Linq;
using Ethereum.Test.Base;
using FluentAssertions;
using NUnit.Framework;

namespace Ethereum.Blockchain.Pyspec.Test;

[TestFixture]
[Parallelizable(ParallelScope.All)]
[Explicit("These tests are not ready yet")]
public class PragueStateTests : GeneralStateTestBase
{
[TestCaseSource(nameof(LoadTests))]
public void Test(GeneralStateTest test) => RunTest(test).Pass.Should().BeTrue();

private static IEnumerable<GeneralStateTest> LoadTests()
{
TestsSourceLoader loader = new(new LoadPyspecTestsStrategy(), $"fixtures/state_tests/prague");
return loader.LoadTests().Cast<GeneralStateTest>();
}
}
16 changes: 16 additions & 0 deletions src/Nethermind/Ethereum.Test.Base/AuthorizationListJson.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-FileCopyrightText: 2024 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only

using Nethermind.Core;

namespace Ethereum.Test.Base;
public class AuthorizationListJson
{
public ulong ChainId { get; set; }
public Address Address { get; set; }
public ulong Nonce { get; set; }
public ulong V { get; set; }
public byte[] R { get; set; }
public byte[] S { get; set; }
public Address Signer { get; set; }
}
8 changes: 6 additions & 2 deletions src/Nethermind/Ethereum.Test.Base/GeneralTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,16 @@ protected EthereumTestResult RunTest(GeneralStateTest test, ITxTracer txTracer)

Block block = Build.A.Block.WithTransactions(test.Transaction).WithHeader(header).TestObject;

bool isValid = _txValidator.IsWellFormed(test.Transaction, spec) && IsValidBlock(block, specProvider);
ValidationResult txIsValid = _txValidator.IsWellFormed(test.Transaction, spec);

if (isValid)
if (txIsValid)
{
transactionProcessor.Execute(test.Transaction, new BlockExecutionContext(header), txTracer);
}
else
{
_logger.Info($"Skipping invalid tx with error: {txIsValid.Error}");
}

stopwatch.Stop();

Expand Down
Loading

0 comments on commit 39e8a95

Please sign in to comment.