From 58e5fe867361f15e8281a16d6b8ffe0e06569ba2 Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Fri, 4 Aug 2023 13:38:30 +0200 Subject: [PATCH] Proto: Make Alpha use the latest PVM revision --- docs/protocols/alpha.rst | 4 ++++ src/lib_protocol_environment/environment_V11.ml | 2 +- src/lib_protocol_environment/sigs/v11.ml | 2 +- src/lib_protocol_environment/sigs/v11/wasm_2_0_0.mli | 2 +- src/lib_scoru_wasm/test/test_protocol_migration.ml | 2 +- src/lib_scoru_wasm/wasm_vm.ml | 2 +- src/proto_alpha/lib_protocol/sc_rollup_wasm.ml | 4 ++-- .../Alpha- wasm_2_0_0 - RPC API should work and be stable.out | 2 +- tezt/tests/sc_rollup.ml | 3 ++- 9 files changed, 14 insertions(+), 9 deletions(-) diff --git a/docs/protocols/alpha.rst b/docs/protocols/alpha.rst index 777c0c5c59f5..dcc23a01582a 100644 --- a/docs/protocols/alpha.rst +++ b/docs/protocols/alpha.rst @@ -25,6 +25,10 @@ Smart Rollups - The ``transferring`` parameter from smart rollup client command ``get proof for message of outbox at level `` is now optional. (MR :gl:`!9461`) +- Enable the latest version of the WASM PVM (``2.0.0-r3``). Existing smart + rollups will see their PVM automatically upgrade, and newly originated smart + rollups will use this version directly (MR :gl:`!9735`) + Zero Knowledge Rollups (ongoing) -------------------------------- diff --git a/src/lib_protocol_environment/environment_V11.ml b/src/lib_protocol_environment/environment_V11.ml index 9a6f8f2a8102..9123d2de9b19 100644 --- a/src/lib_protocol_environment/environment_V11.ml +++ b/src/lib_protocol_environment/environment_V11.ml @@ -1164,7 +1164,7 @@ struct type version = Tezos_scoru_wasm.Wasm_pvm_state.version - let v2 = Tezos_scoru_wasm.Wasm_pvm_state.V2 + let v3 = Tezos_scoru_wasm.Wasm_pvm_state.V3 module Make (Tree : Context.TREE with type key = string list and type value = bytes) = diff --git a/src/lib_protocol_environment/sigs/v11.ml b/src/lib_protocol_environment/sigs/v11.ml index 6ae8806d2214..29c9d3340f68 100644 --- a/src/lib_protocol_environment/sigs/v11.ml +++ b/src/lib_protocol_environment/sigs/v11.ml @@ -12098,7 +12098,7 @@ end type version -val v2 : version +val v3 : version type input = {inbox_level : Bounded.Non_negative_int32.t; message_counter : Z.t} diff --git a/src/lib_protocol_environment/sigs/v11/wasm_2_0_0.mli b/src/lib_protocol_environment/sigs/v11/wasm_2_0_0.mli index 765950e3b0fd..46b48b4a5443 100644 --- a/src/lib_protocol_environment/sigs/v11/wasm_2_0_0.mli +++ b/src/lib_protocol_environment/sigs/v11/wasm_2_0_0.mli @@ -25,7 +25,7 @@ type version -val v2 : version +val v3 : version type input = {inbox_level : Bounded.Non_negative_int32.t; message_counter : Z.t} diff --git a/src/lib_scoru_wasm/test/test_protocol_migration.ml b/src/lib_scoru_wasm/test/test_protocol_migration.ml index 7ce6ac9dac68..9de1b60b366b 100644 --- a/src/lib_scoru_wasm/test/test_protocol_migration.ml +++ b/src/lib_scoru_wasm/test/test_protocol_migration.ml @@ -76,7 +76,7 @@ let tests = ~from_version ~to_version ~after_protocol_activation:protocol)) - [(V0, V1, Nairobi); (V1, V2, Proto_alpha)] + [(V0, V1, Nairobi); (V1, V2, Oxford); (V2, V3, Proto_alpha)] let () = Alcotest_lwt.run diff --git a/src/lib_scoru_wasm/wasm_vm.ml b/src/lib_scoru_wasm/wasm_vm.ml index aa497d2299e7..c699e0e5cf62 100644 --- a/src/lib_scoru_wasm/wasm_vm.ml +++ b/src/lib_scoru_wasm/wasm_vm.ml @@ -30,7 +30,7 @@ let version_for_protocol : Pvm_input_kind.protocol -> Wasm_pvm_state.version = function | Nairobi -> V1 | Oxford -> V2 - | Proto_alpha -> V2 + | Proto_alpha -> V3 let link_finished (ast : Wasm.Ast.module_) offset = offset >= Wasm.Ast.Vector.num_elements ast.it.imports diff --git a/src/proto_alpha/lib_protocol/sc_rollup_wasm.ml b/src/proto_alpha/lib_protocol/sc_rollup_wasm.ml index 6f8ff7629950..849487f0124a 100644 --- a/src/proto_alpha/lib_protocol/sc_rollup_wasm.ml +++ b/src/proto_alpha/lib_protocol/sc_rollup_wasm.ml @@ -103,7 +103,7 @@ let () = (fun () -> WASM_invalid_dissection_distribution) module V2_0_0 = struct - let current_version = Wasm_2_0_0.v2 + let current_version = Wasm_2_0_0.v3 let ticks_per_snapshot = Z.of_int64 11_000_000_000L @@ -154,7 +154,7 @@ module V2_0_0 = struct *) let reference_initial_state_hash = Sc_rollup_repr.State_hash.of_b58check_exn - "srs11qkRe5cbDBixB2fuumn4tfkvQcxUSuFXa94Lv5c6kdzzfpM9UF" + "srs127FAyj2NkJYtN8RE8yPieBGpakvAH8MgwzRPUM4UnsCKB24rrA" open Sc_rollup_repr module PS = Sc_rollup_PVM_sig diff --git a/tezt/tests/expected/sc_rollup.ml/Alpha- wasm_2_0_0 - RPC API should work and be stable.out b/tezt/tests/expected/sc_rollup.ml/Alpha- wasm_2_0_0 - RPC API should work and be stable.out index 7dd94fbb3ffe..8377e0059e21 100644 --- a/tezt/tests/expected/sc_rollup.ml/Alpha- wasm_2_0_0 - RPC API should work and be stable.out +++ b/tezt/tests/expected/sc_rollup.ml/Alpha- wasm_2_0_0 - RPC API should work and be stable.out @@ -251,7 +251,7 @@ Smart rollup [SMART_ROLLUP_HASH] memorized as "rollup" null ./octez-smart-rollup-client-alpha rpc get '/global/block/head/durable/wasm_2_0_0/value?key=/readonly/wasm_version' -"322e302e302d7232" +"322e302e302d7233" ./octez-smart-rollup-client-alpha rpc get '/global/block/head/durable/wasm_2_0_0/length?key=/readonly/wasm_version' "8" diff --git a/tezt/tests/sc_rollup.ml b/tezt/tests/sc_rollup.ml index 90583cec2acb..d3eef0e3d68c 100644 --- a/tezt/tests/sc_rollup.ml +++ b/tezt/tests/sc_rollup.ml @@ -43,7 +43,8 @@ open Sc_rollup_helpers *) let default_wasm_pvm_revision = function - | Protocol.Alpha | Protocol.Oxford -> "2.0.0-r2" + | Protocol.Alpha -> "2.0.0-r3" + | Protocol.Oxford -> "2.0.0-r2" | Protocol.Nairobi -> "2.0.0-r1" let assert_some_client_command cmd ~__LOC__ ?hooks client = -- GitLab