Skip to content

[1.2.0] P2P: BP gossip connections #1616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 19, 2025
Merged

Conversation

heifner
Copy link
Member

@heifner heifner commented Jun 16, 2025

  • Do not disconnect from BP gossip peers if they are manually configured.
  • Disconnect from BP gossip peers when no longer in the active proposer schedule.

Resolves #1584

@heifner heifner requested review from greg7mdp and linh2931 June 16, 2025 15:39
@heifner heifner added the OCI Work exclusive to OCI team label Jun 16, 2025
@heifner heifner linked an issue Jun 16, 2025 that may be closed by this pull request
@heifner heifner changed the title [1.2.0] BP gossip connections [1.2.0] P2P: BP gossip connections Jun 16, 2025
@@ -489,6 +489,17 @@ class bp_connection_manager {
return addresses;
}

flat_set<std::string> all_gossip_bp_addresses(const char* desc) const {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that boost::unordered_flat_set would be better here and for find_gossip_bp_addresses unless there is a reason to use boost::flat_set?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the test fails because it is not ordered... maybe you can convert to a std::set for the comparison?

@@ -174,6 +174,7 @@ BOOST_AUTO_TEST_CASE(test_on_pending_schedule) {
plugin.lib_catchup = true;
plugin.on_pending_schedule(test_schedule1);

std::ranges::sort(connected_hosts);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't think this one is needed if we expect the vector to be empty

@heifner heifner merged commit a67562d into release/1.2 Jun 19, 2025
36 checks passed
@heifner heifner deleted the GH-1584-bp-gossip-connect-1.2 branch June 19, 2025 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

P2P: Do not disconnect from BP gossip peers if manually configured
3 participants