chia-blockchain
chia-blockchain copied to clipboard
improve BlockHeightMap flush
Purpose:
Current Behavior:
New Behavior:
Testing Notes:
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
File | Coverage | Missing Lines |
---|---|---|
chia/full_node/weight_proof.py | 0.0% | lines 645 |
Total | Missing | Coverage |
---|---|---|
23 lines | Unknown | 95% |
I'm not entirely convinced that this is a step in the right direction. I imagine the theory is that something threw an exception after the height-to-hash
file was written, but before the ses-summaries file wsas written, causing it to be corrupt.
It seems like a quite unlikely event. I imagine we don't know what error may have happened, but together with this failure, we also must have just done a reorg causing the ses-summaries file to be wrong. If we hadn't, it should simply be truncated, not wrong.
It's not obvious to me that this extra complexity warrants the very narrow case of something going wrong. If we, instead, make sure we always recover both height-to-hash
and the sub epoch summaries, we cover all kinds of errors that might cause corrupt files. (virtually).
This PR has been flagged as stale due to no activity for over 60 days. It will not be automatically closed, but it has been given a stale-pr label and should be manually reviewed by the relevant parties.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This PR has been flagged as stale due to no activity for over 60 days. It will not be automatically closed, but it has been given a stale-pr label and should be manually reviewed by the relevant parties.