perf(prewarm): hint the EIP-2935 parent-hash slot to the prewarmer - #12410
Conversation
|
Claude finished @svlachakis's task in 4m 1s —— View job PR Review: warm the beneficiary and the EIP-2935 parent-hash slot
I reviewed the full diff plus the surrounding prewarming machinery, DI wiring, and every ✅ Correctness
✅ Wiring / build
🟡 Low / minor observations (non-blocking)
TestingThe new Verdict: mergeable. No blocking findings. |
The fee write to the beneficiary and the 2935 ring-buffer write run in serial segments the prewarmer never covers: the beneficiary is not a tx sender/target and the blockhash store had no access-list hint. Both are computable before processing starts, so warm them with the rest of the addresses.
c2ae9df to
126a2be
Compare
EXPB Benchmark ComparisonRun: View workflow run superblocksScenario: Client Processing (SSE)
K6 TTFB
realblocksScenario: Client Processing (SSE)
K6 TTFB
|
…ciary change Split per review: the beneficiary warming moves to its own PR.
Single sized factory instead of Builder + growing lists.
…rmer Per review: the providers arrive by DI instead of threading through BranchProcessor, whose beacon-handler parameter existed only for the forwarding. IBlockhashStore stays unchanged (fixes the Xdc implementor break); the BlockhashStore class implements IHasAccessList.
Chains that bind their own store (Xdc) broke on the hard cast in the hint registration; a null-object provider contributes nothing instead.
Changes
BlockhashStoreimplementsIHasAccessList: the hint covers the 2935 history contract and the exact ring-buffer slot the block writes, only when EIP-2935 is active, the block is not genesis, and the contract is deployed. The parent-hash write runs in the serial segment before the transaction loop, so without the hint its account and slot are always cold un-overlapped reads on the critical path.Per review:
BlockCachePreWarmerby DI instead of threading throughBranchProcessor— whose beacon-handler parameter existed only for that forwarding and is gone, together with theparamsonPreWarmCaches.IBlockhashStoreis unchanged (no interface widening; the class implementsIHasAccessList), which also keeps otherIBlockhashStoreimplementors unaffected.ApplyBlockhashStateChangesand the hint through one helper, so the write and the hint cannot drift apart.AccessList.ForSingleStorageCell) — no builder object, no list growth; one small sized list pair once per block, the same cost class as the beacon-root hint.The beneficiary warming was split out to #12415 per review.
Testing
GetAccessListcases inBlockhashProviderTests(deployed/pre-fork/genesis/undeployed, exact-slot assertion).Nethermind.Xdcbuild (46/0);Nethermind.Blockchain.Test1556/1556;Nethermind.Consensus.Test110/110;dotnet formatclean.Types of changes