Skip to content

libp2p dial order#2319

Merged
turuslan merged 12 commits intomasterfrom
update/libp2p-dial-order
Dec 24, 2024
Merged

libp2p dial order#2319
turuslan merged 12 commits intomasterfrom
update/libp2p-dial-order

Conversation

@turuslan
Copy link
Copy Markdown
Contributor

@turuslan turuslan commented Dec 20, 2024

Referenced issues

Description of the Change

Possible Drawbacks

Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Comment thread core/application/impl/app_configuration_impl.cpp Outdated
turuslan and others added 4 commits December 23, 2024 14:00
Co-authored-by: Igor Egorov <igor@qdrvm.io>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
@turuslan turuslan force-pushed the update/libp2p-dial-order branch from 0f740a0 to 7454f00 Compare December 23, 2024 15:01
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
Signed-off-by: turuslan <turuslan.devbox@gmail.com>
@turuslan turuslan merged commit 78779b9 into master Dec 24, 2024
@turuslan turuslan deleted the update/libp2p-dial-order branch December 24, 2024 16:30
@kamilsa kamilsa requested a review from Copilot June 10, 2025 13:34
@kamilsa kamilsa restored the update/libp2p-dial-order branch June 10, 2025 13:34
Copy link
Copy Markdown

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 introduces a new configuration parameter, maxPeers, along with associated updates across tests, application configuration, and peer management. Key changes include:

  • Adding the maxPeers method to application configuration and its mock.
  • Updating peer alignment in PeerManagerImpl to use the new maxPeers limit.
  • Adjusting stream connection calls and updating toolchain/test configurations.

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/mock/core/application/app_configuration_mock.hpp Added a new mock method, maxPeers, for configuration consistency.
test/core/network/rpc_libp2p_test.cpp Updated newStream call parameters to pass full peer_info instead of just peer_info_.id.
core/network/impl/protocols/request_response_protocol.hpp Simplified the asynchronous callback by removing the timeout parameter.
core/network/impl/peer_manager_impl.hpp / .cpp Introduced the collectGarbage method and updated align() logic to use app_config_.maxPeers().
core/application/impl/app_configuration_impl.hpp, core/application/impl/app_configuration_impl.cpp, core/application/app_configuration.hpp Added and integrated the maxPeers configuration parameter throughout the application.
cmake/toolchain/flags/sanitize_thread.cmake, cmake/functions.cmake, cmake/Hunter/config.cmake, .thread-sanitizer-ignore Updated environment and toolchain settings to support the new configurations.
Comments suppressed due to low confidence (1)

core/application/impl/app_configuration_impl.cpp:833

  • The help message for 'lucky-peers' still references '-1' for full broadcast despite using a uint32_t, which cannot represent negative values. Consider updating the message to reflect the valid input range or change the type if negative flags are required.
("lucky-peers", po::value<uint32_t>()->default_value(def_lucky_peers), "number of \"lucky\" peers (peers that are being gossiped to). -1 for full broadcast." )

@kamilsa kamilsa deleted the update/libp2p-dial-order branch June 10, 2025 13:43
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.

4 participants