Skip to content
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

feat(rooch-da): add repair command for segment issues #3344

Merged
merged 13 commits into from
Feb 20, 2025

Conversation

popcnt1
Copy link
Collaborator

@popcnt1 popcnt1 commented Feb 19, 2025

Summary

  1. fix(rooch-da): handle duplicate transaction hashes

    Skip processing transactions with duplicate hashes to avoid inconsistencies during execution.

  2. fix(rooch-pipeline-processor): handle tx revert errors gracefully

    Improve error handling during transaction reversal for DA failures. Log detailed errors when reverting fails, enabling easier monitoring and debugging.

  3. feat(rooch-da): add repair command for segment issues

    Add a new RepairCommand to address tx_order inconsistencies in data availability segments. This feature includes tools for repairing and verifying segments with enhanced integrity checks without persisting changes.

  4. feat(rooch-db): add CpCfCommand for column family migration

    Introduce CpCfCommand to facilitate copying RocksDB column families between databases. Supports specifying source, destination, and column family name for efficient data migration.

  5. feat(moveos): add RocksDB-backed accumulator tree store

    Introduce a new RocksAccumulatorStore implementation for AccumulatorTreeStore using RocksDB. This includes support for node retrieval, batch operations, and node deletion.

  6. feat(rooch): add utility functions for RocksDB integration

    Introduce open_rooch_db and open_inner_rocks functions to support RocksDB operations. Updated dependencies in Cargo.toml and Cargo.lock to include RocksDB.

Introduce `open_rooch_db` and `open_inner_rocks` functions to support RocksDB operations. Updated dependencies in `Cargo.toml` and `Cargo.lock` to include RocksDB.
Introduce a new `RocksAccumulatorStore` implementation for `AccumulatorTreeStore` using RocksDB. This includes support for node retrieval, batch operations, and node deletion.
Improve the efficiency and clarity of batch creation by passing `RoochKeyPair` and `sequencer_key` as references. This avoids unnecessary copying and enhances memory management across related methods.
Refactored multiple commands to utilize `open_rooch_db` instead of `init` for improved modularity and code clarity. Removed the `init` function and related dependencies, simplifying command logic and reducing redundancy.
Introduce CpCfCommand to facilitate copying RocksDB column families between databases. Supports specifying source, destination, and column family name for efficient data migration.
Add a new RepairCommand to address tx_order inconsistencies in data availability segments. This feature includes tools for repairing and verifying segments with enhanced integrity checks without persisting changes.
Improve error handling during transaction reversal for DA failures. Log detailed errors when reverting fails, enabling easier monitoring and debugging.
Refactor loop to ensure the timestamp of the previous transaction is found. Prevents panics when a transaction doesn't exist and returns the minimum timestamp instead.
Skip processing transactions with duplicate hashes to avoid inconsistencies during execution. Also, adjust logging for L2 transaction execution failures by refining the logging function.
Refactored `cp_cf` command to use a `for` loop instead of a manual loop for iterating over RocksDB entries. This simplifies the code and improves readability without changing functionality.
Renamed constant `TX_ORDER_WITH_DUP_HASH_ISSUE` to `tx_order_with_dup_hash_issue` for alignment with Rust naming conventions. Improves code readability and maintainability.
Refactored the logic for retrieving the transaction timestamp to use `if let` for improved clarity and conciseness. This eliminates unnecessary unwrapping of the option.
Copy link

vercel bot commented Feb 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
onchain-ai-chat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2025 7:09pm
rooch ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2025 7:09pm
rooch-portal-v2.1 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2025 7:09pm
test-portal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 19, 2025 7:09pm

@popcnt1 popcnt1 merged commit 85bf21f into rooch-network:main Feb 20, 2025
11 checks passed
@popcnt1 popcnt1 deleted the feat/da/cmd/repair branch February 20, 2025 09:30
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.

2 participants