chia-blockchain icon indicating copy to clipboard operation
chia-blockchain copied to clipboard

improve BlockHeightMap flush

Open almogdepaz opened this issue 1 year ago • 7 comments

Purpose:

Current Behavior:

New Behavior:

Testing Notes:

almogdepaz avatar Sep 11 '23 13:09 almogdepaz

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Sep 11 '23 13:09 github-actions[bot]

Conflicts have been resolved. A maintainer will review the pull request shortly.

github-actions[bot] avatar Sep 11 '23 14:09 github-actions[bot]

File Coverage Missing Lines
chia/full_node/weight_proof.py 0.0% lines 645
Total Missing Coverage
23 lines Unknown 95%

github-actions[bot] avatar Sep 13 '23 15:09 github-actions[bot]

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).

arvidn avatar Sep 13 '23 20:09 arvidn

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.

github-actions[bot] avatar Oct 29 '23 11:10 github-actions[bot]

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Mar 14 '24 17:03 github-actions[bot]

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.

github-actions[bot] avatar Apr 29 '24 11:04 github-actions[bot]