---
# System prepended metadata

title: '`proto-proposal` rebase fix-ups report'
tags: [LéCøre]

---

###### tags: `LéCøre` 

# `proto-proposal` rebase fix-ups report

- Each MR merged into proto-proposal branch is being checked to pass the full CI using these scripts: https://gitlab.com/metastatedev/tezos/-/commit/97f5a9b2613dd1663fdcd12c8ff7163017e9e6c5
- main challenges
    - find tips (last commit) of MRs 
        - for this we rely on finding the commits in history by commit message
        - the tip commits not found in history are reported by the script as `MISSING`, manual work-around is required
            - the work-around is to check the MR and find why the tip commit is missing, for changed tips and commit messages, commit title fix-up is applied in the script
        - the commit messages have to be unique, this condition is also checked by the script and reported as `AMBIGUOUS`, manual work-around is required
            - the work-around is to update the commit message and also apply commit title fix-up in the script
    - reliably simulate full CI run
        - simulate_ci.sh script 
        - some tests that were found to spuriously fail are re-tried


## commit message fix-ups
- rename !99 tip from ambiguous "Tests/Python"
    - new name "Tests/Python: add test for contract caching"
- rename !173 commits from ambiguous
   - "Tests/Python" to "Tests/Python: Add sha3 and keccak tests"
   - "Doc" to "Doc : Add sha3 and keccak docs"


## other fix-ups
- squash !215 to !122 - the former fix-ups the opam-repository change of latter


## (WIP) CI simulation results from tips (last commit) of merged MRs

Format of the following is: `return code, MR ID, commit position, commit hash, commit message`

-   0 38 287 baf52f7f6 Proto/Michelson: abstract logging facility
-   0 42 285 f38afd14c Tests/Python: update regression logs for
    list\_size
-   0 53 277 6bc156fe9 Tests/Python: regenerate reg. traces
-   0 47 276 13d6db10a Proto: Uniform variable names for context +
    comments clean-up
-   0 56 274 9d4d4ed83 Proto: expose parse\_storage
-   0 59 273 0501a29d4 Proto/Michelson: remove some Lwt wrappers
-   0 60 270 90760743c Tests/Python: fix error message in chain\_id
    arity test
-   0 63 269 f7432a4c1 Test/Python: move and fix Map\_map side-effect
    test
