diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index ea9b416626292e4e38811d591b9f4d7f905dd247..61df5307ac2c350d05b3ac599edc6b19247c0e28 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -3150,7 +3150,7 @@ module Sc_rollup : sig val reference_initial_state_hash : State_hash.t - module ProtocolImplementation : + module Protocol_implementation : PVM.S with type context = Context.t and type state = Context.tree @@ -3205,7 +3205,7 @@ module Sc_rollup : sig context -> input option -> state -> (proof, error) result Lwt.t end - module ProtocolImplementation : + module Protocol_implementation : PVM.S with type context = Context.t and type state = Context.tree @@ -3279,10 +3279,10 @@ module Sc_rollup : sig | Unencodable of (module PVM_with_proof) | Arith_pvm_with_proof of (module PVM_with_proof - with type proof = ArithPVM.ProtocolImplementation.proof) + with type proof = ArithPVM.Protocol_implementation.proof) | Wasm_2_0_0_pvm_with_proof of (module PVM_with_proof - with type proof = Wasm_2_0_0PVM.ProtocolImplementation.proof) + with type proof = Wasm_2_0_0PVM.Protocol_implementation.proof) val wrapped_proof_kind_exn : wrapped_proof -> Kind.t diff --git a/src/proto_alpha/lib_protocol/sc_rollup_arith.ml b/src/proto_alpha/lib_protocol/sc_rollup_arith.ml index e069a051e2f2e8b5be3727c3863577c991d25402..1933e8932513041dde0c24d9679a4dc8db3669c8 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_arith.ml +++ b/src/proto_alpha/lib_protocol/sc_rollup_arith.ml @@ -28,7 +28,7 @@ module PS = Sc_rollup_PVM_sem (* This is the state hash of reference that both the prover of the node - and the verifier of the protocol {!ProtocolImplementation} have to + and the verifier of the protocol {!Protocol_implementation} have to agree on (if they do, it means they are using the same tree structure). @@ -40,7 +40,7 @@ module PS = Sc_rollup_PVM_sem Utlimately, the value of this constant is decided by the prover of reference (the only need is for it to be compatible with - {!ProtocolImplementation}.) + {!Protocol_implementation}.) Its value is the result of the following snippet @@ -1203,7 +1203,7 @@ module Make (Context : P) : end end -module ProtocolImplementation = Make (struct +module Protocol_implementation = Make (struct module Tree = struct include Context.Tree diff --git a/src/proto_alpha/lib_protocol/sc_rollup_arith.mli b/src/proto_alpha/lib_protocol/sc_rollup_arith.mli index 0c79c48654e9fc5593a6c4353b9d18e39e3e647e..74aede90957620421b199c8c7496c2f5991545c8 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_arith.mli +++ b/src/proto_alpha/lib_protocol/sc_rollup_arith.mli @@ -132,14 +132,14 @@ type 'a proof = { requested : Sc_rollup_PVM_sem.input_request; } -module ProtocolImplementation : +module Protocol_implementation : S with type context = Context.t and type state = Context.tree and type proof = Context.Proof.tree Context.Proof.t proof (** This is the state hash of reference that both the prover of the - node and the verifier of the protocol {!ProtocolImplementation} + node and the verifier of the protocol {!Protocol_implementation} have to agree on (if they do, it means they are using the same tree structure). *) val reference_initial_state_hash : Sc_rollup_repr.State_hash.t diff --git a/src/proto_alpha/lib_protocol/sc_rollup_wasm.ml b/src/proto_alpha/lib_protocol/sc_rollup_wasm.ml index 0f069fe94ad1fa359dac0f9e40a78e06538c0aea..cedfd122e072fb7e8290fe73b19cd58a13de4651 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_wasm.ml +++ b/src/proto_alpha/lib_protocol/sc_rollup_wasm.ml @@ -27,7 +27,7 @@ module V2_0_0 = struct (* This is the state hash of reference that both the prover of the - node and the verifier of the protocol {!ProtocolImplementation} + node and the verifier of the protocol {!Protocol_implementation} have to agree on (if they do, it means they are using the same tree structure). @@ -39,7 +39,7 @@ module V2_0_0 = struct Utlimately, the value of this constant is decided by the prover of reference (the only need is for it to be compatible with - {!ProtocolImplementation}.) + {!Protocol_implementation}.) Its value is the result of the following snippet @@ -442,7 +442,7 @@ module V2_0_0 = struct end end - module ProtocolImplementation = Make (struct + module Protocol_implementation = Make (struct module Tree = struct include Context.Tree diff --git a/src/proto_alpha/lib_protocol/sc_rollup_wasm.mli b/src/proto_alpha/lib_protocol/sc_rollup_wasm.mli index 5fc1f7d26a084972d7461163409311043f9042ad..01a3da0feba11e752e9ab31af0c3cec3a72c511e 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_wasm.mli +++ b/src/proto_alpha/lib_protocol/sc_rollup_wasm.mli @@ -96,14 +96,14 @@ module V2_0_0 : sig and type proof = Context.proof proof (** This PVM is used for verification in the Protocol. [produce_proof] always returns [None]. *) - module ProtocolImplementation : + module Protocol_implementation : S with type context = Context.t and type state = Context.tree and type proof = Context.Proof.tree Context.Proof.t proof (** This is the state hash of reference that both the prover of the - node and the verifier of the protocol {!ProtocolImplementation} + node and the verifier of the protocol {!Protocol_implementation} have to agree on (if they do, it means they are using the same tree structure). *) val reference_initial_state_hash : Sc_rollup_repr.State_hash.t diff --git a/src/proto_alpha/lib_protocol/sc_rollups.ml b/src/proto_alpha/lib_protocol/sc_rollups.ml index 69d3a3adf66bea246c8dd23fe7c58bcdfd319189..8b048f662d6fbf3a2298d11018052857a2366094 100644 --- a/src/proto_alpha/lib_protocol/sc_rollups.ml +++ b/src/proto_alpha/lib_protocol/sc_rollups.ml @@ -85,10 +85,10 @@ module Kind = struct | _ -> None let example_arith_pvm = - (module Sc_rollup_arith.ProtocolImplementation : PVM.S) + (module Sc_rollup_arith.Protocol_implementation : PVM.S) let wasm_2_0_0_pvm = - (module Sc_rollup_wasm.V2_0_0.ProtocolImplementation : PVM.S) + (module Sc_rollup_wasm.V2_0_0.Protocol_implementation : PVM.S) let pvm_of = function | Example_arith -> example_arith_pvm @@ -129,10 +129,10 @@ type wrapped_proof = | Unencodable of (module PVM_with_proof) | Arith_pvm_with_proof of (module PVM_with_proof - with type proof = Sc_rollup_arith.ProtocolImplementation.proof) + with type proof = Sc_rollup_arith.Protocol_implementation.proof) | Wasm_2_0_0_pvm_with_proof of (module PVM_with_proof - with type proof = Sc_rollup_wasm.V2_0_0.ProtocolImplementation.proof) + with type proof = Sc_rollup_wasm.V2_0_0.Protocol_implementation.proof) let wrapped_proof_module p = match p with @@ -163,19 +163,19 @@ let wrapped_proof_encoding = case ~title:"Arithmetic PVM with proof" (Tag 0) - Sc_rollup_arith.ProtocolImplementation.proof_encoding + Sc_rollup_arith.Protocol_implementation.proof_encoding (function | Arith_pvm_with_proof pvm -> let (module P : PVM_with_proof with type proof = - Sc_rollup_arith.ProtocolImplementation.proof) = + Sc_rollup_arith.Protocol_implementation.proof) = pvm in Some P.proof | _ -> None) (fun proof -> let module P = struct - include Sc_rollup_arith.ProtocolImplementation + include Sc_rollup_arith.Protocol_implementation let proof = proof end in @@ -183,19 +183,19 @@ let wrapped_proof_encoding = case ~title:"Wasm 2.0.0 PVM with proof" (Tag 1) - Sc_rollup_wasm.V2_0_0.ProtocolImplementation.proof_encoding + Sc_rollup_wasm.V2_0_0.Protocol_implementation.proof_encoding (function | Wasm_2_0_0_pvm_with_proof pvm -> let (module P : PVM_with_proof with type proof = - Sc_rollup_wasm.V2_0_0.ProtocolImplementation.proof) = + Sc_rollup_wasm.V2_0_0.Protocol_implementation.proof) = pvm in Some P.proof | _ -> None) (fun proof -> let module P = struct - include Sc_rollup_wasm.V2_0_0.ProtocolImplementation + include Sc_rollup_wasm.V2_0_0.Protocol_implementation let proof = proof end in @@ -212,7 +212,7 @@ let wrap_proof pvm_with_proof = Option.map (fun arith_proof -> let module P_arith = struct - include Sc_rollup_arith.ProtocolImplementation + include Sc_rollup_arith.Protocol_implementation let proof = arith_proof end in @@ -221,13 +221,13 @@ let wrap_proof pvm_with_proof = (Data_encoding.Binary.to_bytes_opt P.proof_encoding P.proof) (fun bytes -> Data_encoding.Binary.of_bytes_opt - Sc_rollup_arith.ProtocolImplementation.proof_encoding + Sc_rollup_arith.Protocol_implementation.proof_encoding bytes)) | Some Kind.Wasm_2_0_0 -> Option.map (fun wasm_proof -> let module P_wasm2_0_0 = struct - include Sc_rollup_wasm.V2_0_0.ProtocolImplementation + include Sc_rollup_wasm.V2_0_0.Protocol_implementation let proof = wasm_proof end in @@ -236,5 +236,5 @@ let wrap_proof pvm_with_proof = (Data_encoding.Binary.to_bytes_opt P.proof_encoding P.proof) (fun bytes -> Data_encoding.Binary.of_bytes_opt - Sc_rollup_wasm.V2_0_0.ProtocolImplementation.proof_encoding + Sc_rollup_wasm.V2_0_0.Protocol_implementation.proof_encoding bytes)) diff --git a/src/proto_alpha/lib_protocol/sc_rollups.mli b/src/proto_alpha/lib_protocol/sc_rollups.mli index 373bb8a9059346585d3c600aefe75053e85a63a1..0a6091428d42b3d4bdba41da091e58314844bed3 100644 --- a/src/proto_alpha/lib_protocol/sc_rollups.mli +++ b/src/proto_alpha/lib_protocol/sc_rollups.mli @@ -98,10 +98,10 @@ type wrapped_proof = | Unencodable of (module PVM_with_proof) | Arith_pvm_with_proof of (module PVM_with_proof - with type proof = Sc_rollup_arith.ProtocolImplementation.proof) + with type proof = Sc_rollup_arith.Protocol_implementation.proof) | Wasm_2_0_0_pvm_with_proof of (module PVM_with_proof - with type proof = Sc_rollup_wasm.V2_0_0.ProtocolImplementation.proof) + with type proof = Sc_rollup_wasm.V2_0_0.Protocol_implementation.proof) (** Unwrap a [wrapped_proof] into a first-class module. *) val wrapped_proof_module : wrapped_proof -> (module PVM_with_proof) diff --git a/src/proto_alpha/lib_protocol/test/integration/test_sc_rollup_wasm.ml b/src/proto_alpha/lib_protocol/test/integration/test_sc_rollup_wasm.ml index 99ff45f6802fb5b97ce725d35b54e9d87e8ff5da..d52416008b3dc8bd374b8cbaeb61606816c14628 100644 --- a/src/proto_alpha/lib_protocol/test/integration/test_sc_rollup_wasm.ml +++ b/src/proto_alpha/lib_protocol/test/integration/test_sc_rollup_wasm.ml @@ -105,7 +105,7 @@ module WASM_P : return None end -module Verifier = Alpha_context.Sc_rollup.Wasm_2_0_0PVM.ProtocolImplementation +module Verifier = Alpha_context.Sc_rollup.Wasm_2_0_0PVM.Protocol_implementation module Prover = Alpha_context.Sc_rollup.Wasm_2_0_0PVM.Make (WASM_P) (* Helpers *)