Skip to content

Proto/Michelson: Double type size limit

Context

See #1681 (closed). This MR implements the solution "Increase the limit (double it + 1), to make sure everything that passed before still passes now." As pointed there, "The main question is: why do we have this limit in the first place? Where is it used to prove something won't explode?"; @klakplok: any clue?

Manually testing the MR

  • create a Granada mockup config
$ alias mockup_client='tezos-client --mode mockup --base-dir /tmp/mockup'
$ rm -rf /tmp/mockup
$ mockup_client --protocol PtGRANAD create mockup
  • originate a contract with a big parameter type (size between 500 and 1000) and a big storage type (same size range)
$ mockup_client --protocol PtGRANAD originate contract test_big_type transferring 0 from bootstrap1 running [test_big_type.tz](/uploads/32c7113bd2ded6846546c9234cd24e52/test_big_type.tz)test_big_type.tz --init None --force --burn-cap 1
  • check that the contract works on Granada
$ mockup_client --protocol PtGRANAD transfer 0 from bootstrap1 to test_big_type --arg None
  • migrate the mockup config to Alpha
$ mockup_client migrate mockup to ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK 
  • call the contract on proto Alpha
$ mockup_client --protocol ProtoALpha transfer 0 from bootstrap1 to test_big_type --arg None

This should fail on master (with the error message "At (unshown) location 455, type exceeded maximum type size (1000).") and succeed on this branch.

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, the Development Version section of CHANGES.md for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Raphaël Cauderlier

Merge request reports