-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(rooch-da): refactor indexing logic in DA commands #3199
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Updated the functionality to fetch execution info using transaction hash instead of order. This includes renaming the command, updating related logic, and adapting parameters to handle transaction hashes.
Removed the DumpTxRootCommand and its references from the codebase as it is no longer needed. This simplifies the db module and reduces unnecessary maintenance overhead.
Updated `execute` methods in `GetExecutionInfoByHashCommand` and `GetChangesetByOrderCommand` to return `Option` types directly. This simplifies the implementation by removing unnecessary logging and streamlining the return process.
Refactored `has_executed` method to streamline logic and avoid redundant calls. Removed unused `get_execution_info_by_order` method for cleaner code maintenance.
Cleaned up the code by removing an unused import for DumpTxRootCommand. This improves maintainability and eliminates unnecessary dependencies.
Introduce an LMDB-based transaction indexing mechanism to replace the file-based approach, significantly optimizing storage and performance. Added reset functionality and enforced stricter handling of tx_order continuity.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@popcnt1 is attempting to deploy a commit to the Rooch Team on Vercel. A member of the Team first needs to authorize it. |
Introduced a new `--max-block-number` flag to indexer to define the maximum block number to index. Updated loop logic to respect the limit and adjusted dependencies in Cargo.lock.
Introduce the ability to load and verify transaction indices from a file-based source. This includes adding CLI options `--load-from` and `--verify` to support initialization and validation against the original index file.
Add functionality to load, dump, and verify transaction indices from file-based sources. This implementation includes new CLI options such as `--file`, `--dump`, and improved validations to enhance index initialization, verification, and stats reporting.
Extracted Indexer and TxPosition into separate files and modules, improving code organization and reusability. This change reduces redundancy and streamlines dependencies within the `da` commands.
Refactored data indexing and management by introducing TxMetaStore and TxPositionIndexer. Removed legacy TxDAIndexer and associated structures, improving modularity and simplifying the DA execution flow.
popcnt1
requested review from
wow-sven,
pause125,
jolestar,
baichuan3 and
steelgeek091
as code owners
January 19, 2025 16:17
popcnt1
changed the title
feat(rooch-da): implement LMDB-backed indexer for transactions
refactor(rooch-da): refactor indexing logic in DA commands
Jan 19, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Refactored data indexing and management, improving modularity and simplifying the DA execution flow.