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

feat(gnokey): update gnokey verify and tests #2333

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

thinhnx-var
Copy link
Contributor

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.

Link to this issue: #2311
This PR changes the Verify() to read the signed doc, verify the exactly original message hash that was signed.
It also adds chainid, account-number, account-sequence config flag to the gnokey verify command.

The sign function now expose the hex-format of signature to the IO in oder to feed the verify as an argument. I think we need better way for user to verify their signed document, which currently need this hex-format (#2272)

What do you think about this change?

@thinhnx-var thinhnx-var requested review from jaekwon and a team as code owners June 12, 2024 04:42
@github-actions github-actions bot added the 📦 🌐 tendermint v2 Issues or PRs tm2 related label Jun 12, 2024
Copy link

codecov bot commented Jun 12, 2024

Codecov Report

Attention: Patch coverage is 85.18519% with 4 lines in your changes missing coverage. Please review.

Project coverage is 60.45%. Comparing base (f04ec89) to head (951bce8).

Files with missing lines Patch % Lines
tm2/pkg/crypto/keys/client/verify.go 84.61% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2333      +/-   ##
==========================================
+ Coverage   60.44%   60.45%   +0.01%     
==========================================
  Files         563      563              
  Lines       75159    75185      +26     
==========================================
+ Hits        45427    45452      +25     
+ Misses      26343    26341       -2     
- Partials     3389     3392       +3     
Flag Coverage Δ
contribs/gnodev 60.65% <ø> (-0.82%) ⬇️
contribs/gnofaucet 14.46% <ø> (-0.86%) ⬇️
gno.land 67.21% <ø> (ø)
gnovm 64.46% <ø> (ø)
misc/genstd 80.54% <ø> (ø)
misc/logos 20.23% <ø> (+0.35%) ⬆️
tm2 62.09% <85.18%> (+0.03%) ⬆️

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.

@leohhhn
Copy link
Contributor

leohhhn commented Jun 12, 2024

Hey @thinhnx-var thanks for this - can you please check why the CI is failing and fix it?

@thinhnx-var thinhnx-var changed the title [gnokey] update gnokey verify and tests feat(gnokey): update gnokey verify and tests Jun 12, 2024
@thinhnx-var
Copy link
Contributor Author

@leohhhn yeah sure. Maybe CI failed because CI-Lint. I gonna fix it up.

@thinhnx-var
Copy link
Contributor Author

@leohhhn
Can you please review this. I ( and I think others) have problems when using current version of gno sign so I think it should be good to merge this.

@leohhhn
Copy link
Contributor

leohhhn commented Sep 11, 2024

Hey! I will take a look. Please stop clicking "merge master". This is annoying and spammy, and will not get your PR reviewed faster. You should only merge in master if there are conflicts to be resolved.

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: No status
Status: In Review
Development

Successfully merging this pull request may close these issues.

2 participants