Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Single block missing after warp sync. #12255

Closed
arkpar opened this issue Sep 13, 2022 · 2 comments · Fixed by #12300
Closed

Single block missing after warp sync. #12255

arkpar opened this issue Sep 13, 2022 · 2 comments · Fixed by #12300
Assignees
Labels
I3-bug The node fails to follow expected behavior.

Comments

@arkpar
Copy link
Member

arkpar commented Sep 13, 2022

Currently after the warp sync we end up with the full block history, except there's one block body missing.
Warp sync selects block X as target. It then downloads warp proofs, which includes header for X. Then it dowloads the state and passes the state + header to the client, where it gets imported. After that sync starts gap sync process, which downloads block headers and bodies up to block X-1, but not including X. It also starts syncing blocks X+1 .. normally. So we end up with no body in the database for block X. This can be reproduced by trying to sync a new node off a warp-synced node or by simpy trying to export the target block. There are two ways to fix that:

  1. Add an andditional step to warp sync that downloads block body for X and passes it along with the header and state for import in the first phase of warp sync.
  2. Extend gap sync to include block X. However, since header X is already in the DB, X is considered to be an existing block with state. Changes to the client code will be required to allow importing just the body for such blocks.
@arkpar arkpar added the I3-bug The node fails to follow expected behavior. label Sep 13, 2022
@arkpar
Copy link
Member Author

arkpar commented Sep 13, 2022

cc @bkchr

@bkchr
Copy link
Member

bkchr commented Sep 13, 2022

Cc @altonen @dmitry-markin

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I3-bug The node fails to follow expected behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants