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

[3.1 -> 3.2] net_plugin improve block latency calculation #681

Merged
merged 5 commits into from
Feb 2, 2023

Conversation

heifner
Copy link
Member

@heifner heifner commented Feb 2, 2023

Remove the +1 to the block latency calculation otherwise even 0ms latency indicates 1 block latency instead of 0. The +1 makes the comparisons of head and msg.head in the if-else off by 1 when there is no latency.

Added additional logging so that issues like #588 are easier to debug.

Before:

debug 2022-12-21T21:54:29.938 net-3     net_plugin.cpp:1790           recv_handshake       ] ["localhost:9878 - f9bdaf6" - 43 127.0.0.1:52370] Network latency is 0ms, 0 blocks discrepancy by network latency, 1 blocks discrepancy expected once message received

After:

debug 2023-01-31T00:27:27.386 net-0     net_plugin.cpp:1795           recv_handshake       ] ["localhost:9878 - 978ab39" - 1 127.0.0.1:54362] Network latency is 0ms, 0 blocks discrepancy by network latency, 0 blocks discrepancy expected once message received

Merges release/3.1 into release/3.2 including #676

@heifner heifner requested review from greg7mdp and dimas1185 February 2, 2023 20:49
@heifner heifner merged commit 8feca18 into release/3.2 Feb 2, 2023
@heifner heifner deleted the GH-588-handshake-3.2 branch February 2, 2023 23:11
@heifner heifner added the OCI Work exclusive to OCI team label Feb 3, 2023
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.

3 participants