Skip to content
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

create a VerkleBlockchainTestRunner #7494

Merged
merged 31 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
67a7ae6
create a VerkleBlockchainTestRunner
yerke26 Sep 26, 2024
38030e7
Merge branch 'feature/verkle' into verkle/hive-tests
yerke26 Sep 26, 2024
c49c474
remove TestWitnessJson and change it to ExecutionWitness
yerke26 Sep 30, 2024
506fa2c
add Witness to block and set ShouldVerifyIncomingWitness = true
yerke26 Sep 30, 2024
01621fb
refactoring: remove VerkleBlockchainTestsRunner
yerke26 Sep 30, 2024
bbb8852
add a test file and configs
tanishqjasoria Oct 3, 2024
7f11a36
temp config
tanishqjasoria Oct 4, 2024
775e69e
add assertions
tanishqjasoria Oct 4, 2024
58eb0cc
fix blockhash gas calculations
tanishqjasoria Oct 8, 2024
aa3176a
stateless vm and witness fix
tanishqjasoria Oct 9, 2024
916be63
fix for stateless
tanishqjasoria Oct 9, 2024
f6cc25d
add serve window
tanishqjasoria Oct 9, 2024
76a8ee3
small fix
tanishqjasoria Oct 10, 2024
19a9f60
charge read and write witness simultaneously
tanishqjasoria Oct 14, 2024
6693cfb
modify state tree to fix issues
tanishqjasoria Oct 14, 2024
b7fdc27
refac
tanishqjasoria Oct 15, 2024
3fceca5
fix vm
tanishqjasoria Oct 15, 2024
6873bba
pass worldstate in withdrawal processor
tanishqjasoria Oct 15, 2024
7c214b2
add equality checks
tanishqjasoria Oct 15, 2024
1f27942
mini fix
tanishqjasoria Oct 16, 2024
d4d085b
fix changes
tanishqjasoria Oct 16, 2024
9eb27e1
verify a lot of things
tanishqjasoria Nov 4, 2024
1a0243a
Add stateless verkle world state for system contract exec
tanishqjasoria Nov 4, 2024
c8c1f13
add system contract in statelss block processor
tanishqjasoria Nov 4, 2024
479f091
updates
tanishqjasoria Nov 4, 2024
397f859
update package managements
tanishqjasoria Nov 4, 2024
c3ea1e8
update timestamp
tanishqjasoria Nov 4, 2024
9566eb5
fix storage issues for the devnet
tanishqjasoria Nov 5, 2024
69ab005
Add tree dump
tanishqjasoria Nov 5, 2024
a577d71
updates
tanishqjasoria Nov 5, 2024
cdff70d
fix whitespace
tanishqjasoria Nov 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 7 additions & 14 deletions src/Nethermind/Chains/kaustinen.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
},
"difficulty": "0x01",
"author": "0x0000000000000000000000000000000000000000",
"timestamp": "0x66190fbc",
"timestamp": "0x6720f8ac",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "",
"gasLimit": "0x17D7840"
Expand Down Expand Up @@ -937,18 +937,11 @@
}
},
"nodes": [
"enode://686762312c36eb5bacd4044f909c39ad360c7bf99966c14bdc72109a06ca656a226aa646e38e21bb8203980490fc82834576062f6b824d3d08f255c814bfae62@49.13.203.116:30303?discport=30303",
"enode://7c51103dd772a164a7c45c2cce2c9171ce1a9e032671a158aac6f8bc7b927dbc0be40a564af1678fd6aec5e2768a41afa3d97d38e3fde6edbeffab31a7a71258@128.140.104.96:30303?discport=30303",
"enode://1ff18a6e90574d3d7276e72516ac396325770b4c7e2db0b6eaa82dc5edb5ec91d0b4ce7c4b22166a64617d2d27b8555f100a804706518e9ecab7131bc1bdd8b1@49.13.196.169:30303?discport=30303",
"enode://3cd52cb1b4839c4defb04662521e0ceb226ff697660e0a88de2abc3f2afa3f15207df9678f2c511b7731f1d4f2077351966cd3c455d4ab5129a5e45424ef9a04@128.140.103.190:30303?discport=30303",
"enode://a74b106aa67636aa7ee28b6928bd7da0115a6fe658630a25f9cb6f7bf02275dcda1b66c5ef98a30d1e462d12c915a4ca248f033f4edbf2c87601aded63990fac@78.47.30.10:30303?discport=30303",
"enode://8a7bc039cdabb77744166b7bb4640b7a1ba3cfc6b9fdb8693663a8615c399e849e0a5cc8f9bde4ff4bf4a14d84611f77b459129251710c499c2b9d96cef1ce6b@116.203.113.205:30303?discport=30303",
"enode://ff62daadb1a1f08cb332ed87893e061252ffd42f32704c512ef4fb1937a19acda00f814e57bd1c8f06d9d8c6d404481bea67b692f412d8e1f8fd628103992465@167.235.68.89:30303?discport=30303",
"enode://0eee8ed3c4d5f06e3d395c2290db054d39989d21a9c4038de9d40009416e3aea5d7269481ec2214d45303aaa0a80d2522bb529673bbdd22a4ec7cb22f5a4f5a4@116.203.223.168:30303?discport=30303",
"enode://627ee97e5c297d3229d08abb53842d61b47d0162618264ef3156654c9f4cd26c994e02c44e0ca1576c932b8d29133a769e24bf5482f6a3412ba4dad5adbb4185@195.201.36.62:30303?discport=30303",
"enode://261ce91ece10fef227bbad6453f3bc5648ea18c42c9750820cf2110b590755630d3d5c32b360cc06787abefafc7ce6dbe92f8c39fb613774c922d8fc340e47a8@128.140.104.94:30303?discport=30303"



"enode://548ff025abb1522c5257f50765abd21754b7ea7159a176a9b96c738ee6456fc378a11c09a62d55d92684634cd32a9cad498f5649256caf693dab77f961a169f6@167.235.68.89:30303?discport=30303",
"enode://7a46b1126d2c602e2d567a75aa3cc2577d93ea2bfcc524d115f985689516159c94a339f3984bbce28eb8b35d49494d1ec7be55f361c7768ae43993bc5b88eb77@128.140.104.94:30303?discport=30303",
"enode://a21d8ecaaea7a199a479672ae11b11afc1b55dce4851d278cae11fd4cf5452866f40890cb7262c3430f9f249d7091ebab39f148740c267f3f3b505c6d27391fe@128.140.104.96:30303?discport=30303",
"enode://145e00c57c837fe19d431bb33cb964b747616cc6be57e350936f13fe51ab4fab5bb167fb38c8399d9b0d687d317466d2c4d0bff2c83068ffa77c4ed16f5f7b28@195.201.139.113:30303?discport=30303",
"enode://9ceb22af386b10ba283cd60f7e83772585e47946e7dddc6029e9acd79730095ea8e5e6ba8619c30149e002084b9bb83ef62e0765cd30c9626667b29ea8f3389e@49.13.196.169:30303?discport=30303",
"enode://e1157ce974bd103852a6df269a772dbcf308f628b185e6fc2774f8eddc127c1309a7f023dfaae922dfe32c5170aa7085245dbe4b88931b21d3ee4bb290b77418@195.201.36.62:30303?discport=30303"
]
}
4 changes: 2 additions & 2 deletions src/Nethermind/Ethereum.Test.Base/BlockchainTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

