zebra
zebra copied to clipboard
fix(consensus): Increase the number of blocks checked for legacy transactions
Motivation
In NU5 we added a check for previous Zebra versions that had followed an incorrect chain.
But we only check 100 blocks for legacy transactions. Sometimes testnet has no transactions for 100 blocks (2 hours), and fails the check.
Solution
- Increase the number of blocks checked to 1000
- Improve logging
Review
Anyone can review this PR. This bug needs to be fixed eventually, but at the moment I've only seen it happen rarely, and only on testnet.
Reviewer Checklist
- [ ] Test pass
Codecov Report
Merging #4804 (c334ba4) into main (4cda4ee) will increase coverage by
0.02%
. The diff coverage is58.53%
.
@@ Coverage Diff @@
## main #4804 +/- ##
==========================================
+ Coverage 79.18% 79.20% +0.02%
==========================================
Files 309 309
Lines 38783 38800 +17
==========================================
+ Hits 30710 30733 +23
+ Misses 8073 8067 -6
~~I've seen this happen twice on testnet, so I think we should include it in the release, to avoid user confusion.~~
Edit: Actually testnet users should be using the main
branch
@mergifyio update
update
✅ Branch has been successfully updated
@mergifyio update
update
✅ Branch has been successfully updated
@mergifyio update
update
✅ Branch has been successfully updated
@mergifyio update
update
✅ Branch has been successfully updated
@mergifyio update
update
✅ Branch has been successfully updated
@mergifyio update
update
✅ Branch has been successfully updated
@mergifyio update
update