Skip to content

[#841] Adjust to sapling changes in jakarta

Diogo Castro requested to merge diogo/#841-jakarta-sapling into master

Description

Excerpt from the Jakarta release notes:

The existing type sapling_transaction is renamed sapling_transaction_deprecated and is deprecated. Existing onchain contracts are automatically converted. A new Michelson type sapling_transaction and an overload of the instruction SAPLING_VERIFY_UPDATE have been added to fix the malleability problem of the old instruction (see Sapling integration). (MRs tezos/tezos!4670 (merged), tezos/tezos!4589 (merged))

  • Since sapling_transaction_deprecated can't be used for new contracts (it's rejected by tezos-client typecheck and tezos-client originate), we won't be supporting it in morley.
  • Which means we only need to make sure SAPLING_VERIFY_UPDATE works on the "new" sapling_transaction type.
  • This MR also makes sure morley fails with a neat error message when a user attempts to parse/unpack a contract with sapling_transaction_deprecated

As part of this MR, I've also uncovered and fixed some bugs in the deserializer. Details in the commits' descriptions.

Related issue(s)

Resolves #841 (closed)

Checklist for your Merge Request

Related changes (conditional)

  • Tests (see short guidelines)

    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • Documentation

    • I checked whether I should update the docs and did so if necessary:
    • I updated changelog files of all affected packages released to Hackage if my changes are externally visible.

Stylistic guide (mandatory)

Edited by Diogo Castro

Merge request reports