masp
masp copied to clipboard
Merge murisi/masp-incentive, newest librustzcash + v5 tx format + remove librustzcash as dep
External note_encryption test vectors still need to be updated and also newer clippy is more opinionated
I guess we need to integrate this branch into anoma/namada first to see whether it integrates nicely and continues to work. I suspect the lack of transparent transaction inputs combined with the zero value balance requirement will make it awkward to create shielding transactions from the anoma/namada repo.
Are these problems? I was under the impression that these changes made it closer to anoma/namada.
I'm not sure if all the new serialization (and perhaps other) trait implementations added here are used in anoma/namada, so perhaps some could be removed?
Yes, let's take out anything unnecessary.
All the transaction construction unit tests are passing despite the serialization and deserialization routines being unmatched. Perhaps more tests need to be added?
Yes, it's hard to believe that everything matched exactly by accident.
Are these problems? I was under the impression that these changes made it closer to anoma/namada.
They might be problems. In anoma/namada
, if Bertha was sending 5BTC to a shielded address then the client would add a transparent input of 5 BTC to the MASP Transaction
object (again the MASP VP checks the consistency between the inner Transaction
and outer Transfer
). This (inner) transparent input served to balance the inner Transaction
, otherwise the inner Transaction
's total outputs would exceed the total inputs and an insufficient funds error would be issued by the transaction builder.
See the test that I'm not sure will pass without transparent inputs here: https://github.com/anoma/masp/pull/41#discussion_r1064593287 . See the specs governing how inner Transaction
s are constructed here: https://github.com/anoma/namada/blob/main/documentation/specs/src/masp/ledger-integration.md#boundary-conditions .
Yes, it's hard to believe that everything matched exactly by accident.
I believe that essentially all the serialization/deserialization of transaction components are correct. I'm just worried specifically about the serialization/deserialization of the container object. See https://github.com/anoma/masp/pull/41#discussion_r1064522462 specifically.