feat: refactor domain objects deserialization#37
Merged
fpelliccioni merged 1 commit intomasterfrom Apr 30, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors deserialization of domain objects by removing now-obsolete witness-related logic and streamlining protocol behavior. Key changes include the removal of the inline is_witness functions and witness flag handling in transaction and block protocols, updates to network service defaults in the parser, and a dependency upgrade for Catch2 in the conanfile.
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/protocols/protocol_transaction_out.cpp | Removed witness-related inline function and parameter from fetch_transaction. |
| src/protocols/protocol_transaction_in.cpp | Removed witness checks and members; added logging before filtering transactions. |
| src/protocols/protocol_block_out.cpp | Removed witness parameter in block fetching and inventory announcement logic. |
| src/protocols/protocol_block_in.cpp | Removed witness-related logic from block processing workflows. |
| src/parser.cpp | Updated default network service configuration with revised description text. |
| include/kth/node/protocols/protocol_*.hpp | Removed witness flag members from protocol class definitions. |
| conanfile.py | Upgraded Catch2 test dependency from version 3.6.0 to 3.7.1. |
Files not reviewed (1)
- CMakeLists.txt: Language not supported
Comments suppressed due to low confidence (3)
src/protocols/protocol_block_out.cpp:515
- The conditional logic for choosing between witness and non-witness block inventory types has been removed; please confirm that using the default inventory type here aligns with the new protocol design.
announce.inventories().push_back({ inventory::type_id::block, block->header().hash() });
src/protocols/protocol_block_out.cpp:178
- The witness flag has been removed from the fetch_block call; please verify that the updated chain_.fetch_block signature and related behavior correctly reflect this change.
chain_.fetch_block(block_hash, [this, message](code const& ec, block_const_ptr block, uint64_t) {
src/protocols/protocol_transaction_in.cpp:112
- [nitpick] Ensure that the newly added logging statements use the appropriate log level in production environments to avoid potential performance overhead.
LOG_INFO(LOG_NODE, "send_get_transactions() - before filter_transactions - 1");
This file contains hidden or 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
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.
No description provided.