zebra icon indicating copy to clipboard operation
zebra copied to clipboard

fix(network): send height to peers

Open oxarbitrage opened this issue 3 years ago • 2 comments

Motivation

Zebra currently send height 0 in the start_height field of the Message::Version. This works protocol wise but DNS seeders expect a height here to classify peers. Resolves https://github.com/ZcashFoundation/zebra/issues/4875

Solution

Pretty simple solution, we already have everything available to end the height when we are building the version message.

Review

Anyone can review, i could be missing something as i thought this were going to be more complex. Local tests pass and i know this works while checkpointing, however i need to check a full sync. I expect the CI will assist me there.

Reviewer Checklist

  • [ ] CI pass including full sync tests

oxarbitrage avatar Aug 09 '22 22:08 oxarbitrage

Codecov Report

Merging #4904 (9ec3c07) into main (4cda4ee) will decrease coverage by 0.15%. The diff coverage is 83.33%.

@@            Coverage Diff             @@
##             main    #4904      +/-   ##
==========================================
- Coverage   79.18%   79.03%   -0.16%     
==========================================
  Files         309      309              
  Lines       38783    38786       +3     
==========================================
- Hits        30710    30654      -56     
- Misses       8073     8132      +59     

codecov[bot] avatar Aug 10 '22 00:08 codecov[bot]

You could try:

  • increasing the timeouts on the failing tests
  • updating the Zebra mainnet checkpoints (until #4721 gets merged, the full verifier will do twice as much note commitment work as the checkpoint verifier)

teor2345 avatar Aug 12 '22 21:08 teor2345

@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]

It seems like Zebra appears in block explorers and nodes without this fix, so I'm reducing the priority to make room for other PRs in the queue.

teor2345 avatar Aug 24 '22 00:08 teor2345

@mergifyio update

oxarbitrage avatar Aug 26 '22 11:08 oxarbitrage

update

✅ Branch has been successfully updated

mergify[bot] avatar Aug 26 '22 11:08 mergify[bot]

@Mergifyio update

gustavovalverde avatar Aug 28 '22 21:08 gustavovalverde

update

✅ Branch has been successfully updated

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