Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
231 commits
Select commit Hold shift + click to select a range
caafcee
add to release spec, chainspec, engineapi
Marchhill Jan 3, 2025
92523fc
change inclusionlisttransactions type, add to block
Marchhill Jan 3, 2025
a7e59cb
implement GetInclusionListTransactions handler
Marchhill Jan 3, 2025
b71294e
fix tests
Marchhill Jan 3, 2025
df33833
use IL for block building
Marchhill Jan 4, 2025
e2557cd
check that block satisfies IL
Marchhill Jan 4, 2025
1a6c7f1
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill Jan 4, 2025
72204a1
fix engine rpc registration, fix old tests, add test
Marchhill Jan 21, 2025
3789381
formatting
Marchhill Jan 21, 2025
2f2abaf
change getInclusionList type to bytes
Marchhill Jan 23, 2025
d7b3dab
fix some tests
Marchhill Jan 23, 2025
dd73442
fix some things and add engineapi tests for inclusion lists
Marchhill Jan 28, 2025
6cf18ad
tidy
Marchhill Jan 28, 2025
99e0963
refactor inclusion list validation to block validator
Marchhill Jan 28, 2025
c26ba5e
add test for inclusion list validation, fix check if tx contained in …
Marchhill Jan 28, 2025
da6e88f
improve efficiency of checking block tx hashes
Marchhill Jan 28, 2025
5e79e5b
fix IL block production and add test
Marchhill Jan 29, 2025
ebd456e
refactor tests and tidy
Marchhill Jan 29, 2025
2300836
use txpooltxsource for inclusion list
Marchhill Jan 29, 2025
4791cb0
whitespace
Marchhill Jan 29, 2025
fd56978
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill Jan 30, 2025
274a563
remove merge conflicts
Marchhill Jan 30, 2025
9d58825
remove syncthreadtests
Marchhill Jan 30, 2025
efecc21
small test change
Marchhill Jan 30, 2025
acc500f
fix aura tests
Marchhill Jan 30, 2025
33b6412
move inclusion list validator to separate class
Marchhill Feb 3, 2025
1a00e1c
remove transactionProcessor from blockValidator
Marchhill Feb 3, 2025
180f85a
formatting
Marchhill Feb 3, 2025
8afa7e6
tidy up old tests
Marchhill Feb 3, 2025
2eec53c
tidy
Marchhill Feb 3, 2025
c82a9c5
fix auramergeengine newpayload IL test, improve hash mismatch error m…
Marchhill Feb 3, 2025
e859eca
restore refactor
Marchhill Feb 3, 2025
a9ff72f
revert whitespace
Marchhill Feb 3, 2025
0339125
limit IL size to 8kb
Marchhill Feb 13, 2025
7ccde5e
avoid recalculating header hash
Marchhill Feb 13, 2025
d5e7fad
refactor and decode IL txs earlier
Marchhill Feb 14, 2025
86ea63a
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill Feb 14, 2025
b4a285f
Fix formatting
rubo Feb 14, 2025
8f97620
don't decode inclusion list again in txsource
Marchhill Feb 17, 2025
439e725
cleanup IL validator
Marchhill Feb 17, 2025
00fec89
IL satisfied if no gas for simple transfer
Marchhill Feb 17, 2025
e1f004b
use txpooltxsource explicitly in GetInclusionListHandler
Marchhill Feb 17, 2025
f4e0894
max IL size 8192, use ILDecode for encoding, comment on ordering by p…
Marchhill Feb 17, 2025
f1a359c
avoid allocating for creating IL trie, move constants to file
Marchhill Feb 17, 2025
8f1bb99
make txpooltxsource nullable
Marchhill Feb 17, 2025
e2fae0c
add 7805 constants file
Marchhill Feb 17, 2025
4b7cfd1
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill Feb 17, 2025
b038b4d
check if InclusionListTransactions null in payloadattributes
Marchhill Feb 17, 2025
b3d1c9b
fix payloadattributes syntax
Marchhill Feb 17, 2025
3c6f62a
fix formatting
Marchhill Feb 17, 2025
54f3baa
fix inclusion list satisfied test
Marchhill Feb 18, 2025
9b34e14
fit as many txs as possible into inclusion list
Marchhill Feb 18, 2025
e10df74
use upper bound estimate for IL packing
Marchhill Feb 18, 2025
9fe0f74
rename getInclusionList to have V1
Marchhill Feb 18, 2025
7acb872
add dummy version updatePayloadWithInclusionList
Marchhill Feb 18, 2025
e8080b9
add new file
Marchhill Feb 18, 2025
93357c7
comment FCU changes
Marchhill Feb 18, 2025
b9d7896
force rebuild payload for updateInclusionListHandler
Marchhill Feb 19, 2025
e0802dc
inclusionlisttxsource pass to update handler and add to additional so…
Marchhill Feb 20, 2025
063d0da
taiko, optimism
Marchhill Feb 20, 2025
d57586f
add cts and ILtxsource to tests
Marchhill Feb 20, 2025
b40e077
INVALID_INCLUSION_LIST error on newpayload
Marchhill Feb 21, 2025
1f3e12d
don't invalidate block for invalid IL
Marchhill Feb 22, 2025
7066d80
move IL validator to public BlockProcessor method
Marchhill Feb 22, 2025
e3cb3ba
fix tests for spec changes
Marchhill Mar 6, 2025
d23b10e
fix auramergeenginemoduletests test name
Marchhill Mar 24, 2025
2327a3e
fix build with force payload rebuild and inclusion list test
Marchhill Mar 24, 2025
29ed2c0
remoe unneeded minor changes
Marchhill Mar 26, 2025
07a4d91
remove old comments
Marchhill Mar 26, 2025
169a5ff
remove unused ecdsa payloadattributes
Marchhill Mar 27, 2025
61f320c
more tidying
Marchhill Mar 27, 2025
b14e50c
add test of force rebuild payload
Marchhill Mar 27, 2025
d6d693d
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill Mar 30, 2025
8bc0634
use CallAndRestore for testing IL txs
Marchhill Mar 30, 2025
8d54857
custom 7805 fork
Marchhill Mar 31, 2025
2511879
remove unused ecdsa
Marchhill Mar 31, 2025
e5adae2
use cancellationtokens in payloadpreparationservice
Marchhill Mar 31, 2025
a41e492
fix force rebuild, track build count for tests
Marchhill Mar 31, 2025
8ed54f6
fork activation, remove old usings
Marchhill Mar 31, 2025
bc6c8d7
fix whitespace
Marchhill Mar 31, 2025
4a297f1
randomise IL building tx order
Marchhill Mar 31, 2025
4a5348e
fix aura tests
Marchhill Apr 1, 2025
b1cb3de
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill Apr 1, 2025
5aa695e
fix Can_include_inclusion_list to account for randomisation
Marchhill Apr 1, 2025
a2c9f1b
fix shutter keys missed test with delay
Marchhill Apr 1, 2025
0b400bf
comment out Shutter test
Marchhill Apr 1, 2025
37512ca
use arraypoollist for getInclusionList
Marchhill Apr 1, 2025
e3efc6a
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill Apr 1, 2025
efb6260
Improvements
LukaszRozmej Apr 1, 2025
0b44442
reuse transactionsInBlock hash set
Marchhill Apr 2, 2025
ec85830
Merge branch 'feature/eip-7805' of github.com:NethermindEth/nethermin…
Marchhill Apr 2, 2025
4a2a26e
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill May 2, 2025
8dfef56
fix whitespace
Marchhill May 2, 2025
8a5f745
remove comments
Marchhill May 8, 2025
67d6b37
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill May 8, 2025
77dc23f
throw invalidoperation for TransactionInBlock
Marchhill May 8, 2025
df22ddf
disable osaka test
Marchhill May 8, 2025
448c0a1
notimplementedexception
Marchhill May 8, 2025
8373eae
fix checking for transactions in block
Marchhill May 9, 2025
6eff241
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill May 20, 2025
3a4d340
whitespace
Marchhill May 20, 2025
6c0d84c
check nonce and balance
Marchhill May 20, 2025
f90835f
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill May 29, 2025
30158de
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill May 29, 2025
fc0985d
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill May 29, 2025
69acd56
format
Marchhill May 29, 2025
723d33a
comment tests
Marchhill May 30, 2025
1205ccd
fix IL test
Marchhill May 30, 2025
da0c12f
fix some tests
Marchhill May 30, 2025
f761280
fix aura tests
Marchhill May 30, 2025
dde1d97
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill May 30, 2025
b5ff810
use txpool directly for building
Marchhill May 30, 2025
552dd31
separate IL builder class
Marchhill May 30, 2025
69575ac
add IL builder class
Marchhill May 30, 2025
f3ead60
todo IL building
Marchhill May 30, 2025
fa3e27d
improve payload storage
Marchhill Jun 2, 2025
c6d886c
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill Jun 2, 2025
782eccc
fix test
Marchhill Jun 2, 2025
6f54a3c
formatting
Marchhill Jun 2, 2025
e4c6377
optimise sender recovery
Marchhill Jun 2, 2025
3563120
set IL txs in execution payload, recover later
Marchhill Jun 2, 2025
96e1574
only expose build count
Marchhill Jun 2, 2025
2fe01bf
ImproveBlock overload take payloadstore
Marchhill Jun 2, 2025
37c1107
reuse txs decoding
Marchhill Jun 3, 2025
c7906c1
formatting
Marchhill Jun 3, 2025
9d0ecc7
prewarm IL tx sender addresses
Marchhill Jun 3, 2025
9cfdf66
parallelise validation
Marchhill Jun 3, 2025
fae7077
move asOrdered
Marchhill Jun 3, 2025
ed4ddc9
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill Jun 3, 2025
4809fca
tidy, disable txsdecoder parallelism
Marchhill Jun 3, 2025
36c94c1
fix RLP decoding exception handling
Marchhill Jun 3, 2025
600812e
add delay in force rebuild test
Marchhill Jun 3, 2025
1d439af
format
Marchhill Jun 3, 2025
007cbfb
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill Jun 3, 2025
17dc92e
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill Jul 15, 2025
5e37d24
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill Jul 30, 2025
816d6ad
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill May 26, 2026
3570860
Rename Fork7805 → Bogota
Marchhill May 26, 2026
15fbef6
Wire InclusionListTxSource through DI and implement payload-rebuild
Marchhill May 26, 2026
618fcb6
Update FOCIL impl to execution-apis#609 (latest EIP-7805 spec)
Marchhill May 26, 2026
0612604
Address PR review feedback
Marchhill May 26, 2026
1b9cf10
Add unit tests for FOCIL components
Marchhill May 26, 2026
0056156
Add CI workflows for FOCIL test suites
Marchhill May 26, 2026
3563641
Fold FOCIL into existing CI plumbing, fix existing test failures
Marchhill May 26, 2026
8ce1f4b
Document why Bogota Pyspec fixtures stay empty
Marchhill May 27, 2026
6cddc9b
Rewrite FOCIL E2E tests and fix scope-violation in IL validation
Marchhill May 27, 2026
5586d85
Drop BogotaBlockchainTests placeholders
Marchhill May 27, 2026
ff9b645
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill May 27, 2026
1d3ab76
lint
Marchhill May 27, 2026
3c5b27c
fix lint
Marchhill May 27, 2026
bb87894
Fix bugs surfaced by the Marchhill/hive focil simulator
Marchhill May 27, 2026
de8654d
Include inclusion list in payload-id hash
Marchhill May 27, 2026
eb3e7e6
Address PR review comments (round 2)
Marchhill May 27, 2026
307fa3d
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill May 27, 2026
249a4ec
Migrate FOCIL tests from FluentAssertions to NUnit
Marchhill May 27, 2026
0dc087d
Simplify IL validator and narrow FCUv5 catch (review)
Marchhill May 28, 2026
8eb86c6
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill May 28, 2026
2b4e82d
IL validator: parent-state check + MaxFeePerGas fix
Marchhill May 28, 2026
4a4f95b
IL: combine decode + signature recovery into one parallel pass
Marchhill May 28, 2026
40bce39
Drop dead BlockchainProcessor block + refresh stale Bogota doc
Marchhill May 28, 2026
6219866
IL decoder: narrow recovery catch + log at trace
Marchhill May 29, 2026
62b66da
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill May 29, 2026
94a4bed
fix lint
Marchhill May 29, 2026
18e25aa
tidy
Marchhill Jun 2, 2026
0ed5ddf
Cleanup: 2026 license, trim comments, drop dead code
Marchhill Jun 2, 2026
73fd89f
Drop commented ProcessTransactions overload from IBlockProcessor
Marchhill Jun 2, 2026
f718fe4
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill Jun 2, 2026
3bd49e2
PayloadPreparationService: fix stale comment on _rebuildSlots
Marchhill Jun 2, 2026
98e40f7
Move IL satisfaction onto IBlockValidator (option 2)
Marchhill Jun 2, 2026
5c22ccc
NullBlockProcessor: restore TransactionProcessed event
Marchhill Jun 2, 2026
e9e4fcf
Perf pass on FOCIL hot paths
Marchhill Jun 2, 2026
89a105d
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill Jun 2, 2026
5b93395
Drop orphan IL stub + raise stackalloc threshold
Marchhill Jun 2, 2026
a0cfe7f
tidy
Marchhill Jun 3, 2026
d1a2b16
Encapsulate IL validation lifecycle behind IBlockValidator
Marchhill Jun 3, 2026
84df88d
Doc: BeginInclusionListValidation two-phase contract
Marchhill Jun 3, 2026
43dfec6
EIP-7805: revert IL satisfaction check to post-execution state
Marchhill Jun 3, 2026
d6d444b
refactor, throw invalidILException
Marchhill Jun 4, 2026
daf80ef
cleanup and optimise
Marchhill Jun 4, 2026
96e72c1
remove specprovider test
Marchhill Jun 4, 2026
02fdfd1
arraypoollist
Marchhill Jun 4, 2026
11bdfcf
tidy comment
Marchhill Jun 4, 2026
672b195
IEngineRpcModule comments
Marchhill Jun 4, 2026
5b358b9
tidy
Marchhill Jun 4, 2026
f744cbc
whitespace
Marchhill Jun 4, 2026
c23c8ef
optimisations
Marchhill Jun 5, 2026
42de652
reduce allocations
Marchhill Jun 5, 2026
53059f6
simplify IL decoding
Marchhill Jun 5, 2026
4022f38
remove RecoverOne
Marchhill Jun 5, 2026
99df16c
txsdecoder reuse
Marchhill Jun 5, 2026
1df99cf
Fix stateless tests: keep TryGetTransactions serial-inline
Marchhill Jun 5, 2026
f79494c
Gate TxsDecoder parallel branch behind !ZK_EVM, re-dedup TryGetTransa…
Marchhill Jun 5, 2026
f737c3d
RecoverData: skipErrors=true for IL txs in block preprocessor
Marchhill Jun 5, 2026
1a871be
TxsDecoder: collapse to single #if/#else by extracting DecodeSequential
Marchhill Jun 5, 2026
b69ea5e
tidy, optimise encode
Marchhill Jun 8, 2026
08b58ad
optimise GetInclusionList
Marchhill Jun 8, 2026
f4a916d
missing file
Marchhill Jun 8, 2026
cf03bb6
tidy
Marchhill Jun 8, 2026
a0fb199
fix lint
Marchhill Jun 8, 2026
404e52f
tidy comments
Marchhill Jun 8, 2026
502d43a
add more tests
Marchhill Jun 8, 2026
fcfbf78
fix comment
Marchhill Jun 8, 2026
60068af
review comments
Marchhill Jun 9, 2026
30696bb
more review comments
Marchhill Jun 9, 2026
3dfe25c
add comments
Marchhill Jun 9, 2026
614d90f
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill Jun 9, 2026
d3be493
Address Lukasz review (round 5)
Marchhill Jun 10, 2026
564b2b8
Revert input-side MAX_BYTES_PER_INCLUSION_LIST check
Marchhill Jun 10, 2026
97bd77a
InclusionListBuilder: pool the reservoir buffer
Marchhill Jun 10, 2026
3e7ef38
IL: skip intrinsic-gas-too-low txs in CouldIncludeTx
Marchhill Jun 19, 2026
02996e0
test: regression for IL intrinsic-gas-too-low filter
Marchhill Jun 19, 2026
f96ca94
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill Jun 19, 2026
1810a3e
fix: missing Nethermind.Core using in EngineRpcModule.Bogota.cs
Marchhill Jun 22, 2026
05fe0a9
fix: build failure due to missing 'using Nethermind.Core' (#12083)
felix314159 Jun 22, 2026
8624fa2
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill Jun 24, 2026
57bed13
test: wire EEST tests-focil@v0.1.0 fixtures into CI
Marchhill Jun 24, 2026
a75fc09
Merge remote-tracking branch 'upstream/feature/eip-7805' into feature…
Marchhill Jun 24, 2026
0dd6077
FOCIL: signal IL-unsatisfied via Block flag, don't throw to reject
Marchhill Jun 24, 2026
99bd016
Update src/Nethermind/Nethermind.Merge.Plugin/Handlers/NewPayloadHand…
Marchhill Jun 25, 2026
c5ee1de
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill Jun 25, 2026
e766b70
FOCIL: align with master's gas-limit ulong + log-wording fix
Marchhill Jun 25, 2026
6b1a6c0
Merge remote-tracking branch 'upstream/feature/eip-7805' into feature…
Marchhill Jun 25, 2026
9ccac2b
fix lint
Marchhill Jun 25, 2026
45edb2b
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill Jul 6, 2026
2406261
Address review feedback: trim comments, parameterize tests, typed fix…
Marchhill Jul 6, 2026
538fb9f
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill Jul 13, 2026
f486ec9
test: post-merge FOCIL fixups
Marchhill Jul 13, 2026
2d9a0df
Merge remote-tracking branch 'upstream/master' into feature/eip-7805
Marchhill Jul 16, 2026
a41b123
fix: re-add MinTxsForParallelDecoding const dropped in merge
Marchhill Jul 16, 2026
7f68132
fix: harden EIP-7805 inclusion-list validation and build scoping
Marchhill Jul 16, 2026
78e68a0
feat: return PayloadStatusV2 from engine_newPayloadV6 (execution-apis…
Marchhill Jul 16, 2026
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
4 changes: 4 additions & 0 deletions src/Nethermind/Ethereum.Blockchain.Pyspec.Test/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ public class Constants
public const string ARCHIVE_URL_TEMPLATE = "https://github.com/ethereum/execution-specs/releases/download/{0}/{1}";
public const string DEFAULT_ARCHIVE_VERSION = "tests-glamsterdam-devnet@v6.1.1";
public const string DEFAULT_ARCHIVE_NAME = "fixtures_glamsterdam-devnet.tar.gz";

// EIP-7805 (FOCIL) fixtures for Bogota — shipped as a separate archive from the default release.
public const string FOCIL_ARCHIVE_VERSION = "tests-focil@v0.1.0";
public const string FOCIL_ARCHIVE_NAME = "fixtures_focil.tar.gz";
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,23 @@ public static IEnumerable<TestCaseData> LoadTests() =>
PyspecLoader.LoadCases<BlockchainTest, TSelf>("blockchain_tests_sync", "SyncBlockchainTests");
}

// Bogota engine-payload fixtures (EIP-7805 FOCIL). Shipped as a separate EELS release archive
// from BAL, so we override ArchiveVersion/ArchiveName here.
public abstract class PyspecBogotaEngineBlockchainTestFixture() : PyspecLinuxX64BlockchainFixture(parallel: false, batchRead: false)
{
[TestCaseSource(nameof(LoadTests))]
public async Task Test(BlockchainTest test) => Assert.That((await RunTest(test)).Pass, Is.True);

public static IEnumerable<TestCaseData> LoadTests() =>
PyspecLoader.ToTestCases(new TestsSourceLoader(
new LoadPyspecTestsStrategy
{
ArchiveVersion = Constants.FOCIL_ARCHIVE_VERSION,
ArchiveName = Constants.FOCIL_ARCHIVE_NAME,
},
"fixtures/blockchain_tests_engine/for_bogota").LoadTests<BlockchainTest>());
}

// Loads only `for_amsterdam` because parallel-BAL execution is gated on EIP-7928.
public abstract class PyspecAmsterdamBlockchainTestFixture(bool parallel, bool batchRead) : PyspecLinuxX64BlockchainFixture(parallel, batchRead)
{
Expand Down
3 changes: 3 additions & 0 deletions src/Nethermind/Ethereum.Blockchain.Pyspec.Test/Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public class Bpo2ToAmsterdamAtTime15kEngineBlockchainTests : PyspecEngineBlockch
public class Bpo2ToBpo3AtTime15kEngineBlockchainTests : PyspecEngineBlockchainTestFixture<Bpo2ToBpo3AtTime15kEngineBlockchainTests>;
public class Bpo3ToBpo4AtTime15kEngineBlockchainTests : PyspecEngineBlockchainTestFixture<Bpo3ToBpo4AtTime15kEngineBlockchainTests>;

// EIP-7805 (FOCIL) — Bogota fork. Loads `for_bogota` from the tests-focil release.
public class BogotaEngineBlockchainTests : PyspecBogotaEngineBlockchainTestFixture;

// Sync blockchain tests - exercise sync-mode payload validation alongside the standard engine flow.
public class AmsterdamSyncBlockchainTests : PyspecSyncBlockchainTestFixture<AmsterdamSyncBlockchainTests>;
public class OsakaSyncBlockchainTests : PyspecSyncBlockchainTestFixture<OsakaSyncBlockchainTests>;
Expand Down
30 changes: 24 additions & 6 deletions src/Nethermind/Ethereum.Test.Base/BlockchainTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,11 @@ private static async Task<Result<string>> RunNewPayloads(TestEngineNewPayloadsJs
&& validationError is null;

int paramCount = NewPayloadParamCounts[newPayloadVersion];
string paramsJson = "[" + string.Join(",", enginePayload.Params.Take(paramCount).Select(static p => p.GetRawText())) + "]";
IEnumerable<string> paramsRaw = enginePayload.Params.Take(paramCount).Select(static p => p.GetRawText());
// EIP-7805 (FOCIL): the IL is a separate fixture field; append it as the 5th positional arg for V6.
if (newPayloadVersion >= EngineApiVersions.NewPayload.V6 && enginePayload.InclusionListTransactions is { } il)
paramsRaw = paramsRaw.Append(JsonSerializer.Serialize(il));
string paramsJson = "[" + string.Join(",", paramsRaw) + "]";

string npMethod = expectWitness ? "engine_newPayloadWithWitness" : "engine_newPayloadV" + newPayloadVersion;
JsonRpcResponse npResponse = await SendRpc(rpcService, rpcContext, npMethod, paramsJson);
Expand Down Expand Up @@ -476,12 +480,14 @@ private static async Task<Result<string>> RunNewPayloads(TestEngineNewPayloadsJs
else
{
PayloadStatusV1 payloadStatus = GetPayloadStatus(npResponse, newPayloadVersion);
AssertPayloadStatus(payloadStatus, validationError, newPayloadVersion);
AssertPayloadStatus(payloadStatus, validationError, newPayloadVersion, enginePayload.Status);
lastStatus = payloadStatus.Status;
if (payloadStatus.ValidationError is not null)
lastValidationError = payloadStatus.ValidationError;

if (payloadStatus.Status == PayloadStatus.Valid)
// FCU after INCLUSION_LIST_UNSATISFIED too — the block is committed, so the head
// must advance to match the fixture's lastblockhash/postState.
if (payloadStatus.Status is PayloadStatus.Valid or PayloadStatus.InclusionListUnsatisfied)
{
string blockHash = enginePayload.Params[0].GetProperty("blockHash").GetString()!;
AssertRpcSuccess(await SendFcu(rpcService, rpcContext, fcuVersion, blockHash));
Expand Down Expand Up @@ -523,6 +529,9 @@ private static bool TryGetRpcError(JsonRpcResponse response, out int errorCode,
private static PayloadStatusV1 GetPayloadStatus(JsonRpcResponse response, int payloadVersion) =>
response switch
{
// newPayloadV6 (EIP-7805) returns PayloadStatusV2; it derives from PayloadStatusV1 so the
// runtime type is preserved and AssertPayloadStatus can read inclusionListSatisfied.
ResultWrapper<PayloadStatusV2> { Result.ResultType: ResultType.Success } v2Wrapper => v2Wrapper.Data,
ResultWrapper<PayloadStatusV1> { Result.ResultType: ResultType.Success } resultWrapper => resultWrapper.Data,
JsonRpcSuccessResponse { Result: PayloadStatusV1 payloadStatus } => payloadStatus,
_ => throw new AssertionException($"engine_newPayloadV{payloadVersion} returned unexpected response type {response.GetType().FullName}")
Expand All @@ -531,10 +540,19 @@ private static PayloadStatusV1 GetPayloadStatus(JsonRpcResponse response, int pa
private static void AssertExpectedRpcError(int errorCode, string? errorMessage, string? validationError, int payloadVersion) =>
Assert.That(validationError, Is.Not.Null, $"engine_newPayloadV{payloadVersion} RPC error: {errorCode} {errorMessage}");

private static void AssertPayloadStatus(PayloadStatusV1 payloadStatus, string? expectedValidationError, int payloadVersion)
private static void AssertPayloadStatus(PayloadStatusV1 payloadStatus, string? expectedValidationError, int payloadVersion, string? explicitStatus = null)
{
string expectedStatus = expectedValidationError is null ? PayloadStatus.Valid : PayloadStatus.Invalid;
Assert.That(payloadStatus.Status, Is.EqualTo(expectedStatus), $"engine_newPayloadV{payloadVersion} returned {payloadStatus.Status}, expected {expectedStatus}. ValidationError: {payloadStatus.ValidationError}");
// A fixture-supplied `status` wins (covers INCLUSION_LIST_UNSATISFIED for FOCIL);
// otherwise fall back to the legacy validation-error → INVALID convention.
string expectedStatus = explicitStatus ?? (expectedValidationError is null ? PayloadStatus.Valid : PayloadStatus.Invalid);

// execution-apis#609: newPayloadV6 reports a censoring payload as VALID with
// inclusionListSatisfied=false rather than the legacy INCLUSION_LIST_UNSATISFIED status.
// Fixtures authored against the old status still expect it, so normalize for comparison.
string actualStatus = payloadStatus is PayloadStatusV2 { Status: PayloadStatus.Valid, InclusionListSatisfied: false }
? PayloadStatus.InclusionListUnsatisfied
: payloadStatus.Status;
Assert.That(actualStatus, Is.EqualTo(expectedStatus), $"engine_newPayloadV{payloadVersion} returned {actualStatus}, expected {expectedStatus}. ValidationError: {payloadStatus.ValidationError}");

if (expectedValidationError is not null)
AssertValidationError(payloadStatus.ValidationError, expectedValidationError, payloadVersion);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ public class TestEngineNewPayloadsJson
public string? NewPayloadVersion { get; set; }
public string? ForkChoiceUpdatedVersion { get; set; }
public string? ValidationError { get; set; }
// EIP-7805: RLP-encoded txs, emitted by the fixture out-of-band from `params`;
// appended as the 5th positional arg when targeting newPayloadV6.
public string[]? InclusionListTransactions { get; set; }
// Expected PayloadStatusV1.Status; when absent, derived from ValidationError.
public string? Status { get; set; }

public ExecutionWitnessJson? ExecutionWitness { get; set; }
public bool? ExecutionWitnessMutated { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
// SPDX-License-Identifier: LGPL-3.0-only

using System.Diagnostics.CodeAnalysis;
using Nethermind.Consensus.Processing;
using Nethermind.Consensus.Validators;
using Nethermind.Core;
using Nethermind.Crypto;
using Nethermind.Evm.State;

namespace Nethermind.BalRecorder;

Expand All @@ -28,6 +30,9 @@ public bool ValidateSuggestedBlock(Block block, BlockHeader parent, [NotNullWhen
public bool ValidateBodyAgainstHeader(BlockHeader header, BlockBody toBeValidated, [NotNullWhen(false)] out string? error) =>
inner.ValidateBodyAgainstHeader(header, toBeValidated, out error);

public bool ValidateInclusionList(Block processedBlock, Block suggestedBlock, IWorldState worldState, ProcessingOptions options) =>
inner.ValidateInclusionList(processedBlock, suggestedBlock, worldState, options);

public bool ValidateProcessedBlock(Block processedBlock, TxReceipt[] receipts, Block suggestedBlock, [NotNullWhen(false)] out string? error)
{
if (balSwitch.Enabled && suggestedBlock.Header.BlockAccessListHash is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ private class BranchProcessorMock : IBranchProcessor

internal readonly HashSet<Hash256> Processed = [];

// Captures the block instance actually handed to the branch processor (post-recovery-queue
// resolution) so tests can assert transient side-channel data survived — see the IL case.
internal readonly ConcurrentDictionary<Hash256, Block> ProcessedBlockByHash = new();

private readonly ConcurrentHashSet<Hash256> _allowedToFail = [];

private readonly HashSet<Hash256> _rootProcessed = [];
Expand Down Expand Up @@ -99,6 +103,7 @@ public Block[] Process(BlockHeader? baseBlock, IReadOnlyList<Block> suggestedBlo
}

Processed.AddRange(suggestedBlocks.Select(x => x.Hash!));
foreach (Block suggested in suggestedBlocks) ProcessedBlockByHash[suggested.Hash!] = suggested;

_logger.Info($"Processing {suggestedBlocks.Last().ToString(Block.Format.Short)}");
int nextBlock = 0;
Expand Down Expand Up @@ -275,6 +280,16 @@ public ProcessingTestContext AndRecoveryQueueLimitHasBeenReached()
return this;
}

public ProcessingTestContext InclusionListPreservedFor(Block block)
{
Assert.That(_branchProcessor.ProcessedBlockByHash.TryGetValue(block.Hash!, out Block? processed), Is.True,
$"Block {block.ToString(Block.Format.Short)} was not processed");
Assert.That(processed!.InclusionListTransactions, Is.Not.Null,
"Inclusion list was dropped before validation (recovery-queue re-resolve stripped it)");
Assert.That(processed.InclusionListTransactions!, Has.Length.EqualTo(block.InclusionListTransactions!.Length));
return this;
}

public AfterBlock Processed(Block block)
{
_headBefore = _blockTree.Head?.Hash;
Expand Down Expand Up @@ -778,6 +793,23 @@ public void Can_change_branch_on_invalid_block_when_invalid_branch_is_in_the_que
.ProcessedSkipped(_block4D8).IsDeletedAsInvalid()
.FullyProcessed(_blockB2D4).BecomesNewHead();

// review r3595551681: when the recovery-queue limit is reached the processor would replace an
// IL-bearing block with a hash-only BlockRef re-resolved from the DB, dropping the transient
// (non-RLP) inclusion list. The full block must be kept so ValidateInclusionList still sees the IL.
[Test, MaxTime(Timeout.MaxTestTime)]
public void Inclusion_list_survives_recovery_queue_backlog()
{
Transaction ilTx = Build.A.Transaction.SignedAndResolved(TestItem.PrivateKeyA).TestObject;
Block ilBlock = Build.A.Block.WithNumber(1).WithNonce(111).WithParent(_block0).WithDifficulty(2)
.WithInclusionListTransactions([ilTx]).TestObject;

When.ProcessingBlocks
.AndRecoveryQueueLimitHasBeenReached()
.FullyProcessed(_block0).BecomesGenesis()
.FullyProcessed(ilBlock).BecomesNewHead()
.InclusionListPreservedFor(ilBlock);
}

[Test, MaxTime(Timeout.MaxTestTime)]
[Ignore("Not implemented yet - scenario when from suggested blocks we can see that previously suggested will not be winning")]
[Todo(Improve.Performance, "We can skip processing losing branches by implementing code to pass this test")]
Expand Down
Loading
Loading