-
Notifications
You must be signed in to change notification settings - Fork 956
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
Refactor transfer transaction creation and WASM to split shielded and transparent transfers #1677
Comments
Moving this to phase 1 so we can avoid transaction format changes. |
@Fraccaman confirmed that this will not break the transaction format |
@cwgoes Reviewing the changes in #3356 made me revisit this issue.
It seems to me that the introduction of vectorized transfers could nullify the need for a sentinel amount and sentinel token. This could be done by having a transfer whose sources and targets are empty vectors and yet still has a
Furthermore, there may be some drawbacks in how we combine this splitting with the transfer vectorization changes:
So overall the combination of this splitting and vectorization feels to me like an artificial limitation on the expressiveness of transfers with some potential maintenance overhead, especially in the hardware wallet. Increasing the expressiveness/coverage of the transfer formats in the future would also have to be coordinated with hardware wallet updates to support it.
A potentially simpler approach to achieve full expressivity + reduced maintenance overhead + and yet keep the above clarity in the context of vectorization might be to have one transfer format: a vectorized transparent transfer with an optional |
Excellent points - this issue preceded transfer vectorization, and I hadn't considered the combination of the two at the time.
Yes, I think that would make sense. Do I correctly assume, however, that this would require a further refactor at the moment? |
Thanks. See #3446 for an attempt to achieve the above goals. |
I audited the transfer transaction creation for any data leakage, and I didn't find any, but the way things are structured is very confusing, e.g. setting amount and token to sentinel amounts for MASP transactions. I think it would be clearer if we refactor transfers into four separate transactions:
These should have separate WASM, separate functions, and separate CLI commands, and it should be clear what data is kept private and what data is sent to the ledger in each case (and this should be reflected by the WASM function's arguments).
The text was updated successfully, but these errors were encountered: