---
# System prepended metadata

title: phases

---

# phases

1. tests, coverage, refactors, fix encodings, coq-of-ocaml
2. environment
3. lazy_storage
4. michelson
5. sapling & BA

# merged MRs and their commits in `proto-proposal-prior-to-007` branch

- !280
  - 1 823ff065de Tests/Python: update test for migration receipts
  - 2 a30401d033 Client: update for migration receipts
  - 3 b14dcd97
  Migration: update protocol invoice receipt
  - 4 a801630bba Proto: distinguish balance updates (receipts) applied in migration

- included in delphi
  - 5 55e53fc7d9 Tests/Python: regenerate regression traces
  - 6 57ec6b0c47 Tests/Python: adapt to fixed-point
  - 7 0da5edf037 Proto/tests: adapt protocol unit tests to fixed-point
  - 8 b1cbf9e505 Proto/parameters: gas limits as fixed-point values
  - 9 5d1dd87cff Proto/mempool_filters: use fixed-point computations for gas
  - 10 795f2992c2 Proto/delegate: use fixed-point computations for gas
  - 11 aa0640628a Proto/client: use fixed-point computations for gas
  - 12 3efedd6993 Proto/gas: use fixed-point computations for gas
  - 13 baca08d84c Proto/gas: edit TEZOS_PROTOCOL for Fixed_point, move Gas_limit_repr
  - 14 2a4b10803d Proto/tests: unit tests for Fixed_point_repr
  - 15 42d48c94fb Proto/gas: introduce Fixed_point_repr module

- originally from !281 - @paracetamolo p2
  included in delphi, but without the env change
  - 16 fee7b2bbdb Env/V1: expose Z.{pow, ediv, erem, format}

- included in delphi
  - 17 083c2c770f Revert "Vendors/flextesa: scale gas limit constants in the context by 128"
  - 18 c4f0df21fd Revert "Protocol/Migration: scale gas limit constants in the context by 128"
  - 19 d1c092b88c Revert "Vendors/flextesa: scale gas limit constants in the context by 1000"
  - 20 719241c3da Revert "Protocol/Migration: scale gas limit constants in the context by 1000"
  - 21 8624ef93fa Proto: Add missing case for keyword namespace encoding
  - 22 7564e98c84 Protocol/Test: add dependencies on .tz sources
  - 23 e9ede108b8 Client: fix .opam (add package for registration)
  - 24 da0cf9bba3 Build: remove conf-rust

- !256 - @rafoo p4
  - 25 2ba8ff19d8 Docs: combs and DUP n
  - 26 0314adb575 Test/Python: add tests for DUP n
  - 27 4502049a2d Tests/Python: add tests for combs
  - 28 56ecd5107b Client: change macros for DUP n
  - 29 7667b5b80e Proto/Michelson: make auxiliary functions tail-recursive
  - 30 8463e04937 Protocol/Michelson: add DUP n
  - 31 a90e6220ba Protocol/Michelson: add combs

- !274 - @medhi p3
  - 32 40198d5ac8 Lazy storage: fix NL email

- !149
  - 33 46b8125fbb Protocol/RPC: slightly improve efficiency of '/baking_rights?delegate=[...]'
 
- included in delphi
  - 34 bcc05bb478 Proto/tests: lift some Lwt.return
  - 35 40f6ebe28f Proto: lift some Lwt.return
  - 36 f7d7131ebf Proto: more changes due to rebase
  - 37 71225a69f2 Proto/tests: use predefined ok constants
  - 38 7e3600b9e0 Proto: use predefined ok constants
  - 39 17a8ceac10 Proto: fail_unless/when -> error_unless/when
  - 40 640b666738 Tests: less Lwt
  - 41 01c9876703 Storage: less Lwt
  - 42 a74c95dbff Script_ir_translator.collect_big_maps: get rid of Lwt
  - 43 21c5865cdc Script_ir_translator: less Lwt
  - 44 f54c565e7b Script_ir_translator.parse_data: traced
  - 45 34b7c796e6 Script_ir_translator.parse_data: remove lots of Lwt
  - 46 38d1e97e50 Script_ir_translator.parse_data: rename error
  - 47 65dcb476ab Script_ir_translator: remove lots of Lwt in parse_instr
  - 48 62aae32e0c Script_ir_annot: get rid of fail_unexpected_annot
  - 49 46e8c21f4b Raw_context.add_fees/rewards/deposit: get rid of Lwt
  - 50 d2536aca13 Proto: Lwt.return >>=? -> >>?=
  - 51 ad614e9702 Operation.check_signature: get rid of Lwt
  - 52 58a4a6fcb1 Fees_storage.origination_burn: get rid of Lwt
  - 53 45379cf0d8 Delegate_services.required_endorsements/minimal_valid_time: get rid of Lwt
  - 54 7560af432f Contract_storage.fresh_contract_from_current_nonce: get rid of Lwt
  - 55 0dc2999ee6 Baking.check_fitness_gap: get rid of Lwt
  - 56 3f716365bf Baking/tests: baking/endorsing_reward, get rid of Lwt
  - 57 6f924fd0c3 Baking: baking/endorsing_reward, get rid of Lwt
  - 58 102fa723ab Baking.earlier_predecessor_timestamp: get rid of Lwt
  - 59 a3d3188664 Baking: minimal_(valid_)time, get rid of Lwt
  - 60 5c4ed6e037 Script: force_decode/bytes, get rid of Lwt.t

- !250 @claret p1
  - 61 ff17bf3ea8 Protocol/coq-of-ocaml: prevent a name collision with the Log module
  - 62 2df7f66e30 Protocol/coq-of-ocaml: force some types to be considered as GADTs
  - 63 3e4880ecfc Protocol/coq-of-ocaml: we handle num as a phantom type
  - 64 5be0875afc Protocol/coq-of-ocaml: add coq_axiom attribute for lazy_storage_diff GADT functions

