zebra icon indicating copy to clipboard operation
zebra copied to clipboard

fix(consensus): Increase the number of blocks checked for legacy transactions

Open teor2345 opened this issue 1 year ago • 10 comments

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

teor2345 avatar Jul 22 '22 03:07 teor2345

Codecov Report

Merging #4804 (c334ba4) into main (4cda4ee) will increase coverage by 0.02%. The diff coverage is 58.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     

codecov[bot] avatar Jul 22 '22 04:07 codecov[bot]

~~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

teor2345 avatar Jul 26 '22 03:07 teor2345

@mergifyio update

teor2345 avatar Jul 30 '22 20:07 teor2345

update

✅ Branch has been successfully updated

mergify[bot] avatar Jul 30 '22 20:07 mergify[bot]

@mergifyio update

teor2345 avatar Aug 03 '22 22:08 teor2345

update

✅ Branch has been successfully updated

mergify[bot] avatar Aug 03 '22 22:08 mergify[bot]

@mergifyio update

teor2345 avatar Aug 04 '22 03:08 teor2345

update

✅ Branch has been successfully updated

mergify[bot] avatar Aug 04 '22 03:08 mergify[bot]

@mergifyio update

teor2345 avatar Aug 04 '22 16:08 teor2345

update

✅ Branch has been successfully updated

mergify[bot] avatar Aug 04 '22 16:08 mergify[bot]

@mergifyio update

oxarbitrage avatar Aug 23 '22 13:08 oxarbitrage

update

✅ Branch has been successfully updated

mergify[bot] avatar Aug 23 '22 13:08 mergify[bot]

@mergifyio update

teor2345 avatar Aug 24 '22 00:08 teor2345

update

✅ Branch has been successfully updated

mergify[bot] avatar Aug 24 '22 00:08 mergify[bot]

@mergifyio update

teor2345 avatar Aug 25 '22 21:08 teor2345

update

✅ Branch has been successfully updated

mergify[bot] avatar Aug 25 '22 21:08 mergify[bot]