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
Implement SIGN_MODE_DIRECT_JSON #9320
Comments
The 2nd step here is "create deterministic proto JSON serializer", and it's unclear to me what's the best way to start working on this. My understanding is the determinstic JSON serializer will be incorporated into our custom codegen at some point, but that might not be ready for 0.44. So we'll need to write this serializer for the current codebase anyways. @aaronc should we start writing a proto-reflection-based serializer for the current api v1 codebase? |
yeah I know, I'm asking because during our standup we assigned #8476 to Ru, but it was unclear what the next step after that was. In this case i'll let the 2 of two sync on this 👍 |
Okay, maybe I'm not understanding. @ruhatch let's sync on this. |
I think there's a lot of good reasons for us prioritizing
@aaronc Do you mean scrapping proto JSON entirely or just for the hardware wallet use case? IMO there are still some valid use cases for a JSON based sign-mode that's a hybrid of "dev-friendly human readable" & machine readable. Interacting with the CLI through the The other reason why I see us still potentially wanting |
That's sort of what I'm proposing to optimize developer time across several projects...
Yes, you're right that it sort of "comes for free" for chain developers, but it doesn't come for free for the SDK, CosmJs or Ledger developers. Having both JSON signing + textual signing will probably take us twice the effort. Also, it doesn't really come for free in the sense that users that really see very many benefits of sign mode JSON unless the ledger app specifically adapts to each case which seems much more complex than SIGN_MODE_TEXTUAL. I think many of us have experience signing messages on Osmosis with the Ledger and I can never tell what I'm signing with the default JSON rendering of Osmosis specific messages. It all feels like blind trust in the Osmosis UI. So yes, it is additional overhead for chain developers but IMHO it's additional work that brings a lot of value. I think we should reduce the overhead with a good set of linting tools and best practices provided by the SDK as I tried to outline above.
One unfortunate limitation of ledger devices is that they only support the renderable subset of ASCII characters. So localization is not impossible but will be somewhat ugly and have the unfortunate side effect of sometimes telling users |
I don't think this is something in their roadmap... while extended ascii "could" be possible... (solving problems like |
We're not pursuing the DIRECT_JSON sign mode anymore, because of limitations of using JSON in ledger devices. For more info, see the meeting notes of the 22.09.2021 meeting with Juan in https://hackmd.io/G4mjmz7YRJ-5_rE12Y8uYQ |
Implementation details based on design agreed upon in #6513.
SignDocTextual
PR feat: Add SignDocJSON for proto JSON signing #8476Timestamp
s andDuration
s, in which case we need to fully auditcanonicaljson-go
SignModeHandler
The text was updated successfully, but these errors were encountered: