Env: Context.produce_tree_proof throws exception
Reproduction
Check out hans@merkle-proof-test
or b8670bee2d7354a2cc337802f9c632c3063e8273
.
(This branch was made on top of !4086 (merged), using Irmin 2.10 as pinned by the pin of tezos/opam-repository
in that branch.)
Run dune exec src/proto_alpha/lib_protocol/test/unit/main.exe -- test "^\[Unit\] merkle proofs$"
Expected
All tests complete normally.
Actual
│ [FAIL] [Unit] merkle proofs 0 test merkle proofs from env.
[exception] Tezos_context_helpers.Context.Make_tree(Store).Context_dangling_hash("Irmin.Tree.find_tree encountered dangling hash CoVXM7ERqiqLcHfVay7FdZc2vDFezGYc8oLytmxwdotM6jVR4kf5")
Raised at Tezos_context_helpers__Context.Make_tree.find_tree.(fun) in file "src/lib_context/helpers/context.ml", line 197, characters 12-45
Called from Environment_context.Context.Tree.find_tree in file "src/lib_protocol_environment/environment_context.ml", line 224, characters 6-33
Called from Dune__exe__Test_merkle_proofs.test_raw_ctxt.(fun) in file "src/proto_alpha/lib_protocol/test/unit/test_merkle_proofs.ml", line 162, characters 15-44
Called from Environment_context.Context.produce_tree_proof.(fun) in file "src/lib_protocol_environment/environment_context.ml", line 265, characters 8-11
Called from Irmin__Tree.Make.produce_proof.(fun) in file "src/irmin/tree.ml", line 2075, characters 30-36
Called from Irmin__Proof.Env.with_set_produce in file "src/irmin/proof.ml", line 257, characters 15-35
Called from Tezos_context_helpers__Context.Make_proof.produce_tree_proof in file "src/lib_context/helpers/context.ml", line 315, characters 4-40
Called from Dune__exe__Test_merkle_proofs.test_raw_ctxt in file "src/proto_alpha/lib_protocol/test/unit/test_merkle_proofs.ml", line 161, characters 20-134
Called from Tezos_base_test_helpers__Tztest.tztest.(fun) in file "src/lib_base/test_helpers/tztest.ml", line 40, characters 15-19
Called from Alcotest_lwt.run_test.(fun) in file "src/alcotest-lwt/alcotest_lwt.ml", line 24, characters 47-57
Called from Lwt.Sequential_composition.try_bind in file "src/core/lwt.ml", line 2129, characters 16-20
Edited by Hans Hoglund