- !225
  - 65 e4bae28c74 Tests/Python: tests for metadata hashes around protocol migration
  - 66 e2b543d65a Baker: Add block metadata hash to block's context
  - 67 9671436124 Tests/OCaml: update tests for block metadata hash
  - 68 aa759c43f3 Shell/RPC: add endpoint for block metadata hash
  - 69 544342b247 Shell: Store and validate block metadata hash
  - 70 58909d0d53 Crypto: Add block metadata hash
  - 71 fd0e9801f3 Baker: Add operation metadata hash to block's context
  - 72 8502715f26 Tests/OCaml: update tests for operation metadata hashes
  - 73 9e9d53441f Shell/RPC: add endpoints for operations metadata hashes of a block
  - 74 271ca253ca Shell: Store and validate operation metadata hashes
  - 75 62c3476a43 Env: Add function to get environment's version
  - 76 f4a5aa6db0 Crypto: Add prefixes for operation metadata hash

- !254 - @paracetamolo p2
  - 77 059f8dc5f0 Proto_demo: update demo protocol to environment V1

- included in delphi
  - 78 a11e4d0073 Protocol/coq-of-ocaml: add signature annotations
  - 79 832f0e9c67 Protocol/coq-of-ocaml: changes to compile storage.ml
  - 80 4adc2ec08a Protocol/coq-of-ocaml: lint the interpreter
  - 81 230178361b Proto/Michelson: add missing cases in typechecking error reporting
  - 82 281aeba714 Proto/Michleson: make annotations on `Right` and `Elt` consistent

- !245 - @claret p1
  - 83 cee6c06a7b Protocol/coq-of-ocaml: compile lazy_storage_kind.ml with suggestions from @mbouaziz
  - 84 bf8ad946cc Protocol/coq-of-ocaml: remove unused mutual dependencies
  - 85 09f1b44543 Protocol/coq-of-ocaml: add axioms to compile storage_description

- included in delphi
  - 86 1a1dbe6245 Protocol/coq-of-ocaml: renaming to compile alpha_context
  - 87 e046a98e5c Protocol/coq-of-ocaml: rename consume and check_enough to prevent collisions
  - 88 f69c4f40c4 Protocol/coq-of-ocaml: renaming of force_decode / force_bytes to prevent collision
  - 89 bfdfb27fee Protocol/coq-of-ocaml: rename of_seconds to prevent a collision of name

- !246 - @claret p1
  - 90 b9bc0d1c4d Protocol/coq-of-ocaml: use 'with type' instead of 'with module'

- !234 - @paracetamolo p2
  - 91 2ea476bd79 Environment: add missing bool arg to RCP_arg.mli
  - 92 aeae769ab6 Environment: remove duplicated function Context.del

- !45 - @paracetamolo p2
  - 93 fa9a15fcfc CI: BLS12-381
  - 94 4c6238bd3a Docs: BLS12-381
  - 95 87ea2e53c2 Tests/Python: BLS12-381
  - 96 b34b627163 Proto: BLS12-381 ops
  - 97 d43aa3084f Bindings: BLS12-381

- !241 - @paracetamolo p2
  - 98 36fe284cc4 Bump up ocaml-bls12-381 to 0.3.9

- !244 - @claret p1
  - 99 5955842591 Protocol/coq-of-ocaml: explicit the comparison module for KId

- !111 - @claret p1
  - 100 8fdda417e5 Tests/coq-of-ocaml: Add a CI rule to run coq-of-ocaml

- included in delphi
  - 101 32d1312e6f Use Option.value
  - 102 847bf61c00 List.fold_left -> Error_monad.map
  - 103 8e0a12dfc0 Proto: filter_map_s -> filter_s
  - 104 de20f8f4b3 List.map -> fold_left_s
  - 105 7f1a352513 Proto: bind -> to
  - 106 06f7c787d7 Protocol/coq-of-ocaml: avoid a name collision on encoding in the generated Coq

- !230 - @paracetamolo p2
  - 107 2bbe92986e Update to 0.3.8
  - 108 66a7e0fd54 Bump up version of ocaml-bls12-381 to 0.3.7

- !240 - @claret p1
  - 109 8b75575420 Protocol/coq-of-ocaml: Ignore some functions with Coq errors
  - 110 7595707dcd Protocol/coq-of-ocaml: break mutual dependency of the type t
  - 111 9931d4eed0 Protocol/coq-of-ocaml: name the signatures of the protocol

- !238 - @claret p1
  - 112 1aa88aa69e Protocol/coq-of-ocaml: avoid non-top-level uses of 'let and' constructs

- !96 @mehdi p3 @paracetamolo p2
  - 113 b0395ee554 Proto: abstract type for big map id
  - 114 9e65943b6f Proto: add tests for lazy_storage_diff
  - 115 85eb1b0e45 Proto: generalize big_map init too
  - 116 93da0e094e Proto: generalize temporary big_map id too
  - 117 8a1c7f2079 Proto/Michelson: rename allow_big_map -> allow_lazy_stoage
  - 118 19d74b0b6a Proto/Michelson: find_big_map rather than list_of_big_map_ids
  - 119 c836ed4abf Proto/Michelson: fold for lazy_storage
  - 120 c97011266b Proto/Michelson: rename has_big_map -> has_lazy_storage
  - 121 9c31267de8 Proto/Michelson: lazy storage in interpreter
  - 122 63ddf5614d Proto: use lazy storage
  - 123 e28f15fc77 Env: add Option.first_some
  - 124 3e03695808 Proto/Contracts: start generalizing lazy storage
  - 125 eecf4a1c3d Proto/Contracts: big_map_diff: move to legacy module

- !233 - @claret p1
  - 126 e5c08219a7 Protocol/coq-of-ocaml: Name some anonymous signatures to help coq-of-ocaml

- !165 - @paracetamolo p2
  - 127 fb04329697 Env/Error_monad: import more values from the lib

- included in delphi
  - 128 d4ed3d399e Migration: remove leftovers Alpha_previous and Babylon_005

- included in delphi
  - 129 7530ba9da8 Docs: Update `max_revelations_per_block` references
  - 130 4920b819a0 Proto: Update `max_revelations_per_block` to include anon ops

- !220 - @paracetamolo p2
  - 131 b2495cc3de Update ocaml-bls12-381 to 0.3.6

- !122 - @paracetamolo p2
  - 132 99015061ff Vendors ocaml-bls12-381 0.3.4

- !212 - @paracetamolo p2
  - 133 f58291a10b Proto: update to Stdlib's Option syntax
  - 134 45e0eed2ab Env: use Stdlib's Option

- included in delphi (depends on !69)
  - 135 c214393714 Proto: update the old operator to regular naming scheme
  - 136 36cd06e8d5 Env: update the old operator to regular naming scheme
  - 137 f2b85667b9 Proto/coq-of-ocaml: Remove a polymorphic variant in raw_context

- !209
  - 138 90de795719 Client: follow curryfication of helper services
  - 139 c3ad6ab8c3 Proto/RPC: curryfication and argument naming of helper service functions

- !207
  - 140 3dbeffec3d Tests/Python: test the --balance argument of run_script
  - 141 20f0714720 Client/Michelson: add a --balance argument to `run script`
  - 142 b9721e842a Proto/RPC: add a mandatory balance field to the run_code RPC

- !51
  - 143 1ff284be4a Docs: add failing_noop operation information
  - 144 1a1724b7f6 Python/test: sign/inject/check a failing_noop msg
  - 145 a0e6c5da2d Python/test: remove double 'sign bytes' fct
  - 146 52091c42c9 Protocol/test: send a failing_noop op and fails
  - 147 f5ef8d5c00 Protocol/client: add commands sign/check "message"
  - 148 ad8d15df49 Protocol: add failing_noop operation

- !190 (depends on !125 - could be joined with !125) @rafoo p4
  - 149 2813d343c5 Docs/Michelson: Remove references to removed instructions
  - 150 821f37dd87 Docs/Michelson: Update 'Deprecated' to 'Removed' instructions

- !80 (depends on !69) - @paracetamolo p2
  - 151 1df08b50fd Env: Expose PVSS to the protocol

- !206 - p1
  - 152 6ac153d59b Proto: Split cases with different type parameters
  - 008 MR: https://gitlab.com/metastatedev/tezos/-/merge_requests/304

- included in delphi
  - 153 b1cf7682f4 Tests/Python: Satisfy mypy typechecker
  - 154 4f70b94f08 Proto/Michelson: avoid Lwt.bind when logging

- !46
  - 155 4b4c51b274 Migration/Tests: Check bootstrap1 migration invoice
  - 156 6110f4dc63 Migration: Invoice bootstrap1 contract
  - 157 eec1b89c93 Tests/Python: Add migration integration test
  - 158 a551e1a602 Tests/OCaml: update tests for migration balance updates
  - 159 a332091c0e Proto: Allow to apply balance updates from migration
  - 160 544e3db55e Client: Separate balance updates receipts into Receipts module
  - 161 928b544708 Proto: Separate balance updates receipts into Receipts module

- !48
  - 162 da5ce8727f Proto/test: Prevent double injection evidence
  - 163 e8ee021cbd Protocol: Prevent double injection of evidence

- !173 - @paracetamolo p2
  - 164 cd2bc1811e Docs: Add sha3 and keccak docs
  - 165 5178abfc3b Tests/Python: Add sha3 and keccak tests
  - 166 2f0c71d12e Proto: add keccak and sha3 opcodes
  - 167 aad58b8c9b Tests/Python: fix and extend the test of the `CHAIN_ID` instruction

- included in delphi - @rafoo p4
  - 168 d38b39de66 Proto/Michelson: readable unparsing of chain ids

- !178 (depends on !82 - could be joined with !82) - @rafoo p4
  - 169 648b02283c Docs: New opcode, and update glossary and voting
  - 170 7b7514ba74 Test/Python: Update regression output
  - 171 1461b3230a Test/Python: Regression test for TOTAL_VOTING_POWER
  - 172 5102acfad7 Test/OCaml: TOTAL_VOTING_POWER operation
  - 173 d16d94f7e3 Proto: Add TOTAL_VOTING_POWER operation, and account for gas
  - 174 3c14a7a9cc Test/Python: Remove `test_voting_power_opcode.py`
  - 175 63e4f620b8 CI: Remove `test_voting_power_opcode.py` from integration tests

- !186 (depends on !79 - could be joined with !79)
  - 176 6cf38d15a1 Test/Python: Check fractions positive and add up to votes_per_roll
  - 177 e554e4bd07 Client: Check fractions are positive and improve ballot allocation
  - 178 2107009ec7 Proto: Check fractions are positive and improve ballot allocation

- !181 (depends on !52 - could be joined with !52) - @rafoo p4
  - 179 d7720c7dd9 Docs: Michelson's empty type

- !41
  - 180 b266b81184 Doc: Update voting section with the new 5th period
  - 181 13668d0ebd Tests/Sandbox: update for Activation_delay period
  - 182 7e22201452 Tests/OCaml: update voting tests
  - 183 6282115fc1 Client: Update for the new period
  - 184 888a9922b7 Proto: add the 5th period - Activation_delay

- !146 - @mehdi p3
  - 185 4c4fc54cc4 Tests/Python: originating with big map diff do work
  - 186 32cf26cf84 Tests/Python: add tests for origination of big maps
  - 187 abef758855 Test/Python: add an optional parameter in init_with_transfer
  - 188 9da89b0701 Doc/Michelson: document the syntax of big_map literals
  - 189 0d7d5b158a Tests: update failwith with bigmap
  - 190 627687bb75 Proto: add representation for big_maps with id & diff
  - 191 bb2c289904 Tests: failwith with bigmap

- !99 - @rafoo p4
  - 192 a542f04233 Tests/Python: add test for contract caching
  - 193 16b451d5cd Proto: Cache deserialized contracts

- !179 - @claret p1
  - 194 fa4c87526a Proto/coq-of-ocaml: Remove a polymorphic variant in apply.ml to name the type

- !137 - @paracetamolo p2
  - 195 89b1a00546 Proto: Adding Keccak256 and SHA-3 to lib_protocol_environment

- !82 - @rafoo
  - 196 ca0eb3e596 Docs: Add VOTING_POWER opcode, returns a delegate's voting weight
  - 197 372c392fdf Test/Python: Update regression output
  - 198 075801f57b Test/Python: Parametrized input-output test for VOTING_POWER
  - 199 166e3772f4 Test/Python: Add tests for Michelson VOTING_POWER opcode
  - 200 d559caa01b Test/OCaml: voting power changes over time
  - 201 c1a9fadbca Test/OCaml: Add tests for Michelson VOTING_POWER opcode
  - 202 a86366dc67 Proto/Michelson: Add VOTING_POWER opcode

