Skip to content

Conversation

@kwvg
Copy link
Collaborator

@kwvg kwvg commented Jun 26, 2024

Additional Information

bitcoin#22762 (backported as part of dash#6043) did away with then-existing behaviour of overwriting peers.dat silently if found corrupt with the rationale of preventing situations where the wrong file is pointed at or the file is written by a higher version of Core. Alongside a change in behaviour, refactoring also took place and further changes were built on top of them.

Since then, there have been reports of an increasing number of "Corrupt data. Consistency check failed with code -5: iostream error" errors from builds based on develop. Reverting the pull request that introduced this change in behaviour is non-trivial due to the number of backports that build on top of the refactoring brought along with it.

Nor were any other error messages found except for the one mentioned above. The tendency for peers.dat to corrupt itself has also been documented upstream (bitcoin#26599), with the issue marked as closed with the merger of bitcoin#26909.

Therefore, to remedy the above problem, alongside backporting bitcoin#26909, to avoid inconvenience, instead of reverting all progress made from backporting (as the benefits of not overwriting peers.dat for having the wrong magic altogether, for example, is something that doesn't need to be reverted), only inconsistent peers.dat files will be overwritten and the action logged with no user intervention required.

Breaking Changes

None expected.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation (note: N/A)
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

@kwvg
Copy link
Collaborator Author

kwvg commented Jun 26, 2024

Special thanks to @knst, @PastaPastaPasta and @thephez for reporting on this issue!

@kwvg kwvg added this to the 21 milestone Jun 26, 2024
@kwvg kwvg marked this pull request as ready for review June 27, 2024 06:35
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK adba609

@kwvg kwvg requested a review from knst June 27, 2024 17:48
Copy link
Collaborator

@knst knst left a comment

Choose a reason for hiding this comment

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

utACK adba609
utACK fbb2b51

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

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

utACK adba609

@PastaPastaPasta PastaPastaPasta merged commit 1f00538 into dashpay:develop Jun 27, 2024
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.

4 participants