pathfinder icon indicating copy to clipboard operation
pathfinder copied to clipboard

Add support for L1 to L2 message log syncing

Open t00ts opened this issue 5 months ago • 0 comments

Introduces functionality to sync L1 to L2 message logs, improving our ability to track cross-chain interactions.

Key Changes

  1. Added get_logs method to the Ethereum client:
    • Allows fetching logs for a specified block range
    • Implements recursive fetching with automatic range splitting for large queries
  2. Implemented bulk syncing of L1ToL2MessageLog:
    • Fetches logs from the last synced L1 block up to the current state
    • Stores these logs for later matching with L2 transactions
  3. Enhanced L1 sync process:
    • Bulk fetches logs at the beginning of execution
    • Waits for L2 blocks and matches l1_handler transactions with corresponding L1 transaction hashes
  4. Introduced L1BlockNumber and L1TransactionHash types to avoid confusion

Closes #2243

t00ts avatar Sep 19 '24 10:09 t00ts