- !120
  - 203 07f3dae98b Protocol/test: verify that error message is correct
  - 204 26c4734a80 Protocol: add debug info to storage_description

- !79
  - 205 15c54ba731 Test/OCaml: Change encoding of fractions to uint16
  - 206 2f7ff3e7da Proto: Change encoding of fractions to uint16
  - 207 b697cf790d doc/whitedoc: voting with split votes
  - 208 1ee279836e Sandbox: Fix command submit ballot
  - 209 e7eba60439 Tests/Python: Submit ballot with non-zero Yay, Nay and Pass splits
  - 210 1dc42aa336 Tests/OCaml: Casting split ballots
  - 211 72a08916b4 Client: Fix allocation of votes and fix command submit ballot
  - 212 f0e6592b79 Proto: Add repr for split ballots and fix allocation of votes

- !121 @alvaro
  - 213 4365d28432 Test/Python: Test RPCs for counter and for global counter
  - 214 36f2df8635 Test/OCaml: Expose global counter through new RPC
  - 215 002dfa6b48 Proto: Remove check in get_counter and expose global counter

- included in delphi
  - 216 b5d3767a67 Storage: rename Int_index -> Int31_index
  - 217 be44e369da Storage: rename Int -> UInt16
  - 218 50834737a8 Tests/Python: Add a test case for transfer to nonexistent contract
  - 219 dccbc96eb6 Proto: for transfers with 0 tz, check if target exists
  - 220 97e15ee1f1 Proto/Client: make integer constant easier to read
  - 221 73e67594e0 Vendors/flextesa: scale gas limit constants in the context by 1000
  - 222 3b99d2dd7a Protocol/Migration: scale gas limit constants in the context by 1000
  - 223 9517e8c57e Proto/Gas: arithmetic optimization (remove multiplication by 1)
  - 224 842225804e Tests_python: adapt regression tests to gas rescaling
  - 225 76cc881d41 Tests/Python: update limits and fees in python tests
  - 226 06e9786897 Proto/Tests: update protocol unit tests
  - 227 13e9e6bd77 Proto/Gas: perform rescaling from x128 to x1000
  - 228 80640869e9 Proto/Gas: inline calls to scale
  - 229 d619d22177 Proto/Gas: factor calls to scaling function
  - 230 a7d621ee89 Proto/Gas: remove intermediary cost record

- !125 - @rafoo p4
  - 231 da8aba42d6 Tests/Python: update tests for deprecated instructions
  - 232 e5c57c0b6e Proto/Tests: remove STEPS_TO_QUOTA test
  - 233 e5d23ef4ad Tests_python: remove contract_legacy
  - 234 d897dc7ebe Proto/Michelson: remove a now dead file
  - 235 3406f86ced Protocol/Michelson: Drop the `_2` suffix for `Create_contract`
  - 236 4b894cc1da Protcol/Michelson: remove the deprecated instructions

- !153 - @claret p1
  - 237 877646f326 Proto/coq-of-ocaml: Name the signatures of the environment
  - 238 e952c1ec3e Proto/coq-of-ocaml: Name the tag_size type
  - 239 6618ffb7a6 Proto/coq-of-ocaml: Name the key_or_dir type

- !135 (depends on !72 - could be joined with !72) - @rafoo p4 @paracetamolo p2
  - 240 8fdfacad70 Docs/Michelson: Update comparable types and COMPARABLE instruction
  - 241 00eea479f2 Test/Python: Make key, chain_id and signature comparable
  - 242 4877d9b919 Proto/Michelson: Make key, chain_id and signature comparable
  - 243 af5fae00d1 Crypto: size of a public key

- !162 (depends on !69) - @paracetamolo p2
  - 244 e2415f1131 Proto: use Z.pp rather than Z.to_string
  - 245 2b73ddea05 Env V1: add Z.pp

- included in delphi
  - 246 fb36f69722 Tests/Python: update annotations tests (numerals now allowed)
  - 247 99c2141b90 Doc/Michelson: update the regular expression for annotations
  - 248 bc68ae34df Proto/Michelson: extend the set of allowed Michelson annotations
  - 249 ff4e90f5c7 Tests/Python: update annotation tests (issue #716 is solved)
  - 250 10a2a20a3e Proto/Michelson: ensures all annotations are checked
  - 251 0ef47bbd67 Tests/Python: test of the second char of field annotations
  - 252 cda68b6fe2 Tests/Python: Allow script literals in client.py
  - 253 ab40ae7d36 Proto_alpha: spell check
  - 254 a2ff9b2a1c Proto/Michelson: Use the right cost function for SET_DELEGATE instr
  - 255 0ecb709d66 Proto: Fix double encoding of big_map_diff
  - 256 280e2eeb0c Proto/Michelson: expose unparse_code in Script_ir_translator

- !133 - @rafoo p4
  - 257 87f946c17b Proto/Michelson: cleanup error handling for comparables
  - 258 7f337d1ecb Proto/Michelson: add missing Unit case in comparable_ty_of_ty_no_gas

- !117 - @rafoo p4
  - 259 162fba427a Tests/Python: typechecking test in legacy mode
  - 260 068bcdf583 Tests/Python: support for legacy flag in typechecking methods of client.py
  - 261 92ce58040e Client/RPC: client support for the legacy switch in typechecking commands
  - 262 d5ae02b1e4 Protocol/RPC: add an optional legacy switch to the typecheck RPCs

- !54 - @rafoo p4
  - 263 c30345718c Tests/Python/Regression: update regression logs for UNPAIR
  - 264 ed3f0130ad Tests/Python: unskip the annotation mismatch test for UNPAIR
  - 265 b5dac33e1d Client/Tests: update UNPAIR (un)expansion unit tests
  - 266 695bce4236 Doc/Michelson: documentation of the UNPAIR instruction
  - 267 b4524a20d1 Client/Michelson: improve the UNPAPAIR macros
  - 268 5531d2bd8b Client/Michelson: deactivate the UNPAIR macro
  - 269 a381d2cdef Proto/Michelson: UNPAIR instruction

- !114 - @rafoo p4
  - 270 f6e3fdda59 Tests/Python: Update regression output (UNPAPAIR annots deprecated)
  - 271 546999eaf7 Tests/Python: skip an annotation mismatch test for UNPAIR
  - 272 790cc7d7cf Doc/Michelson: document the deprecation of annotations on UNPAPAIR
  - 273 d66b2f8b8c Client/Michelson: drop support for annotations on UNPAPAIR macros
  - 274 79dbbeea3a Tests/Python: more extensive tests for UNPAIR

- included in delphi
  - 275 fe271644e3 Use plain algebraic types for the Michelson annotations

- !94 (depends on !69) @paracetamolo p2
  - 276 61ea716b97 Env: int32 of_string -> of_string_opt
  - 277 67b64c697a Env: int64 remove {of,to}_nativeint, of_string -> of_string_opt
  - 278 9c3a47e65e Env: format add pp_{print_custom_break,print_option} {k,}dprintf
  - 279 a290ecb50e Env: list add 1 type, remove mem, remove assoc
  - 280 95269a0f1d Env: reduce diff of int32, string, set, map, s.ml, pervasives
  - 281 429fbfd8a3 Env: add char

- !98 (depends on !69) @paracetamolo p2
  - 282 da221083fb Proto: simplify Bytes.of_string (String.make _)
  - 283 5ff9d148d4 Proto: simplify some Bytes.concat
  - 284 acae7162d2 Env V1: disallow Bytes.unsafe_of/to_string
  
- !??  @rafoo p4
  - 285 5068aeccbb Proto/Michelson: expose parse_ty for convenience to external tools

- included in delphi
  - 286 b78f259fdf Proto/Michelson: simplify Big_map.fresh
  - 287 c5bbb0d2a8 Proto/Michelson: remove dead code
  - 288 c8f495c876 Client/operation result: factorize pp_big_map_diff
  - 289 8904e2833e Proto/Contracts: big_map_diff/Copy: use inline record
  - 290 bdb4287cbf Proto/RPCs: use parse_packable/parameter_ty instead of parse_ty in services
  - 291 35778d84ea Proto/Michelson: factorize parse_storage_ty
  - 292 3c7a82053f Tests/Python: update regtest outputs
  - 293 234fa3a420 Proto/Michelson: get rid of has_big_map flag and old function
  - 294 3b6f67a9b6 Proto/Michelson: compute has_big_map only when needed
  - 295 c671244490 Proto/Michelson: extract_big_map_updates: aux
  - 296 3b80bdb5f6 Tests/Python: update hard-coded gas and fees accordingly
  - 297 a7f86deb00 Tests/Python: Update steps to quota expected output
  - 298 4365a37abd Proto/Michelson: properly carbonate extract_big_map_updates and collect_big_maps
  - 299 c05ba52be4 Michelson: simplify GADT matchings in script_ir_translator 4/4
  - 300 d40114f566 Michelson: simplify GADT matchings in script_ir_translator 3/4
  - 301 01b629da9f Michelson: simplify GADT matchings in script_ir_translator 2/4
  - 302 e5c75ecca8 Michelson: simplify GADT matchings in script_ir_translator 1/4
  - 303 11eae8aaf9 Michelson: fix number_of_generated_growing_types
  - 304 6b7df07363 Michelson: rename Left/Right as Cons_left/right
  
- !93 @paracetamolo p2
  - 305 62010c6822 Environment: remove unused module lwt_sequence
  - 306 2b7f483963 Environment: update signature list.mli
  - 307 6a7dca3b05 Environment: update signature lwt.mli

- !43 (depends on !69) @paracetamolo p2
  - 308 86fa19125a Stdlib, ProtoEnv/V1: no more MBytes
  - 309 35a30ed997 Option, ProtoEnv/V1: disallow hidden catch-all pattern
  - 310 7acdbe27c4 ProtoEnv/V1: disallow concurrent list processing

- !107 (depends on !69) @paracetamolo p2
  - 311 b376b61bf9 Environment: Add hex to V1

- !52 @rafoo p4
  - 312 fb35379c38 Tests/Python: test failed attempt to push a literal of type never
  - 313 5920afcd51 Client/Michelson: reporter for the new `Invalid_never_expr` error
  - 314 738b7993f8 Tests/Michelson: typechecking tests for comparability of type never
  - 315 13f1eca3db Doc/Michelson: type never is comparable
  - 316 070b9aaea3 Proto/Michelson: comparability of type never
  - 317 94cade300f Doc/Michelson: document the NEVER instruction
  - 318 8341bd42ce Tests/Michelson: add typechecking tests for the NEVER instruction
  - 319 058580537c Proto/Michelson: add the NEVER instruction
  - 320 3372d715d8 Doc/Michelson: document type never
  - 321 3df578672f Tests/Michelson: test typechecking of a contract using type never
  - 322 6050d1b412 Proto/Michelson: add an empty type named "never"

- included in delphi
  - 323 bcaa1d7d2d Proto/Michelson: simplify the interpreter

- !75 @rafoo p4
  - 324 676396bb36 Doc/Michelson: document SELF_ADDRESS
  - 325 8d22858cc3 Tests/Python: test the new SELF_ADDRESS instruction
  - 326 0809108992 Proto/Michelson: add the SELF_ADDRESS instruction

- !81 @rafoo p4
  - 327 d47384afcc Tests/Python: add a test for the LEVEL instruction

- !69 @paracetamolo p2
  - 328 c4e3e49f2d Protocol: alpha use environment V1
  - 329 607643b186 Python/test: injection of protocol with env V1
  - 330 0723aed7e8 Shell: environment V1

- !71 @rafoo p4
  - 331 f11957177a Doc: document LEVEL
  - 332 ff0c4a9197 Tests/python: add tests for LEVEL
  - 333 9a637870dc Tests: improve debugging of assert_storage_contains
  - 334 84b6b5535e Proto/Michelson: instruction LEVEL
  - 335 fd0a8a5c44 Script_int_repr: add of_int32
  - 336 00746c6dd1 Script_int_repr: fix comments of of_int(64)
  - 337 e48e7c51be Regtest scrubbing: scrub constants first

- included in delphi
  - 338 cd76dfeee8 Client: Refactor Michelson OCaml printer using namespace function
  - 339 5c456fa82e Client: Update moved namespace type
  - 340 4c845e73ec Proto: Move and export Michelson prim namespace function
  - 341 5989255556 Proto: Fix formatting

- !72 @rafoo p4
  - 342 fe17220011 Doc: move UNIT to section on type unit
  - 343 b39b8b0ee7 Doc: add documentation on comparisons of unit, options, unions
  - 344 5f7b09492e Doc: add missing documentation on boolean comparison
  - 345 8d6bfa12fe Tests: add tests for comparable unit, options, unions
  - 346 f9cb50575c Add Unit, Union, and Option as comparable types

- included in delphi
  - 347 4f009a268b Tests: update error message for big_dip.tz
  - 348 0bac8f0d1d Proto/Michelson: fix error message for DIP with wrong constant
  - 349 a5365ecba8 Tests: update error message for big_drop.tz
  - 350 1b94160227 Proto/Michelson: fix registration of error Invalid_syntactic_constant
  - 351 c66941784c Remove useless recursion
  - 352 11b847deee Rewrite some when clauses for Coq
  - 353 f83089363f Proto: remove unused exported vals
  - 354 f333c7d141 Remove mutual dependency between numeric types
  - 355 e39a583fc6 Proto/Michelson: remove dead code in parse_instr
  - 356 a088b35850 Express (comparable_)ty_eq in terms of merge_(comparable_)ty
  - 357 afcc9ff1b4 Tests_python: update regression tests outputs
  - 358 11d30f1a74 Include ty_eq in merge_types
  - 359 f3dde1183c Test/Python: update regression tests gas costs
  - 360 dbff05bb4b Proto/Michelson: Remove gas cost of 'map_to_list' and 'set_to_list' conversions
  - 361 656364cb13 Proto/Michelson: Use map fold for Big map updates
  - 362 0778cedaee Proto/Michelson: Fold over Map with Map_map and Map_iter
  - 363 5d0f36560f Proto/Michelson: Fold on Set using a folding break technique
  - 364 3da1d0d61b Proto/Michelson: Simplify parse_uint30
  - 365 475dac2d82 Update test output for DIP/DROP over the limit
  - 366 aa5db1772f Protocol/Michelson: avoid overflowing [Int32.to_int Int32.max_int]
  - 367 620ce631bf Add test for DIP/DROP with int over the limit

- !64 @rafoo p4
  - 368 b7edba4a0b Doc: generalize comparable pairs
  - 369 d516a2c34c Tests_python: update tests
  - 370 e242dd534b Comparable types: allow non-comb pairs
  - 371 ba0b0895ab Tests_python: update non-comparable-set-update test error message
  - 372 03dc429d11 Tests_python: update regression tests outputs
  - 373 480dcb3bd8 Protocol/Michelson: do not use comparable_ty_of_ty for set update
  - 374 1b381d3e2d Explicit absence of gas accounting in comparable_ty_of_ty
  - 375 8b219c03eb Tests_python: add test for non-comparable type in set update

- included in delphi
  - 376 39e3ab4c19 Proto/RPC: return all delegates if no flags were used
  - 377 a6a1ad0496 Tests/Python: fix gas bound in test_contract.py
  - 378 7f0aaa2688 Protocol: Safer Int64.to_int
  - 379 973a78fc3e Tests/Python: regenerate regression traces without internal_gas
  - 380 b666b3dc9d Vendors/flextesa: scale gas limit constants in the context by 128
  - 381 141e69b84d Protocol/Migration: scale gas limit constants in the context by 128
  - 382 1f12bd814d Proto/gas: remove internal_gas
  - 383 062fa31940 Proto/test: fix gas limit in unit test framework
  - 384 311187156c Tests/Python: regenerate regression traces witnessing internal_gas=0
  - 385 6be4517aa6 Tests/Python: Update steps to quota expected output
  - 386 5b57bdb2b7 Tests/Python: adjust gas limits and fees in Python tests
  - 387 dae02f9190 Proto/gas: rescale gas by 2^7, making internal_gas always 0
  - 388 a325b0468a Tests/Python: regenerate traces including internal_gas
  - 389 b58e756493 Proto/gas: make internal gas visible in interpreter traces
  - 390 ab83151ed2 Tests/Python: adjust fees and gas in python tests
  - 391 4ffad4c059 Protocol/gas: fix scaling of gas accounting for number of writes
  - 392 68026e191e Client/baking: use Q.t instead of Z.t for fee computation
  - 393 ce95c44fed Proto/Test: new tests checking basic gas properties
  - 394 c53b249731 Proto/Test: export `validation_state` in Incremental module
  - 395 5ca598f78e Test/Python: move and fix Map_map side-effect test
  - 396 7fb77845d2 Tests/Python: fix error message in chain_id arity test
  - 397 373f49877b Proto/Michelson: fix the arity check for chain_id
  - 398 52185d0bef Tests/Python: add an ill-typed test for the arity of chain_id.
  - 399 9ed400db42 Proto/Michelson: remove some Lwt wrappers
  - 400 7834e42f78 Proto: expose parse_storage
  - 401 df180ef290 Michelson: exposes parsing without specifying storage
  - 402 c398ba92fd Proto: Uniform variable names for context + comments clean-up
  - 403 5ad7b755f6 Tests/Python: regenerate reg. traces
  - 404 cff4350c99 Proto/Michelson: hoist Gas.consume out of interp. pattern matching
  - 405 23010519d9 Tests/Python: regenerate regression traces
  - 406 68314bc0ab Proto/Michelson: hoist gas consumption in Slice_{string,bytes}
  - 407 a149e35cca Tests/Python: generate regression traces for new slice test
  - 408 146c45ddc2 Tests/Python: bigger test for slice
  - 409 ef5f7de5b1 Tests/Python: update reg. tests logs for Loop exit gas fix
  - 410 0e6c5aecd4 Protocol/Michelson: fix gas consumption in Loop exit case
  - 411 f6573d3540 Tests/Python: update regression logs for list_size
  - 412 6bf7cbd6c5 Proto/Michelson: make lists carry their size and type of elements
  - 413 023e7b87aa Proto/Michelson: abstract logging facility
  - 414 ecda21dbaf Lint/Python: Increase the limit of maximum module lines



# MRs merged in the old proto-proposal

curl "https://gitlab.com/api/v4/projects/11412215/merge_requests?state=merged&label_name=proto-007-delayed&target_branch=proto-proposal&per_page=1000" | jq -r '.[] | @text "- [ ] !\(.iid): \(.title) \(.author.name)" '

The checkbox means that the corresponding MR has been rebased and merged in the new proto-proposal.

- [ ] !280: distinguish migration receipts from normal receipts Tomáš Zemanovič
- [x] !278: Backport D-alpha release fixes Mehdi Bouaziz
- [x] !274: Lazy storage: fix NL email Mehdi Bouaziz -> !316
- [ ] !268: Use fixed-point arithmetic for gas Ilias Garnier -> Delphi?
- [ ] !265: Fixup! Split votes Alvaro Garcia
- [ ] !256: Follow-up on add combs to Michelson Alvaro Garcia -> !345
- [x] !254: Proto_demo: update demo protocol to environment V1 Tomáš Zemanovič
- [ ] !253: fixup! Tests/Python: Bls12-381 - add nil test case for pairing check A L Manning
- [ ] !252: !fixup: remove an unused parameter in script_ir_translator Raphaël Cauderlier
- [x] !251: fixup! Tests/Python: bls12-381 Tomáš Zemanovič -> 345
- [ ] !250: Add some coq-of-ocaml attributes and minor changes Guillaume Claret
- [ ] !249: Move or name some signatures in the protocol Guillaume Claret
- [ ] !247: Renaming to avoid name collisions in Coq Guillaume Claret
- [ ] !246: Replace 'with module' by 'with type' Guillaume Claret
- [ ] !245: Various changes to compile new files in coq Guillaume Claret
- [x] !244: Explicit comparison module for KId Guillaume Claret -> !316
- [ ] !243: [CHERRY-PICK] fixup! Error_monad: test recursive registration Tomáš Zemanovič
- [x] !241: Bump up ocaml-bls12-381 to 0.3.9 Danny Willems
- [ ] !240: Compile `block_header_repr.ml` and `michelson_v1_primitives.ml` in Coq Guillaume Claret
- [ ] !239: Name the signatures of the protocol Guillaume Claret
- [x] !238: Avoid non-top-level uses of 'let and' constructs for coq-of-ocaml Guillaume Claret
- [ ] !237: Avoid a name collision for `encoding` in the generated Coq Guillaume Claret
- [x] !235: Add missing case for keyword namespace encoding Tomáš Zemanovič (merged in delphi)
- [x] !234: Environment small fixes Marco Stronati
- [ ] !233: Protocol/coq-of-ocaml: Name some anonymous signatures to help coq-of-ocaml Guillaume Claret
- [x] !230: Bump up version of ocaml-bls12-381 to 0.3.8 Danny Willems
- [x] !227: Migration: remove leftovers Alpha_previous and Babylon_005 Sylvain R.
- [x] !225: Shell context commit to operation receipts hash Tomáš Zemanovič
- [x] !221: Proto/Michelson: minor translator fixes Raphaël Cauderlier (merged in delphi)
- [x] !220: Update ocaml-bls12-381 to 0.3.6 Danny Willems
- [x] !219: Fix max revelations constant to reflect actual behavior Tomáš Zemanovič (merged in delphi)
- [x] !215: Update opam repository to tezos instead of NL Danny Willems
- [x] !212: Modernise option Tomáš Zemanovič
- [x] !211: Improve error monad in preparation for lwtreslib Tomáš Zemanovič (part in merged in delphi, part in 008)
- [ ] !210: Add gas scaling migration and fix failing voting_full integration test Adrian Brink
- [x] !209: Curryfication of helper services Raphaël Cauderlier -> !321
- [ ] !208: Remove poly variant from raw_context.ml for coq-of-ocaml Guillaume Claret
- [ ] !207: Allow to set the balance in script simulation Raphaël Cauderlier
- [x] !206: Proto: Split cases with different type parameters Adrian Brink
- [x] !203: Proto/Michelson: avoid Lwt.bind when logging Ilias Garnier (merged in delphi)
- [ ] !200: Follow up from !99 "Cache Deserialized Script Code & Storage" A L Manning
- [x] !192: Proto/Michelson: readable unparsing of chain ids Raphaël Cauderlier (merged in delphi)
- [x] !190: Docs/Michelson: Update removed legacy instructions Tomáš Zemanovič (merged in delphi)
- [ ] !186: Alvaro/follow up split votes Alvaro Garcia
- [x] !185: Refactor Michelson printer Tomáš Zemanovič (merged in delphi)
- [x] !181: Docs: Michelson's empty type Alvaro Garcia -> !321
- [ ] !179: Remove poly variant from apply.ml for coq-of-ocaml Guillaume Claret
- [x] !178: Alvaro/follow up rolls per key Alvaro Garcia -> !321
- [ ] !175: Protocol/{Contracts,Big_maps,Rolls}: flat hierarchy Ilias Garnier
- [ ] !174: Alvaro/follow up split votes Alvaro Garcia
- [x] !173: Add Keccak and SHA3 instructions to Michelson A L Manning -> !345
- [x] !170: Storage: rename Int -> UInt16 Mehdi Bouaziz (merged in delphi)
- [x] !165: Env/Error_monad: import more values from the lib Mehdi Bouaziz
- [x] !164: Rewrite some bind in to Mehdi Bouaziz (merged in delphi)
- [x] !163: Get rid of Lwt when not necessary Mehdi Bouaziz (merged in delphi)
- [x] !162: Env: add Z.pp Mehdi Bouaziz (partial conflicts)
- [x] !157: Remove `cost` vectors in Gas_limit_repr and perform final gas rescaling Ilias Garnier (merged in delphi)
- [x] !153: Changes to compile the environment with coq-of-ocaml Guillaume Claret
- [x] !150: Proto: Fix double encoding of big_map_diff François Thiré
- [x] !149: Protocol/RPC: slightly improve efficiency of '/baking_rights?delegate=[...]' Pierre Boutillier
- [x] !147: Spell check Mehdi Bouaziz (merged in delphi)
- [x] !146: Proto: add representation for big_maps with id & diff Mehdi Bouaziz -> !321
- [x] !140: Proto/Michelson: expose unparse_code in Script_ir_translator Ilias Garnier
- [x] !137: Adding Keccak256 and SHA-3 to protocol Victor Dumitrescu
- [x] !135: Make more types comparable Alvaro Garcia -> !321
- [x] !134: Proto/Michelson: Use the right cost function for SET_DELEGATE instr Tomáš Zemanovič (proto 007)
- [x] !133: Proto/Michelson: add missing Unit case in comparable_ty_of_ty_no_gas Ilias Garnier (proto 007)
- [x] !125: Proto/Michelson: Remove legacy instructions Raphaël Cauderlier -> !321
- [x] !122: Vendor ocaml-bls12-381 0.3.4 Danny Willems
- [ ] !121: Fix counter rpc Alvaro Garcia
- [ ] !120: add debug info to storage_description Sylvain R.
- [x] !119: pytest: add regression markers Tomáš Zemanovič
- [x] !118: Proto/Michelson: ensures all annotations are checked Raphaël Cauderlier -> Delphi
- [x] !117: Add a legacy flag for the typechecking commands Raphaël Cauderlier -> !321
- [x] !114: Client/Michelson: drop support for annotations on UNPAPAIR macros Raphaël Cauderlier -> !321
- [x] !111: Add a rule to run coq-of-ocaml in the CI Guillaume Claret (proto 007)
- [x] !110: Michelson annotations as algebraic types Guillaume Claret (proto 007)
- [x] !107: Env: Add hex to V1 Sylvain R.
- [x] !106: Changes to compile the environment with coq-of-ocaml Guillaume Claret
- [x] !103: Proto/Michelson: expose parse_ty for convenience to external tools Ilias Garnier (proto 007)
- [ ] !99: Cache Deserialized Script Code & Storage A L Manning
- [x] !98: Simplify some Bytes operations Mehdi Bouaziz
- [ ] !97: Minor refactorings on bigmaps Mehdi Bouaziz
- [x] !96: Generalize lazy storage Mehdi Bouaziz -> !316
- [ ] !95: Simplify has_big_map flag Mehdi Bouaziz
- [x] !94: refresh environment sigs Marco Stronati
- [x] !93: Update signatures of Lwt{,_list} so that they are a strict subset of their original. Marco Stronati
- [x] !92: Simplify GADT matchings in script_ir_translator Mehdi Bouaziz (proto 007)
- [x] !91: Michelson: fix number_of_generated_growing_types Mehdi Bouaziz
- [x] !89: Cherry-pick tezos/tezos!1643 Mehdi Bouaziz -> !321
- [x] !88: Tests: remove dead regression test outputs Mehdi Bouaziz -> !321
- [x] !82: Proto/Michelson: rolls per key Alvaro Garcia -> !321
- [x] !81: Tests/Python: add a test for the LEVEL instruction Raphaël Cauderlier -> !321
- [x] !80: Add PVSS modules to the protocol environment Tomáš Zemanovič
- [ ] !79: Implement the splitting of votes Alvaro Garcia
- [x] !78: Proto: minor cleanups Mehdi Bouaziz (proto 007)
- [x] !77: Proto/Michelson: fix DIP error message Mehdi Bouaziz (merged in delphi)
- [x] !76: Proto/Michelson: fix registration of Invalid_syntactic_constant Mehdi Bouaziz (proto 007)
- [x] !75: Proto/Michelson: add the SELF_ADDRESS instruction Raphaël Cauderlier -> !321
- [x] !72: Add Unit, Union, Option as comparable types Mehdi Bouaziz -> !321

```
curl "https://gitlab.com/api/v4/projects/11412215/merge_requests?state=merged&label_name=proto-007-delayed&target_branch=proto-proposal&per_page=100&page=2" | jq -r '.[] | @text "- [ ] !\(.iid): \(.title) \(.author.name)"'
```
- [x] !71: LEVEL instruction Mehdi Bouaziz -> !321
- [x] !69: new environment Sylvain R.
- [x] !68: Fix gas bound in python test Ilias Garnier (merged in delphi)
- [x] !67: Protocol/Michelson: avoid overflowing [Int32.to_int Int32.max_int] Pierre Boutillier (merged in delphi)
- [x] !66: Protocol: Safer Int64.to_int Pierre Boutillier (merged in dephi)
- [x] !65: Simplify/refactor merge_types/ty_eq Mehdi Bouaziz (merged in delphi)
- [x] !64: Michelson: allow non-comb comparable pairs Mehdi Bouaziz -> !321
- [x] !63: Test/Python: move and fix Map_map side-effect test Mehdi Bouaziz  (merged in delphi)
- [x] !60: Fix error message for chain_id bad arity Raphaël Cauderlier
- [x] !59: Proto/Michelson: remove some Lwt wrappers Raphaël Cauderlier (merged in delphi)
- [x] !58: Gas rescaling Ilias Garnier (merged in delphi)
- [x] !56: Expose a michelson parsing function in michelson translator Guillaume B (merged in delphi)
- [x] !55: Simplify the Michelson interpreter Raphaël Cauderlier (merged in delphi)
- [x] !54: Protocol/Michelson: UNPAIR instruction Raphaël Cauderlier -> !321
- [x] !53: Proto/Michelson: hoist calls to Gas.consume in dedicated function (simplify 3/3) Ilias Garnier (merged in delphi)
- [x] !52: Michelson: empty type Raphaël Cauderlier -> !321
- [ ] !51: add failing_noop operation + client command sign/check arbitrary message Tomáš Zemanovič
- [x] !49: For transfers with 0 tz, check if the target exists Tomáš Zemanovič (merged in delphi)
- [ ] !48: prevent double injection of the same evidence Tomáš Zemanovič
- [x] !47: Uniform variable names for context + clean-up Tomáš Zemanovič (merged in delphi)
- [ ] !46: Allow to apply balance updates from migration Tomáš Zemanovič
- [ ] !45: Michelson BLS12-381 ops A L Manning
- [x] !43: Proto proposal clean up Raphaël Proust
- [x] !42: Proto/Michelson: boxed lists (simplify 2/3) Ilias Garnier (merged in delphi)
- [x] !41: Add 5th period for protocol "Adoption" Tomáš Zemanovič
- [x] !38: Proto/Michelson: abstract logging for the interpreter (simplify 1/3) Ilias Garnier (merged in delphi)
- [x] !36: Protocol: remove code specific to the migration from Babylon to Carthage Raphaël Cauderlier
- [x] !35: RPC: return all delegates if no flags were used Tomáš Zemanovič (merged in delphi)
- [ ] ~~!34: improve Michelson gas costs with map and set folding break Tomáš Zemanovič~~