Skip to content

factory: do not treat history as pruned before the tip passes the retention - #5038

Open
guo wants to merge 1 commit into
masterfrom
guo/history-retention-underflow
Open

guo wants to merge 1 commit into
masterfrom
guo/history-retention-underflow

Conversation

@guo

@guo guo commented Oct 2, 2026

Copy link
Copy Markdown
Member

The read-only working set compared height < tip-HistoryBlockRetention in
uint64, which wraps while the tip is below the retention value, so every
historical read was rejected as pruned on a young chain.

Test: state/factory/history_retention_test.go covers the change and fails without it. go test -gcflags=all=-N -l -short passes for the touched packages.

…ention

The read-only working set compared height < tip-HistoryBlockRetention in
uint64, which wraps while the tip is below the retention value, so every
historical read was rejected as pruned on a young chain.
@guo
guo requested a review from a team as a code owner October 2, 2026 17:42
@sonarqubecloud

sonarqubecloud Bot commented Oct 2, 2026

Copy link
Copy Markdown

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.

1 participant