-   2 58 255 aae66f37e Tests/Python: regenerate regression traces
    without internal\_gas
    -   error: regression test output differences for
        tests/test\_contract\_legacy.py::TestContractLegacy::test\_contract\_input\_output\[steps\_to\_quota.tz-0-100-133008040\]:
        -   regenerated regressions
    -   error:
        tests/test\_voting\_full.py::TestVotingFull::test\_testchain\_transfer:
        Gas limit exceeded during typechecking or execution
        -   added migration commit before !58\'s tip:
            \"Protocol/Migration: scale gas limit constants in the
            context by 128\"
        -   <https://gitlab.com/metastatedev/tezos/-/commit/d66d43f29af1de2195d6e57c9abc3acf5690748d>
    -   error: runtest\_sandbox\_voting\_demo\_noops: \"Gas limit
        exceeded during typechecking or execution\"
        -   when the MR was merged, flextesa had way higher limits:
            <https://gitlab.com/metastatedev/tezos/-/blob/96f7992a1f45bfba2f3c5cec6a0b20266769efbb/vendors/flextesa-lib/tezos_protocol.ml#L141>
        -   now the flextesa constant match the sandbox\'s defaults
        -   to fix scale-up in `vendors/flextesa-lib/tezos_protocol.ml`
            -   to do this, move
                <https://gitlab.com/metastatedev/tezos/-/commit/d72439aa6966a0795918022d9cfcbe144b8c578b>
                before all proto-proposal MRs
            -   also rename `` `DNext `` to `` `Alpha ``
            -   MR to upstream to master:
                <https://gitlab.com/tezos/tezos/-/merge_requests/1942>
            -   then use `` `DNext `` to update the constants
            -   fixed in
                <https://gitlab.com/metastatedev/tezos/-/commit/56434916b52af981973171c0bb276ab43821834a>
        -   drop
            <https://gitlab.com/metastatedev/tezos/-/commit/f5ba029b638fb4450b1f8029956a8163a3a609a1>
-   0 66 253 a9cd7abbe Protocol: Safer Int64.to\_int
-   0 68 252 96d9b684f Tests/Python: fix gas bound in test\_contract.py
-   2 35 251 655e71113 Proto/RPC: return all delegates if no flags were
    used
    -   error: tests/test\_bootstrap.py
        -   okay on re-run
-   0 64 243 51eb90f40 Doc: generalize comparable pairs
-   0 67 239 2cf9800c9 Proto/Michelson: Simplify parse\_uint30
-   0 34 234 c4fabe73d Test/Python: update regression tests gas costs
-   0 65 231 f13d0e0d4 Express (comparable\_)ty\_eq in terms of
    merge~(comparable\_)~ty
-   0 78 226 6d5f72e5e Remove useless recursion
-   0 76 224 5772d08fe Tests: update error message for big\_drop.tz
-   0 77 222 fc9c909b4 Tests: update error message for big\_dip.tz
-   0 72 217 70243f8f7 Doc: move UNIT to section on type unit
-   2 71 210 c2aa1c1ea Doc: document LEVEL
    -   error: missing case for new instruction in "src/proto_alpha/lib_client/michelson_v1_printer.ml
        -   to avoid this error without having to add the case, move MR !185 (4 commits from https://gitlab.com/metastatedev/tezos/-/merge_requests/185) before this MR (7 commits)
        -   this has removed multiple rebase fix-up commits, that were adding a case for new primitives to michelson printer
-   1 69 207 05e67ac73 Protocol: alpha use environment V1
    -   pass on re-run
-   0 81 206 c78e2310d Tests/Python: add a test for the LEVEL
    instruction
-   2 75 201 7dd0cfe72 Doc/Michelson: document SELF\_ADDRESS
    -   error: regression tests failing
        - reset regressions on the commit "Tests/Python: test the new SELF_ADDRESS instruction"
-   0 55 200 20540327e Proto/Michelson: simplify the interpreter
-   0 52 189 3011209ec Tests/Python: test failed attempt to push a
    literal of type never
-   2 43 185 4774b826e Stdlib, ProtoEnv/V1: no more MBytes
    -   error: test_protocol_compile
        ```
        File "./blinded_public_key_hash.ml", line 55, characters 2-14:
        Error: Unbound module Hex
        ```

        -   to fix, move MR !107  (1 commit) that adds Hex to V1 before !43 (3 commits)
-   0 107 184 a44feca25 Environment: Add hex to V1
    -   moved before MR !43
-   0 93 181 32622e88f Environment: remove unused module lwt\_sequence
-   0 91 179 018d5745c Michelson: fix
    number\_of\_generated\_growing\_types
-   0 92 175 3943e802f Michelson: simplify GADT matchings in
    script\_ir\_translator 4/4
-   2 95 172 2fa1722f9 Tests/Python: update regtest outputs
    -   error: 3 python tests in test_contract.py failing with `Gas limit exceeded during typechecking or execution`
        -   In the original MR there were two commits with name "Tests/Python: update regtest outputs", one of which was the tip. During rebases the tip commit has been removed (probably because the regression fix-up was applied on the other commit), so the CI simulation was running on a wrong commit
        -   To fix, moved the regression reset commit to the tip of the commits
-   0 97 162 6ba15a1f4 Proto/Michelson: simplify Big\_map.fresh
-   0 103 161 70d967f91 Proto/Michelson: expose parse\_ty for
    convenience to external tools
-   0 98 158 6eba6630e Proto: simplify Bytes.of\_string (String.make \_)
-   0 94 152 0d3f4eb93 Env: int32 of\_string -\> of\_string\_opt
-   0 110 151 d38f42bca Use plain algebraic types for the Michelson
    annotations
-   0 114 146 b88a5a1f8 Tests/Python: Update regression output (UNPAPAIR
    annots deprecated)
-   0 54 138 4d63ae205 Tests/Python/Regression: update regression logs
    for UNPAIR
-   2 117 134 7e115da66 Tests/Python: typechecking test in legacy mode
    -   error: python typecheck
        -   fixed-up `assert_run_failure` syntax change
-   0 133 132 bb71870c7 Proto/Michelson: cleanup error handling for
    comparables
-   1 140 131 84d3bb691 Proto/Michelson: expose unparse\_code in
    Script\_ir\_translator
    -   error: flaky flextesa
        -   okay on re-run
-   0 134 129 6e40e623c Proto/Michelson: Use the right cost function for
    SET\_DELEGATE instr
-   0 147 128 b07e3b6d3 Proto\_alpha: spell check
-   2 118 121 8aa23223a Tests/Python: update annotations tests (numerals now allowed)
    -   error: python typecheck
        ```
        tools/utils.py:421: error: Argument 1 to "assert_run_failure" has incompatible type "Pattern[Any]"; expected "str"
        tests/test_contract_annotations.py:53: error: Argument 3 to "assert_typecheck_failure" has incompatible type "str"; expected "Pattern[Any]"
        tests/test_contract_annotations.py:66: error: Argument 3 to "assert_typecheck_failure" has incompatible type "str"; expected "Pattern[Any]"
        ```
        - fix-up in commit that added this "Tests/Python: test of the second char of field annotations"
-   0 162 119 e3c582aff Proto: use Z.pp rather than Z.to\_string
-   0 135 115 d60a85859 Docs/Michelson: Update comparable types and
    COMPARABLE instruction
-   0 153 112 5fbf05dc9 Proto/coq-of-ocaml: Name the signatures of the
    environment
-   2 125 108 2b973914e Tests/Python: update tests for deprecated
    instructions
    - errors: 11 failing tests in test_contract_legacy.py
        - rebase fix-up commit "Tests_python: remove contract_legacy" is right after the tip
        - to fix, moved the fix-up commit before the tip
    -   error: runtest_proto_alpha `interpretation              1   test unaccounted steps to quota`
        -   to fix, move the fix-up commit "Proto/Tests: remove STEPS_TO_QUOTA test" before the tip
-   0 210 98 b9169a06a Protocol/Migration: scale gas limit constants in
    the context by 1000
-   2 157 96 82547ce9b Proto/Client: make integer constant easier to
    read
    -   added migration to pass `test_voting_full.py` (taken from https://gitlab.com/metastatedev/tezos/-/merge_requests/157)
        -   <https://gitlab.com/metastatedev/tezos/-/commit/b9169a06a4f9b21a6eed45e2d3e5d5c9799d9416>
    -   flextesa constants update before the last commit to pass flextesa tests
        -   <https://gitlab.com/metastatedev/tezos/-/commit/dce5ef3f2a435cf159d02f78e4d3e59dab2b6426>
-   2 49 94 6936e56c8 Tests/Python: Add a test case for transfer to
    nonexistent contract
    - error: check_python_types, `assert_run_failure` syntax change
        - fix-up in tip commit that added these
-   0 170 92 2b8899949 Storage: rename Int\_index -\> Int31\_index
-   0 121 89 885c7527c Test/Python: Test RPCs for counter and for global
    counter
-   0 79 81 30d95c7d7 Test/OCaml: Change encoding of fractions to uint16
-   2 120 78 ceaa2be5b Protocol/test: verify that error message is
    correct
    - error: `Makefile:157: recipe for target 'build-deps' failed`
        - okay on re-run
-   0 82 71 3c16e50b6 Docs: Add VOTING\_POWER opcode, returns a
    delegate\'s voting weight
-   0 137 69 ad977a2c6 Proto: Adding Keccak256 and SHA-3 to
    lib\_protocol\_environment
-   0 179 68 998645192 Proto/coq-of-ocaml: Remove a polymorphic variant
    in apply.ml to name the type
-   2 99 66 8ee16df47 Tests/Python: add test for contract caching
    -   error: python typecheck `tests/test_contract_caching.py:24: error: Item "None" of "Optional[Match[Any]]" has no attribute "groups"`
        -   fix-up in tip commit
-   0 146 59 92d6daa68 Tests/Python: originating with big map diff do
    work
-   0 41 54 cf0454904 Doc: Update voting section with the new 5th period
-   0 185 50 7503a972c Client: Refactor Michelson OCaml printer using
    namespace function
    -   moved before MR !107
- 0 181 74 4991939d6 Docs: Michelson's empty type
- 0 186 71 e51c9b244 Test/Python: Check fractions positive and add up to votes_per_roll
- 0 174 71 e51c9b244 Test/Python: Check fractions positive and add up to votes_per_roll
- 0 173 70 5adfd915f CI: Remove `test_voting_power_opcode.py` from integration tests
- 0 178 64 ff3aba174 Docs: New opcode, and update glossary and voting
- 0 192 62 4d0a7bd41 Tests/Python: fix and extend the test of the `CHAIN_ID` instruction
- 0 48 57 484290d68 Proto/test: Prevent double injection evidence
- 2 46 50 b5f821a76 Migration/Tests: Check bootstrap1 migration invoice
    - errors: python typechecks
        - fix-up in commit "Tests/Python: Add migration integration test"
- *At this point, the rest of MRs have been merged after the last rebase, so they should still all be passing*


### flaky tests

1.  p2p

    -   2 53 277 6bc156fe9 Tests/Python: regenerate reg. traces

    -   2 59 273 0501a29d4 Proto/Michelson: remove some Lwt wrappers

    -   2 60 270 90760743c Tests/Python: fix error message in chain\_id
        arity test

            tests/test_p2p.py:54: in test_check_stat
                assert num_connected == NUM_NODES - 1
            E   assert 3 == 4
            E     -3
            E     +4

2.  flextesa bootstrap timeout

    -   test: runtest\_sandbox\_accusations\_simple\_double\_endorsing

3. tests/test_bootstrap.py
    ```
    tests/test_bootstrap.py:71: in test_node_3_bootstrapped
        sandbox.client(3).bootstrapped()
    client/client.py:573: in bootstrapped
        return self.run(['bootstrapped'])
    client/client.py:157: in run
        (stdout, _, _) = self.run_generic(params, admin, check, trace)
    client/client.py:134: in run_generic
        completed_process = subprocess.run(cmd,
    ../../.pyenv/versions/3.8.3/lib/python3.8/subprocess.py:491: in run
        stdout, stderr = process.communicate(input, timeout=timeout)
    ../../.pyenv/versions/3.8.3/lib/python3.8/subprocess.py:1024: in communicate
        stdout, stderr = self._communicate(input, endtime, timeout)
    ../../.pyenv/versions/3.8.3/lib/python3.8/subprocess.py:1866: in _communicate
        ready = selector.select(timeout)
    ../../.pyenv/versions/3.8.3/lib/python3.8/selectors.py:415: in select
        fd_event_list = self._selector.poll(timeout)
    E   Failed: Timeout >5.0s
    ```