Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(rooch-da): introduce new data struct for DA and approach to …
…improve robust of DA submission (#2731) * wip: refactor da/proposer * feat(rooch-types): add DA batch and chunk serialization Introduce DA batch structures and implement chunk serialization logic. Moved DA-related modules to rooch-types and updated dependencies. * feat(rooch-store): add DA store for block submission tracking Introduce DAMetaDBStore to handle DA block submission and cursors. Refactor tests and configuration to integrate new DA store functionalities. * fix(rooch-sequencer): correct typo and add TODO for transaction Corrected a typo in the sequencer initialization comment and added a TODO note to save sequencer_info and transaction in a single transaction. This change ensures clarity in the code and highlights a necessary improvement. * docs(rooch-da): update DA server responsibilities in README Revised README to clarify DA server responsibilities and structure. Removed outdated internal and Celestia server README files. * refactor(rooch-da): rename DABatch constructors Renamed DABatch constructors for clarity. 'new' is now 'new_no_sign' and 'new_with_sign' is now 'new' to better reflect their functionality. * refactor(rooch-config): rename InternalDAServerConfig to DABackendConfig Renamed InternalDAServerConfig and associated types to DABackendConfig for clarity and consistency. Updated related references in scripts and configuration files accordingly. * feat(rooch-da): simplify DA backend and message handling Remove actor and message handling layers for DA backend, and streamline Celestia and OpenDA backend logic. This refactor reduces complexity and improves maintainability by consolidating DA backend responsibilities. * chore * feat(rooch-store): enhance block range calculations Improve block range calculations for better handling of tx order continuity and maximum transactions per block constraint. Adjust test cases to validate changes and ensure accurate block range partitioning. * feat(rooch-da): add new constructor for DABatchMeta Added a constructor for DABatchMeta to initialize its fields. Also, updated SignedDABatchMeta and DABatch to include meta_signature field. * fix(rooch-store): reduce MAX_TXS_PER_BLOCK_IN_FIX Update MAX_TXS_PER_BLOCK_IN_FIX to 8192 to prevent OOM errors during block submission fixes. This change helps manage memory usage more effectively. * feat(rooch-da): implement batch metadata signing and submission Update batch message structure, return type, and implement batch metadata signing. Introduce background submission logic and remove unused dependencies. * chore(rooch-executor): remove hex dependency Removed the hex crate from rooch-executor's Cargo.toml as it is no longer needed. This cleanup helps to minimize the dependencies and can potentially reduce the final binary size. * feat(rooch-rpc-server): integrate DAServer with sequencer Updated the DA module integration by switching from DAActor to DAServerActor and corresponding proxy changes. Added sequencer order tracking to improve transaction handling with the new DAServerActor setup. * fix(rooch-da): improve error handling in append_submitting_block Enhanced error message formatting in append_submitting_block for better debugging. This provides more context about the block numbers involved when an error occurs. * feat(rooch-proposer): replace DAProxy with DAServerProxy Update the `ProposerActor` and `StateCommitmentChain` to use `DAServerProxy` instead of `DAProxy`. This change enhances consistency with server handling. Additionally, update dependencies in Cargo.lock to latest versions. * refactor(rooch-da): improve error handling and code clarity Refactor error handling logic and code readability. Replaced use of deprecated macros and improved conditional checks for better maintainability. * refactor(rooch-da): simplify DA backend and server logic Removed unused imports and redundant code. Refactored backend submission logic for efficiency and readability. * feat(rooch-da): refactor DABatch to use typed tx_list Refactored DABatch to accept Vec<LedgerTransaction> instead of Vec<u8>. This improves type safety and clarity, and involves modifying methods, tests, and related message structures. * feat(rooch-da): use genesis digest as open-da namespace 1. simply da config 2. use genesis digest as open-da namespace when start server * fix lint issue
- Loading branch information