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 -> main] P2P: Fix stuck in peer syncing state #152

Merged
merged 4 commits into from
May 17, 2024

Conversation

heifner
Copy link
Member

@heifner heifner commented May 17, 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

Merges release/1.0-beta1 into main including #151

Resolves #150

@heifner heifner requested review from linh2931 and spoonincode May 17, 2024 12:13
@heifner heifner added the OCI Work exclusive to OCI team label May 17, 2024
@heifner heifner merged commit c42a611 into main May 17, 2024
36 checks passed
@heifner heifner deleted the merge-beta1-sync branch May 17, 2024 14:43
@ericpassmore
Copy link
Contributor

ericpassmore commented May 17, 2024

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 completes.
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