Skip to content

Conversation

letypequividelespoubelles
Copy link
Collaborator

@letypequividelespoubelles letypequividelespoubelles commented Sep 29, 2025

Note

Preloads, records, and validates historical BLOCKHASHes across conflations, wiring them through tracer/capture/RPC, adding EIP-2935/4788 touches, updating snapshots/counters, and expanding tests.

  • Blockhash/HUB/Tracer:
    • Refactor Blockhash to preload and validate historical block hashes, record parent/last block hashes, and compute line counts; add retrieveHistoricalBlockHashes and support for post-op defers.
    • Pass historical block hashes into ZkTracer and all *Hub constructors; Hub wires new Blockhash and schedules BLOCKHASH pre-exec handling.
    • Implement EIP-2935/EIP-4788 system touches in Reaper and EIP2935HistoricalHash (parent hash capture via Blockhash).
  • Capture/Replay/RPC:
    • BlockCapturer now accepts a map of historical hashes and records the last block’s hash; removes inline BLOCKHASH lookup logic.
    • RPC endpoints (CaptureToFile, GenerateConflatedTracesV2) fetch BlockchainService and inject historical hashes into BlockCapturer/ZkTracer.
    • Fork.getForkFromBesuBlockchainService overload to accept BlockchainService directly.
  • Snapshots/Collapse API:
    • Replace BlockHashReaper with a Map<Long, Hash> in Reaper; add touchedBySystemTransactions.
    • ConflationSnapshot: new from(...), historicalBlockHashes(), and adjusted toBlockHashLookup; BlockHeaderSnapshot stores parentBeaconBlockRoot as optional hex string with safe builder.
  • Counting/Execution:
    • ZkCounter updates to account for historical BLOCKHASH rows; only report checked modules in counts.
    • ReplayExecutionEnvironment/test harnesses updated to build snapshots, compute mining beneficiary, and pass historical hashes.
  • Tests:
    • Add Prague Sepolia replays and expanded BlockhashTest; adjust existing tests and disable some legacy ones.
  • Submodule:
    • Bump linea-constraints subproject.

Written by Cursor Bugbot for commit 599cee0. This will update automatically on new commits. Configure here.

@letypequividelespoubelles letypequividelespoubelles linked an issue Sep 29, 2025 that may be closed by this pull request
@letypequividelespoubelles letypequividelespoubelles marked this pull request as draft September 29, 2025 13:13
cursor[bot]

This comment was marked as outdated.

@letypequividelespoubelles letypequividelespoubelles marked this pull request as ready for review October 1, 2025 04:03
cursor[bot]

This comment was marked as outdated.

Signed-off-by: F Bojarski <[email protected]>
Signed-off-by: F Bojarski <[email protected]>
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Signed-off-by: F Bojarski <[email protected]>
Signed-off-by: F Bojarski <[email protected]>
Signed-off-by: F Bojarski <[email protected]>
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Signed-off-by: F Bojarski <[email protected]>
Signed-off-by: F Bojarski <[email protected]>
Signed-off-by: F Bojarski <[email protected]>
Signed-off-by: F Bojarski <[email protected]>
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Signed-off-by: F Bojarski <[email protected]>
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Signed-off-by: F Bojarski <[email protected]>
Signed-off-by: F Bojarski <[email protected]>
This changes the type of the field parentBeaconBlockRoot in
BlockHeaderSnapshot to be an (optional) String instead of a Bytes32
instance.  This is to avoid decoding issues because the GSONDecoder is
not aware of the Bytes32 type.
The clique consensus protocol was only used prior to shanghai, hence we
cannot extract key information from block headers generated from
Shanghai nodes and onwards.
This restores this component, whilst retaining flexibility around the
use of Map<Long,Hash>.  The goal is simply to ensure all block hashes
are stored in the JSON file as hex strings.
cursor[bot]

This comment was marked as outdated.

DavePearce and others added 7 commits October 17, 2025 16:59
Signed-off-by: F Bojarski <[email protected]>
Signed-off-by: F Bojarski <[email protected]>
This puts in fixes for the methods Reaper.touchBlockHash() and also
ConflationSnapshot.from(), and applies spotless.
Signed-off-by: F Bojarski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add previous blockhashes to the conflation

3 participants