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 rollback for exec cmd #3066

Merged
merged 6 commits into from
Dec 19, 2024

Conversation

popcnt1
Copy link
Collaborator

@popcnt1 popcnt1 commented Dec 18, 2024

Summary

  1. add rollback for catching wrong tx execution
  2. implement transaction order hash command for dump tx_order:tx_hash:block

popcnt1 added 4 commits December 18, 2024 22:33
Add `get_tx_order_hash` command to process transaction order and hash data. Introduced `LedgerTxLoader` for loading and verifying ledger transactions, and updated DACommand to integrate the new functionality.
…d rollback

Introduce new transaction and ledger handling with rollback and logging features. This includes TxOrderHashBlockGetter for advanced binary search and rollback management, improved logging with shutdown handling, and restructuring for clearer chunk processing and execution.
Increase mpsc channel buffer size to 16384 for performance improvement and resolve edge cases in binary search for finding the last executed transaction. Ensures better handling of empty lists and accurate last executed transaction detection.
Simplifies the `binary_search_by` logic and refines error handling for `tx_order` mismatch. Ensures alignment with expected behavior and improves code readability.
Copy link

vercel bot commented Dec 18, 2024

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

Name Status Preview Comments Updated (UTC)
rooch-portal-v2.1 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2024 4:44am
test-portal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 19, 2024 4:44am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
rooch ⬜️ Ignored (Inspect) Visit Preview Dec 19, 2024 4:44am

@jolestar jolestar requested a review from Copilot December 19, 2024 00:12
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

crates/rooch/src/commands/da/commands/unpack.rs:121

  • The variable name _min_chunk_id is ambiguous and unused. Consider removing it or renaming it to something more meaningful if it will be used in the future.
let (chunks, _min_chunk_id, _max_chunk_id) = collect_chunks(self.segment_dir.clone())?;

crates/rooch/src/commands/db/commands/rollback.rs Outdated Show resolved Hide resolved
@popcnt1 popcnt1 merged commit 089bb48 into rooch-network:main Dec 19, 2024
6 of 9 checks passed
@popcnt1 popcnt1 deleted the refactor/da/exec/rollback branch December 19, 2024 04:41
steelgeek091 pushed a commit to steelgeek091/rooch that referenced this pull request Dec 22, 2024
## Summary

1. add rollback for catching wrong tx execution
2. implement transaction order hash command for dump tx_order:tx_hash:block
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