-
Notifications
You must be signed in to change notification settings - Fork 202
chainimport[1/3]: import block and filter headers on startup before falling back to P2P synchronization #320
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
base: master
Are you sure you want to change the base?
Conversation
ff4ead7
to
b3b80de
Compare
|
6c0b7e1
to
c1bf101
Compare
@guggero – How am I supposed to move this PR forward? There are no flaky test cases when running this multiple times. It is now ready for review. This PR mainly addresses your comment in the mentioned PR #317 (comment) while refactoring related code |
Yeah, looks ready. Assigned myself and @ziggie1984 for review. |
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.
Did a first pass, looks to be pretty far along.
To add additional integration test coverage, it would be good to create an lnd (draft!) PR in your repo or the main repo that bumps the Neutrino library to this PR, to see if the full Neutrino integration test runs properly.
353b7d0
to
b0ed3f7
Compare
b0ed3f7
to
73a471b
Compare
/gemini review |
Why gemini not triggered? reopening this PR |
12a9c3e
to
5ea4198
Compare
/gemini review |
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.
Code Review
This is a great refactoring that significantly improves the structure and robustness of the header storage logic. The introduction of interfaces, consolidation of related logic, and improved error handling are all excellent changes. The test suite has also been substantially improved with better mocking and more comprehensive test cases.
I've found one critical issue with incorrect error formatting that could lead to a panic. Once that's addressed, this PR will be in great shape.
5ea4198
to
40e9054
Compare
/gemini review |
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.
Code Review
The pull request introduces refactoring and improvements, including interfaces for header stores, testify mocks, and consolidated platform-specific code. The error handling for database writes is a crucial addition for robustness. However, there are potential issues related to data consistency in the filterHeaderStore
's rollback logic and error handling in NewBlockHeaderStore
.
21dd256
to
afc723a
Compare
Thanks a lot @guggero for the last round of review and your patience reviewing my work. I've addressed the feedback also I (re)organized git commits addressing this feedback comment #320 (comment) as a learning exercise. I think the PR is now in a good shape for another round of review 🙇♂️ |
afc723a
to
da926b2
Compare
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.
Very nice, thanks a lot for the improved commit structure. Now ready very well!
Just one final question, other than that LGTM 🎉
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 🎉
Description
This PR serves two main purposes:
Towards #70.
Next #317.
Motivation and Context
This opportunity for improvement was identified while addressing Oli's feedback #317 (comment).