Skip to content
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

Fix/4732 #4759

Merged
merged 19 commits into from
May 15, 2024
Merged

Fix/4732 #4759

merged 19 commits into from
May 15, 2024

Conversation

jcnelson
Copy link
Member

@jcnelson jcnelson commented May 8, 2024

This fixes #4732 by tracking pending connections in addition to completed connections, so that the state machine for StackerDB doesn't re-attempt a handshake if it already has one in-flight. It also disables disconnection from dead/broken StackerDB peers, since a StackerDB peer's inability to reply to a StackerDB request (itself a best-effort replication system) should not be grounds for disconnecting from and banning the node in its entirety.

@jcnelson jcnelson requested review from kantai and obycode May 8, 2024 01:21
obycode
obycode previously approved these changes May 8, 2024
Copy link
Contributor

@obycode obycode left a comment

Choose a reason for hiding this comment

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

Makes sense to me. Does this seem to make a difference in practice?

obycode
obycode previously approved these changes May 9, 2024
…r, not that the stackerdb sync state machine is
…s, and don't use the PoX bitvec length to determine when to retry an inv sync
…depends on bootstrap nodes staying connected)
… latter happens fast enough on its own (it only needs to be done once per reward cycle)
@jcnelson
Copy link
Member Author

jcnelson commented May 9, 2024

Okay, I have this running on my node, and have tested it in both IBD and steady-state modes of operation. No duplicate connections have been established.

obycode
obycode previously approved these changes May 9, 2024
@jcnelson
Copy link
Member Author

ping @kantai

@jcnelson
Copy link
Member Author

(note that this is blocking the next point release)

Copy link
Member

@kantai kantai left a comment

Choose a reason for hiding this comment

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

These changes look fine to me, but reading through this PR, it's not really clear to me exactly what behavior is being changed, and why, and how it is tested. It seems like there isn't sufficient testing here to prevent a regression: the only testing change is an assertion about the number of connections, which I can imagine being related to some of these changes, but not all of them.

@jcnelson
Copy link
Member Author

@kantai I added some regression tests for the new functionality

@obycode
Copy link
Contributor

obycode commented May 14, 2024

There are some build issues with the latest version.

@jcnelson jcnelson requested review from obycode and kantai May 15, 2024 02:40
@jcnelson jcnelson enabled auto-merge May 15, 2024 14:12
@jcnelson jcnelson added this pull request to the merge queue May 15, 2024
Merged via the queue into develop with commit 368541f May 15, 2024
97 of 100 checks passed
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.

None yet

3 participants