-
Notifications
You must be signed in to change notification settings - Fork 1k
Handle IBC deposits/withdraws to/from payment addresses #4939
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
base: main
Are you sure you want to change the base?
Conversation
🧪 CI InsightsHere's what we observed from your CI run for ed70e61. 🟢 All jobs passed!But CI Insights is watching 👀 |
471aea1 to
ab45ed0
Compare
ab45ed0 to
2f12d8b
Compare
The sus fee can be obtained from the inner IBC args
4dde27b to
12e9a55
Compare
|
oops, I broke something between the last two f-pushes |
12e9a55 to
12c5530
Compare
12c5530 to
ed70e61
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying the context of this code. I see nothing obviously wrong or improvable with the changes to the MASP VP or the transfer context. I just wonder if we could utilize existing code and execution paths more in order to minimize risk. For instance, the transfer context has code to update the note commitment tree and the undated balances though apply_shielded_transfer does something similar. In the MASP VP, the new logic skips the anchor check execution paths when the ProtocolIbcShielding condition is met.
I guess I just wonder if there could be a single function to create a dummy transaction based off (owner_pa, token, amount, ...) (potentially having correct anchors) that can be:
- constructed (from the event) and used by clients to update their shielded state
- constructed and used by the transfer context to update undated balances and note commitment tree (somehow using the
apply_shielded_transferfunction) - constructed by the MASP VP (from the event) and fed into the existing verification logic in a way that minimizes the number of checks that are disabled/the number of paths through the verification logic.
A unified dummy transaction logic would ensure that IBC transactions are synchronized, executed, and verified in the exactly same way. Overall the code is likely correct, but it would be nice to leverage existing mainnet code as much as possible to minimize risk of unexpected behaviour. Of course, this hypothetical approach might not be practical!
Describe your changes
Closes #4830
Closes #4168
Allow IBC deposits into payment addresses (without generating MASP transactions), and IBC withdraws from payment addresses (to automatically get refunded, if an IBC unshielding transfer fails on the counter-party).
These changes should substantially improve the UX of MASP over IBC.
Checklist before merging
breaking::labelsnamada-docsreponamada-indexerornamada-masp-indexer, a corresponding PR is opened in that repo