diff --git a/.dockerignore b/.dockerignore index 93e76ff1801ad8017777e60706cf43c602217f87..4fec45576981504e463d1447ffc9b700bd9cd459 100644 --- a/.dockerignore +++ b/.dockerignore @@ -39,7 +39,7 @@ octez-injector-server octogram octez-teztale-archiver octez-teztale-server -octez-agnostic-baker +octez-experimental-agnostic-baker scripts/opam-test-all.sh.DONE scripts/create_genesis/src diff --git a/.gitignore b/.gitignore index 37c9b80d38358e2d421e855c78762088745bdfda..501a6aa488e48735563e817f7a523f7434488421 100644 --- a/.gitignore +++ b/.gitignore @@ -61,7 +61,7 @@ __pycache__ /safety-checker /octez-teztale-archiver /octez-teztale-server -/octez-agnostic-baker +/octez-experimental-agnostic-baker /src/riscv/riscv-sandbox* /src/riscv/riscv-dummy.elf diff --git a/dune-project b/dune-project index 2c93d5712a789d9501570d1d7a72727ba854455d..fa6e99accd2394f82ace1dfdedffd51fc9a3fa7f 100644 --- a/dune-project +++ b/dune-project @@ -17,7 +17,6 @@ (package (name octez-accuser-PsParisC)) (package (name octez-accuser-PsQuebec)) (package (name octez-accuser-alpha)) -(package (name octez-agnostic-baker)) (package (name octez-alcotezt)) (package (name octez-baker-PsParisC)) (package (name octez-baker-PsQuebec)) @@ -33,6 +32,7 @@ (package (name octez-evm-node-libs)) (package (name octez-evm-node-tests)(allow_empty)) (package (name octez-evm-wasm-runtime-tests)(allow_empty)) +(package (name octez-experimental-agnostic-baker)) (package (name octez-injector)) (package (name octez-injector-server)) (package (name octez-internal-libs)) diff --git a/manifest/product_octez.ml b/manifest/product_octez.ml index 138a028837905bb65615c0e4356451f61e7a8fdc..f76198c349b9b3b839183ce5433096fea980321b 100644 --- a/manifest/product_octez.ml +++ b/manifest/product_octez.ml @@ -7996,12 +7996,12 @@ let _octez_node = ~section:"bin"; ] -let _octez_agnostic_baker = +let _octez_experimental_agnostic_baker = public_exe - "octez-agnostic-baker" + "octez-experimental-agnostic-baker" ~path:"src/bin_agnostic_baker" ~internal_name:"main_agnostic_baker" - ~synopsis:"Tezos: `octez-agnostic-baker` binary for baking" + ~synopsis:"Tezos: `octez-experimental-agnostic-baker` binary for baking" ~release_status:Unreleased ~with_macos_security_framework:true ~deps: diff --git a/opam/octez-agnostic-baker.opam b/opam/octez-experimental-agnostic-baker.opam similarity index 91% rename from opam/octez-agnostic-baker.opam rename to opam/octez-experimental-agnostic-baker.opam index 00e9b805f6f91911b0fbc39f0782d76666f7623f..a45ed011a42f0991d969de7cf9c604e51a4ed8a4 100644 --- a/opam/octez-agnostic-baker.opam +++ b/opam/octez-experimental-agnostic-baker.opam @@ -23,4 +23,4 @@ build: [ ["dune" "runtest" "-p" name "-j" jobs] {with-test} ] available: os-family != "windows" -synopsis: "Tezos: `octez-agnostic-baker` binary for baking" +synopsis: "Tezos: `octez-experimental-agnostic-baker` binary for baking" diff --git a/src/bin_agnostic_baker/agnostic_baker_events.ml b/src/bin_agnostic_baker/agnostic_baker_events.ml index 00ba3eeb3527e7a2b364c44cc34e9f0a0c34439b..cdb6585bf353e41550575bd349f0aae8fce65124 100644 --- a/src/bin_agnostic_baker/agnostic_baker_events.ml +++ b/src/bin_agnostic_baker/agnostic_baker_events.ml @@ -48,7 +48,7 @@ let starting_daemon = ~alternative_color ~level:Notice ~name:"starting_daemon" - ~msg:"agnostic baker started" + ~msg:"experimental agnostic baker started" () let stopping_daemon = @@ -88,3 +88,16 @@ let period_status = ~msg:"new block on {period} period (remaining period duration {remaining})" ("period", string) ("remaining", int31) + +(* Warning *) +let experimental_binary = + declare_0 + ~section + ~alternative_color + ~level:Warning + ~name:"experimental_binary" + ~msg: + "[WARNING] As the name suggests, this binary is EXPERIMENTAL, therefore \ + it is intended for testing purposes only. Please do not use it on \ + `mainnet`." + () diff --git a/src/bin_agnostic_baker/daemon.ml b/src/bin_agnostic_baker/daemon.ml index efdbdd9052263bb1b4d4a55acaf650c0b50ed1cd..52c60f4faf495d83e59512679853f58d90409a9d 100644 --- a/src/bin_agnostic_baker/daemon.ml +++ b/src/bin_agnostic_baker/daemon.ml @@ -153,6 +153,7 @@ let monitor_voting_periods ~state head_stream = monitored heads. *) let may_start_initial_baker state = let open Lwt_result_syntax in + let*! () = Agnostic_baker_events.(emit experimental_binary) () in let rec may_start ?last_known_proto ~head_stream () = let* protocol_hash = Rpc_services.get_next_protocol_hash ~node_addr:state.node_endpoint diff --git a/src/bin_agnostic_baker/dune b/src/bin_agnostic_baker/dune index 0b2ab5f507c5329e6c616144d29856b6dfc5e8f7..631eb12d546fd72db84385ed0e6fc69bcd7175b4 100644 --- a/src/bin_agnostic_baker/dune +++ b/src/bin_agnostic_baker/dune @@ -3,8 +3,8 @@ (executable (name main_agnostic_baker) - (public_name octez-agnostic-baker) - (package octez-agnostic-baker) + (public_name octez-experimental-agnostic-baker) + (package octez-experimental-agnostic-baker) (instrumentation (backend bisect_ppx)) (libraries octez-rustzcash-deps diff --git a/src/bin_agnostic_baker/parameters.ml b/src/bin_agnostic_baker/parameters.ml index 8813b9a96c7ccf296fa7c71cffcb85c8cda75317..c985a297d8c693d69a194d2389a71faf67488ca7 100644 --- a/src/bin_agnostic_baker/parameters.ml +++ b/src/bin_agnostic_baker/parameters.ml @@ -10,7 +10,7 @@ let default_node_endpoint = "http://localhost:%d" Octez_node_config.Config_file.default_rpc_port -let default_daily_logs_path = Some "octez-agnostic-baker" +let default_daily_logs_path = Some "octez-experimental-agnostic-baker" let log_config ~base_dir = let base_dir : string = diff --git a/src/bin_agnostic_baker/run_args.ml b/src/bin_agnostic_baker/run_args.ml index d9d7afcacb0da2c7d877d8e2cf8d38dfff7a20b1..7b7654d93d299e2876170dd16311686ee6d542bb 100644 --- a/src/bin_agnostic_baker/run_args.ml +++ b/src/bin_agnostic_baker/run_args.ml @@ -20,10 +20,11 @@ let help_arg = "--help" let print_help () = Format.printf "Usage:\n\ - \ octez-agnostic-baker [OCTEZ-AGNOSTIC-BAKER-COMMANDS] -- \ + \ octez-experimental-agnostic-baker \ + [OCTEZ-EXPERIMENTAL-AGNOSTIC-BAKER-COMMANDS] -- \ [OCTEZ-BAKER-COMMANDS]@.@." ; Format.printf - "OCTEZ-AGNOSTIC-BAKER-COMMANDS:\n\ + "OCTEZ-EXPERIMENTAL-AGNOSTIC-BAKER-COMMANDS:\n\ \ %s: display help\n\ \ %s: path to the octez-baker binaries@.@." help_arg diff --git a/tezt/lib_tezos/agnostic_baker.ml b/tezt/lib_tezos/agnostic_baker.ml index 1c11e49f2efadbcd6ff606cb46457b20611ed65c..a61c431c6d42366b3041a20f9a8daa340c6002e3 100644 --- a/tezt/lib_tezos/agnostic_baker.ml +++ b/tezt/lib_tezos/agnostic_baker.ml @@ -45,8 +45,9 @@ let set_ready agnostic_baker = | Running status -> status.session_state.ready <- true) ; trigger_ready agnostic_baker (Some ()) -let create_from_uris ?runner ?(path = Uses.path Constant.octez_agnostic_baker) - ?name ?color ?event_pipe ?(delegates = []) ?(remote_mode = false) +let create_from_uris ?runner + ?(path = Uses.path Constant.octez_experimental_agnostic_baker) ?name ?color + ?event_pipe ?(delegates = []) ?(remote_mode = false) ?(liquidity_baking_toggle_vote = Some Pass) ~base_dir ~node_data_dir ~node_rpc_endpoint () = let agnostic_baker = @@ -152,9 +153,9 @@ let wait_for_ready agnostic_baker = resolver :: agnostic_baker.persistent_state.pending_ready ; check_event agnostic_baker "agnostic baker started" promise -let init ?runner ?(path = Uses.path Constant.octez_agnostic_baker) ?name ?color - ?event_level ?event_pipe ?event_sections_levels ?(delegates = []) - ?remote_mode ?liquidity_baking_toggle_vote node client = +let init ?runner ?(path = Uses.path Constant.octez_experimental_agnostic_baker) + ?name ?color ?event_level ?event_pipe ?event_sections_levels + ?(delegates = []) ?remote_mode ?liquidity_baking_toggle_vote node client = let* () = Node.wait_for_ready node in let agnostic_baker = create diff --git a/tezt/lib_tezos/agnostic_baker.mli b/tezt/lib_tezos/agnostic_baker.mli index 6f037ba170b0c22d1929bee5434256bca674f6a9..9e7456be8659f6a85c1ac6d6774b354fe1ad5753 100644 --- a/tezt/lib_tezos/agnostic_baker.mli +++ b/tezt/lib_tezos/agnostic_baker.mli @@ -38,7 +38,7 @@ val wait_for : ?where:string -> t -> string -> (JSON.t -> 'a option) -> 'a Lwt.t *) val wait_for_ready : t -> unit Lwt.t -(** Spawn [octez-agnostic-baker run]. +(** Spawn [octez-experimental-agnostic-baker run]. The resulting promise is fulfilled as soon as the agnostic baker has been spawned. It continues running in the background. *) diff --git a/tezt/lib_tezos/constant.ml b/tezt/lib_tezos/constant.ml index 2a6af2b2a80e8a229b862f89b9b392698b41edbb..5987f9e98a2bb4fed3bc3a2d6d507c588c795d03 100644 --- a/tezt/lib_tezos/constant.ml +++ b/tezt/lib_tezos/constant.ml @@ -147,8 +147,11 @@ module WASM = struct Uses.make ~tag:"tx_kernel_dal" ~path:"tx_kernel_dal.wasm" () end -let octez_agnostic_baker = - Uses.make ~tag:"agnostic_baker" ~path:"./octez-agnostic-baker" () +let octez_experimental_agnostic_baker = + Uses.make + ~tag:"experimental_agnostic_baker" + ~path:"./octez-experimental-agnostic-baker" + () (* TODO: tezos/tezos#4803 Can we do better than to depend on script-inputs? diff --git a/tezt/lib_wrapper/expected/tezt_wrapper.ml/runtime-dependency-tags.out b/tezt/lib_wrapper/expected/tezt_wrapper.ml/runtime-dependency-tags.out index 99919d76ffbe236507b9c10aa928cf411956b5a7..4a57da4a1445a2eb5df3d81819d0af49ca645dda 100644 --- a/tezt/lib_wrapper/expected/tezt_wrapper.ml/runtime-dependency-tags.out +++ b/tezt/lib_wrapper/expected/tezt_wrapper.ml/runtime-dependency-tags.out @@ -11,7 +11,6 @@ accuser_psparisc: octez-accuser-PsParisC accuser_psquebec: octez-accuser-PsQuebec accuser_alpha: octez-accuser-alpha admin_client: octez-admin-client -agnostic_baker: octez-agnostic-baker baker_psparisc: octez-baker-PsParisC baker_psquebec: octez-baker-PsQuebec baker_alpha: octez-baker-alpha @@ -22,6 +21,7 @@ dac_node: octez-dac-node dal_node: octez-dal-node dsn_node: octez-dsn-node evm_node: octez-evm-node +experimental_agnostic_baker: octez-experimental-agnostic-baker node: octez-node protocol_compiler: octez-protocol-compiler signer: octez-signer diff --git a/tezt/manual_tests/agnostic_baking.ml b/tezt/manual_tests/agnostic_baking.ml index 5a84c6d5250e9bc456aea759f668f6c02dc883eb..e0350756fd304bb16c4801c96c6c94933fd0aad0 100644 --- a/tezt/manual_tests/agnostic_baking.ml +++ b/tezt/manual_tests/agnostic_baking.ml @@ -7,7 +7,7 @@ (* Testing ------- - Component: Agnostic baker (octez-agnostic-baker) + Component: Agnostic baker (octez-experimental-agnostic-baker) Invocation: dune exec tezt/manual_tests/main.exe -- --file agnostic_baking.ml Subject: Ensure that the agnostic baker behaves as expected *) @@ -158,7 +158,7 @@ let migrate ~migrate_from ~migrate_to ?(use_remote_signer = false) () = (Protocol.tag migrate_to) remote_signer_text) ~tags:["protocol"; "migration"; "agnostic"; "baker"] - ~uses:[Constant.octez_agnostic_baker] + ~uses:[Constant.octez_experimental_agnostic_baker] @@ fun () -> let* () = perform_protocol_migration @@ -178,7 +178,7 @@ let start_stop = ~__FILE__ ~title:"Agnostic baker starts and stops" ~tags:["sandbox"; "agnostic"; "baker"; "init"] - ~uses:[Constant.octez_agnostic_baker] + ~uses:[Constant.octez_experimental_agnostic_baker] @@ fun () -> let* node, client = Client.init_with_node `Client () in let* baker = Agnostic_baker.init node client in