namespace Ethereum.Test.Base
{
public abstract class BlockchainTestBase
public class BlockchainTestBase: IBlockchainTestBase
{
private static InterfaceLogger _logger = new NUnitLogger(LogLevel.Trace);
// private static ILogManager _logManager = new OneLoggerLogManager(_logger);
Expand Down Expand Up @@ -74,7 +74,7 @@ public UInt256 Calculate(BlockHeader header, BlockHeader parent)
}
}

protected async Task<EthereumTestResult> RunTest(BlockchainTest test, Stopwatch? stopwatch = null, bool failOnInvalidRlp = true)
public async Task<EthereumTestResult> RunTest(BlockchainTest test, Stopwatch? stopwatch = null, bool failOnInvalidRlp = true)
{
TestContext.WriteLine($"Running {test.Name}, Network: [{test.Network.Name}] at {DateTime.UtcNow:HH:mm:ss.ffffff}");
if (test.NetworkAfterTransition is not null)
Expand Down
14 changes: 14 additions & 0 deletions src/Nethermind/Ethereum.Test.Base/IBlockchainTestBase.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-FileCopyrightText: 2024 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only

using System.Diagnostics;
using System.Threading.Tasks;

namespace Ethereum.Test.Base;

public interface IBlockchainTestBase
{
public void Setup();

public Task<EthereumTestResult> RunTest(BlockchainTest test, Stopwatch? stopwatch = null, bool failOnInvalidRlp = true);
}
2 changes: 2 additions & 0 deletions src/Nethermind/Ethereum.Test.Base/JsonToEthereumTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ private static IReleaseSpec ParseSpec(string network)
network = network.Replace("Shanghai+6780", "Cancun");
network = network.Replace("GrayGlacier+1153", "Cancun");
network = network.Replace("Merge+1153", "Cancun");
network = network.Replace("Verkle", "Osaka");
return network switch
{
"Frontier" => Frontier.Instance,
Expand All @@ -58,6 +59,7 @@ private static IReleaseSpec ParseSpec(string network)
"GrayGlacier" => GrayGlacier.Instance,
"Shanghai" => Shanghai.Instance,
"Cancun" => Cancun.Instance,
"Osaka" => Osaka.Instance,
_ => throw new NotSupportedException()
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public IEnumerable<IEthereumTest> Load(string testsDirectoryName, string wildcar
}
else
{
// testDirs = Directory.EnumerateDirectories(testsDirectoryName);
testDirs = new[] { testsDirectoryName };
}

Expand Down
5 changes: 4 additions & 1 deletion src/Nethermind/Ethereum.Test.Base/TestBlockJson.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only

using System.Text.Json;
using System.Text.Json.Serialization;
using Nethermind.Core.Verkle;
using Nethermind.Serialization.Json;

namespace Ethereum.Test.Base
{
Expand All @@ -12,6 +13,8 @@ public class TestBlockJson
public TestBlockHeaderJson[]? UncleHeaders { get; set; }
public string? Rlp { get; set; }
public LegacyTransactionJson[]? Transactions { get; set; }
[JsonConverter(typeof(ExecutionWitnessConverter))]
public ExecutionWitness? Witness { get; set; }
[JsonPropertyName("expectException")]
public string? ExpectedException { get; set; }
}
Expand Down
Loading
Loading