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

Textual bytes value renderer: Sign over hash #14206

Closed
Tracked by #11970
amaury1093 opened this issue Dec 7, 2022 · 1 comment · Fixed by #14275
Closed
Tracked by #11970

Textual bytes value renderer: Sign over hash #14206

amaury1093 opened this issue Dec 7, 2022 · 1 comment · Fixed by #14275

Comments

@amaury1093
Copy link
Contributor

amaury1093 commented Dec 7, 2022

Summary

In Textual, sign over the hash when bytes' length is > 32 (or some other number).

(initial idea from Aaron's value renderer draft)

Problem Definition

CosmWasm's msg to upload contract code in WASM byte can take up to 800KB in practice. That's difficult to sign on ledger:

  • memory constraints on nano s
  • too many screens to scroll

Proposal

For bytes field, when the length of the bytes is greater than a certain N, then we render the hash (sha256) of these bytes. I propose to choose N=32, so that the bytes value-rendered output is always at most 32 bytes (64 hex characters).

However, this makes the bytes value renderer NOT invertible anymore.

@JimLarson
Copy link
Contributor

This seems necessary for usability. Though it's not invertible, invertibility was always stronger than necessary - you just need to be sure that any (computationally plausible) modification of the transaction results in a modification of the rendering.

Are there any other transaction types that might have huge strings, or thousands of entries in a repeated field?

@amaury1093 amaury1093 self-assigned this Dec 12, 2022
@amaury1093 amaury1093 moved this from 📝 Todo to 👀 Needs Review in Cosmos-SDK Dec 13, 2022
@github-project-automation github-project-automation bot moved this from 👀 Needs Review to 👏 Done in Cosmos-SDK Jan 5, 2023
@tac0turtle tac0turtle removed this from Cosmos-SDK May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants