From 36055190bb560997f377ab7ee7bc6b66fe61835f Mon Sep 17 00:00:00 2001 From: Romain Bardou Date: Mon, 20 Sep 2021 17:52:38 +0200 Subject: [PATCH 1/2] Version: set to 11.0-rc1 --- scripts/tezos-docker-manager.sh | 6 +++--- src/lib_version/version.ml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/tezos-docker-manager.sh b/scripts/tezos-docker-manager.sh index d73a9b8a8337..beb5fbcc9e9c 100755 --- a/scripts/tezos-docker-manager.sh +++ b/scripts/tezos-docker-manager.sh @@ -704,21 +704,21 @@ if [ "$#" -eq 0 ] ; then usage ; exit 1; else shift ; fi case $(basename "$0") in granadanet.sh) docker_base_dir="$HOME/.tezos-granadanet" - docker_image=tezos/tezos:master + docker_image=tezos/tezos:v11.0-rc1 docker_compose_base_name=granadanet default_port=9732 network=granadanet ;; hangzhounet.sh) docker_base_dir="$HOME/.tezos-hangzhounet" - docker_image=tezos/tezos:master + docker_image=tezos/tezos:v11.0-rc1 docker_compose_base_name=hangzhounet default_port=9732 network=hangzhounet ;; *) docker_base_dir="$HOME/.tezos-mainnet" - docker_image=tezos/tezos:master + docker_image=tezos/tezos:v11.0-rc1 docker_compose_base_name="mainnet" default_port=9732 network=mainnet diff --git a/src/lib_version/version.ml b/src/lib_version/version.ml index 71b69bc326a1..3789f8a9fbbf 100644 --- a/src/lib_version/version.ml +++ b/src/lib_version/version.ml @@ -39,6 +39,6 @@ let to_string {major; minor; additional_info} = string_of_int major ^ "." ^ string_of_int minor ^ string_of_additional_info additional_info -let current = {major = 11; minor = 0; additional_info = Dev} +let current = {major = 11; minor = 0; additional_info = RC 1} let current_string = to_string current -- GitLab From 1bfb60e190e50d4ff0e410a287d795e870873bc5 Mon Sep 17 00:00:00 2001 From: "E. Rivas" <8037031-er433@users.noreply.gitlab.com> Date: Thu, 11 Nov 2021 08:52:31 -0300 Subject: [PATCH 2/2] Apply changes on branch --- src/lib_context/tezos-context.opam | 4 ++-- .../tezos-protocol-environment-structs.opam | 1 + src/lib_sapling/core.ml | 4 ++-- src/lib_stdlib/tezos-stdlib.opam | 2 +- src/lib_stdlib_unix/dune | 1 + src/lib_stdlib_unix/tezos-stdlib-unix.opam | 1 + .../lib_protocol/sapling_storage.ml | 16 ++++++++++++---- 7 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/lib_context/tezos-context.opam b/src/lib_context/tezos-context.opam index c86f4612b95f..af8f55a88840 100644 --- a/src/lib_context/tezos-context.opam +++ b/src/lib_context/tezos-context.opam @@ -8,8 +8,8 @@ license: "MIT" depends: [ "dune" { >= "2.0" } "tezos-base" - "irmin" { >= "2.7.2" } - "irmin-pack" { >= "2.7.2" } + "irmin" { >= "2.7.2" & < "2.8.0" } + "irmin-pack" { >= "2.7.2" & < "2.8.0" } "digestif" {>= "0.7.3"} "tezos-shell-services" "tezos-stdlib-unix" diff --git a/src/lib_protocol_environment/tezos-protocol-environment-structs.opam b/src/lib_protocol_environment/tezos-protocol-environment-structs.opam index 0323b2d0420b..c863487ee5cd 100644 --- a/src/lib_protocol_environment/tezos-protocol-environment-structs.opam +++ b/src/lib_protocol_environment/tezos-protocol-environment-structs.opam @@ -8,6 +8,7 @@ license: "MIT" depends: [ "dune" { >= "2.0" } "tezos-stdlib" + "bls12-381-legacy" "tezos-crypto" "tezos-protocol-environment-packer" "data-encoding" { >= "0.4" & < "0.5" } diff --git a/src/lib_sapling/core.ml b/src/lib_sapling/core.ml index b13df11a0aa9..279e31b156c9 100644 --- a/src/lib_sapling/core.ml +++ b/src/lib_sapling/core.ml @@ -616,7 +616,7 @@ module Raw = struct let merkle_hash = R.merkle_hash - let uncommitted_hashes = + let uncommitted_hashes () = let max_height = 32 in let res = Array.make (max_height + 1) R.tree_uncommitted in for height = 0 to max_height - 1 do @@ -625,7 +625,7 @@ module Raw = struct done ; res - let uncommitted ~height = uncommitted_hashes.(height) + let uncommitted ~height = (uncommitted_hashes ()).(height) let of_bytes_exn = R.to_hash diff --git a/src/lib_stdlib/tezos-stdlib.opam b/src/lib_stdlib/tezos-stdlib.opam index 5a6df2ab1173..e45289aa9aa1 100644 --- a/src/lib_stdlib/tezos-stdlib.opam +++ b/src/lib_stdlib/tezos-stdlib.opam @@ -7,7 +7,7 @@ dev-repo: "git+https://gitlab.com/tezos/tezos.git" license: "MIT" depends: [ "dune" { >= "2.0" } - "ppx_inline_test" {with-test} + "ppx_inline_test" "hex" "zarith" { < "1.12" } "lwt" { >= "5.4.0" } diff --git a/src/lib_stdlib_unix/dune b/src/lib_stdlib_unix/dune index c904a543be9a..bac354152793 100644 --- a/src/lib_stdlib_unix/dune +++ b/src/lib_stdlib_unix/dune @@ -17,6 +17,7 @@ re ptime ptime.clock.os + fmt mtime mtime.clock.os lwt_log)) diff --git a/src/lib_stdlib_unix/tezos-stdlib-unix.opam b/src/lib_stdlib_unix/tezos-stdlib-unix.opam index 6da3c048608b..18a9ec27d2b3 100644 --- a/src/lib_stdlib_unix/tezos-stdlib-unix.opam +++ b/src/lib_stdlib_unix/tezos-stdlib-unix.opam @@ -15,6 +15,7 @@ depends: [ "tezos-stdlib" "re" { >= "1.7.2" } "lwt" + "fmt" "ptime" { >= "0.8.4" } "mtime" { >= "1.0.0" } "conf-libev" diff --git a/src/proto_011_PtHangzH/lib_protocol/sapling_storage.ml b/src/proto_011_PtHangzH/lib_protocol/sapling_storage.ml index 167f75f1f913..be4bccfa3d9f 100644 --- a/src/proto_011_PtHangzH/lib_protocol/sapling_storage.ml +++ b/src/proto_011_PtHangzH/lib_protocol/sapling_storage.ml @@ -26,7 +26,7 @@ module type COMMITMENTS = sig val init : Raw_context.t -> Storage.Sapling.id -> Raw_context.t Lwt.t - val default_root : Sapling.Hash.t + val default_root : unit -> Sapling.Hash.t val get_root : Raw_context.t -> @@ -113,7 +113,15 @@ module Commitments : COMMITMENTS = struct let assert_pos pos height = assert (Compare.Int64.(pos >= 0L && pos <= pow2 height)) - let default_root = H.uncommitted ~height:max_height + let default_root_ = ref None + + let default_root () = + match ! default_root_ with + | None -> + let default_root = H.uncommitted ~height:max_height in + default_root_ := Some default_root ; + default_root + | Some default_root -> default_root let init = Storage.Sapling.commitments_init @@ -309,7 +317,7 @@ module Roots = struct let[@coq_struct "pos"] rec aux ctx pos = if Compare.Int32.(pos < 0l) then return ctx else - Storage.Sapling.Roots.init (ctx, id) pos Commitments.default_root + Storage.Sapling.Roots.init (ctx, id) pos (Commitments.default_root ()) >>=? fun ctx -> aux ctx (Int32.pred pos) in aux ctx (Int32.pred size) >>=? fun ctx -> @@ -446,7 +454,7 @@ let root_mem ctx {id; _} tested_root = | None -> return Compare.Int.( - Sapling.Hash.compare tested_root Commitments.default_root = 0) + Sapling.Hash.compare tested_root (Commitments.default_root ()) = 0) (* to avoid a double spend we need to check the disk AND the diff *) let nullifiers_mem ctx {id; diff; _} nf = -- GitLab