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 switch from lib catchup to head catchup #146

Merged
merged 1 commit into from
May 16, 2024

Conversation

heifner
Copy link
Member

@heifner heifner commented May 15, 2024

When syncing do not mark a block as applied until it is actually applied to the chain state.
Reverting this commit: AntelopeIO/leap@fdeb7fc with the comment "GH-2125 If we have the block in our dispatcher list then it is applied". The comment is wrong. A block that is in the dispatcher list is not necessarily applied. We can not assume that a block is applied just because we have added it to our received block list. We distinguish from received blocks and applied blocks in sync_manager to know the current state of syncing. The indication that the block is already applied confused sync_manager so that it doesn't request the correct blocks.

Introduced in AntelopeIO/leap#2290

Resolves #141

@heifner heifner linked an issue May 15, 2024 that may be closed by this pull request
@heifner heifner requested review from linh2931 and spoonincode May 15, 2024 21:31
@heifner
Copy link
Member Author

heifner commented May 15, 2024

EOSUSA reports this patch fixed the issue for them.

Copy link
Member

@linh2931 linh2931 left a comment

Choose a reason for hiding this comment

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

Can a test be added later?

@heifner heifner merged commit b4a784a into release/1.0-beta1 May 16, 2024
36 checks passed
@heifner heifner deleted the GH-141-syncing branch May 16, 2024 02:10
@heifner heifner added the OCI Work exclusive to OCI team label May 16, 2024
@ericpassmore
Copy link
Contributor

ericpassmore commented May 17, 2024

Note:start
group: IF
category: BUG
summary: P2P Fix switch from lib catchup to head catchup. Fixes bug which incorrectly assumed blocks in dispatcher list were applied.
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.

[Jungle Slownet] Problems Syncing From Peers
4 participants