penumbra-zone / penumbra

Penumbra is a fully private proof-of-stake network and decentralized exchange for the Cosmos ecosystem.
https://penumbra.zone
Apache License 2.0
376 stars 294 forks source link

Make transaction plan JSON more human-readable by making protos stringly typed #2110

Closed plaidfinch closed 1 year ago

plaidfinch commented 1 year ago

Right now, it is extremely difficult to hand-craft a transaction plan, or even to understand one when you are looking at it. This impedes DAO spend usability, as well as makes debugging more painful. If we changed the transaction plan proto format to use string values where currently it uses well-typed sub-messages, this would make it much easier to understand what is happening in a transaction plan, and in the case of plans that don't require randomizers and such, make it possible to reasonably easily human-author one (i.e. for a DAO spend proposal).

Non-goals of this change: transaction plan JSON should not be the canonical human view of a transaction plan, because it is still too low-level. I posit that humans care about the net flow of typed value between addresses and accounts, not individual actions, and this latter concept is meant to be reified in possible future work on #2076.

hdevalence commented 1 year ago

This would also be useful to do for transaction views, but that runs into the problem identified in https://github.com/penumbra-zone/penumbra/pull/2150 , which I assume would also be a problem for TransactionPlans.

hdevalence commented 1 year ago

xref #1788, they're different issues but the same concerns as in this issue may be relevant while revising the TxV structures.

aubrika commented 1 year ago

In doing this one, do we also want to propagate these changes into the component well-typed sub-messages, to make them stringy as well, or leave those as-is?

conorsch commented 1 year ago

Blocked while waiting for clarification on the above.

redshiftzero commented 1 year ago

Upon discussion with @plaidfinch, closing as not needed