diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index 3509c29afeb653dd8ce9cbe70103851805174f62..2202f1272718b3735057aaf4bec161eeb93e77b8 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -3659,6 +3659,10 @@ module Sc_rollup : sig module Wasm_2_0_0PVM : sig val ticks_per_snapshot : Z.t + val well_known_reveal_preimage : string + + val well_known_reveal_hash : Sc_rollup_reveal_hash.t + module type P = sig module Tree : Context.TREE with type key = string list and type value = bytes diff --git a/src/proto_alpha/lib_protocol/sc_rollup_wasm.ml b/src/proto_alpha/lib_protocol/sc_rollup_wasm.ml index 30ed9608c2a021209f0d10d219f059b2ea9231c1..f4876f2c3852cbbd1ea318029c5862c5ea2576e1 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_wasm.ml +++ b/src/proto_alpha/lib_protocol/sc_rollup_wasm.ml @@ -83,6 +83,13 @@ let () = module V2_0_0 = struct let ticks_per_snapshot = Z.of_int64 11_000_000_000L + let well_known_reveal_preimage = "" + + let well_known_reveal_hash = + Sc_rollup_reveal_hash.hash_string + ~scheme:Blake2B + [well_known_reveal_preimage] + (* This is the state hash of reference that both the prover of the node and the verifier of the protocol {!Protocol_implementation} @@ -303,10 +310,7 @@ module V2_0_0 = struct | None -> (* In case of an invalid hash, the rollup is blocked. Any commitment will be invalid. *) - Waiting_for_reveal - (Reveal_raw_data - (Sc_rollup_reveal_hash.zero - ~scheme:Sc_rollup_reveal_hash.Blake2B))) + Waiting_for_reveal (Reveal_raw_data well_known_reveal_hash)) | Reveal_required Wasm_2_0_0.Reveal_metadata -> Waiting_for_reveal Reveal_metadata diff --git a/src/proto_alpha/lib_protocol/sc_rollup_wasm.mli b/src/proto_alpha/lib_protocol/sc_rollup_wasm.mli index 35f7ef51753efd072dc4d7eb4fa6d42169306676..6d6ce03abab121bcf37f0930a49212b5f4cd7f6d 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_wasm.mli +++ b/src/proto_alpha/lib_protocol/sc_rollup_wasm.mli @@ -124,4 +124,12 @@ module V2_0_0 : sig see #3590 for more pointers *) val ticks_per_snapshot : Z.t + + (** The hash requested by the WASM PVM if it cannot decode the input + provided by the WASM kernel, that is, if the bytes value cannot + be decoded with {!Sc_rollup_reveal_hash.encoding}. *) + val well_known_reveal_hash : Sc_rollup_reveal_hash.t + + (** The preimage of {!well_known_reveal_hash}. *) + val well_known_reveal_preimage : string end