Skip to content

Conversation

fpelliccioni
Copy link
Contributor

No description provided.

@fpelliccioni fpelliccioni requested a review from Copilot April 30, 2025 23:01
Copy link

@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.

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");

@fpelliccioni fpelliccioni merged commit 5de9a11 into master Apr 30, 2025
7 of 9 checks passed
@fpelliccioni fpelliccioni deleted the feat/domain-obj-deserialization-lite branch April 30, 2025 23:02
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.

1 participant