Skip to content

Fix last archived segment search#1997

Merged
nazar-pc merged 2 commits intomainfrom
fix-last-archived-segment-search
Sep 24, 2023
Merged

Fix last archived segment search#1997
nazar-pc merged 2 commits intomainfrom
fix-last-archived-segment-search

Conversation

@nazar-pc
Copy link
Copy Markdown
Member

This is a fix for regression introduced in #1980

Basically during archiver restart it was ignoring that blocks need to be at a certain depth before they can be archivd. One user ended up in a situation where their block was exactly the block in one of the segment headers: https://forum.subspace.network/t/thread-main-panicked-at-must-always-set-if-there-is-no-logical-error/1901

The fix here is to restrict what blocks are supposed to be archived at this point and which are not yet.

This can also potentially cause nodes to archive incorrect history if before restart they wereon a short fork and in similarly unlucky conditions as the post on the forum above.

Code contributor checklist:

Co-authored-by: Vedhavyas Singareddi <vedhavyas.singareddi@gmail.com>
@nazar-pc nazar-pc requested a review from vedhavyas September 24, 2023 02:46
Copy link
Copy Markdown
Contributor

@0xjeremyfrank 0xjeremyfrank left a comment

Choose a reason for hiding this comment

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

lgtm

@nazar-pc nazar-pc merged commit fd4187c into main Sep 24, 2023
@nazar-pc nazar-pc deleted the fix-last-archived-segment-search branch September 24, 2023 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants