-
Notifications
You must be signed in to change notification settings - Fork 206
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
Chain repair fixes #1163
Chain repair fixes #1163
Conversation
* core: define and test chain reparation cornercases * core: write up a variety of set-head tests * core, eth: unify chain rollbacks, handle all the cases * core: make linter smile * core: remove commented out legacy code * core, eth/downloader: fix review comments * core: revert a removed recovery mechanism
…ain into mrsmkl/long-repair
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a couple small changes, and then the larger question of what to do with the tests. As noted, I think that removing tests with a side chain that's longer than the canonical chain could be valid, but I'd like more a little more though on that.
Once tests are figured out I think that this PR is good to go. It syncs with main net just fine in several modes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Looks like some test cases are quite flaky, I'll check if it's the same in the master. Example:
|
Unfortunately this seems to be a new flaky test. On my machine I don't find them to be that flaky, but I don't love adding new flaky tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change look good. One interesting thing that upstream has started to introduce is wrapped errors which might be good to introduce to the parts we've added.
Note: These changes overwrote the changes in eth/sync.go which we had made in #1163 (which were an adapted cherry-pick of a later chain repair commit from upstream). In the next commit I will apply the corresponding changes changes from the upstream chain repair commit, which are now directly applicable without having to be tweaked. Conflicts: eth/backend.go eth/handler.go eth/sync.go
For #1163, these changes had to be adapted because we had an older version of the `eth/sync.go`. The commit before this one merged in the upstream changes that were missing, and which overwrote the adapted chain repair fix changes. So this commit reapplies those changes from the upstream chain repair fix commit, since they now apply as is without any issues.
Description
Cherry-picked this:
ethereum/go-ethereum#21409
Other changes
Made some changes to get
SetHead
working in lightest mode. Also doesn't start bloom indexer in lightest mode.Tested
Did some sync tests in addition to new unit tests.
Related issues
Backwards compatibility