Open jackzhhuang opened 1 month ago
The changes introduce several enhancements across various modules in the codebase. A new method merge_check_and_ghostdata
is added to the ChainReader
trait, which allows for merge checks and ghost data retrieval. The MockChain
struct is updated to reflect these changes, and significant renaming of verifier types occurs for clarity. Additionally, new structures and methods related to block depth management are introduced, alongside updates to existing methods for improved error handling and logging. Overall, the modifications aim to enhance functionality and clarity in blockchain operations.
File Path | Change Summary |
---|---|
chain/api/src/chain.rs |
Added method merge_check_and_ghostdata to ChainReader trait. |
chain/mock/src/mock_chain.rs |
Renamed blue_blocks to ghostdata , updated logging and block header collection logic. |
chain/src/chain.rs |
Renamed verifier types, updated verify and apply methods in ChainReader and ChainWriter , added merge_check_and_ghostdata and verify_pruning_point methods. |
chain/src/verifier/mod.rs |
Renamed DagVerifier to DagVerifierForMining and DagVerifierWithGhostData to DagVerifierForSync , updated verification logic. |
config/src/genesis_config.rs |
Added static variable G_MERGE_DEPTH . |
flexidag/src/block_depth/block_depth_info.rs |
Introduced BlockDepthManagerT struct with methods for managing block depth. |
flexidag/src/block_depth/mod.rs |
Added new public module block_depth_info . |
flexidag/src/blockdag.rs |
Enhanced BlockDAG with new methods for block depth management and updated constructors. |
flexidag/src/consensusdb/consensus_block_depth.rs |
Introduced BlockDepthInfo struct, added schema and traits for block depth management. |
flexidag/src/consensusdb/db.rs |
Added block_depth_info_store field to FlexiDagStorage . |
flexidag/src/consensusdb/mod.rs |
Added new public module consensus_block_depth . |
flexidag/src/lib.rs |
Added new module block_depth and function process_key_already_error . |
flexidag/src/prune/pruning_point_manager.rs |
Updated logic in next_pruning_point method for pruning depth checks. |
flexidag/tests/tests.rs |
Added new test function test_merge_bounded , updated existing test functions for improved assertions. |
sync/src/block_connector/block_connector_service.rs |
Introduced G_MERGE_DEPTH constant, updated mining logic to use ghostdata . |
sync/src/block_connector/write_block_chain.rs |
Modified reset and apply_failed methods for improved block management. |
sync/src/parallel/executor.rs |
Updated apply_with_verifier to use DagVerifierForSync , modified waiting_for_parents method signature. |
sync/src/tasks/block_sync_task.rs |
Enhanced collect method in BlockCollector for clearer control flow and logging. |
ChainReader
trait with new methods related to pruning and ghost data, directly connected to merge_check_and_ghostdata
.BlockDAG
struct that enhance state management and pruning logic, aligning with changes in the main PR.🐰 In the code where blocks do flow,
New methods sprout, like seeds we sow.
Merging data, pruning with care,
A rabbit hops, with joy to share!
With ghostly whispers, depths we trace,
In the world of blocks, we find our place! 🌟
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?
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: N/A
What is the new behavior?
-
-
Other information
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Tests