Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(network): send height to peers #4904

Merged
merged 5 commits into from
Aug 29, 2022
Merged

fix(network): send height to peers #4904

merged 5 commits into from
Aug 29, 2022

Conversation

oxarbitrage
Copy link
Contributor

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 #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 oxarbitrage requested a review from a team as a code owner August 9, 2022 22:41
@oxarbitrage oxarbitrage requested review from upbqdn and removed request for a team August 9, 2022 22:41
@codecov
Copy link

codecov bot commented Aug 10, 2022

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     

Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

It seems like syncing is slow enough to fail CI, but I don't think that's because of the changes in this PR. But we'll need to fix the sync bugs before we merge any more PRs.

I'll try re-running those jobs, in case it was temporary network slowness.

@teor2345 teor2345 added C-bug Category: This is a bug P-Medium ⚡ A-network Area: Network protocol updates or fixes labels Aug 10, 2022
Copy link
Contributor

@teor2345 teor2345 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can merge this as soon as we fix the unrelated sync failures.

@teor2345
Copy link
Contributor

You could try:

@oxarbitrage
Copy link
Contributor Author

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Aug 23, 2022

update

✅ Branch has been successfully updated

@teor2345
Copy link
Contributor

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.

@oxarbitrage
Copy link
Contributor Author

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Aug 26, 2022

update

✅ Branch has been successfully updated

@gustavovalverde
Copy link
Member

@Mergifyio update

@mergify
Copy link
Contributor

mergify bot commented Aug 28, 2022

update

✅ Branch has been successfully updated

mergify bot added a commit that referenced this pull request Aug 29, 2022
@mergify mergify bot merged commit c76a954 into main Aug 29, 2022
@mergify mergify bot deleted the issue4875 branch August 29, 2022 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-network Area: Network protocol updates or fixes C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Send the state tip height in Version messages
3 participants