Closed sideninja closed 1 month ago
This update enhances the codebase by incorporating precompiled call data into receipt storage, simplifying function signatures through the removal of unnecessary parameters, and improving transaction ingestion tests. These modifications increase clarity, ensure robust error handling, and facilitate easier maintenance and future development.
Files | Change Summary |
---|---|
models/receipt.go , models/transaction.go |
Added PrecompiledCalls field to StorageReceipt and updated related constructors for enhanced transaction data. |
services/ingestion/engine.go , services/ingestion/engine_test.go |
Removed block parameter from indexReceipts , simplifying its signature and updated tests to validate against heights. |
storage/index.go , storage/mocks/ReceiptIndexer.go |
Removed height parameter from Store method in ReceiptIndexer , simplifying method calls. |
storage/index_testsuite.go |
Updated test functions to eliminate block height requirement and added validation for storing receipts. |
storage/pebble/keys.go |
Introduced new constants ledgerValue and ledgerSlabIndex for ledger management. |
storage/pebble/ledger.go |
Added Ledger type for managing key-value pairs, ensuring thread safety with a mutex. |
storage/pebble/receipts.go |
Modified Store method to remove evmHeight , improving logic for block height validation. |
sequenceDiagram
participant Client
participant Engine
participant ReceiptIndexer
participant Storage
Client->>Engine: Process Events
Engine->>ReceiptIndexer: Index Receipts
ReceiptIndexer->>Storage: Store Receipts
Storage-->>ReceiptIndexer: Acknowledge Storage
ReceiptIndexer-->>Engine: Acknowledge Indexing
Engine-->>Client: Return Result
In the meadow where changes bloom,
Our code hops high, dispelling gloom.
With simplified paths and clearer skies,
We store our treasures, watch them rise.
A precompiled call, a leap so grand,
Together we code, hand in hand! πβ¨
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: #449
Description
This is adding a ledger database implementation for creating a local state. This is the first version and it might be changing.
For contributor use:
master
branchFiles changed
in the Github PR explorerSummary by CodeRabbit
New Features
PrecompiledCalls
to enhance transaction receipt data.Ledger
implementation for better key-value operations.Improvements
Bug Fixes
Tests