Skip to content

Conversation

@murisi
Copy link
Collaborator

@murisi murisi commented May 6, 2024

Describe your changes

Tried to increase the readability, strength, and generality of the MASP validity predicate whilst decreasing its verbosity. The changes are as follows:

  • Transaction inputs and outputs that exceed pre-balances and post-balances respectively are no longer allowed.
  • Now use the Sapling value balance in order to verify that movement in and out of the shielded pool is correct
  • Now handle all AssetType decoding in one place before starting to check the transparent bundles
  • The VP should now support Transactions and unrelated Transfers touching the same addresses/tokens
  • Tried to remove the code that gave IBC minting transactions special treatment now that Sapling value balance is used
  • Reduced dependency on the multitoken VP by directly checking the correctness of MASP VP balance changes
  • Now check that all Transactions and the balancing transaction are sufficiently authorized; prevents malleability

What would still need to be handled/fixed if this code turns out to be relevant:

  • Overflows when trying to construct ValueSum::new objects
  • Underflows when subtracting Amounts during the value balance computations in verify_sapling_balancing_value
  • Add integration tests. Like checking that an unshielding Transaction to Bertha is embeddable inside a Transfer to Christel only if Bertha has signed the entire transaction (in addition to the usual MASP checks).

Indicate on which release or other PRs this topic is based on

#2690

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

@murisi murisi force-pushed the murisi/multi-tx-masp-vp-experiments branch from aaa5904 to 098ee65 Compare May 6, 2024 15:26
@murisi murisi closed this May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants