Skip to content

Commit 2d4d09a

Browse files
Remove EOF (#10866)
* Remove EOF * Feedback * fix: RETURNDATACOPY gas policy and benchmark CLZ coverage - Use ConsumeDataCopyGas for RETURNDATACOPY, consistent with other COPY opcodes - Add CLZ opcode to benchmark StackRequirements * chore(pgo): update PGO profile (#10867) chore(pgo): update PGO profile from weekly collection Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * test: add Osaka and Amsterdam fork coverage to InvalidOpcodeTests Add TestCase attributes for Osaka (CLZ) and Amsterdam (SLOTNUM, SWAPN, DUPN, EXCHANGE) activations. Add missing SLOTNUM to AmsterdamInstructions. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent fca448c commit 2d4d09a

File tree

88 files changed

+245
-4780
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+245
-4780
lines changed

src/Nethermind/Ethereum.Blockchain.Pyspec.Test/OsakaEofTests.cs

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/Nethermind/Ethereum.Test.Base/EofTest.cs

Lines changed: 0 additions & 28 deletions
This file was deleted.

src/Nethermind/Ethereum.Test.Base/EofTestBase.cs

Lines changed: 0 additions & 74 deletions
This file was deleted.

src/Nethermind/Ethereum.Test.Base/EofTestJson.cs

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/Nethermind/Ethereum.Test.Base/FileTestsSource.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public IEnumerable<EthereumTest> LoadTests(TestType testType)
3030

3131
return testType switch
3232
{
33-
TestType.Eof => JsonToEthereumTest.ConvertToEofTests(json),
3433
TestType.State => JsonToEthereumTest.ConvertStateTest(json),
3534
_ => JsonToEthereumTest.ConvertToBlockchainTests(json)
3635
};

src/Nethermind/Ethereum.Test.Base/GeneralTestBase.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
using Nethermind.Core.Test.Modules;
1414
using Nethermind.Crypto;
1515
using Nethermind.Evm;
16-
using Nethermind.Evm.EvmObjectFormat;
1716
using Nethermind.Evm.State;
1817
using Nethermind.Evm.Tracing;
1918
using Nethermind.Evm.TransactionProcessing;
@@ -66,8 +65,6 @@ protected EthereumTestResult RunTest(GeneralStateTest test, ITxTracer txTracer)
6665
Assert.That(test.LoadFailure, Is.Null, "test data loading failure");
6766
Assert.That(test.Transaction, Is.Not.Null, "there is no transaction in the test");
6867

69-
EofValidator.Logger = _logger;
70-
7168
test.Fork = ChainUtils.ResolveSpec(test.Fork, test.ChainId);
7269

7370
ISpecProvider specProvider =

src/Nethermind/Ethereum.Test.Base/IEofTestRunner.cs

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/Nethermind/Ethereum.Test.Base/JsonToEthereumTest.cs

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
using Nethermind.Core.Extensions;
1414
using Nethermind.Core.Specs;
1515
using Nethermind.Crypto;
16-
using Nethermind.Evm.EvmObjectFormat;
1716
using Nethermind.Int256;
1817
using Nethermind.Merge.Plugin.Data;
1918
using Nethermind.Serialization.Json;
@@ -337,66 +336,6 @@ public static BlockchainTest Convert(string name, string category, BlockchainTes
337336

338337
private static readonly EthereumJsonSerializer _serializer = new();
339338

340-
public static IEnumerable<EofTest> ConvertToEofTests(string json)
341-
{
342-
Dictionary<string, EofTestJson> testsInFile = _serializer.Deserialize<Dictionary<string, EofTestJson>>(json);
343-
List<EofTest> tests = [];
344-
foreach (KeyValuePair<string, EofTestJson> namedTest in testsInFile)
345-
{
346-
(string name, string category) = GetNameAndCategory(namedTest.Key);
347-
GetTestMetaData(namedTest, out string? description, out string? url, out string? spec);
348-
349-
foreach (KeyValuePair<string, VectorTestJson> pair in namedTest.Value.Vectors)
350-
{
351-
VectorTestJson vectorJson = pair.Value;
352-
VectorTest vector = new()
353-
{
354-
Code = Bytes.FromHexString(vectorJson.Code),
355-
ContainerKind = ParseContainerKind(vectorJson.ContainerKind)
356-
};
357-
358-
foreach (KeyValuePair<string, TestResultJson> result in vectorJson.Results)
359-
{
360-
EofTest test = new()
361-
{
362-
Name = $"{name}",
363-
Category = $"{category} [{result.Key}]",
364-
Url = url,
365-
Description = description,
366-
Spec = spec,
367-
Vector = vector,
368-
Result = result.ToTestResult()
369-
};
370-
tests.Add(test);
371-
}
372-
}
373-
}
374-
375-
return tests;
376-
377-
static ValidationStrategy ParseContainerKind(string containerKind)
378-
=> "INITCODE".Equals(containerKind) ? ValidationStrategy.ValidateInitCodeMode : ValidationStrategy.ValidateRuntimeMode;
379-
380-
static void GetTestMetaData(KeyValuePair<string, EofTestJson> namedTest, out string? description, out string? url, out string? spec)
381-
{
382-
description = null;
383-
url = null;
384-
spec = null;
385-
GeneralStateTestInfoJson info = namedTest.Value?.Info;
386-
if (info is not null)
387-
{
388-
description = info.Description;
389-
url = info.Url;
390-
spec = info.Spec;
391-
}
392-
}
393-
}
394-
395-
private static Result ToTestResult(this KeyValuePair<string, TestResultJson> result)
396-
=> result.Value.Result ?
397-
new Result { Fork = result.Key, Success = true } :
398-
new Result { Fork = result.Key, Success = false, Error = result.Value.Exception };
399-
400339
public static IEnumerable<GeneralStateTest> ConvertStateTest(string json)
401340
{
402341
Dictionary<string, GeneralStateTestJson> testsInFile =

src/Nethermind/Ethereum.Test.Base/LoadEofTestsFileStrategy.cs

Lines changed: 0 additions & 48 deletions
This file was deleted.

src/Nethermind/Ethereum.Test.Base/LoadEofTestsStrategy.cs

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)