Closed m-Peter closed 1 month ago
[!CAUTION]
Review failed
The pull request is closed.
The recent changes significantly enhance the Engine
class and associated components by introducing a method for indexing multiple receipts linked to a block. This update includes improved error handling and batch processing capabilities, which promote efficiency and robustness in event processing. Modifications ensure better alignment across tests and interfaces, ultimately enhancing data integrity and streamlining storage operations.
Files | Change Summary |
---|---|
services/ingestion/engine.go , |
Added indexReceipts method for handling multiple receipts with safety checks; modified processEvents to incorporate receipt indexing. |
services/ingestion/engine_test.go |
Updated TestBlockAndTransactionIngestion to handle batch processing of receipts, enhancing assertions for multiple receipts. |
storage/index.go , |
Revised ReceiptIndexer.Store method to accept multiple receipts and an evmHeight parameter, improving batch storage efficiency. |
storage/index_testsuite.go |
Adjusted test cases to match the updated Store method signature, supporting multiple receipts and the new block height parameter. |
storage/mocks/ReceiptIndexer.go , |
Altered mocked Store method to accept slices of receipts and additional parameters, improving test fidelity for batch operations. |
storage/pebble/receipts.go |
Updated Store method to process multiple receipts with validation against evmHeight , enhancing integrity and efficiency in storage operations. |
sequenceDiagram
participant E as Engine
participant R as ReceiptIndexer
participant S as Storage
participant B as Block
E->>B: Process block and receipts
E->>R: Call indexReceipts(receipts, block)
R->>S: Store(receipts, evmHeight)
S->>S: Validate each receipt against evmHeight
S-->>R: Return result
R-->>E: Return indexing result
Objective | Addressed | Explanation |
---|---|---|
Ensure indexing is idempotent (#400) | β | Changes improve batch processing but do not confirm idempotence. |
Allow for manual reindexing with a special mode (#400) | β | No implementation for manual reindexing was observed. |
π° In the garden where data flows,
With receipts that gather, and blooms that glow.
We index with joy, in batches we play,
Ensuring our blocks are stored without stray.
A hop, a skip, through code we bound,
Efficiency blooms in the changes we've found! πΌ
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Closes: https://github.com/onflow/flow-evm-gateway/issues/400
Description
We do this by indexing all receipts for a block height at once, instead of individually, as was done before.
For contributor use:
master
branchFiles changed
in the Github PR explorerSummary by CodeRabbit
New Features
Bug Fixes
Tests