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(p2p|sync): Only log head verification failure as error if it is not ErrKnownHeader #138

Merged
merged 5 commits into from
Jan 3, 2024

Conversation

walldiss
Copy link
Member

Known headers are not failing verification. They just ignored because we don't need them and thus can be reported as soft failure.

Copy link
Member

@Wondertan Wondertan left a comment

Choose a reason for hiding this comment

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

Making known headers a soft failure means we will use them as sync target which is wrong.
The issue here is not with the buggy logic but with the logging that confuses node operators, so the solution should be on the logging level, like demoting this error to WARN

@walldiss
Copy link
Member Author

Do you think we need this log as WARN or it should be DEBUG? Does this case need attention from node operator?

@codecov-commenter
Copy link

codecov-commenter commented Dec 25, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6afe95f) 63.77% compared to head (d2c7a7b) 63.79%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #138      +/-   ##
==========================================
+ Coverage   63.77%   63.79%   +0.01%     
==========================================
  Files          39       39              
  Lines        3382     3389       +7     
==========================================
+ Hits         2157     2162       +5     
- Misses       1059     1061       +2     
  Partials      166      166              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

sync/sync_head.go Outdated Show resolved Hide resolved
@renaynay
Copy link
Member

renaynay commented Jan 3, 2024

Note that this PR suppresses a symptom of a problem (likely with recencyThreshold) that the node eagerly requests Head even though one should soon arrive via header-sub

@walldiss walldiss merged commit e9205ab into celestiaorg:main Jan 3, 2024
2 checks passed
@walldiss walldiss requested a review from ramin January 3, 2024 16:18
@Wondertan
Copy link
Member

Note that this PR suppresses a symptom of a problem (likely with recencyThreshold) that the node eagerly requests Head even though one should soon arrive via header-sub

Please make sure we have a descriptive issue for it and so we don't forget after vanishing it from logs.

@renaynay renaynay changed the title fix(verify): report known headers as soft failure fix(p2p|sync): Only log head verification failure as error if it is not ErrKnownHeader Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants