Skip to content

Add support for reverting to a user defined epoch#767

Open
HerbertJordan wants to merge 1 commit intomainfrom
herbert/heal_to_arbitrary_epochs
Open

Add support for reverting to a user defined epoch#767
HerbertJordan wants to merge 1 commit intomainfrom
herbert/heal_to_arbitrary_epochs

Conversation

@HerbertJordan
Copy link
Copy Markdown
Collaborator

@HerbertJordan HerbertJordan commented Mar 25, 2026

This PR adds an extra --epoch flag to the heal command of the sonictool to allow users to select the epoch to be reverting to.

This PR covers the basic tooling, and a manual test has been conducted using

go run ./cmd/sonictool --datadir <path-to-data-dir> heal --epoch 61016

where 61016 was 5 epochs before the latest branch. The recovery worked and the node was able to continue syncing after.

@HerbertJordan HerbertJordan requested a review from LuisPH3 March 25, 2026 16:38
@HerbertJordan HerbertJordan marked this pull request as ready for review March 25, 2026 16:38
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 25, 2026

Codecov Report

❌ Patch coverage is 62.06897% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/sonictool/db/heal.go 61.90% 6 Missing and 2 partials ⚠️
cmd/sonictool/app/heal.go 40.00% 2 Missing and 1 partial ⚠️

❌ Your patch check has failed because the patch coverage (62.06%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Files with missing lines Coverage Δ
cmd/sonictool/app/cli.go 0.00% <ø> (ø)
cmd/sonictool/app/main.go 100.00% <100.00%> (ø)
cmd/sonictool/app/heal.go 52.17% <40.00%> (-1.68%) ⬇️
cmd/sonictool/db/heal.go 54.23% <61.90%> (-1.84%) ⬇️

... and 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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