Skip to content

fix(gnokey): JSON-ify the query results from the 'gnokey' query #2249

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

Closed
wants to merge 42 commits into from

Conversation

linhpn99
Copy link
Contributor

@linhpn99 linhpn99 commented May 31, 2024

From issue of @leohhhn : #2232

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

codecov bot commented May 31, 2024

Codecov Report

Attention: Patch coverage is 20.45455% with 70 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
tm2/pkg/crypto/keys/client/utils.go 0.00% 43 Missing ⚠️
tm2/pkg/crypto/keys/client/maketx.go 31.57% 13 Missing ⚠️
tm2/pkg/crypto/keys/client/query.go 42.85% 8 Missing ⚠️
tm2/pkg/crypto/keys/client/broadcast.go 50.00% 6 Missing ⚠️

📢 Thoughts on this report? Let us know!

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.

I don't like this. The default output for vm/qeval should be simple and human-readable; JSON is helpful for working with scripting but harms readability. Ie. I want the result of vm/qeval to be simple to understand and close to what I get reading the result of maketx call.

I suggest having a -output flag, defaulting to text, but which can be set to json, for the gnokey query, maketx -broadcast and broadcast commands. This should print the JSON response from the node, with little modification. In the case of qeval, this can be simply qres.Response.

@linhpn99 linhpn99 requested a review from thehowl June 1, 2024 02:14
@linhpn99 linhpn99 requested a review from moul as a code owner June 1, 2024 02:50
@linhpn99
Copy link
Contributor Author

linhpn99 commented Jun 1, 2024

I don't like this. The default output for vm/qeval should be simple and human-readable; JSON is helpful for working with scripting but harms readability. Ie. I want the result of vm/qeval to be simple to understand and close to what I get reading the result of maketx call.

I suggest having a -output flag, defaulting to text, but which can be set to json, for the gnokey query, maketx -broadcast and broadcast commands. This should print the JSON response from the node, with little modification. In the case of qeval, this can be simply qres.Response.

agree with u, so that i will also format response when calling maketx --broadcast.

@moul
Copy link
Member

moul commented Jun 4, 2024

We need to align this pull request with #1776 to ensure consistency and idiomatic usage.

I suggest waiting for #1776 to be merged before merging this one.

cc @gfanton

@moul moul marked this pull request as draft July 16, 2024 04:54
Copy link

This PR is stale because it has been open 3 months with no activity. Remove stale label or comment or this will be closed in 3 months.

@github-actions github-actions bot added Stale and removed Stale labels Nov 14, 2024
@thehowl
Copy link
Member

thehowl commented Apr 8, 2025

I'm closing this PR as the author has not been contributing to Gno for a while.

Feel free to re-open this PR, or fork this PR and propose a new one, considering the latest comments and any surrounding discussion.

@thehowl thehowl closed this Apr 8, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in 💪 Bounties & Worx Apr 8, 2025
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.

3 participants