Remove support for tickets with zero amount

By Tezos Protocol amendments team

Today we would like to announce an important change coming in your way. As part of our next protocol proposal, we will remove support for tickets of zero amount.

Tickets of zero amount was previously allowed at the introduction of tickets initially. However, as Tezos protocol developers work on transaction and smart contract rollups, tickets of this kind has become the source of inconvenience and potential security issues. To simplify and provide more safeguards to the ticket system, a more systematic accounting method for tickets is being introduced and, along with it, tickets of zero amount will be phased out of support.

Tickets of zero amount will be rejected while there are safeguards and assertions in several places. They will not be accepted as a valid value of any given ticket type, when parsing a Micheline node into a Michelson value. They will not be able to get instantiated using TICKET or SPLIT_TICKET instructions. Therefore, during execution of smart contracts, those instructions will return NONE when tickets of zero amount may be created.

This will potentially impact the existing originated contract on the Tezos blockchain. However, after gathering recent Tezos mainnet data, we come to a conclusion that there is a rather low risk in carrying out this migration. Here is how.

Scanning mainnet for tickets of zero amount

We try to identify contracts that has recently created, stored or read tickets of zero amount. Specifically, we fixed a date, 10th of August, 2022, and replay those Tezos mainnet blocks baked after the level 2608372. First, we took the snapshot and imported it into a tezos-node.

If you want to learn more about this Tezos bridge, please read our blogpost on Marigold website :point_right: Remove support for tickets with zero amount

2 Likes

Additionally, we’d like to add that in the process of reviewing this potentially breaking change, we used the Michelson static analysis tool being developed by one of our PhD students to verify that all deployed contracts would not create zero-amount tickets in the future.

Scanning the history of the chain for contracts calls emitting zero-amount tickets can raise confidence that past contracts calls did not break (by being able to emit zero-amount tickets previously, and not after this change). However, it cannot guarantee that new calls to already originated contracts could break in the future – a guarantee that a static analysis can indeed provide.

A check was added in the Michelson analyzer to verify non-zero amounts for TICKET and SPLIT_TICKET instructions, and the analysis was run on all contracts of Mainnet at level 2,704,194 (12th of September). Our analysis found 5 contracts (listed below) that could possibly create zero-amount tickets, which we could then examine one by one. These contracts were not broadly used, and none of them were active within the last year. This give us some confidence the change would not break major dApps in the future, if the protocol proposal is accepted and once it is activated on Mainnet.

List of contracts potentially emitting zero-amount tickets:

5 Likes