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

[1.0-beta1] P2P: Fix stuck in peer syncing state #151

Merged
merged 2 commits into from
May 17, 2024

Conversation

heifner
Copy link
Member

@heifner heifner commented May 16, 2024

Test failure: https://github.com/AntelopeIO/spring/actions/runs/9114438126/job/25059003107?pr=149

The producing node (Node03) was stuck in LIB catchup. Since blocks can be processed inside controller during a fork and not call sync_master->sync_recv_block with blk_applied==true.

This is similar to the issue addressed in #27. In the #27, a handshake with the wrong information was sent. In this case no handshake was sent at all as it become synced up during a fork switch. I believe this issue was masked by #147 because it was incorrectly reporting blocks as applied. Without this improper reporting of applied blocks a fork switch that applies up to synced would not call sync_master->sync_recv_block with blk_applied==true and not move node out of LIB catchup.

Now also send out handshakes if we determine we are synced and there is a pending handshake to send.

Related to #27
Related to #147

Resolves #150

@heifner heifner added the OCI Work exclusive to OCI team label May 16, 2024
@heifner heifner requested review from linh2931 and spoonincode May 16, 2024 20:55
@heifner heifner linked an issue May 16, 2024 that may be closed by this pull request
@heifner heifner merged commit 33bd41b into release/1.0-beta1 May 17, 2024
36 checks passed
@heifner heifner deleted the GH-150-sync-stuck branch May 17, 2024 12:09
@ericpassmore
Copy link
Contributor

Note:start
group: IF
category: BUG
summary: Add handshakes to cover additional P2P scenarios, including during a fork and when there are pending handshakes after a sync complete.
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.

Test failure: lib_advance_test
4 participants