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(tm2): Improve hash comparison messages in consensus error handling #2859

Merged
merged 4 commits into from
Oct 2, 2024

Conversation

sunspirit99
Copy link
Contributor

@sunspirit99 sunspirit99 commented Sep 26, 2024

Relates to #2773

Description:
This PR enhances the error messaging in the validateBlock function by formatting the hash values as a hexadecimal string instead of a byte array. This change improves readability during consensus failures

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

Copy link
Member

@thehowl thehowl left a comment

Choose a reason for hiding this comment

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

Please add golden tests showing the error messages

@sunspirit99
Copy link
Contributor Author

sunspirit99 commented Sep 27, 2024

Please add golden tests showing the error messages

@thehowl thanks, i just improved the test cases in a3fee13

Copy link

codecov bot commented Oct 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.92%. Comparing base (df0d6b8) to head (bc31c05).
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2859      +/-   ##
==========================================
+ Coverage   60.90%   60.92%   +0.01%     
==========================================
  Files         564      564              
  Lines       75269    75278       +9     
==========================================
+ Hits        45843    45863      +20     
+ Misses      26055    26044      -11     
  Partials     3371     3371              
Flag Coverage Δ
contribs/gnodev 61.46% <ø> (ø)
contribs/gnofaucet 14.46% <ø> (ø)
gno.land 67.17% <ø> (ø)
gnovm 65.77% <ø> (+<0.01%) ⬆️
misc/genstd 80.54% <ø> (ø)
misc/logos 19.88% <ø> (ø)
tm2 62.06% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@thehowl thehowl merged commit 0e84846 into gnolang:master Oct 2, 2024
119 of 120 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🌐 tendermint v2 Issues or PRs tm2 related
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants