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

IF: P2P: Send handshake to peer to let it know it is not syncing from peer #22

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

heifner
Copy link
Member

@heifner heifner commented Apr 10, 2024

Test failure: nodeos_forked_chain_if_lr_test https://github.com/AntelopeIO/spring/actions/runs/8624067947/job/23638727644
The logs showed the test failed because a peer (Node02) stopped receiving blocks. It stopped receiving blocks because the block producer (Node00) thought Node02 was syncing from it, so it didn't send current blocks.

Updated net_plugin to send handshakes (how a node knows a peer is not syncing from it) even if the peer thinks the other peer is syncing from the you. Also send handshake to peer when it informs you that it needs blocks, but you determine it does not.

Set peer_syncing_from_us to false for handshake case where it was missing (Block discrepancy is within network latency range).

@heifner heifner requested review from greg7mdp and linh2931 April 10, 2024 21:50
@heifner heifner changed the title P2P: Send handshake to peer to let it know it is not syncing from peer IF: P2P: Send handshake to peer to let it know it is not syncing from peer Apr 10, 2024
Base automatically changed from disable-ship-tests to savanna April 11, 2024 00:42
@heifner heifner added the OCI Work exclusive to OCI team label Apr 11, 2024
@heifner heifner merged commit f5967c0 into savanna Apr 11, 2024
35 of 36 checks passed
@heifner heifner deleted the net-sync-peer-fix branch April 11, 2024 03:22
@ericpassmore
Copy link
Contributor

Note:start
group: IF
category: INTERNALS
summary: More robust handshaking, send handshake to current peers, this allows nodes to discover they are not syncing from peers.
Note:end

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.

4 participants