Skip to content

Upgrade to protocol Mumbai

Melwyn Saldanha requested to merge move/mumbai/v16.1 into dev

Motivation and Context

Changelog https://tezos.gitlab.io/protocols/016_mumbai.html#michelson-opcodes-for-logical-operations-on-bytes

Description

closes #1724 (closed)

TODO:

  • Apply the lazification patches https://gitlab.com/ligolang/tezos-ligo/-/commits/v15.0-ligo
  • Disable tx_rollup_l2_address for Mumbai
  • Add support of Mumbai Michelson changes
    • Michelson opcodes AND, OR, XOR, NOT, LSL and LSR for bytes
    • Michelson opcodes NAT, INT and BYTES for bytes-int and bytes-nat conversions.
  • Update documentation
    • Add section for bitwise operators for Bytes
    • Add section for bytes-int, bytest-nat conversion
    • Add page for protocol Mumbai
  • Remove chest related things from stdlib & environment & other parts of compiler
  • Add tests for txr1 & scr1 addresses
  • Fix weird CI issue
  • Check with @prometheansacrifice about windows compat patches
  • esy build
  • Fix weird build failure for jsoo build
  • Add changelog description

Component

  • compiler
  • website
  • webide
  • vscode-plugin
  • debugger

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Performance improvement (non-breaking change that improves performance)
  • None (change with no changelog)

Changelog

Upgrade LIGO to use the Mumbai protocol

Additions

  1. Add support for bitwise operators on bytes
  2. Add support for byest-nat & bytes-int conversion
  3. The protocol supports working with txr1 & scr1 addresses

Deprecation

  1. The type tx_rollup_l2_address has been disabled in the Mumbai protocol

Example

[@entry] let main (_ : unit) (_ : bytes) : operation list * bytes =
  let b = bytes 123n in
  [], b land 0xffff

let test =
  let (taddr, _, _) = Test.originate main 0xffff 0tez in
  let contr = Test.to_contract taddr in
  let _ = Test.transfer_to_contract_exn contr () 1mutez in
  assert (Test.get_storage taddr = 0xffff land bytes 123n)

Compilation

$ ligo compile contract x.mligo 
{ parameter unit ;
  storage bytes ;
  code { DROP ;
         PUSH nat 123 ;
         BYTES ;
         PUSH bytes 0xffff ;
         AND ;
         NIL operation ;
         PAIR } }

Tests

$ ligo run test x.mligo 
Everything at the top-level was executed.
- test exited with value ().

Checklist:

  • Changes follow the existing coding style (use dune @fmt to check).
  • Tests for the changes have been added (for bug fixes / feature).
  • Documentation has been updated.
  • Changelog description has been added (if appropriate).
  • Start titles under ## Changelog section with #### (if appropriate).
  • There is no image or uploaded file in changelog
  • Examples in changed behaviour have been added to the changelog (for breaking change / feature).
Edited by Rémi

Merge request reports