From 4b2be156a5dcfd1d914946527152b9feb3bb1616 Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Fri, 25 Apr 2025 11:07:57 +0300 Subject: [PATCH 01/15] Tezt: Rename agnostic_baker to baker module --- .../benchmark_tps_command.ml | 2 +- src/bin_tps_evaluation/gas_tps_command.ml | 4 +- src/lib_octogram/tezos.ml | 10 ++-- .../lib_tezos/{agnostic_baker.ml => baker.ml} | 0 .../{agnostic_baker.mli => baker.mli} | 0 tezt/long_tests/tenderbake.ml | 25 ++++---- tezt/manual_tests/baker_test.ml | 36 ++++++------ tezt/manual_tests/dal.ml | 4 +- tezt/tests/agnostic_baker_test.ml | 48 +++++++--------- tezt/tests/baker_operations_cli_options.ml | 6 +- tezt/tests/baker_test.ml | 57 +++++++------------ tezt/tests/cloud/dal.ml | 4 +- tezt/tests/cloud/layer1.ml | 6 +- tezt/tests/dal.ml | 31 +++++----- tezt/tests/http_cache_headers.ml | 4 +- .../tests/liquidity_baking_per_block_votes.ml | 40 ++++++------- tezt/tests/nonce_seed_revelation.ml | 26 ++++----- tezt/tests/protocol_migration.ml | 20 +++---- tezt/tests/signer_test.ml | 2 +- tezt/tests/synchronisation_heuristic.ml | 18 +++--- tezt/tests/voting.ml | 2 +- 21 files changed, 156 insertions(+), 189 deletions(-) rename tezt/lib_tezos/{agnostic_baker.ml => baker.ml} (100%) rename tezt/lib_tezos/{agnostic_baker.mli => baker.mli} (100%) diff --git a/src/bin_tps_evaluation/benchmark_tps_command.ml b/src/bin_tps_evaluation/benchmark_tps_command.ml index c2266285385a..6a0b1c1595f3 100644 --- a/src/bin_tps_evaluation/benchmark_tps_command.ml +++ b/src/bin_tps_evaluation/benchmark_tps_command.ml @@ -206,7 +206,7 @@ let run_benchmark ~lift_protocol_limits ~provided_tps_of_injection ~blocks_total give very little Tez to the extra bootstraps, the default bootstraps will dominate in terms of stake. *) let delegates = make_delegates Constants.default_bootstraps_count in - let _baker = Agnostic_baker.init ~delegates node client in + let _baker = Baker.init ~delegates node client in Log.info "Originating smart contracts" ; let* () = Client.stresstest_originate_smart_contracts originating_bootstrap client diff --git a/src/bin_tps_evaluation/gas_tps_command.ml b/src/bin_tps_evaluation/gas_tps_command.ml index 71694c585134..f264ee697164 100644 --- a/src/bin_tps_evaluation/gas_tps_command.ml +++ b/src/bin_tps_evaluation/gas_tps_command.ml @@ -51,7 +51,7 @@ let estimate_gas_tps ~average_block_path () = let* average_block = Average_block.load average_block_path in let* () = Average_block.check_for_unknown_smart_contracts average_block in let delegates = make_delegates Constants.default_bootstraps_count in - let* baker = Agnostic_baker.init ~delegates node client in + let* baker = Baker.init ~delegates node client in Log.info "Originating smart contracts" ; let* () = Client.stresstest_originate_smart_contracts originating_bootstrap client @@ -70,7 +70,7 @@ let estimate_gas_tps ~average_block_path () = in Log.info "Gas TPS: %d" gas_tps ; let* _ = Node.kill node in - let* _ = Agnostic_baker.terminate baker in + let* _ = Baker.terminate baker in Lwt.return @@ {average_block; transaction_costs; average_transaction_cost; gas_tps} diff --git a/src/lib_octogram/tezos.ml b/src/lib_octogram/tezos.ml index ec2f73595d56..833eb542995e 100644 --- a/src/lib_octogram/tezos.ml +++ b/src/lib_octogram/tezos.ml @@ -62,12 +62,12 @@ end let () = Agent_state.register_key (module Octez_node_key) -type _ key += Octez_baker_k : string -> Agnostic_baker.t key +type _ key += Octez_baker_k : string -> Baker.t key module Octez_baker_key = struct type t = string - type r = Agnostic_baker.t + type r = Baker.t let proj : type a. a key -> (t * (a, r) eq) option = function | Octez_baker_k name -> Some (name, Eq) @@ -2627,7 +2627,7 @@ module Start_octez_baker = struct in (* Create a baker state. *) let octez_baker = - Agnostic_baker.create_from_uris + Baker.create_from_uris ?name ?path:baker_path ~base_dir @@ -2638,10 +2638,10 @@ module Start_octez_baker = struct () in (* Register the baker state. *) - let name = Agnostic_baker.name octez_baker in + let name = Baker.name octez_baker in Agent_state.add (Octez_baker_k name) octez_baker state ; (* Start the baker. *) - let* () = Agnostic_baker.run octez_baker in + let* () = Baker.run octez_baker in return {name} let on_completion ~on_new_service:_ ~on_new_metrics_source:_ (_ : r) = () diff --git a/tezt/lib_tezos/agnostic_baker.ml b/tezt/lib_tezos/baker.ml similarity index 100% rename from tezt/lib_tezos/agnostic_baker.ml rename to tezt/lib_tezos/baker.ml diff --git a/tezt/lib_tezos/agnostic_baker.mli b/tezt/lib_tezos/baker.mli similarity index 100% rename from tezt/lib_tezos/agnostic_baker.mli rename to tezt/lib_tezos/baker.mli diff --git a/tezt/long_tests/tenderbake.ml b/tezt/long_tests/tenderbake.ml index 1b01a066646a..8be5b30805ad 100644 --- a/tezt/long_tests/tenderbake.ml +++ b/tezt/long_tests/tenderbake.ml @@ -180,8 +180,7 @@ end module Sandbox = struct type state = { - mutable daemons : - (Node.t * Agnostic_baker.t option * Client.t option) array; + mutable daemons : (Node.t * Baker.t option * Client.t option) array; mutable delegates : Account.key Inf.t; } @@ -219,10 +218,8 @@ module Sandbox = struct | node, _, _ -> let* client = Client.init ~endpoint:(Client.Node node) () in let delegates = [get_delegate st] in - let baker = Agnostic_baker.create node client ~delegates in - let* () = - if run_baker then Agnostic_baker.run baker else Lwt.return_unit - in + let baker = Baker.create node client ~delegates in + let* () = if run_baker then Baker.run baker else Lwt.return_unit in st.daemons.(h) <- (node, Some baker, Some client) ; return (client, baker) @@ -236,7 +233,7 @@ module Sandbox = struct (Invalid_argument (sf "remove_baker_from_node: node %d has no baker" h)) | node, Some baker, client_opt -> - let* () = Agnostic_baker.terminate baker in + let* () = Baker.terminate baker in st.daemons.(h) <- (node, None, client_opt) ; return baker @@ -250,16 +247,14 @@ module Sandbox = struct let add_node_with_baker ?(run_baker = true) (st : state) = let* handle, node = add_node st in let* client, baker = add_baker_to_node ~run_baker st handle in - Log.info "Creating baker #%d (%s)" handle (Agnostic_baker.name baker) ; + Log.info "Creating baker #%d (%s)" handle (Baker.name baker) ; return (handle, node, client, baker) let terminate (st : state) = Lwt_list.iter_p (fun (node, baker_opt, _) -> let* () = Node.terminate node - and* () = - Option.fold ~none:unit ~some:Agnostic_baker.terminate baker_opt - in + and* () = Option.fold ~none:unit ~some:Baker.terminate baker_opt in unit) (Array.to_list st.daemons) end @@ -360,7 +355,7 @@ module Rounds = struct Log.info "Setting up nodes in ring topology" ; Cluster.ring nodes ; let* () = Cluster.start ~wait_connections:true nodes in - let* () = Lwt_list.iter_p Agnostic_baker.run bakers in + let* () = Lwt_list.iter_p Baker.run bakers in let* parameter_file = write_parameter_file @@ -527,7 +522,7 @@ module Long_dynamic_bake = struct let* () = Cluster.start ~wait_connections:true nodes in Log.info "Starting bakers" ; - let* () = Lwt_list.iter_p Agnostic_baker.run bakers in + let* () = Lwt_list.iter_p Baker.run bakers in Log.info "Activating protocol" ; let* () = @@ -553,7 +548,7 @@ module Long_dynamic_bake = struct "Cycle %d (head level %d): killed baker %s from handle #%d" cycle head_level - (Agnostic_baker.name killed_baker) + (Baker.name killed_baker) dead_baker_handle' ; let revive_delay = 1.0 in @@ -568,7 +563,7 @@ module Long_dynamic_bake = struct "Cycle %d (head level %d): added baker %s to handle #%d" cycle head_level - (Agnostic_baker.name new_baker) + (Baker.name new_baker) dead_baker_handle ; (* set the next baker to die *) diff --git a/tezt/manual_tests/baker_test.ml b/tezt/manual_tests/baker_test.ml index e203a75ea5df..c13ff7852780 100644 --- a/tezt/manual_tests/baker_test.ml +++ b/tezt/manual_tests/baker_test.ml @@ -184,7 +184,7 @@ let baker_early_preattestation_test = pp_list baker1_delegates_alias ; let* baker1 = - Agnostic_baker.init + Baker.init ~delegates: (List.map (fun (bootstrap : Account.key) -> bootstrap.public_key_hash) @@ -199,7 +199,7 @@ let baker_early_preattestation_test = pp_list baker2_delegates_alias ; let* baker2 = - Agnostic_baker.init + Baker.init ~event_sections_levels: [ ( String.concat @@ -248,10 +248,10 @@ let baker_early_preattestation_test = Log.info "Ensure that the test is in an state where %s propose at round 0 for level \ %d and %d. And that %s propose at level %d round 1. " - (Agnostic_baker.name baker1) + (Baker.name baker1) prev_lvl test_lvl - (Agnostic_baker.name baker2) + (Baker.name baker2) test_lvl ; let* baking_rights_prev_lvl = recover_baking_rights ~max_round:1 client1 prev_lvl @@ -279,10 +279,10 @@ let baker_early_preattestation_test = Log.info "Ensure that %s as reached the EQC at level %d round 0 and is locked on a \ payload before starting to inject costly manager operations" - (Agnostic_baker.name baker2) + (Baker.name baker2) prev_lvl ; let is_proposed = ref false in - let baker_on_event resolver Agnostic_baker.{name; value; timestamp = _} = + let baker_on_event resolver Baker.{name; value; timestamp = _} = match name with | "new_valid_proposal.v0" -> let level = JSON.(value |-> "level" |> as_int) in @@ -295,7 +295,7 @@ let baker_early_preattestation_test = | _ -> () in let baker_t, baker_u = Lwt.task () in - Agnostic_baker.on_event baker2 (baker_on_event baker_u) ; + Baker.on_event baker2 (baker_on_event baker_u) ; let* () = baker_t in Log.info @@ -325,16 +325,16 @@ let baker_early_preattestation_test = Log.info "Stop the %s once these operations are included in the %s mempool." - (Agnostic_baker.name baker1) + (Baker.name baker1) (Node.name node1) ; - let* () = Agnostic_baker.stop baker1 in + let* () = Baker.stop baker1 in Log.info "Wait for %s to propose a block at level:%d round 1." - (Agnostic_baker.name baker2) + (Baker.name baker2) prev_lvl ; let is_proposed = ref false in - let baker_on_event resolver Agnostic_baker.{name; value; timestamp = _} = + let baker_on_event resolver Baker.{name; value; timestamp = _} = match name with | "new_valid_proposal.v0" -> let level = JSON.(value |-> "level" |> as_int) in @@ -347,12 +347,12 @@ let baker_early_preattestation_test = | _ -> () in let baker_t, baker_u = Lwt.task () in - Agnostic_baker.on_event baker2 (baker_on_event baker_u) ; + Baker.on_event baker2 (baker_on_event baker_u) ; let* () = baker_t in let baker_on_event ?(log = false) (status : status ref) preattestations_resolver pqc_resolver attestations_resolver - Agnostic_baker.{name; value; timestamp = _} = + Baker.{name; value; timestamp = _} = match name with | "new_valid_proposal.v0" -> let block = JSON.(value |-> "block" |> as_string) in @@ -440,7 +440,7 @@ let baker_early_preattestation_test = let preattestation_t1, preattestation_u1 = Lwt.task () in let pqc_t1, pqc_u1 = Lwt.task () in let attestations_t1, attestations_u1 = Lwt.task () in - Agnostic_baker.on_event + Baker.on_event baker1 (baker_on_event ~log:true status1 preattestation_u1 pqc_u1 attestations_u1) ; @@ -450,16 +450,16 @@ let baker_early_preattestation_test = let preattestation_t2, preattestation_u2 = Lwt.task () in let pqc_t2, pqc_u2 = Lwt.task () in let attestations_t2, attestations_u2 = Lwt.task () in - Agnostic_baker.on_event + Baker.on_event baker2 (baker_on_event status2 preattestation_u2 pqc_u2 attestations_u2) ; Log.info "Continue %s and wait for it to propose a block at level:%d that contains \ the gas consuming manager operations." - (Agnostic_baker.name baker1) + (Baker.name baker1) test_lvl ; - let* _baker = Agnostic_baker.continue baker1 in + let* _baker = Baker.continue baker1 in let preattestation_should_be_validated = Protocol.(number protocol > 16) in @@ -479,7 +479,7 @@ let baker_early_preattestation_test = let* mempool2 = get_preattestation_mempool client2 in Log.info "%s have proposed, both baker have pre-attested for their delegates%s" - (Agnostic_baker.name baker1) + (Baker.name baker1) (if preattestation_should_be_validated then " and the pqc is reached. Ensure that the pre-attestations are injected \ in the nodes as validated operation" diff --git a/tezt/manual_tests/dal.ml b/tezt/manual_tests/dal.ml index b0c95e0d6c11..4f7acaffef1e 100644 --- a/tezt/manual_tests/dal.ml +++ b/tezt/manual_tests/dal.ml @@ -402,8 +402,8 @@ let baker_scenario ?baker_sk ~airdropper_alias client dal_node l1_node = after it is declared as delegate. *) let* () = stake_or_unstake_half_balance client ~baker_alias in let dal_node_rpc_endpoint = Dal_node.as_rpc_endpoint dal_node in - let baker = Agnostic_baker.create ~dal_node_rpc_endpoint l1_node client in - let* () = Agnostic_baker.run baker in + let baker = Baker.create ~dal_node_rpc_endpoint l1_node client in + let* () = Baker.run baker in Lwt_unix.sleep Float.max_float (** A slots injector test parameterized by a network. Typically, to run a slot diff --git a/tezt/tests/agnostic_baker_test.ml b/tezt/tests/agnostic_baker_test.ml index 6d85078e84cf..fa347058b673 100644 --- a/tezt/tests/agnostic_baker_test.ml +++ b/tezt/tests/agnostic_baker_test.ml @@ -24,18 +24,14 @@ let team = Tag.layer1 let wait_for_active_protocol_waiting agnostic_baker = - Agnostic_baker.wait_for - agnostic_baker - "waiting_for_active_protocol.v0" - (fun _json -> Some ()) + Baker.wait_for agnostic_baker "waiting_for_active_protocol.v0" (fun _json -> + Some ()) let wait_for_become_old_baker agnostic_baker = - Agnostic_baker.wait_for agnostic_baker "become_old_agent.v0" (fun _json -> - Some ()) + Baker.wait_for agnostic_baker "become_old_agent.v0" (fun _json -> Some ()) let wait_for_stopping_baker agnostic_baker = - Agnostic_baker.wait_for agnostic_baker "stopping_agent.v0" (fun _json -> - Some ()) + Baker.wait_for agnostic_baker "stopping_agent.v0" (fun _json -> Some ()) let remote_sign client = let* () = Client.forget_all_keys client in @@ -65,14 +61,14 @@ let perform_protocol_migration ?node_name ?client_name ?parameter_file in let* () = if use_remote_signer then remote_sign client else unit in Log.info "Node %s initialized" (Node.name node) ; - let baker = Agnostic_baker.create node client in + let baker = Baker.create node client in let wait_for_active_protocol_waiting = wait_for_active_protocol_waiting baker in Log.info "Starting agnostic baker" ; - let* () = Agnostic_baker.run baker in + let* () = Baker.run baker in let* () = wait_for_active_protocol_waiting in - let* () = Agnostic_baker.wait_for_ready baker in + let* () = Baker.wait_for_ready baker in let* () = Client.activate_protocol ~protocol:migrate_from @@ -112,17 +108,15 @@ let perform_protocol_migration ?node_name ?client_name ?parameter_file Log.info "Check that baker for protocol %s is killed after %d levels" (Protocol.tag migrate_from) - Agnostic_baker.extra_levels_for_old_baker ; + Baker.extra_levels_for_old_baker ; let wait_for_stopping_baker = wait_for_stopping_baker baker in let* _level = - Node.wait_for_level - node - (migration_level + Agnostic_baker.extra_levels_for_old_baker) + Node.wait_for_level node (migration_level + Baker.extra_levels_for_old_baker) in let* () = wait_for_stopping_baker in (* Test that we can still bake after migration *) let* _level = Node.wait_for_level node baked_blocks_after_migration in - let* () = Agnostic_baker.terminate baker in + let* () = Baker.terminate baker in unit let migrate ~migrate_from ~migrate_to ~use_remote_signer = @@ -179,9 +173,9 @@ let test_start_and_stop () = ~uses:[Constant.octez_agnostic_baker] @@ fun () -> let* node, client = Client.init_with_node `Client () in - let* baker = Agnostic_baker.init node client in - let* () = Agnostic_baker.wait_for_ready baker in - let* () = Agnostic_baker.terminate baker in + let* baker = Baker.init node client in + let* () = Baker.wait_for_ready baker in + let* () = Baker.terminate baker in unit let test_man () = @@ -215,7 +209,7 @@ let test_keep_alive = (* Provide a delegate with no voting power to avoid baking blocks with the baker and the client simultaneously. *) let baker = - Agnostic_baker.create + Baker.create ~delegates:[Constant.activator.public_key_hash] ~node_version_check_bypass:true node @@ -223,18 +217,18 @@ let test_keep_alive = in let* () = Node.terminate node in (* Start the baker with no node running and no [--keep-alive], it crashes. *) - let process = Agnostic_baker.spawn_run baker in + let process = Baker.spawn_run baker in let* () = Process.check_error ~msg:(rex "Cannot connect to node") process in (* Start the baker with no node running and [--keep-alive], it'll wait. *) let wait_for_cannot_connect = - Agnostic_baker.wait_for baker "cannot_connect.v0" (fun _json -> Some ()) + Baker.wait_for baker "cannot_connect.v0" (fun _json -> Some ()) in - let* () = Agnostic_baker.run ~extra_arguments:["--keep-alive"] baker + let* () = Baker.run ~extra_arguments:["--keep-alive"] baker and* () = wait_for_cannot_connect in (* Start the node. *) let f_wait_for_chain_id () = (* This is an event emitted by the baker lib. *) - Agnostic_baker.wait_for baker "node_chain_id.v0" (fun _json -> Some ()) + Baker.wait_for baker "node_chain_id.v0" (fun _json -> Some ()) in let wait_for_chain_id = f_wait_for_chain_id () in let* () = Node.run node [] @@ -243,11 +237,11 @@ let test_keep_alive = (* Bake a block, the baker is connected so it'll see it. *) let f_wait_baker_proposal () = (* This is an event emitted by the baker lib. *) - Agnostic_baker.wait_for baker "new_valid_proposal.v0" (fun _json -> Some ()) + Baker.wait_for baker "new_valid_proposal.v0" (fun _json -> Some ()) in let f_wait_period_status () = (* This is an event emitted by the agnostic baker. *) - Agnostic_baker.wait_for baker "period_status.v0" (fun _json -> Some ()) + Baker.wait_for baker "period_status.v0" (fun _json -> Some ()) in let wait_baker_proposal = f_wait_baker_proposal () in let wait_period_status = f_wait_period_status () in @@ -273,7 +267,7 @@ let register ~protocols = test_keep_alive protocols let register_migration ~migrate_from ~migrate_to = (* We want to migrate only from Active protocols *) - if Agnostic_baker.protocol_status migrate_from = Active then ( + if Baker.protocol_status migrate_from = Active then ( migrate ~migrate_from ~migrate_to ~use_remote_signer:false ; migrate ~migrate_from ~migrate_to ~use_remote_signer:true) else () diff --git a/tezt/tests/baker_operations_cli_options.ml b/tezt/tests/baker_operations_cli_options.ml index f592aac7062c..359eefb10151 100644 --- a/tezt/tests/baker_operations_cli_options.ml +++ b/tezt/tests/baker_operations_cli_options.ml @@ -418,7 +418,7 @@ let test_baker_external_operations = Lwt_unix.sleep (float_of_int (minimal_block_delay + delay_increment_per_round)) in - let* _baker = Agnostic_baker.init ~operations_pool node client in + let* _baker = Baker.init ~operations_pool node client in (* Wait until we have seen enough blocks. This should not take much time. *) Log.info "Wait until high enough level" ; let* (_ : int) = Node.wait_for_level node (level + 1) in @@ -473,8 +473,8 @@ let test_baker_state_recorder protocol state_recorder = let* level = Node.get_level node in (* Initialise a baker *) let* _baker = - if state_recorder then Agnostic_baker.init ~state_recorder node client - else Agnostic_baker.init node client + if state_recorder then Baker.init ~state_recorder node client + else Baker.init node client in (* Wait for chain to process the empty block *) let* (_ : int) = Node.wait_for_level node (level + 1) in diff --git a/tezt/tests/baker_test.ml b/tezt/tests/baker_test.ml index 698640f0cc5e..4a621e5e9c0f 100644 --- a/tezt/tests/baker_test.ml +++ b/tezt/tests/baker_test.ml @@ -73,14 +73,11 @@ let check_node_version_check_bypass_test = ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) @@ fun protocol -> let* node, client = Client.init_with_protocol `Client ~protocol () in - let baker = - Agnostic_baker.create ~node_version_check_bypass:true node client - in + let baker = Baker.create ~node_version_check_bypass:true node client in let check_bypassed_event_promise = - Agnostic_baker.wait_for baker "node_version_check_bypass.v0" (fun _ -> - Some ()) + Baker.wait_for baker "node_version_check_bypass.v0" (fun _ -> Some ()) in - let* () = Agnostic_baker.run baker in + let* () = Baker.run baker in let* () = check_bypassed_event_promise in unit @@ -94,10 +91,7 @@ let check_node_version_allowed_test = @@ fun protocol -> let* node, client = Client.init_with_protocol `Client ~protocol () in let* _baker = - Agnostic_baker.init - ~node_version_allowed:"octez-v7894.789:1a991a03" - node - client + Baker.init ~node_version_allowed:"octez-v7894.789:1a991a03" node client in unit @@ -111,7 +105,7 @@ let check_node_version_no_commit_allowed_test = @@ fun protocol -> let* node, client = Client.init_with_protocol `Client ~protocol () in let* _baker = - Agnostic_baker.init ~node_version_allowed:"octez-v7894.789" node client + Baker.init ~node_version_allowed:"octez-v7894.789" node client in unit @@ -136,9 +130,9 @@ let baker_reward_test = () in let level_2_promise = Node.wait_for_level node 2 in - let* baker = Agnostic_baker.init node client in + let* baker = Baker.init node client in Log.info "Wait for new head." ; - Agnostic_baker.log_events baker ; + Baker.log_events baker ; let* _ = level_2_promise in let* _ = Client.RPC.call ~hooks client @@ RPC.get_chain_block_metadata () @@ -163,9 +157,9 @@ let baker_test protocol ~keys = in let level_2_promise = Node.wait_for_level node 2 in let level_3_promise = Node.wait_for_level node 3 in - let* baker = Agnostic_baker.init node client in + let* baker = Baker.init node client in Log.info "Wait for new head." ; - Agnostic_baker.log_events baker ; + Baker.log_events baker ; let* _ = level_2_promise in Log.info "New head arrive level 2" ; let* _ = level_3_promise in @@ -194,7 +188,7 @@ let baker_stresstest = let* node, client = Client.init_with_protocol `Client ~protocol () ~timestamp:Now in - let* _ = Agnostic_baker.init node client in + let* _ = Baker.init node client in let* _ = Node.wait_for_level node 3 in (* Use a large tps, to have failing operations too *) let* () = Client.stresstest ~tps:25 ~transfers:100 client in @@ -211,7 +205,7 @@ let baker_stresstest_apply = let* node, client = Client.init_with_protocol `Client ~protocol () ~timestamp:Now in - let* _ = Agnostic_baker.init ~force_apply_from_round:0 node client in + let* _ = Baker.init ~force_apply_from_round:0 node client in let* _ = Node.wait_for_level node 3 in (* Use a large tps, to have failing operations too *) let* () = Client.stresstest ~tps:25 ~transfers:100 client in @@ -302,7 +296,7 @@ let baker_remote_test = let* node, client = Client.init_with_protocol `Client ~protocol () ~timestamp:Now in - let* _ = Agnostic_baker.init ~remote_mode:true node client in + let* _ = Baker.init ~remote_mode:true node client in let* _ = Node.wait_for_level node 3 in unit @@ -320,9 +314,9 @@ let baker_check_consensus_branch = let target_level = 5 in Log.info "Start a baker and bake until level %d" target_level ; - let* baker = Agnostic_baker.init node client in + let* baker = Baker.init node client in let* _ = Node.wait_for_level node target_level in - let* () = Agnostic_baker.kill baker in + let* () = Baker.kill baker in Log.info "Retrieve mempool" ; let* mempool = @@ -398,15 +392,11 @@ let force_apply_from_round = delegate force_apply_from_round ; let* baker = - Agnostic_baker.init - ~force_apply_from_round - ~delegates:[delegate] - node - client + Baker.init ~force_apply_from_round ~delegates:[delegate] node client in (* fail if a block is applied at a round < [force_apply_from_round] *) - Agnostic_baker.on_event baker (fun Agnostic_baker.{name; value; _} -> + Baker.on_event baker (fun Baker.{name; value; _} -> if name = "forging_block.v0" then let round = JSON.(value |-> "round" |> as_int) in let level = JSON.(value |-> "level" |> as_int) in @@ -420,7 +410,7 @@ let force_apply_from_round = (* a promise that resolves on event forging_block when (force_apply = true && round = [round] && level = [level]) *) let forced_application_promise = - Agnostic_baker.wait_for baker "forging_block.v0" (fun json -> + Baker.wait_for baker "forging_block.v0" (fun json -> let round' = JSON.(json |-> "round" |> as_int) in let level' = JSON.(json |-> "level" |> as_int) in let force_apply = JSON.(json |-> "force_apply" |> as_bool) in @@ -698,7 +688,7 @@ let simple_attestations_aggregation = in (* Testing the baker automaton *) log_step 8 "Start a baker and wait until level 12" ; - let* _baker = Agnostic_baker.init ~delegates node client in + let* _baker = Baker.init ~delegates node client in let* _ = Node.wait_for_level node 12 in log_step 9 "Check consensus operations" ; let* () = @@ -739,13 +729,13 @@ let prequorum_check_levels = List.map (fun (account : Account.key) -> account.public_key_hash) in let* baker = - Agnostic_baker.init + Baker.init ~event_level:`Debug ~delegates:[Constant.activator.public_key_hash] node client in - Agnostic_baker.log_events ~max_length:1000 baker ; + Baker.log_events ~max_length:1000 baker ; let* () = Client.bake_for_and_wait ~node @@ -780,7 +770,7 @@ let prequorum_check_levels = unit in let wait_for_preattestations_received () = - Agnostic_baker.wait_for + Baker.wait_for baker "preattestations_received.v0" JSON.( @@ -879,10 +869,7 @@ let attestations_aggregation_on_reproposal = manually inject consensus operations to control the progression of consensus. *) let* _baker = - Agnostic_baker.init - ~delegates:[Constant.bootstrap5.public_key_hash] - node - client + Baker.init ~delegates:[Constant.bootstrap5.public_key_hash] node client in Log.info "Bake until BLS consensus keys are activated" ; let keys = diff --git a/tezt/tests/cloud/dal.ml b/tezt/tests/cloud/dal.ml index b216d705908e..ed19eb12658c 100644 --- a/tezt/tests/cloud/dal.ml +++ b/tezt/tests/cloud/dal.ml @@ -494,7 +494,7 @@ type bootstrap = { type baker = { node : Node.t; dal_node : Dal_node.t option; - baker : Agnostic_baker.t; + baker : Baker.t; account : Account.key; stake : int; } @@ -2578,7 +2578,7 @@ let init_baker ?stake cloud (configuration : configuration) ~bootstrap teztale in let* baker = let dal_node_rpc_endpoint = Option.map Dal_node.as_rpc_endpoint dal_node in - Agnostic_baker.Agent.init + Baker.Agent.init ~name:(Format.asprintf "baker-%d" i) ~delegates:[account.Account.alias] ~client diff --git a/tezt/tests/cloud/layer1.ml b/tezt/tests/cloud/layer1.ml index b99a3e7e39e8..7f95e84e386a 100644 --- a/tezt/tests/cloud/layer1.ml +++ b/tezt/tests/cloud/layer1.ml @@ -416,7 +416,7 @@ type bootstrap = { type baker = { agent : Agent.t; node : Node.t; - baker : Agnostic_baker.t; + baker : Baker.t; accounts : string list; } @@ -454,7 +454,7 @@ let init_baker_i i (configuration : configuration) cloud ~peers toplog "init_baker: Initialize agnostic baker" ; let name = name ^ "-agnostic-baker" in let* agnostic_baker = - Agnostic_baker.Agent.init + Baker.Agent.init ~env:yes_crypto_env ~name ~delegates:(List.map (fun ({pkh; _} : baker_account) -> pkh) accounts) @@ -463,7 +463,7 @@ let init_baker_i i (configuration : configuration) cloud ~peers cloud agent in - let* () = Agnostic_baker.wait_for_ready agnostic_baker in + let* () = Baker.wait_for_ready agnostic_baker in toplog "init_baker: %s is ready!" name ; Lwt.return agnostic_baker in diff --git a/tezt/tests/dal.ml b/tezt/tests/dal.ml index a4eca97e9c97..5defebc09fa1 100644 --- a/tezt/tests/dal.ml +++ b/tezt/tests/dal.ml @@ -2886,7 +2886,7 @@ let test_attester_with_daemon protocol parameters cryptobox node client dal_node let run_baker delegates target_level = let* baker = let dal_node_rpc_endpoint = Dal_node.as_rpc_endpoint dal_node in - Agnostic_baker.init + Baker.init ~event_sections_levels:[(Protocol.name protocol ^ ".baker", `Debug)] ~dal_node_rpc_endpoint ~delegates @@ -2895,7 +2895,7 @@ let test_attester_with_daemon protocol parameters cryptobox node client dal_node client in let* _ = Node.wait_for_level node target_level in - Agnostic_baker.terminate baker + Baker.terminate baker in (* Test goal: the published slot at levels in [first_level, intermediary_level - 1] @@ -3383,7 +3383,7 @@ let e2e_test_script ?expand_test:_ ?(beforehand_slot_injection = 1) "[e2e.start_baker] spawn a baker daemon with all bootstrap accounts@." ; let* _baker = let dal_node_rpc_endpoint = Dal_node.as_rpc_endpoint baker_dal_node in - Agnostic_baker.init ~dal_node_rpc_endpoint l1_node l1_client + Baker.init ~dal_node_rpc_endpoint l1_node l1_client in (* To be sure that we just moved to [start_dal_slots_level], we wait and extra @@ -4154,13 +4154,12 @@ let test_baker_registers_profiles _protocol _parameters _cryptobox l1_node let* () = Dal_node.terminate dal_node in let baker = let dal_node_rpc_endpoint = Dal_node.as_rpc_endpoint dal_node in - Agnostic_baker.create ~dal_node_rpc_endpoint l1_node client ~delegates + Baker.create ~dal_node_rpc_endpoint l1_node client ~delegates in let wait_for_attestation_event = - Agnostic_baker.wait_for baker "failed_to_get_attestations.v0" (fun _json -> - Some ()) + Baker.wait_for baker "failed_to_get_attestations.v0" (fun _json -> Some ()) in - let* () = Agnostic_baker.run baker in + let* () = Baker.run baker in let* () = wait_for_attestation_event in let* _lvl = Node.wait_for_level l1_node 3 in @@ -4485,9 +4484,9 @@ let test_migration_accuser_issue ~migrate_from ~migrate_to = let baker = let dal_node_rpc_endpoint = Dal_node.as_rpc_endpoint dal_node in - Agnostic_baker.create ~dal_node_rpc_endpoint node client + Baker.create ~dal_node_rpc_endpoint node client in - let* () = Agnostic_baker.run baker in + let* () = Baker.run baker in let* _level = Node.wait_for_level node migration_level in Log.info "migrated to next protocol, starting a second DAL node accuser" ; @@ -4502,7 +4501,7 @@ let test_migration_accuser_issue ~migrate_from ~migrate_to = let* () = Dal_node.run accuser ~wait_ready:true in let* _level = Node.wait_for_level node last_level in - let* () = Agnostic_baker.terminate baker in + let* () = Baker.terminate baker in Lwt_list.iter_s (fun delegate -> @@ -4718,7 +4717,7 @@ let test_restart_dal_node _protocol dal_parameters _cryptobox node client in let* baker = let dal_node_rpc_endpoint = Dal_node.as_rpc_endpoint dal_node in - Agnostic_baker.init + Baker.init ~delegates:all_pkhs ~liquidity_baking_toggle_vote:(Some On) ~state_recorder:true @@ -4746,7 +4745,7 @@ let test_restart_dal_node _protocol dal_parameters _cryptobox node client wait_for_layer1_final_block dal_node last_finalized_level in let* _ = Node.wait_for_level node (last_finalized_level + 2) in - let* () = Agnostic_baker.terminate baker in + let* () = Baker.terminate baker in let* () = wait_for_dal_node in if profile <> Dal_RPC.Bootstrap then let expected_levels = @@ -7457,7 +7456,7 @@ let scenario_tutorial_dal_baker = Log.info "Step 5: Run an Octez baking daemon" ; let* _baker = let dal_node_rpc_endpoint = Dal_node.as_rpc_endpoint dal_node in - Agnostic_baker.init + Baker.init ~event_sections_levels:[(Protocol.name protocol ^ ".baker", `Debug)] ~dal_node_rpc_endpoint ~delegates:all_delegates @@ -10043,7 +10042,7 @@ let use_mockup_node_for_getting_attestable_slots _protocol dal_parameters let dal_node_rpc_endpoint = Endpoint.make ~host:"localhost" ~scheme:"http" ~port () in - let baker = Agnostic_baker.create ~dal_node_rpc_endpoint l1_node client in + let baker = Baker.create ~dal_node_rpc_endpoint l1_node client in Log.info "Publish a slot" ; let* (`OpHash _op_hash) = @@ -10060,11 +10059,11 @@ let use_mockup_node_for_getting_attestable_slots _protocol dal_parameters in Log.info "Start the baker" ; - let* () = Agnostic_baker.run baker in + let* () = Baker.run baker in (* +2 blocks for the attested block to be final, +1 for some slack *) let* _ = Node.wait_for_level l1_node (publish_level + attestation_lag + 3) in - let* () = Agnostic_baker.terminate baker in + let* () = Baker.terminate baker in let () = Dal_node.Mockup_for_baker.stop dal_node_mockup in let attested_level = publish_level + attestation_lag in diff --git a/tezt/tests/http_cache_headers.ml b/tezt/tests/http_cache_headers.ml index 1052669e31da..62b282439333 100644 --- a/tezt/tests/http_cache_headers.ml +++ b/tezt/tests/http_cache_headers.ml @@ -143,7 +143,7 @@ let test_if_none_match ~rpc_external = Client.activate_protocol ~timestamp:Now ~parameter_file ~protocol client in Log.info "Bake and wait for block" ; - let* baker = Agnostic_baker.init ~delegates node client in + let* baker = Baker.init ~delegates node client in Log.info "Check etag found in query" ; let* _ = Node.wait_for_level node 2 in @@ -167,7 +167,7 @@ let test_if_none_match ~rpc_external = node (RPC.get_chain_block_hash ()) in - let* () = Agnostic_baker.terminate baker in + let* () = Baker.terminate baker in Check.( (String.length body > 0) int diff --git a/tezt/tests/liquidity_baking_per_block_votes.ml b/tezt/tests/liquidity_baking_per_block_votes.ml index 7ea2e79a1671..c20211335793 100644 --- a/tezt/tests/liquidity_baking_per_block_votes.ml +++ b/tezt/tests/liquidity_baking_per_block_votes.ml @@ -41,13 +41,12 @@ let ensure_removal path p = unit let baker_wait_for_vote baker = - Agnostic_baker.wait_for baker "vote_for_liquidity_baking_toggle.v0" - @@ fun json -> - JSON.as_string json |> Agnostic_baker.liquidity_baking_vote_of_string_opt + Baker.wait_for baker "vote_for_liquidity_baking_toggle.v0" @@ fun json -> + JSON.as_string json |> Baker.liquidity_baking_vote_of_string_opt let baker_wait_for_per_block_vote_file_error ?expected_id ?expected_file_path baker = - Agnostic_baker.wait_for baker "per_block_vote_file_error.v0" @@ fun json -> + Baker.wait_for baker "per_block_vote_file_error.v0" @@ fun json -> let json = JSON.(json |=> 0) in let id = JSON.(json |-> "id" |> as_string) in let file_path = JSON.(json |-> "file_path" |> as_string) in @@ -57,8 +56,7 @@ let baker_wait_for_per_block_vote_file_error ?expected_id ?expected_file_path then Some (id, file_path) else None -let vote_typ = - Check.(convert Agnostic_baker.liquidity_baking_vote_to_string string) +let vote_typ = Check.(convert Baker.liquidity_baking_vote_to_string string) let check_vote ?__LOC__ expected_vote obtained_vote = Check.(obtained_vote = expected_vote) @@ -147,14 +145,14 @@ let test_all_per_block_votes = not set [--liquidity-baking-toggle-vote pass] as the normal baker does. *) let run_vote_file ?votefile ?liquidity_baking_toggle_vote baker = - let* () = Agnostic_baker.terminate baker in + let* () = Baker.terminate baker in let delegates = Array.map (fun Account.{alias; _} -> alias) Account.Bootstrap.keys |> Array.to_list in let baker = - Agnostic_baker.create + Baker.create ~liquidity_baking_toggle_vote ?votefile ~delegates @@ -169,30 +167,30 @@ let test_all_per_block_votes = let* error = baker_wait_for_per_block_vote_file_error baker in return (baker, Error error) in - let* () = Agnostic_baker.run baker in - let* () = Agnostic_baker.wait_for_ready baker in + let* () = Baker.run baker in + let* () = Baker.wait_for_ready baker in Lwt.pick [p_vote; p_error] in - let* baker = Agnostic_baker.init node client in + let* baker = Baker.init node client in Log.info "Test [off] vote file" ; let* baker = - let votefile = Agnostic_baker.liquidity_baking_votefile Off in + let votefile = Baker.liquidity_baking_votefile Off in run_vote_file ~votefile ~liquidity_baking_toggle_vote:On baker >|= check_vote_success ~__LOC__ Off in Log.info "Test [on] vote file" ; let* baker = - let votefile = Agnostic_baker.liquidity_baking_votefile On in + let votefile = Baker.liquidity_baking_votefile On in run_vote_file ~votefile ~liquidity_baking_toggle_vote:Off baker >|= check_vote_success ~__LOC__ On in Log.info "Test [pass] vote file" ; let* baker = - let votefile = Agnostic_baker.liquidity_baking_votefile Pass in + let votefile = Baker.liquidity_baking_votefile Pass in run_vote_file ~votefile ~liquidity_baking_toggle_vote:On baker >|= check_vote_success ~__LOC__ Pass in @@ -231,18 +229,14 @@ let test_all_per_block_votes = Log.info "Test vote file at default file location " ; let* baker = ensure_removal default_votefile @@ fun () -> - let _ = - Agnostic_baker.liquidity_baking_votefile ~path:default_votefile On - in + let _ = Baker.liquidity_baking_votefile ~path:default_votefile On in run_vote_file baker >|= check_vote_success ~__LOC__ On in Log.info "Test caching of the votefile setting" ; let* _baker = ensure_removal default_votefile @@ fun () -> - let _ = - Agnostic_baker.liquidity_baking_votefile ~path:default_votefile On - in + let _ = Baker.liquidity_baking_votefile ~path:default_votefile On in let* baker = run_vote_file baker >|= check_vote_success ~__LOC__ On in (* Explicitly remove the votefile to check that the baker has retained its value *) let p_error = @@ -264,10 +258,8 @@ let test_all_per_block_votes = Log.info "Test [--votefile] overrides default file location " ; let* baker = ensure_removal default_votefile @@ fun () -> - let _ = - Agnostic_baker.liquidity_baking_votefile ~path:default_votefile On - in - let votefile = Agnostic_baker.liquidity_baking_votefile Off in + let _ = Baker.liquidity_baking_votefile ~path:default_votefile On in + let votefile = Baker.liquidity_baking_votefile Off in run_vote_file ~votefile baker >|= check_vote_success ~__LOC__ Off in diff --git a/tezt/tests/nonce_seed_revelation.ml b/tezt/tests/nonce_seed_revelation.ml index 35b179257a58..185c3654b8d7 100644 --- a/tezt/tests/nonce_seed_revelation.ml +++ b/tezt/tests/nonce_seed_revelation.ml @@ -98,7 +98,7 @@ let test_nonce_seed_revelation = (fun i node -> let* client = Client.init ~endpoint:(Node node) () in let delegates = [Account.Bootstrap.keys.(i).alias] in - Agnostic_baker.init ~delegates node client) + Baker.init ~delegates node client) nodes in let* () = @@ -114,7 +114,7 @@ let test_nonce_seed_revelation = (* Wait until target level is reached *) let* () = cycle_two_promise in (* No need to bake further *) - let* () = Lwt_list.iter_p Agnostic_baker.terminate bakers in + let* () = Lwt_list.iter_p Baker.terminate bakers in Log.info "Get all blocks" ; (* Retrieve all blocks for two full cycles. *) let* blocks = @@ -248,7 +248,7 @@ let test_baking_nonce_migration = Array.to_list @@ Array.map (fun key -> Account.(key.alias)) Account.Bootstrap.keys in - let baker = Agnostic_baker.create ~delegates node client in + let baker = Baker.create ~delegates node client in (* Reduce the block per cycle to gain some time *) let blocks_per_cycle = 4 in @@ -276,9 +276,9 @@ let test_baking_nonce_migration = Log.info "Start the baker and wait for success migration nonces baker event" ; let successful_migration_event = - Agnostic_baker.wait_for baker "success_migrate_nonces.v0" Option.some + Baker.wait_for baker "success_migrate_nonces.v0" Option.some in - let* () = Agnostic_baker.run baker in + let* () = Baker.run baker in let* _ = successful_migration_event in @@ -286,7 +286,7 @@ let test_baking_nonce_migration = "Bake until the level: %d (end of the second cycle) then kill the baker" target_level ; let* _ = target_level_promise in - let* () = Agnostic_baker.kill baker in + let* () = Baker.kill baker in Log.info "Retrieve the nonce file contents" ; let* chain_id = Client.RPC.call client @@ RPC.get_chain_chain_id () in @@ -307,9 +307,9 @@ let test_baking_nonce_migration = "Restart the baker until level: %d (end of the fifth cycle) then kill the \ baker" target_level ; - let* () = Agnostic_baker.run baker in + let* () = Baker.run baker in let* _ = target_level_promise in - let* () = Agnostic_baker.kill baker in + let* () = Baker.kill baker in Log.info "Concat old nonces contents with the new one" ; let new_nonces_contents = Base.read_file nonces_file in @@ -323,20 +323,20 @@ let test_baking_nonce_migration = "Restart the baker and wait for ignore failed nonce migration event then \ kill the baker" ; let failed_migration_event = - Agnostic_baker.wait_for baker "ignore_failed_nonce_migration.v0" Option.some + Baker.wait_for baker "ignore_failed_nonce_migration.v0" Option.some in - let* () = Agnostic_baker.run baker in + let* () = Baker.run baker in let* _ = failed_migration_event in - let* () = Agnostic_baker.kill baker in + let* () = Baker.kill baker in Log.info "Remove old nonces contents from nonces file" ; let () = Base.write_file nonces_file ~contents:new_nonces_contents in Log.info "Restart the baker and wait for success migrate nonces event" ; let successful_migration_event = - Agnostic_baker.wait_for baker "success_migrate_nonces.v0" Option.some + Baker.wait_for baker "success_migrate_nonces.v0" Option.some in - let* () = Agnostic_baker.run baker in + let* () = Baker.run baker in let* _ = successful_migration_event in unit diff --git a/tezt/tests/protocol_migration.ml b/tezt/tests/protocol_migration.ml index c47a5a857c31..f86230bed7e7 100644 --- a/tezt/tests/protocol_migration.ml +++ b/tezt/tests/protocol_migration.ml @@ -571,7 +571,7 @@ let test_migration_with_bakers ?(migration_level = 4) in Log.info "Launching an agnostic baker" ; let* _agnostic_baker = - Agnostic_baker.init ~name:"agnostic_baker" node client ~delegates + Baker.init ~name:"agnostic_baker" node client ~delegates in let* _ret = Node.wait_for_level node migration_level in let* () = @@ -778,9 +778,9 @@ let test_forked_migration_manual ?(migration_level = 4) (Protocol.name migrate_to) ; let* () = connect cn1 cn2 in - let* baker_1 = Agnostic_baker.init ~delegates:delegates_1 node_1 client_1 in + let* baker_1 = Baker.init ~delegates:delegates_1 node_1 client_1 in - let* baker_2 = Agnostic_baker.init ~delegates:delegates_2 node_2 client_2 in + let* baker_2 = Baker.init ~delegates:delegates_2 node_2 client_2 in let until_level = migration_level + num_blocks_post_migration in Log.info "Waiting to reach level %d" until_level ; @@ -789,8 +789,8 @@ let test_forked_migration_manual ?(migration_level = 4) check_adaptive_issuance_launch_cycle ~loc:__LOC__ ~migrate_from client_1 in - let* () = Agnostic_baker.terminate baker_1 in - let* () = Agnostic_baker.terminate baker_2 in + let* () = Baker.terminate baker_1 in + let* () = Baker.terminate baker_2 in unit (** Wait for a quorum event on a proposal at the given [level]. @@ -810,7 +810,7 @@ let wait_for_qc_at_level baker level = let where = sf "level = %d" level in let level_seen = ref false in let proposal_waiter = - Agnostic_baker.wait_for baker "new_valid_proposal.v0" ~where (fun json -> + Baker.wait_for baker "new_valid_proposal.v0" ~where (fun json -> let proposal_level = JSON.(json |-> "level" |> as_int) in if proposal_level = level then ( level_seen := true ; @@ -823,7 +823,7 @@ let wait_for_qc_at_level baker level = else None) in Background.register proposal_waiter ; - Agnostic_baker.wait_for baker "qc_reached.v0" ~where (fun (_ : JSON.t) -> + Baker.wait_for baker "qc_reached.v0" ~where (fun (_ : JSON.t) -> if !level_seen then Some () else None) let get_block_at_level level client = @@ -832,7 +832,7 @@ let get_block_at_level level client = (RPC.get_chain_block ~version:"1" ~block:(string_of_int level) ()) let wait_for_post_migration_proposal baker post_migration_level = - Agnostic_baker.wait_for baker "new_valid_proposal.v0" (fun json -> + Baker.wait_for baker "new_valid_proposal.v0" (fun json -> let level = JSON.(json |-> "level" |> as_int) in if level = post_migration_level then Some () else if level > post_migration_level then @@ -905,8 +905,8 @@ let test_forked_migration_bakers ~migrate_from ~migrate_to = let agnostic_baker (node, client, delegates) = let name = sf "agnostic_baker_%s" (Node.name node) in Log.info "Start %s for %a." name pp_delegates delegates ; - let* baker = Agnostic_baker.init ~name ~delegates node client in - Agnostic_baker.log_block_injection ~color:Log.Color.FG.yellow baker ; + let* baker = Baker.init ~name ~delegates node client in + Baker.log_block_injection ~color:Log.Color.FG.yellow baker ; return baker in diff --git a/tezt/tests/signer_test.ml b/tezt/tests/signer_test.ml index 7a36dff174ed..bf4e4d231dc2 100644 --- a/tezt/tests/signer_test.ml +++ b/tezt/tests/signer_test.ml @@ -62,7 +62,7 @@ let signer_test protocol ~keys = in let level_2_promise = Node.wait_for_level node 2 in let level_3_promise = Node.wait_for_level node 3 in - let* _baker = Agnostic_baker.init node client in + let* _baker = Baker.init node client in let* _ = level_2_promise in Log.info "New head arrive level 2" ; let* _ = level_3_promise in diff --git a/tezt/tests/synchronisation_heuristic.ml b/tezt/tests/synchronisation_heuristic.ml index cf95bc406a69..9998fff4937e 100644 --- a/tezt/tests/synchronisation_heuristic.ml +++ b/tezt/tests/synchronisation_heuristic.ml @@ -244,7 +244,7 @@ let test_threshold_zero = ~timestamp:Now () in - let* _ = Agnostic_baker.init node client in + let* _ = Baker.init node client in Log.info "Check that the node is bootstrapped" ; let* () = check_sync_state client Synced in @@ -281,7 +281,7 @@ let test_threshold_one = ~timestamp:Now () in - let* baker = Agnostic_baker.init node client in + let* baker = Baker.init node client in Log.info "Check synchronisation state of first peer" ; let* () = check_sync_state client Synced in @@ -295,7 +295,7 @@ let test_threshold_one = in let* () = Client.Admin.connect_address client ~peer:node1 in let* _ = Node.wait_for_level node 2 in - let* () = Agnostic_baker.kill baker in + let* () = Baker.kill baker in Log.info "Check bootstrapped state of second peer" ; let* () = Client.bootstrapped client1 in @@ -321,7 +321,7 @@ let test_threshold_two = ~timestamp:Now () in - let* baker = Agnostic_baker.init node client in + let* baker = Baker.init node client in Log.info "Add nodes and connect in clique" ; @@ -363,7 +363,7 @@ let test_threshold_two = unit) [node; node1; node2; node3] in - let* () = Agnostic_baker.kill baker in + let* () = Baker.kill baker in let* () = Client.bootstrapped client in let* () = Client.bootstrapped client1 in @@ -395,12 +395,12 @@ let test_threshold_stuck = ~timestamp:Now () in - let* baker = Agnostic_baker.init node client in + let* baker = Baker.init node client in Log.info "Bake a few blocks and kill baker" ; let* current_level = Node.get_level node in let* (level : int) = Node.wait_for_level node (current_level + 3) in - let* () = Agnostic_baker.terminate baker in + let* () = Baker.terminate baker in Log.info "Add two additional peers" ; let* node1, client1 = @@ -474,7 +474,7 @@ let test_threshold_split_view = ~timestamp:Now () in - let* _ = Agnostic_baker.init node client in + let* _ = Baker.init node client in let* () = connect_clique client [node; node1; node2] in Log.info "Test that all nodes bootstrap" ; @@ -538,7 +538,7 @@ let test_many_nodes_bootstrap = ~timestamp:Now () in - let* _ = Agnostic_baker.init node client in + let* _ = Baker.init node client in let* node1, client1 = Client.init_with_protocol ~nodes_args: diff --git a/tezt/tests/voting.ml b/tezt/tests/voting.ml index bb683ae9e120..ac8b4d0ae122 100644 --- a/tezt/tests/voting.ml +++ b/tezt/tests/voting.ml @@ -1221,7 +1221,7 @@ let test_user_activated_protocol_override_baker_vote ~from_protocol ~to_protocol Node.wait_for_level node (expected_level_of_next_proposal + good_measure) in - let* _ = Agnostic_baker.init node client in + let* _ = Baker.init node client in (* We also start an accuser for the [to_protocol] protocol. After the protocol switch, we verify that it starts registering blocks. *) -- GitLab From f6bdf06a75fffe52c01427b572e8675ebfe9aae5 Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Fri, 25 Apr 2025 11:17:20 +0300 Subject: [PATCH 02/15] Agnostic_baker: Rename lib_agnostic_baker to lib_agnostic --- manifest/product_octez.ml | 14 +++++++------- opam/octez-baker-lib.opam | 2 +- src/bin_agnostic_accuser/dune | 2 +- src/bin_agnostic_baker/dune | 2 +- .../agnostic_baker_config.ml | 0 .../agnostic_baker_profiler.ml | 0 .../agnostic_baker_profiler.mli | 0 src/{lib_agnostic_baker => lib_baker}/commands.ml | 0 src/{lib_agnostic_baker => lib_baker}/commands.mli | 0 .../configuration.ml | 0 .../configuration.mli | 0 src/{lib_agnostic_baker => lib_baker}/daemon.ml | 0 src/{lib_agnostic_baker => lib_baker}/daemon.mli | 0 src/{lib_agnostic_baker => lib_baker}/dune | 2 +- src/{lib_agnostic_baker => lib_baker}/errors.ml | 0 src/{lib_agnostic_baker => lib_baker}/events.ml | 0 .../parameters.ml | 0 .../parameters.mli | 0 .../protocol_plugin_sig.ml | 0 .../protocol_plugins.ml | 0 .../protocol_plugins.mli | 0 .../rpc_services.ml | 0 .../rpc_services.mli | 0 src/{lib_agnostic_baker => lib_baker}/run_args.ml | 0 src/{lib_agnostic_baker => lib_baker}/run_args.mli | 0 src/proto_021_PsQuebec/lib_agnostic_baker/dune | 2 +- src/proto_022_PsRiotum/lib_agnostic_baker/dune | 2 +- src/proto_alpha/lib_agnostic_baker/dune | 2 +- tobi/config | 2 +- 29 files changed, 15 insertions(+), 15 deletions(-) rename src/{lib_agnostic_baker => lib_baker}/agnostic_baker_config.ml (100%) rename src/{lib_agnostic_baker => lib_baker}/agnostic_baker_profiler.ml (100%) rename src/{lib_agnostic_baker => lib_baker}/agnostic_baker_profiler.mli (100%) rename src/{lib_agnostic_baker => lib_baker}/commands.ml (100%) rename src/{lib_agnostic_baker => lib_baker}/commands.mli (100%) rename src/{lib_agnostic_baker => lib_baker}/configuration.ml (100%) rename src/{lib_agnostic_baker => lib_baker}/configuration.mli (100%) rename src/{lib_agnostic_baker => lib_baker}/daemon.ml (100%) rename src/{lib_agnostic_baker => lib_baker}/daemon.mli (100%) rename src/{lib_agnostic_baker => lib_baker}/dune (96%) rename src/{lib_agnostic_baker => lib_baker}/errors.ml (100%) rename src/{lib_agnostic_baker => lib_baker}/events.ml (100%) rename src/{lib_agnostic_baker => lib_baker}/parameters.ml (100%) rename src/{lib_agnostic_baker => lib_baker}/parameters.mli (100%) rename src/{lib_agnostic_baker => lib_baker}/protocol_plugin_sig.ml (100%) rename src/{lib_agnostic_baker => lib_baker}/protocol_plugins.ml (100%) rename src/{lib_agnostic_baker => lib_baker}/protocol_plugins.mli (100%) rename src/{lib_agnostic_baker => lib_baker}/rpc_services.ml (100%) rename src/{lib_agnostic_baker => lib_baker}/rpc_services.mli (100%) rename src/{lib_agnostic_baker => lib_baker}/run_args.ml (100%) rename src/{lib_agnostic_baker => lib_baker}/run_args.mli (100%) diff --git a/manifest/product_octez.ml b/manifest/product_octez.ml index 4d6f70b823ed..63d610df69f7 100644 --- a/manifest/product_octez.ml +++ b/manifest/product_octez.ml @@ -5649,13 +5649,13 @@ let _octez_scoru_wasm_fast_tests = ] ~preprocess:(staged_pps [ppx_import; ppx_deriving_show]) -let octez_agnostic_baker_lib = +let octez_baker_lib = let (PPX {preprocess; preprocessor_deps}) = ppx_profiler in public_lib "octez-baker-lib" - ~path:"src/lib_agnostic_baker" - ~internal_name:"octez_agnostic_baker" - ~synopsis:"Octez: library for Agnostic Baker" + ~path:"src/lib_baker" + ~internal_name:"octez_baker" + ~synopsis:"Octez: library for Baker" ~preprocess ~preprocessor_deps ~deps: @@ -7492,7 +7492,7 @@ let hash = Protocol.hash main |> open_; baking |> if_some |> open_; baking_commands |> if_some |> open_; - octez_agnostic_baker_lib |> open_; + octez_baker_lib |> open_; ] ~linkall:true in @@ -8580,7 +8580,7 @@ let _octez_agnostic_baker = octez_base |> open_ ~m:"TzPervasives" |> open_; octez_base_unix |> open_; octez_client_base_unix |> open_; - octez_agnostic_baker_lib |> open_; + octez_baker_lib |> open_; octez_profiler |> open_; ] @ protocol_deps) @@ -8615,7 +8615,7 @@ let _octez_agnostic_accuser = octez_base |> open_ ~m:"TzPervasives" |> open_; octez_base_unix |> open_; octez_client_base_unix |> open_; - octez_agnostic_baker_lib |> open_; + octez_baker_lib |> open_; ] @ protocol_deps) ~linkall:true diff --git a/opam/octez-baker-lib.opam b/opam/octez-baker-lib.opam index cc65dc7a4c24..21ffbd7f6c82 100644 --- a/opam/octez-baker-lib.opam +++ b/opam/octez-baker-lib.opam @@ -21,4 +21,4 @@ build: [ ["dune" "runtest" "-p" name "-j" jobs] {with-test} ] available: os-family != "windows" -synopsis: "Octez: library for Agnostic Baker" +synopsis: "Octez: library for Baker" diff --git a/src/bin_agnostic_accuser/dune b/src/bin_agnostic_accuser/dune index aa88c0d40ae7..b3758ef1f14a 100644 --- a/src/bin_agnostic_accuser/dune +++ b/src/bin_agnostic_accuser/dune @@ -31,7 +31,7 @@ -open Tezos_base -open Tezos_base_unix -open Tezos_client_base_unix - -open Octez_agnostic_baker)) + -open Octez_baker)) (rule (action diff --git a/src/bin_agnostic_baker/dune b/src/bin_agnostic_baker/dune index a46efe378b7c..3b6623de2594 100644 --- a/src/bin_agnostic_baker/dune +++ b/src/bin_agnostic_baker/dune @@ -32,7 +32,7 @@ -open Tezos_base -open Tezos_base_unix -open Tezos_client_base_unix - -open Octez_agnostic_baker + -open Octez_baker -open Tezos_profiler)) (rule diff --git a/src/lib_agnostic_baker/agnostic_baker_config.ml b/src/lib_baker/agnostic_baker_config.ml similarity index 100% rename from src/lib_agnostic_baker/agnostic_baker_config.ml rename to src/lib_baker/agnostic_baker_config.ml diff --git a/src/lib_agnostic_baker/agnostic_baker_profiler.ml b/src/lib_baker/agnostic_baker_profiler.ml similarity index 100% rename from src/lib_agnostic_baker/agnostic_baker_profiler.ml rename to src/lib_baker/agnostic_baker_profiler.ml diff --git a/src/lib_agnostic_baker/agnostic_baker_profiler.mli b/src/lib_baker/agnostic_baker_profiler.mli similarity index 100% rename from src/lib_agnostic_baker/agnostic_baker_profiler.mli rename to src/lib_baker/agnostic_baker_profiler.mli diff --git a/src/lib_agnostic_baker/commands.ml b/src/lib_baker/commands.ml similarity index 100% rename from src/lib_agnostic_baker/commands.ml rename to src/lib_baker/commands.ml diff --git a/src/lib_agnostic_baker/commands.mli b/src/lib_baker/commands.mli similarity index 100% rename from src/lib_agnostic_baker/commands.mli rename to src/lib_baker/commands.mli diff --git a/src/lib_agnostic_baker/configuration.ml b/src/lib_baker/configuration.ml similarity index 100% rename from src/lib_agnostic_baker/configuration.ml rename to src/lib_baker/configuration.ml diff --git a/src/lib_agnostic_baker/configuration.mli b/src/lib_baker/configuration.mli similarity index 100% rename from src/lib_agnostic_baker/configuration.mli rename to src/lib_baker/configuration.mli diff --git a/src/lib_agnostic_baker/daemon.ml b/src/lib_baker/daemon.ml similarity index 100% rename from src/lib_agnostic_baker/daemon.ml rename to src/lib_baker/daemon.ml diff --git a/src/lib_agnostic_baker/daemon.mli b/src/lib_baker/daemon.mli similarity index 100% rename from src/lib_agnostic_baker/daemon.mli rename to src/lib_baker/daemon.mli diff --git a/src/lib_agnostic_baker/dune b/src/lib_baker/dune similarity index 96% rename from src/lib_agnostic_baker/dune rename to src/lib_baker/dune index 8675d50e9fc5..18abc7e622c7 100644 --- a/src/lib_agnostic_baker/dune +++ b/src/lib_baker/dune @@ -2,7 +2,7 @@ ; Edit file manifest/main.ml instead. (library - (name octez_agnostic_baker) + (name octez_baker) (public_name octez-baker-lib) (instrumentation (backend bisect_ppx)) (libraries diff --git a/src/lib_agnostic_baker/errors.ml b/src/lib_baker/errors.ml similarity index 100% rename from src/lib_agnostic_baker/errors.ml rename to src/lib_baker/errors.ml diff --git a/src/lib_agnostic_baker/events.ml b/src/lib_baker/events.ml similarity index 100% rename from src/lib_agnostic_baker/events.ml rename to src/lib_baker/events.ml diff --git a/src/lib_agnostic_baker/parameters.ml b/src/lib_baker/parameters.ml similarity index 100% rename from src/lib_agnostic_baker/parameters.ml rename to src/lib_baker/parameters.ml diff --git a/src/lib_agnostic_baker/parameters.mli b/src/lib_baker/parameters.mli similarity index 100% rename from src/lib_agnostic_baker/parameters.mli rename to src/lib_baker/parameters.mli diff --git a/src/lib_agnostic_baker/protocol_plugin_sig.ml b/src/lib_baker/protocol_plugin_sig.ml similarity index 100% rename from src/lib_agnostic_baker/protocol_plugin_sig.ml rename to src/lib_baker/protocol_plugin_sig.ml diff --git a/src/lib_agnostic_baker/protocol_plugins.ml b/src/lib_baker/protocol_plugins.ml similarity index 100% rename from src/lib_agnostic_baker/protocol_plugins.ml rename to src/lib_baker/protocol_plugins.ml diff --git a/src/lib_agnostic_baker/protocol_plugins.mli b/src/lib_baker/protocol_plugins.mli similarity index 100% rename from src/lib_agnostic_baker/protocol_plugins.mli rename to src/lib_baker/protocol_plugins.mli diff --git a/src/lib_agnostic_baker/rpc_services.ml b/src/lib_baker/rpc_services.ml similarity index 100% rename from src/lib_agnostic_baker/rpc_services.ml rename to src/lib_baker/rpc_services.ml diff --git a/src/lib_agnostic_baker/rpc_services.mli b/src/lib_baker/rpc_services.mli similarity index 100% rename from src/lib_agnostic_baker/rpc_services.mli rename to src/lib_baker/rpc_services.mli diff --git a/src/lib_agnostic_baker/run_args.ml b/src/lib_baker/run_args.ml similarity index 100% rename from src/lib_agnostic_baker/run_args.ml rename to src/lib_baker/run_args.ml diff --git a/src/lib_agnostic_baker/run_args.mli b/src/lib_baker/run_args.mli similarity index 100% rename from src/lib_agnostic_baker/run_args.mli rename to src/lib_baker/run_args.mli diff --git a/src/proto_021_PsQuebec/lib_agnostic_baker/dune b/src/proto_021_PsQuebec/lib_agnostic_baker/dune index ade998a4e4cf..138620b07036 100644 --- a/src/proto_021_PsQuebec/lib_agnostic_baker/dune +++ b/src/proto_021_PsQuebec/lib_agnostic_baker/dune @@ -20,4 +20,4 @@ -open Tezos_protocol_021_PsQuebec -open Tezos_baking_021_PsQuebec -open Tezos_baking_021_PsQuebec_commands - -open Octez_agnostic_baker)) + -open Octez_baker)) diff --git a/src/proto_022_PsRiotum/lib_agnostic_baker/dune b/src/proto_022_PsRiotum/lib_agnostic_baker/dune index f1532f1d111c..7083900be6ae 100644 --- a/src/proto_022_PsRiotum/lib_agnostic_baker/dune +++ b/src/proto_022_PsRiotum/lib_agnostic_baker/dune @@ -20,4 +20,4 @@ -open Tezos_protocol_022_PsRiotum -open Tezos_baking_022_PsRiotum -open Tezos_baking_022_PsRiotum_commands - -open Octez_agnostic_baker)) + -open Octez_baker)) diff --git a/src/proto_alpha/lib_agnostic_baker/dune b/src/proto_alpha/lib_agnostic_baker/dune index 9f441e2c15ff..909822032eac 100644 --- a/src/proto_alpha/lib_agnostic_baker/dune +++ b/src/proto_alpha/lib_agnostic_baker/dune @@ -20,4 +20,4 @@ -open Tezos_protocol_alpha -open Tezos_baking_alpha -open Tezos_baking_alpha_commands - -open Octez_agnostic_baker)) + -open Octez_baker)) diff --git a/tobi/config b/tobi/config index d335fa553f95..484bf870d42c 100644 --- a/tobi/config +++ b/tobi/config @@ -56,7 +56,7 @@ octez-baker: src/bin_agnostic_baker octez-baker-PsQuebec: src/proto_021_PsQuebec/bin_baker octez-baker-PsRiotum: src/proto_022_PsRiotum/bin_baker octez-baker-alpha: src/proto_alpha/bin_baker -octez-baker-lib: src/lib_agnostic_baker +octez-baker-lib: src/lib_baker octez-client: src/bin_client octez-codec: src/bin_codec octez-codec-kaitai: client-libs/bin_codec_kaitai -- GitLab From a9feea0dedc30838770d7f68e2792083ef7cfc44 Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Fri, 25 Apr 2025 11:25:27 +0300 Subject: [PATCH 03/15] Agnostic_baker: Rename lib_agnostic_baker to lib_agnostic in proto libraries --- manifest/product_octez.ml | 30 +++++++++---------- src/bin_agnostic_accuser/dune | 12 ++++---- src/bin_agnostic_baker/dune | 12 ++++---- .../accuser_commands_helpers.ml | 0 .../agnostic_baker_plugin.ml | 0 .../baker_args_parser.ml | 0 .../baker_args_parser.mli | 0 .../baker_commands_helpers.ml | 0 .../baker_commands_helpers.mli | 0 .../{lib_agnostic_baker => lib_baker}/dune | 4 +-- src/proto_021_PsQuebec/lib_plugin/index.mld | 2 +- .../accuser_commands_helpers.ml | 0 .../agnostic_baker_plugin.ml | 0 .../baker_args_parser.ml | 0 .../baker_args_parser.mli | 0 .../baker_commands_helpers.ml | 0 .../baker_commands_helpers.mli | 0 .../{lib_agnostic_baker => lib_baker}/dune | 4 +-- src/proto_022_PsRiotum/lib_plugin/index.mld | 2 +- .../accuser_commands_helpers.ml | 0 .../agnostic_baker_plugin.ml | 0 .../baker_args_parser.ml | 0 .../baker_args_parser.mli | 0 .../baker_commands_helpers.ml | 0 .../baker_commands_helpers.mli | 0 .../{lib_agnostic_baker => lib_baker}/dune | 4 +-- src/proto_alpha/lib_plugin/index.mld | 2 +- tobi/config | 6 ++-- 28 files changed, 39 insertions(+), 39 deletions(-) rename src/proto_021_PsQuebec/{lib_agnostic_baker => lib_baker}/accuser_commands_helpers.ml (100%) rename src/proto_021_PsQuebec/{lib_agnostic_baker => lib_baker}/agnostic_baker_plugin.ml (100%) rename src/proto_021_PsQuebec/{lib_agnostic_baker => lib_baker}/baker_args_parser.ml (100%) rename src/proto_021_PsQuebec/{lib_agnostic_baker => lib_baker}/baker_args_parser.mli (100%) rename src/proto_021_PsQuebec/{lib_agnostic_baker => lib_baker}/baker_commands_helpers.ml (100%) rename src/proto_021_PsQuebec/{lib_agnostic_baker => lib_baker}/baker_commands_helpers.mli (100%) rename src/proto_021_PsQuebec/{lib_agnostic_baker => lib_baker}/dune (85%) rename src/proto_022_PsRiotum/{lib_agnostic_baker => lib_baker}/accuser_commands_helpers.ml (100%) rename src/proto_022_PsRiotum/{lib_agnostic_baker => lib_baker}/agnostic_baker_plugin.ml (100%) rename src/proto_022_PsRiotum/{lib_agnostic_baker => lib_baker}/baker_args_parser.ml (100%) rename src/proto_022_PsRiotum/{lib_agnostic_baker => lib_baker}/baker_args_parser.mli (100%) rename src/proto_022_PsRiotum/{lib_agnostic_baker => lib_baker}/baker_commands_helpers.ml (100%) rename src/proto_022_PsRiotum/{lib_agnostic_baker => lib_baker}/baker_commands_helpers.mli (100%) rename src/proto_022_PsRiotum/{lib_agnostic_baker => lib_baker}/dune (85%) rename src/proto_alpha/{lib_agnostic_baker => lib_baker}/accuser_commands_helpers.ml (100%) rename src/proto_alpha/{lib_agnostic_baker => lib_baker}/agnostic_baker_plugin.ml (100%) rename src/proto_alpha/{lib_agnostic_baker => lib_baker}/baker_args_parser.ml (100%) rename src/proto_alpha/{lib_agnostic_baker => lib_baker}/baker_args_parser.mli (100%) rename src/proto_alpha/{lib_agnostic_baker => lib_baker}/baker_commands_helpers.ml (100%) rename src/proto_alpha/{lib_agnostic_baker => lib_baker}/baker_commands_helpers.mli (100%) rename src/proto_alpha/{lib_agnostic_baker => lib_baker}/dune (86%) diff --git a/manifest/product_octez.ml b/manifest/product_octez.ml index 63d610df69f7..008e0c9e58c4 100644 --- a/manifest/product_octez.ml +++ b/manifest/product_octez.ml @@ -5720,7 +5720,7 @@ module Protocol : sig val dal : t -> target option - val agnostic_baker : t -> target option + val baker : t -> target option val parameters : t -> target option @@ -5836,7 +5836,7 @@ end = struct plugin : target option; plugin_registerer : target option; dal : target option; - agnostic_baker : target option; + baker : target option; test_helpers : target option; parameters : target option; benchmarks_proto : target option; @@ -5847,10 +5847,10 @@ end = struct } let make ?client ?client_commands ?client_commands_registration - ?baking_commands_registration ?plugin ?plugin_registerer ?dal - ?agnostic_baker ?test_helpers ?parameters ?benchmarks_proto - ?octez_sc_rollup ?octez_sc_rollup_node ?octez_injector ?baking ~status - ~name ~main ~embedded () = + ?baking_commands_registration ?plugin ?plugin_registerer ?dal ?baker + ?test_helpers ?parameters ?benchmarks_proto ?octez_sc_rollup + ?octez_sc_rollup_node ?octez_injector ?baking ~status ~name ~main + ~embedded () = { status; name; @@ -5863,7 +5863,7 @@ end = struct plugin; plugin_registerer; dal; - agnostic_baker; + baker; test_helpers; parameters; benchmarks_proto; @@ -5926,7 +5926,7 @@ end = struct let dal p = p.dal - let agnostic_baker p = p.agnostic_baker + let baker p = p.baker let parameters p = p.parameters @@ -7478,12 +7478,12 @@ let hash = Protocol.hash alcotezt; ] in - let agnostic_baker = + let baker = only_if (active && N.(number >= 021)) @@ fun () -> octez_protocol_lib - "agnostic-baker" - ~internal_name:(sf "tezos_agnostic_baker_%s" name_dash) - ~path:(path // "lib_agnostic_baker") + "baker" + ~internal_name:(sf "tezos_baker_%s" name_dash) + ~path:(path // "lib_baker") ~synopsis:"Protocol specific library for the Agnostic Baker" ~deps: [ @@ -7824,7 +7824,7 @@ let hash = Protocol.hash ?plugin ?plugin_registerer ?dal - ?agnostic_baker + ?baker ?test_helpers ?parameters ?benchmarks_proto @@ -8560,7 +8560,7 @@ let _octez_agnostic_baker = | Active, V _ -> false | (Frozen | Overridden | Not_mainnet), _ | Active, (Dev | Other) -> true in - let targets = List.filter_map Fun.id [Protocol.agnostic_baker protocol] in + let targets = List.filter_map Fun.id [Protocol.baker protocol] in if is_optional then List.map optional targets else targets in List.map deps_for_protocol Protocol.all |> List.flatten @@ -8595,7 +8595,7 @@ let _octez_agnostic_accuser = | Active, V _ -> false | (Frozen | Overridden | Not_mainnet), _ | Active, (Dev | Other) -> true in - let targets = List.filter_map Fun.id [Protocol.agnostic_baker protocol] in + let targets = List.filter_map Fun.id [Protocol.baker protocol] in if is_optional then List.map optional targets else targets in List.map deps_for_protocol Protocol.all |> List.flatten diff --git a/src/bin_agnostic_accuser/dune b/src/bin_agnostic_accuser/dune index b3758ef1f14a..93bd35e068ef 100644 --- a/src/bin_agnostic_accuser/dune +++ b/src/bin_agnostic_accuser/dune @@ -13,11 +13,11 @@ octez-libs.base.unix octez-shell-libs.client-base-unix octez-baker-lib - octez-protocol-021-PsQuebec-libs.agnostic-baker - octez-protocol-022-PsRiotum-libs.agnostic-baker - (select void_for_linking-octez-protocol-alpha-libs-agnostic-baker from - (octez-protocol-alpha-libs.agnostic-baker -> void_for_linking-octez-protocol-alpha-libs-agnostic-baker.empty) - (-> void_for_linking-octez-protocol-alpha-libs-agnostic-baker.empty))) + octez-protocol-021-PsQuebec-libs.baker + octez-protocol-022-PsRiotum-libs.baker + (select void_for_linking-octez-protocol-alpha-libs-baker from + (octez-protocol-alpha-libs.baker -> void_for_linking-octez-protocol-alpha-libs-baker.empty) + (-> void_for_linking-octez-protocol-alpha-libs-baker.empty))) (preprocess (pps octez-libs.ppx_profiler)) (preprocessor_deps (env_var TEZOS_PPX_PROFILER)) (link_flags @@ -36,4 +36,4 @@ (rule (action (progn - (write-file void_for_linking-octez-protocol-alpha-libs-agnostic-baker.empty "")))) + (write-file void_for_linking-octez-protocol-alpha-libs-baker.empty "")))) diff --git a/src/bin_agnostic_baker/dune b/src/bin_agnostic_baker/dune index 3b6623de2594..f084a8bff243 100644 --- a/src/bin_agnostic_baker/dune +++ b/src/bin_agnostic_baker/dune @@ -14,11 +14,11 @@ octez-shell-libs.client-base-unix octez-baker-lib octez-libs.octez-profiler - octez-protocol-021-PsQuebec-libs.agnostic-baker - octez-protocol-022-PsRiotum-libs.agnostic-baker - (select void_for_linking-octez-protocol-alpha-libs-agnostic-baker from - (octez-protocol-alpha-libs.agnostic-baker -> void_for_linking-octez-protocol-alpha-libs-agnostic-baker.empty) - (-> void_for_linking-octez-protocol-alpha-libs-agnostic-baker.empty))) + octez-protocol-021-PsQuebec-libs.baker + octez-protocol-022-PsRiotum-libs.baker + (select void_for_linking-octez-protocol-alpha-libs-baker from + (octez-protocol-alpha-libs.baker -> void_for_linking-octez-protocol-alpha-libs-baker.empty) + (-> void_for_linking-octez-protocol-alpha-libs-baker.empty))) (preprocess (pps octez-libs.ppx_profiler)) (preprocessor_deps (env_var TEZOS_PPX_PROFILER)) (link_flags @@ -38,4 +38,4 @@ (rule (action (progn - (write-file void_for_linking-octez-protocol-alpha-libs-agnostic-baker.empty "")))) + (write-file void_for_linking-octez-protocol-alpha-libs-baker.empty "")))) diff --git a/src/proto_021_PsQuebec/lib_agnostic_baker/accuser_commands_helpers.ml b/src/proto_021_PsQuebec/lib_baker/accuser_commands_helpers.ml similarity index 100% rename from src/proto_021_PsQuebec/lib_agnostic_baker/accuser_commands_helpers.ml rename to src/proto_021_PsQuebec/lib_baker/accuser_commands_helpers.ml diff --git a/src/proto_021_PsQuebec/lib_agnostic_baker/agnostic_baker_plugin.ml b/src/proto_021_PsQuebec/lib_baker/agnostic_baker_plugin.ml similarity index 100% rename from src/proto_021_PsQuebec/lib_agnostic_baker/agnostic_baker_plugin.ml rename to src/proto_021_PsQuebec/lib_baker/agnostic_baker_plugin.ml diff --git a/src/proto_021_PsQuebec/lib_agnostic_baker/baker_args_parser.ml b/src/proto_021_PsQuebec/lib_baker/baker_args_parser.ml similarity index 100% rename from src/proto_021_PsQuebec/lib_agnostic_baker/baker_args_parser.ml rename to src/proto_021_PsQuebec/lib_baker/baker_args_parser.ml diff --git a/src/proto_021_PsQuebec/lib_agnostic_baker/baker_args_parser.mli b/src/proto_021_PsQuebec/lib_baker/baker_args_parser.mli similarity index 100% rename from src/proto_021_PsQuebec/lib_agnostic_baker/baker_args_parser.mli rename to src/proto_021_PsQuebec/lib_baker/baker_args_parser.mli diff --git a/src/proto_021_PsQuebec/lib_agnostic_baker/baker_commands_helpers.ml b/src/proto_021_PsQuebec/lib_baker/baker_commands_helpers.ml similarity index 100% rename from src/proto_021_PsQuebec/lib_agnostic_baker/baker_commands_helpers.ml rename to src/proto_021_PsQuebec/lib_baker/baker_commands_helpers.ml diff --git a/src/proto_021_PsQuebec/lib_agnostic_baker/baker_commands_helpers.mli b/src/proto_021_PsQuebec/lib_baker/baker_commands_helpers.mli similarity index 100% rename from src/proto_021_PsQuebec/lib_agnostic_baker/baker_commands_helpers.mli rename to src/proto_021_PsQuebec/lib_baker/baker_commands_helpers.mli diff --git a/src/proto_021_PsQuebec/lib_agnostic_baker/dune b/src/proto_021_PsQuebec/lib_baker/dune similarity index 85% rename from src/proto_021_PsQuebec/lib_agnostic_baker/dune rename to src/proto_021_PsQuebec/lib_baker/dune index 138620b07036..fc4951f72bfa 100644 --- a/src/proto_021_PsQuebec/lib_agnostic_baker/dune +++ b/src/proto_021_PsQuebec/lib_baker/dune @@ -2,8 +2,8 @@ ; Edit file manifest/main.ml instead. (library - (name tezos_agnostic_baker_021_PsQuebec) - (public_name octez-protocol-021-PsQuebec-libs.agnostic-baker) + (name tezos_baker_021_PsQuebec) + (public_name octez-protocol-021-PsQuebec-libs.baker) (instrumentation (backend bisect_ppx)) (libraries octez-libs.base diff --git a/src/proto_021_PsQuebec/lib_plugin/index.mld b/src/proto_021_PsQuebec/lib_plugin/index.mld index 85f6a5a73ef3..24d32b703760 100644 --- a/src/proto_021_PsQuebec/lib_plugin/index.mld +++ b/src/proto_021_PsQuebec/lib_plugin/index.mld @@ -5,7 +5,7 @@ This is a package containing some libraries related to the Tezos 021-PsQuebec pr It contains the following libraries: - {{!module-Tezos_021_PsQuebec_test_helpers}Tezos_021_PsQuebec_test_helpers}: Protocol testing framework -- {{!module-Tezos_agnostic_baker_021_PsQuebec}Tezos_agnostic_baker_021_PsQuebec}: Protocol specific library for the Agnostic Baker +- {{!module-Tezos_baker_021_PsQuebec}Tezos_baker_021_PsQuebec}: Protocol specific library for the Agnostic Baker - {{!module-Tezos_baking_021_PsQuebec}Tezos_baking_021_PsQuebec}: Base library for `tezos-baker/accuser` - {{!module-Tezos_baking_021_PsQuebec_commands}Tezos_baking_021_PsQuebec_commands}: Protocol-specific commands for baking - {{!module-Tezos_client_021_PsQuebec}Tezos_client_021_PsQuebec}: Protocol specific library for `octez-client` diff --git a/src/proto_022_PsRiotum/lib_agnostic_baker/accuser_commands_helpers.ml b/src/proto_022_PsRiotum/lib_baker/accuser_commands_helpers.ml similarity index 100% rename from src/proto_022_PsRiotum/lib_agnostic_baker/accuser_commands_helpers.ml rename to src/proto_022_PsRiotum/lib_baker/accuser_commands_helpers.ml diff --git a/src/proto_022_PsRiotum/lib_agnostic_baker/agnostic_baker_plugin.ml b/src/proto_022_PsRiotum/lib_baker/agnostic_baker_plugin.ml similarity index 100% rename from src/proto_022_PsRiotum/lib_agnostic_baker/agnostic_baker_plugin.ml rename to src/proto_022_PsRiotum/lib_baker/agnostic_baker_plugin.ml diff --git a/src/proto_022_PsRiotum/lib_agnostic_baker/baker_args_parser.ml b/src/proto_022_PsRiotum/lib_baker/baker_args_parser.ml similarity index 100% rename from src/proto_022_PsRiotum/lib_agnostic_baker/baker_args_parser.ml rename to src/proto_022_PsRiotum/lib_baker/baker_args_parser.ml diff --git a/src/proto_022_PsRiotum/lib_agnostic_baker/baker_args_parser.mli b/src/proto_022_PsRiotum/lib_baker/baker_args_parser.mli similarity index 100% rename from src/proto_022_PsRiotum/lib_agnostic_baker/baker_args_parser.mli rename to src/proto_022_PsRiotum/lib_baker/baker_args_parser.mli diff --git a/src/proto_022_PsRiotum/lib_agnostic_baker/baker_commands_helpers.ml b/src/proto_022_PsRiotum/lib_baker/baker_commands_helpers.ml similarity index 100% rename from src/proto_022_PsRiotum/lib_agnostic_baker/baker_commands_helpers.ml rename to src/proto_022_PsRiotum/lib_baker/baker_commands_helpers.ml diff --git a/src/proto_022_PsRiotum/lib_agnostic_baker/baker_commands_helpers.mli b/src/proto_022_PsRiotum/lib_baker/baker_commands_helpers.mli similarity index 100% rename from src/proto_022_PsRiotum/lib_agnostic_baker/baker_commands_helpers.mli rename to src/proto_022_PsRiotum/lib_baker/baker_commands_helpers.mli diff --git a/src/proto_022_PsRiotum/lib_agnostic_baker/dune b/src/proto_022_PsRiotum/lib_baker/dune similarity index 85% rename from src/proto_022_PsRiotum/lib_agnostic_baker/dune rename to src/proto_022_PsRiotum/lib_baker/dune index 7083900be6ae..b93d92258107 100644 --- a/src/proto_022_PsRiotum/lib_agnostic_baker/dune +++ b/src/proto_022_PsRiotum/lib_baker/dune @@ -2,8 +2,8 @@ ; Edit file manifest/main.ml instead. (library - (name tezos_agnostic_baker_022_PsRiotum) - (public_name octez-protocol-022-PsRiotum-libs.agnostic-baker) + (name tezos_baker_022_PsRiotum) + (public_name octez-protocol-022-PsRiotum-libs.baker) (instrumentation (backend bisect_ppx)) (libraries octez-libs.base diff --git a/src/proto_022_PsRiotum/lib_plugin/index.mld b/src/proto_022_PsRiotum/lib_plugin/index.mld index fb9418b42a37..74c73df97139 100644 --- a/src/proto_022_PsRiotum/lib_plugin/index.mld +++ b/src/proto_022_PsRiotum/lib_plugin/index.mld @@ -5,7 +5,7 @@ This is a package containing some libraries related to the Tezos 022-PsRiotum pr It contains the following libraries: - {{!module-Tezos_022_PsRiotum_test_helpers}Tezos_022_PsRiotum_test_helpers}: Protocol testing framework -- {{!module-Tezos_agnostic_baker_022_PsRiotum}Tezos_agnostic_baker_022_PsRiotum}: Protocol specific library for the Agnostic Baker +- {{!module-Tezos_baker_022_PsRiotum}Tezos_baker_022_PsRiotum}: Protocol specific library for the Agnostic Baker - {{!module-Tezos_baking_022_PsRiotum}Tezos_baking_022_PsRiotum}: Base library for `tezos-baker/accuser` - {{!module-Tezos_baking_022_PsRiotum_commands}Tezos_baking_022_PsRiotum_commands}: Protocol-specific commands for baking - {{!module-Tezos_client_022_PsRiotum}Tezos_client_022_PsRiotum}: Protocol specific library for `octez-client` diff --git a/src/proto_alpha/lib_agnostic_baker/accuser_commands_helpers.ml b/src/proto_alpha/lib_baker/accuser_commands_helpers.ml similarity index 100% rename from src/proto_alpha/lib_agnostic_baker/accuser_commands_helpers.ml rename to src/proto_alpha/lib_baker/accuser_commands_helpers.ml diff --git a/src/proto_alpha/lib_agnostic_baker/agnostic_baker_plugin.ml b/src/proto_alpha/lib_baker/agnostic_baker_plugin.ml similarity index 100% rename from src/proto_alpha/lib_agnostic_baker/agnostic_baker_plugin.ml rename to src/proto_alpha/lib_baker/agnostic_baker_plugin.ml diff --git a/src/proto_alpha/lib_agnostic_baker/baker_args_parser.ml b/src/proto_alpha/lib_baker/baker_args_parser.ml similarity index 100% rename from src/proto_alpha/lib_agnostic_baker/baker_args_parser.ml rename to src/proto_alpha/lib_baker/baker_args_parser.ml diff --git a/src/proto_alpha/lib_agnostic_baker/baker_args_parser.mli b/src/proto_alpha/lib_baker/baker_args_parser.mli similarity index 100% rename from src/proto_alpha/lib_agnostic_baker/baker_args_parser.mli rename to src/proto_alpha/lib_baker/baker_args_parser.mli diff --git a/src/proto_alpha/lib_agnostic_baker/baker_commands_helpers.ml b/src/proto_alpha/lib_baker/baker_commands_helpers.ml similarity index 100% rename from src/proto_alpha/lib_agnostic_baker/baker_commands_helpers.ml rename to src/proto_alpha/lib_baker/baker_commands_helpers.ml diff --git a/src/proto_alpha/lib_agnostic_baker/baker_commands_helpers.mli b/src/proto_alpha/lib_baker/baker_commands_helpers.mli similarity index 100% rename from src/proto_alpha/lib_agnostic_baker/baker_commands_helpers.mli rename to src/proto_alpha/lib_baker/baker_commands_helpers.mli diff --git a/src/proto_alpha/lib_agnostic_baker/dune b/src/proto_alpha/lib_baker/dune similarity index 86% rename from src/proto_alpha/lib_agnostic_baker/dune rename to src/proto_alpha/lib_baker/dune index 909822032eac..b343c560a74d 100644 --- a/src/proto_alpha/lib_agnostic_baker/dune +++ b/src/proto_alpha/lib_baker/dune @@ -2,8 +2,8 @@ ; Edit file manifest/main.ml instead. (library - (name tezos_agnostic_baker_alpha) - (public_name octez-protocol-alpha-libs.agnostic-baker) + (name tezos_baker_alpha) + (public_name octez-protocol-alpha-libs.baker) (instrumentation (backend bisect_ppx)) (libraries octez-libs.base diff --git a/src/proto_alpha/lib_plugin/index.mld b/src/proto_alpha/lib_plugin/index.mld index 3d4d386ddbe3..eb4888cf5179 100644 --- a/src/proto_alpha/lib_plugin/index.mld +++ b/src/proto_alpha/lib_plugin/index.mld @@ -4,8 +4,8 @@ This is a package containing some libraries related to the Tezos alpha protocol. It contains the following libraries: -- {{!module-Tezos_agnostic_baker_alpha}Tezos_agnostic_baker_alpha}: Protocol specific library for the Agnostic Baker - {{!module-Tezos_alpha_test_helpers}Tezos_alpha_test_helpers}: Protocol testing framework +- {{!module-Tezos_baker_alpha}Tezos_baker_alpha}: Protocol specific library for the Agnostic Baker - {{!module-Tezos_baking_alpha}Tezos_baking_alpha}: Base library for `tezos-baker/accuser` - {{!module-Tezos_baking_alpha_commands}Tezos_baking_alpha_commands}: Protocol-specific commands for baking - {{!module-Tezos_client_alpha}Tezos_client_alpha}: Protocol specific library for `octez-client` diff --git a/tobi/config b/tobi/config index 484bf870d42c..0a7f5b13442d 100644 --- a/tobi/config +++ b/tobi/config @@ -98,9 +98,9 @@ octez-protocol-017-PtNairob-libs: src/proto_017_PtNairob/lib_client, src/proto_0 octez-protocol-018-Proxford-libs: src/proto_018_Proxford/lib_client, src/proto_018_Proxford/lib_client_commands, src/proto_018_Proxford/lib_client_sapling, src/proto_018_Proxford/lib_layer2_utils, src/proto_018_Proxford/lib_plugin, src/proto_018_Proxford/lib_sc_rollup, src/proto_018_Proxford/lib_sc_rollup_layer2 octez-protocol-019-PtParisB-libs: src/proto_019_PtParisB/lib_client, src/proto_019_PtParisB/lib_client_commands, src/proto_019_PtParisB/lib_client_sapling, src/proto_019_PtParisB/lib_layer2_utils, src/proto_019_PtParisB/lib_plugin, src/proto_019_PtParisB/lib_sc_rollup, src/proto_019_PtParisB/lib_sc_rollup_layer2 octez-protocol-020-PsParisC-libs: src/proto_020_PsParisC/lib_client, src/proto_020_PsParisC/lib_client_commands, src/proto_020_PsParisC/lib_client_sapling, src/proto_020_PsParisC/lib_layer2_utils, src/proto_020_PsParisC/lib_plugin, src/proto_020_PsParisC/lib_sc_rollup, src/proto_020_PsParisC/lib_sc_rollup_layer2 -octez-protocol-021-PsQuebec-libs: src/proto_021_PsQuebec/lib_agnostic_baker, src/proto_021_PsQuebec/lib_client, src/proto_021_PsQuebec/lib_client/test, src/proto_021_PsQuebec/lib_client_commands, src/proto_021_PsQuebec/lib_client_sapling, src/proto_021_PsQuebec/lib_dal, src/proto_021_PsQuebec/lib_dal/test, src/proto_021_PsQuebec/lib_delegate, src/proto_021_PsQuebec/lib_delegate/test, src/proto_021_PsQuebec/lib_delegate/test/mockup_simulator, src/proto_021_PsQuebec/lib_delegate/test/tenderbrute, src/proto_021_PsQuebec/lib_delegate/test/tenderbrute/lib, src/proto_021_PsQuebec/lib_layer2_utils, src/proto_021_PsQuebec/lib_plugin, src/proto_021_PsQuebec/lib_plugin/test, src/proto_021_PsQuebec/lib_protocol/test/helpers, src/proto_021_PsQuebec/lib_sc_rollup, src/proto_021_PsQuebec/lib_sc_rollup_layer2 -octez-protocol-022-PsRiotum-libs: src/proto_022_PsRiotum/lib_agnostic_baker, src/proto_022_PsRiotum/lib_client, src/proto_022_PsRiotum/lib_client/test, src/proto_022_PsRiotum/lib_client_commands, src/proto_022_PsRiotum/lib_client_sapling, src/proto_022_PsRiotum/lib_dal, src/proto_022_PsRiotum/lib_dal/test, src/proto_022_PsRiotum/lib_delegate, src/proto_022_PsRiotum/lib_delegate/test, src/proto_022_PsRiotum/lib_delegate/test/mockup_simulator, src/proto_022_PsRiotum/lib_delegate/test/tenderbrute, src/proto_022_PsRiotum/lib_delegate/test/tenderbrute/lib, src/proto_022_PsRiotum/lib_layer2_utils, src/proto_022_PsRiotum/lib_plugin, src/proto_022_PsRiotum/lib_plugin/test, src/proto_022_PsRiotum/lib_protocol/test/helpers, src/proto_022_PsRiotum/lib_sc_rollup, src/proto_022_PsRiotum/lib_sc_rollup_layer2 -octez-protocol-alpha-libs: src/proto_alpha/lib_agnostic_baker, src/proto_alpha/lib_client, src/proto_alpha/lib_client/test, src/proto_alpha/lib_client_commands, src/proto_alpha/lib_client_sapling, src/proto_alpha/lib_dal, src/proto_alpha/lib_dal/test, src/proto_alpha/lib_delegate, src/proto_alpha/lib_delegate/test, src/proto_alpha/lib_delegate/test/mockup_simulator, src/proto_alpha/lib_delegate/test/tenderbrute, src/proto_alpha/lib_delegate/test/tenderbrute/lib, src/proto_alpha/lib_layer2_utils, src/proto_alpha/lib_plugin, src/proto_alpha/lib_plugin/test, src/proto_alpha/lib_protocol/test/helpers, src/proto_alpha/lib_sc_rollup, src/proto_alpha/lib_sc_rollup_layer2 +octez-protocol-021-PsQuebec-libs: src/proto_021_PsQuebec/lib_baker, src/proto_021_PsQuebec/lib_client, src/proto_021_PsQuebec/lib_client/test, src/proto_021_PsQuebec/lib_client_commands, src/proto_021_PsQuebec/lib_client_sapling, src/proto_021_PsQuebec/lib_dal, src/proto_021_PsQuebec/lib_dal/test, src/proto_021_PsQuebec/lib_delegate, src/proto_021_PsQuebec/lib_delegate/test, src/proto_021_PsQuebec/lib_delegate/test/mockup_simulator, src/proto_021_PsQuebec/lib_delegate/test/tenderbrute, src/proto_021_PsQuebec/lib_delegate/test/tenderbrute/lib, src/proto_021_PsQuebec/lib_layer2_utils, src/proto_021_PsQuebec/lib_plugin, src/proto_021_PsQuebec/lib_plugin/test, src/proto_021_PsQuebec/lib_protocol/test/helpers, src/proto_021_PsQuebec/lib_sc_rollup, src/proto_021_PsQuebec/lib_sc_rollup_layer2 +octez-protocol-022-PsRiotum-libs: src/proto_022_PsRiotum/lib_baker, src/proto_022_PsRiotum/lib_client, src/proto_022_PsRiotum/lib_client/test, src/proto_022_PsRiotum/lib_client_commands, src/proto_022_PsRiotum/lib_client_sapling, src/proto_022_PsRiotum/lib_dal, src/proto_022_PsRiotum/lib_dal/test, src/proto_022_PsRiotum/lib_delegate, src/proto_022_PsRiotum/lib_delegate/test, src/proto_022_PsRiotum/lib_delegate/test/mockup_simulator, src/proto_022_PsRiotum/lib_delegate/test/tenderbrute, src/proto_022_PsRiotum/lib_delegate/test/tenderbrute/lib, src/proto_022_PsRiotum/lib_layer2_utils, src/proto_022_PsRiotum/lib_plugin, src/proto_022_PsRiotum/lib_plugin/test, src/proto_022_PsRiotum/lib_protocol/test/helpers, src/proto_022_PsRiotum/lib_sc_rollup, src/proto_022_PsRiotum/lib_sc_rollup_layer2 +octez-protocol-alpha-libs: src/proto_alpha/lib_baker, src/proto_alpha/lib_client, src/proto_alpha/lib_client/test, src/proto_alpha/lib_client_commands, src/proto_alpha/lib_client_sapling, src/proto_alpha/lib_dal, src/proto_alpha/lib_dal/test, src/proto_alpha/lib_delegate, src/proto_alpha/lib_delegate/test, src/proto_alpha/lib_delegate/test/mockup_simulator, src/proto_alpha/lib_delegate/test/tenderbrute, src/proto_alpha/lib_delegate/test/tenderbrute/lib, src/proto_alpha/lib_layer2_utils, src/proto_alpha/lib_plugin, src/proto_alpha/lib_plugin/test, src/proto_alpha/lib_protocol/test/helpers, src/proto_alpha/lib_sc_rollup, src/proto_alpha/lib_sc_rollup_layer2 octez-protocol-compiler: src/lib_protocol_compiler, src/lib_protocol_compiler/bin, src/lib_protocol_compiler/hashes, src/lib_protocol_compiler/registerer octez-protocol-compiler-compat: src/lib_protocol_compiler/compat octez-requester-tests: src/lib_requester/test -- GitLab From 1c2d648dbc303d6492a2812c3a82b69f4419d7c3 Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Fri, 25 Apr 2025 11:31:38 +0300 Subject: [PATCH 04/15] Agnostic_baker: Rename plugin --- .../lib_baker/{agnostic_baker_plugin.ml => baker_plugin.ml} | 0 .../lib_baker/{agnostic_baker_plugin.ml => baker_plugin.ml} | 0 .../lib_baker/{agnostic_baker_plugin.ml => baker_plugin.ml} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename src/proto_021_PsQuebec/lib_baker/{agnostic_baker_plugin.ml => baker_plugin.ml} (100%) rename src/proto_022_PsRiotum/lib_baker/{agnostic_baker_plugin.ml => baker_plugin.ml} (100%) rename src/proto_alpha/lib_baker/{agnostic_baker_plugin.ml => baker_plugin.ml} (100%) diff --git a/src/proto_021_PsQuebec/lib_baker/agnostic_baker_plugin.ml b/src/proto_021_PsQuebec/lib_baker/baker_plugin.ml similarity index 100% rename from src/proto_021_PsQuebec/lib_baker/agnostic_baker_plugin.ml rename to src/proto_021_PsQuebec/lib_baker/baker_plugin.ml diff --git a/src/proto_022_PsRiotum/lib_baker/agnostic_baker_plugin.ml b/src/proto_022_PsRiotum/lib_baker/baker_plugin.ml similarity index 100% rename from src/proto_022_PsRiotum/lib_baker/agnostic_baker_plugin.ml rename to src/proto_022_PsRiotum/lib_baker/baker_plugin.ml diff --git a/src/proto_alpha/lib_baker/agnostic_baker_plugin.ml b/src/proto_alpha/lib_baker/baker_plugin.ml similarity index 100% rename from src/proto_alpha/lib_baker/agnostic_baker_plugin.ml rename to src/proto_alpha/lib_baker/baker_plugin.ml -- GitLab From 582f6f8f3deacb53f980fd8b5cb2c632490f119a Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Fri, 25 Apr 2025 11:44:37 +0300 Subject: [PATCH 05/15] Agnostc_baker: Rename config --- src/bin_agnostic_accuser/main_agnostic_accuser.ml | 8 +++----- src/bin_agnostic_baker/main_agnostic_baker.ml | 14 +++++++------- .../{agnostic_baker_config.ml => baker_config.ml} | 0 src/lib_baker/daemon.ml | 2 +- 4 files changed, 11 insertions(+), 13 deletions(-) rename src/lib_baker/{agnostic_baker_config.ml => baker_config.ml} (100%) diff --git a/src/bin_agnostic_accuser/main_agnostic_accuser.ml b/src/bin_agnostic_accuser/main_agnostic_accuser.ml index dce135f196c6..209bb51bfe62 100644 --- a/src/bin_agnostic_accuser/main_agnostic_accuser.ml +++ b/src/bin_agnostic_accuser/main_agnostic_accuser.ml @@ -25,12 +25,10 @@ let lwt_run ~args () = let open Lwt_result_syntax in let base_dir = Option.value - ~default:Agnostic_baker_config.default_base_dir + ~default:Baker_config.default_base_dir (Run_args.get_base_dir args) in - let*! () = - Client_main_run.init_logging (module Agnostic_baker_config) ~base_dir () - in + let*! () = Client_main_run.init_logging (module Baker_config) ~base_dir () in () [@profiler.overwrite may_start_profiler base_dir] ; let daemon = Daemon.Accuser.create @@ -73,7 +71,7 @@ let () = (* No need to run the accuser commands, we just need to get their description, therefore we do not obtain the protocol plugin. *) Client_main_run.run - (module Agnostic_baker_config) + (module Baker_config) ~select_commands:(fun _ _ -> Lwt_result_syntax.return @@ Commands.accuser_commands ()) else run ~args () diff --git a/src/bin_agnostic_baker/main_agnostic_baker.ml b/src/bin_agnostic_baker/main_agnostic_baker.ml index f68b9a1de76e..a1ab333677a6 100644 --- a/src/bin_agnostic_baker/main_agnostic_baker.ml +++ b/src/bin_agnostic_baker/main_agnostic_baker.ml @@ -26,21 +26,21 @@ let lwt_run ~args () = let open Lwt_result_syntax in let base_dir = Option.value - ~default:Agnostic_baker_config.default_base_dir + ~default:Baker_config.default_base_dir (Run_args.get_base_dir args) in let full = new Tezos_client_base_unix.Client_context_unix.unix_full - ~chain:Agnostic_baker_config.default_chain - ~block:Agnostic_baker_config.default_block + ~chain:Baker_config.default_chain + ~block:Baker_config.default_block ~confirmations:None ~password_filename:None - ~base_dir:Agnostic_baker_config.default_base_dir + ~base_dir:Baker_config.default_base_dir ~rpc_config:Tezos_rpc_http_client_unix.RPC_client_unix.default_config ~verbose_rpc_error_diagnostics:false in let* parsed, _remaining = - Agnostic_baker_config.parse_config_args + Baker_config.parse_config_args full (List.tl args |> Option.value ~default:[]) in @@ -50,7 +50,7 @@ let lwt_run ~args () = Client_main_run.init_logging ?parsed_args ?parsed_config_file - (module Agnostic_baker_config) + (module Baker_config) ~base_dir () in @@ -96,7 +96,7 @@ let () = (* No need to run the baker commands, we just need to get their description, therefore we do not obtain the protocol plugin. *) Client_main_run.run - (module Agnostic_baker_config) + (module Baker_config) ~select_commands:(fun _ _ -> Lwt_result_syntax.return @@ Commands.baker_commands ()) else run ~args () diff --git a/src/lib_baker/agnostic_baker_config.ml b/src/lib_baker/baker_config.ml similarity index 100% rename from src/lib_baker/agnostic_baker_config.ml rename to src/lib_baker/baker_config.ml diff --git a/src/lib_baker/daemon.ml b/src/lib_baker/daemon.ml index f91f5bbc9f20..cea209fcc554 100644 --- a/src/lib_baker/daemon.ml +++ b/src/lib_baker/daemon.ml @@ -130,7 +130,7 @@ module Make_daemon (Agent : AGENT) : AGNOSTIC_DAEMON = struct Lwt.pick [ Client_main_run.lwt_run - (module Agnostic_baker_config) + (module Baker_config) ~select_commands:(fun _ _ -> Lwt_result_syntax.return @@ Agent.commands ~plugin ()) (* The underlying logging from the baker must not be initialised, otherwise we double log. *) -- GitLab From d71c260ab777780d42449e919c73e20962ff927f Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Fri, 25 Apr 2025 11:44:58 +0300 Subject: [PATCH 06/15] Agnostic_baker: Add follow-up issue for profiling --- src/lib_baker/agnostic_baker_profiler.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib_baker/agnostic_baker_profiler.ml b/src/lib_baker/agnostic_baker_profiler.ml index 9b93ffd25bef..b120101ad3e8 100644 --- a/src/lib_baker/agnostic_baker_profiler.ml +++ b/src/lib_baker/agnostic_baker_profiler.ml @@ -6,6 +6,8 @@ (*****************************************************************************) open Profiler +(* FIXME: https://gitlab.com/tezos/tezos/-/issues/7958 + Unify profiling for all bakers. *) let agnostic_baker_profiler = unplugged () let init profiler_maker = -- GitLab From b64b6935949d25922e2e37f8ea480b90c37ac2cf Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Fri, 25 Apr 2025 11:54:23 +0300 Subject: [PATCH 07/15] Tezt: Rename agnostic_baker to baker in tezt module --- tezt/lib_tezos/baker.ml | 171 ++++++++++++++++++---------------------- 1 file changed, 77 insertions(+), 94 deletions(-) diff --git a/tezt/lib_tezos/baker.ml b/tezt/lib_tezos/baker.ml index fae476c2df55..ce3dd9022391 100644 --- a/tezt/lib_tezos/baker.ml +++ b/tezt/lib_tezos/baker.ml @@ -22,8 +22,7 @@ type protocol_status = Active | Frozen | Ignore let protocol_status = function Protocol.Alpha -> Ignore | _ -> Active -(* This is hard-coded after the same value from [Daemon] module from - [src/lib_agnostic_baker]. *) +(* This is hard-coded after the same value from [Daemon] module from [src/lib_baker]. *) let extra_levels_for_old_baker = 3 module Parameters = struct @@ -49,7 +48,7 @@ module Parameters = struct type session_state = {mutable ready : bool} - let base_default_name = "agnostic-baker" + let base_default_name = "baker" let default_colors = Log.Color.[|FG.green|] end @@ -57,16 +56,16 @@ end open Parameters include Daemon.Make (Parameters) -let trigger_ready agnostic_baker value = - let pending = agnostic_baker.persistent_state.pending_ready in - agnostic_baker.persistent_state.pending_ready <- [] ; +let trigger_ready baker value = + let pending = baker.persistent_state.pending_ready in + baker.persistent_state.pending_ready <- [] ; List.iter (fun pending -> Lwt.wakeup_later pending value) pending -let set_ready agnostic_baker = - (match agnostic_baker.status with +let set_ready baker = + (match baker.status with | Not_running -> () | Running status -> status.session_state.ready <- true) ; - trigger_ready agnostic_baker (Some ()) + trigger_ready baker (Some ()) let liquidity_baking_votefile ?path vote = let votefile = @@ -101,34 +100,31 @@ let create_from_uris ?runner ?(path = Uses.path Constant.octez_agnostic_baker) remote_mode ~default:(Option.value enable_remote_mode ~default:false) in - let agnostic_baker = - create - ~path - ?name - ?color - ?event_pipe - ?runner - { - delegates; - runner; - base_dir; - node_data_dir; - node_rpc_endpoint; - pending_ready = []; - votefile; - liquidity_baking_toggle_vote; - force_apply_from_round; - remote_mode; - operations_pool; - dal_node_rpc_endpoint; - dal_node_timeout_percentage; - state_recorder; - node_version_check_bypass; - node_version_allowed; - keep_alive; - } - in - agnostic_baker + create + ~path + ?name + ?color + ?event_pipe + ?runner + { + delegates; + runner; + base_dir; + node_data_dir; + node_rpc_endpoint; + pending_ready = []; + votefile; + liquidity_baking_toggle_vote; + force_apply_from_round; + remote_mode; + operations_pool; + dal_node_rpc_endpoint; + dal_node_timeout_percentage; + state_recorder; + node_version_check_bypass; + node_version_allowed; + keep_alive; + } let handle_event node ({name; _} : event) = match name with "starting_daemon.v0" -> set_ready node | _ -> () @@ -139,7 +135,7 @@ let create ?runner ?path ?name ?color ?event_pipe ?(delegates = []) ?votefile ?dal_node_timeout_percentage ?(state_recorder = false) ?(node_version_check_bypass = false) ?node_version_allowed ?keep_alive node client = - let agnostic_baker = + let baker = create_from_uris ?runner ?path @@ -163,27 +159,22 @@ let create ?runner ?path ?name ?color ?event_pipe ?(delegates = []) ?votefile ?keep_alive () in - on_event agnostic_baker (handle_event agnostic_baker) ; - agnostic_baker + on_event baker (handle_event baker) ; + baker -let run_args agnostic_baker = - let delegates = agnostic_baker.persistent_state.delegates in - let node_data_dir = agnostic_baker.persistent_state.node_data_dir in - let base_dir = agnostic_baker.persistent_state.base_dir in - let node_addr = - Endpoint.as_string agnostic_baker.persistent_state.node_rpc_endpoint - in +let run_args baker = + let delegates = baker.persistent_state.delegates in + let node_data_dir = baker.persistent_state.node_data_dir in + let base_dir = baker.persistent_state.base_dir in + let node_addr = Endpoint.as_string baker.persistent_state.node_rpc_endpoint in let votefile = - Cli_arg.optional_arg - "votefile" - Fun.id - agnostic_baker.persistent_state.votefile + Cli_arg.optional_arg "votefile" Fun.id baker.persistent_state.votefile in let liquidity_baking_toggle_vote = Cli_arg.optional_arg "liquidity-baking-toggle-vote" liquidity_baking_vote_to_string - agnostic_baker.persistent_state.liquidity_baking_toggle_vote + baker.persistent_state.liquidity_baking_toggle_vote in let force_apply_from_round = (* From Protocol Q, the flag --force-apply has been replaced by @@ -192,54 +183,50 @@ let run_args agnostic_baker = Cli_arg.optional_arg "force-apply-from-round" string_of_int - agnostic_baker.persistent_state.force_apply_from_round + baker.persistent_state.force_apply_from_round in let operations_pool = Cli_arg.optional_arg "operations-pool" Fun.id - agnostic_baker.persistent_state.operations_pool + baker.persistent_state.operations_pool in let dal_node_endpoint = Cli_arg.optional_arg "dal-node" Endpoint.as_string - agnostic_baker.persistent_state.dal_node_rpc_endpoint + baker.persistent_state.dal_node_rpc_endpoint in let without_dal = Cli_arg.optional_switch "without-dal" - (Option.is_none agnostic_baker.persistent_state.dal_node_rpc_endpoint) + (Option.is_none baker.persistent_state.dal_node_rpc_endpoint) in let dal_node_timeout_percentage = Cli_arg.optional_arg "dal-node-timeout-percentage" string_of_int - agnostic_baker.persistent_state.dal_node_timeout_percentage + baker.persistent_state.dal_node_timeout_percentage in let state_recorder = - Cli_arg.optional_switch - "record-state" - agnostic_baker.persistent_state.state_recorder + Cli_arg.optional_switch "record-state" baker.persistent_state.state_recorder in let node_version_check_bypass = Cli_arg.optional_switch "node-version-check-bypass" - agnostic_baker.persistent_state.node_version_check_bypass + baker.persistent_state.node_version_check_bypass in let node_version_allowed = Cli_arg.optional_arg "node-version-allowed" Fun.id - agnostic_baker.persistent_state.node_version_allowed + baker.persistent_state.node_version_allowed in let keep_alive = - Cli_arg.optional_switch - "keep-alive" - agnostic_baker.persistent_state.keep_alive + Cli_arg.optional_switch "keep-alive" baker.persistent_state.keep_alive in let run_args = - if agnostic_baker.persistent_state.remote_mode then ["remotely"] + if baker.persistent_state.remote_mode then ["remotely"] else ["with"; "local"; "node"; node_data_dir] in ["--endpoint"; node_addr; "--base-dir"; base_dir; "run"] @@ -249,54 +236,50 @@ let run_args agnostic_baker = @ node_version_allowed @ keep_alive let run ?env ?event_level ?event_sections_levels ?(extra_arguments = []) - (agnostic_baker : t) = - (match agnostic_baker.status with + (baker : t) = + (match baker.status with | Not_running -> () - | Running _ -> - Test.fail "agnostic_baker %s is already running" agnostic_baker.name) ; + | Running _ -> Test.fail "baker %s is already running" baker.name) ; let on_terminate _ = (* Cancel all [Ready] event listeners. *) - trigger_ready agnostic_baker None ; + trigger_ready baker None ; unit in run ?env ?event_level ?event_sections_levels - agnostic_baker + baker {ready = false} - (run_args agnostic_baker @ extra_arguments) + (run_args baker @ extra_arguments) ~on_terminate - ?runner:agnostic_baker.persistent_state.runner + ?runner:baker.persistent_state.runner -let spawn_run ?env (agnostic_baker : t) = - (match agnostic_baker.status with +let spawn_run ?env (baker : t) = + (match baker.status with | Not_running -> () - | Running _ -> - Test.fail "agnostic_baker %s is already running" agnostic_baker.name) ; + | Running _ -> Test.fail "baker %s is already running" baker.name) ; Process.spawn ?env - ?runner:agnostic_baker.persistent_state.runner - agnostic_baker.path - (run_args agnostic_baker) + ?runner:baker.persistent_state.runner + baker.path + (run_args baker) -let check_event ?where agnostic_baker name promise = +let check_event ?where baker name promise = let* result = promise in match result with | None -> - raise - (Terminated_before_event - {daemon = agnostic_baker.name; event = name; where}) + raise (Terminated_before_event {daemon = baker.name; event = name; where}) | Some x -> return x -let wait_for_ready agnostic_baker = - match agnostic_baker.status with +let wait_for_ready baker = + match baker.status with | Running {session_state = {ready = true; _}; _} -> unit | Not_running | Running {session_state = {ready = false; _}; _} -> let promise, resolver = Lwt.task () in - agnostic_baker.persistent_state.pending_ready <- - resolver :: agnostic_baker.persistent_state.pending_ready ; - check_event agnostic_baker "agnostic baker started" promise + baker.persistent_state.pending_ready <- + resolver :: baker.persistent_state.pending_ready ; + check_event baker "baker started" promise let init ?env ?runner ?(path = Uses.path Constant.octez_agnostic_baker) ?name ?color ?event_level ?event_pipe ?event_sections_levels ?(delegates = []) @@ -305,7 +288,7 @@ let init ?env ?runner ?(path = Uses.path Constant.octez_agnostic_baker) ?name ?state_recorder ?node_version_check_bypass ?node_version_allowed ?keep_alive node client = let* () = Node.wait_for_ready node in - let agnostic_baker = + let baker = create ?runner ~path @@ -327,9 +310,9 @@ let init ?env ?runner ?(path = Uses.path Constant.octez_agnostic_baker) ?name node client in - let* () = run ?env ?event_level ?event_sections_levels agnostic_baker in - let* () = wait_for_ready agnostic_baker in - return agnostic_baker + let* () = run ?env ?event_level ?event_sections_levels baker in + let* () = wait_for_ready baker in + return baker (** Logging helpers for baker events. *) -- GitLab From 7b57ebe29d148e024a0490415a8859560890d8b2 Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Fri, 25 Apr 2025 11:58:16 +0300 Subject: [PATCH 08/15] Tezt: Rename Constant.octez_agnostic_baker to Constant.octez_baker --- tezt/lib_tezos/baker.ml | 10 +++---- tezt/lib_tezos/constant.ml | 3 +-- tezt/lib_tezos/vdf.ml | 2 +- tezt/long_tests/tenderbake.ml | 4 +-- tezt/manual_tests/baker_test.ml | 2 +- tezt/manual_tests/dal.ml | 2 +- tezt/tests/agnostic_baker_test.ml | 18 +++++-------- tezt/tests/baker_operations_cli_options.ml | 6 ++--- tezt/tests/baker_test.ml | 26 +++++++++---------- tezt/tests/cloud/dal.ml | 2 +- tezt/tests/cloud/tezos.ml | 4 +-- tezt/tests/dal.ml | 17 ++++++------ tezt/tests/http_cache_headers.ml | 2 +- .../tests/liquidity_baking_per_block_votes.ml | 2 +- tezt/tests/nonce_seed_revelation.ml | 4 +-- tezt/tests/protocol_migration.ml | 6 ++--- tezt/tests/signer_test.ml | 3 +-- tezt/tests/synchronisation_heuristic.ml | 12 ++++----- tezt/tests/vdf_test.ml | 4 +-- tezt/tests/voting.ml | 2 +- 20 files changed, 62 insertions(+), 69 deletions(-) diff --git a/tezt/lib_tezos/baker.ml b/tezt/lib_tezos/baker.ml index ce3dd9022391..114478e51634 100644 --- a/tezt/lib_tezos/baker.ml +++ b/tezt/lib_tezos/baker.ml @@ -88,8 +88,8 @@ let enable_remote_mode = | Some _ -> Some false | _ -> None -let create_from_uris ?runner ?(path = Uses.path Constant.octez_agnostic_baker) - ?name ?color ?event_pipe ?(delegates = []) ?votefile +let create_from_uris ?runner ?(path = Uses.path Constant.octez_baker) ?name + ?color ?event_pipe ?(delegates = []) ?votefile ?(liquidity_baking_toggle_vote = Some Pass) ?force_apply_from_round ?remote_mode ?operations_pool ?dal_node_rpc_endpoint ?dal_node_timeout_percentage ?(state_recorder = false) @@ -281,9 +281,9 @@ let wait_for_ready baker = resolver :: baker.persistent_state.pending_ready ; check_event baker "baker started" promise -let init ?env ?runner ?(path = Uses.path Constant.octez_agnostic_baker) ?name - ?color ?event_level ?event_pipe ?event_sections_levels ?(delegates = []) - ?votefile ?liquidity_baking_toggle_vote ?force_apply_from_round ?remote_mode +let init ?env ?runner ?(path = Uses.path Constant.octez_baker) ?name ?color + ?event_level ?event_pipe ?event_sections_levels ?(delegates = []) ?votefile + ?liquidity_baking_toggle_vote ?force_apply_from_round ?remote_mode ?operations_pool ?dal_node_rpc_endpoint ?dal_node_timeout_percentage ?state_recorder ?node_version_check_bypass ?node_version_allowed ?keep_alive node client = diff --git a/tezt/lib_tezos/constant.ml b/tezt/lib_tezos/constant.ml index a3eca961a761..6d1e92bd1e73 100644 --- a/tezt/lib_tezos/constant.ml +++ b/tezt/lib_tezos/constant.ml @@ -164,8 +164,7 @@ 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-baker" () +let octez_baker = Uses.make ~tag:"baker" ~path:"./octez-baker" () (* TODO: tezos/tezos#4803 Can we do better than to depend on script-inputs? diff --git a/tezt/lib_tezos/vdf.ml b/tezt/lib_tezos/vdf.ml index 5557fef82d82..643712184d63 100644 --- a/tezt/lib_tezos/vdf.ml +++ b/tezt/lib_tezos/vdf.ml @@ -67,7 +67,7 @@ let create ~protocol ?name ?color ?event_pipe ?runner node = let name = match name with None -> fresh_name () | Some name -> name in let vdf_baker = create - ~path:(Uses.path Constant.octez_agnostic_baker) + ~path:(Uses.path Constant.octez_baker) ?name:(Some name) ?color ?event_pipe diff --git a/tezt/long_tests/tenderbake.ml b/tezt/long_tests/tenderbake.ml index 8be5b30805ad..8fcea969d831 100644 --- a/tezt/long_tests/tenderbake.ml +++ b/tezt/long_tests/tenderbake.ml @@ -321,7 +321,7 @@ module Rounds = struct ~title:test ~tags:["tenderbake"; "basic"] ~team - ~uses:[Constant.octez_agnostic_baker] + ~uses:[Constant.octez_baker] ~executors ~timeout:(Long_test.Seconds (repeat * 8 * timeout)) @@ fun () -> @@ -478,7 +478,7 @@ module Long_dynamic_bake = struct ~title:(test topology) ~tags:["tenderbake"; "dynamic"; string_of_topology topology] ~team - ~uses:[Constant.octez_agnostic_baker] + ~uses:[Constant.octez_baker] ~executors ~timeout:(Long_test.Seconds (repeat * 8 * timeout)) @@ fun () -> diff --git a/tezt/manual_tests/baker_test.ml b/tezt/manual_tests/baker_test.ml index c13ff7852780..ca0177ba4e61 100644 --- a/tezt/manual_tests/baker_test.ml +++ b/tezt/manual_tests/baker_test.ml @@ -112,7 +112,7 @@ let baker_early_preattestation_test = ~__FILE__ ~title:"Test baker early pre-attestation" ~tags:["node"; "agnostic_baker"; "early"; "preattestation"] - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) ~supports:(Protocol.From_protocol 16) @@ fun protocol -> Log.info diff --git a/tezt/manual_tests/dal.ml b/tezt/manual_tests/dal.ml index 4f7acaffef1e..d89e9bd1ea2c 100644 --- a/tezt/manual_tests/dal.ml +++ b/tezt/manual_tests/dal.ml @@ -458,7 +458,7 @@ let baker_test ~network = ~__FILE__ ~title:(sf "Join %s and bake" network) ~tags:[Tag.tezos2; "dal"; "baker"; network] - ~uses:[Constant.octez_agnostic_baker] + ~uses:[Constant.octez_baker] @@ fun () -> let baker_sk = Cli.get_string_opt "baker-sk" in let dal_bootstrap_peers = diff --git a/tezt/tests/agnostic_baker_test.ml b/tezt/tests/agnostic_baker_test.ml index fa347058b673..16230e657aae 100644 --- a/tezt/tests/agnostic_baker_test.ml +++ b/tezt/tests/agnostic_baker_test.ml @@ -144,7 +144,7 @@ let migrate ~migrate_from ~migrate_to ~use_remote_signer = Protocol.tag migrate_from; Protocol.tag migrate_to; ] - ~uses:([Constant.octez_agnostic_baker] @ remote_signer) + ~uses:([Constant.octez_baker] @ remote_signer) @@ fun () -> let blocks_per_cycle = JSON.(get "blocks_per_cycle" parameters |> as_int) in let consensus_rights_delay = @@ -170,7 +170,7 @@ let test_start_and_stop () = ~__FILE__ ~title:"Agnostic baker starts and stops" ~tags:[team; "sandbox"; "agnostic"; "baker"; "init"] - ~uses:[Constant.octez_agnostic_baker] + ~uses:[Constant.octez_baker] @@ fun () -> let* node, client = Client.init_with_node `Client () in let* baker = Baker.init node client in @@ -183,19 +183,15 @@ let test_man () = ~__FILE__ ~title:"Agnostic baker man" ~tags:[team; "sandbox"; "agnostic"; "baker"; "man"] - ~uses:[Constant.octez_agnostic_baker] + ~uses:[Constant.octez_baker] ~uses_node:false ~uses_client:false ~uses_admin_client:false @@ fun () -> let hooks = Tezos_regression.hooks in - let* () = Process.run ~hooks (Uses.path Constant.octez_agnostic_baker) [] in - let* () = - Process.run ~hooks (Uses.path Constant.octez_agnostic_baker) ["--help"] - in - let* () = - Process.run ~hooks (Uses.path Constant.octez_agnostic_baker) ["man"] - in + let* () = Process.run ~hooks (Uses.path Constant.octez_baker) [] in + let* () = Process.run ~hooks (Uses.path Constant.octez_baker) ["--help"] in + let* () = Process.run ~hooks (Uses.path Constant.octez_baker) ["man"] in unit let test_keep_alive = @@ -203,7 +199,7 @@ let test_keep_alive = ~__FILE__ ~title:"Agnostic baker --keep-alive" ~tags:[team; "sandbox"; "agnostic"; "baker"; "keep_alive"] - ~uses:(fun _ -> [Constant.octez_agnostic_baker]) + ~uses:(fun _ -> [Constant.octez_baker]) @@ fun protocol -> let* node, client = Client.init_with_protocol ~protocol `Client () in (* Provide a delegate with no voting power to avoid baking blocks with the baker diff --git a/tezt/tests/baker_operations_cli_options.ml b/tezt/tests/baker_operations_cli_options.ml index 359eefb10151..ad93366b8f18 100644 --- a/tezt/tests/baker_operations_cli_options.ml +++ b/tezt/tests/baker_operations_cli_options.ml @@ -338,7 +338,7 @@ let test_baker_external_operations = ~__FILE__ ~title:"Baker external operations" ~tags:[Tag.layer1; "baker"; "external"; "operations"] - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> Log.info "Init" ; let node_args = Node.[Synchronisation_threshold 0] in @@ -501,7 +501,7 @@ let test_baker_state_recorder_memory = ~__FILE__ ~title:"Baker state recorder - memory case" ~tags:[Tag.layer1; "baker"; "state"; "recorder"; "memory"] - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> test_baker_state_recorder protocol false let test_baker_state_recorder_filesystem = @@ -509,7 +509,7 @@ let test_baker_state_recorder_filesystem = ~__FILE__ ~title:"Baker state recorder - filesystem case" ~tags:[Tag.layer1; "baker"; "state"; "recorder"; "filesystem"] - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> test_baker_state_recorder protocol true let register ~protocols = diff --git a/tezt/tests/baker_test.ml b/tezt/tests/baker_test.ml index 4a621e5e9c0f..1bd232fa093f 100644 --- a/tezt/tests/baker_test.ml +++ b/tezt/tests/baker_test.ml @@ -70,7 +70,7 @@ let check_node_version_check_bypass_test = ~title:"baker node version check bypass test" ~tags:[team; "node"; "baker"] ~supports:Protocol.(From_protocol 021) - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> let* node, client = Client.init_with_protocol `Client ~protocol () in let baker = Baker.create ~node_version_check_bypass:true node client in @@ -87,7 +87,7 @@ let check_node_version_allowed_test = ~title:"baker node version allowed test" ~tags:[team; "node"; "baker"] ~supports:Protocol.(From_protocol 022) - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> let* node, client = Client.init_with_protocol `Client ~protocol () in let* _baker = @@ -101,7 +101,7 @@ let check_node_version_no_commit_allowed_test = ~title:"baker node version no commit allowed test" ~tags:[team; "node"; "baker"] ~supports:Protocol.(From_protocol 022) - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> let* node, client = Client.init_with_protocol `Client ~protocol () in let* _baker = @@ -114,7 +114,7 @@ let baker_reward_test = ~__FILE__ ~title:"Baker rewards" ~tags:[team; "baker"; "rewards"] - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) (fun protocol -> let* parameter_file = Protocol.write_parameter_file @@ -171,7 +171,7 @@ let baker_simple_test = ~__FILE__ ~title:"baker test" ~tags:[team; "node"; "baker"] - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> let* _ = baker_test protocol ~keys:(Account.Bootstrap.keys |> Array.to_list) @@ -183,7 +183,7 @@ let baker_stresstest = ~__FILE__ ~title:"baker stresstest" ~tags:[team; "node"; "baker"; "stresstest"] - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> let* node, client = Client.init_with_protocol `Client ~protocol () ~timestamp:Now @@ -200,7 +200,7 @@ let baker_stresstest_apply = ~__FILE__ ~title:"baker stresstest with forced application" ~tags:[team; "node"; "baker"; "stresstest"; "apply"] - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> let* node, client = Client.init_with_protocol `Client ~protocol () ~timestamp:Now @@ -291,7 +291,7 @@ let baker_remote_test = ~__FILE__ ~title:"Baker in RPC-only mode" ~tags:[team; "baker"; "remote"] - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> let* node, client = Client.init_with_protocol `Client ~protocol () ~timestamp:Now @@ -305,7 +305,7 @@ let baker_check_consensus_branch = ~__FILE__ ~title:"Baker check branch in consensus operations" ~tags:[team; "baker"; "grandparent"; "parent"] - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> Log.info "Init client and node with protocol %s" (Protocol.name protocol) ; let* node, client = @@ -353,7 +353,7 @@ let force_apply_from_round = ~title:"Baker check force apply from round" ~tags:[team; "baker"; "force_apply_from_round"] ~supports:Protocol.(From_protocol 021) - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> log_step 1 "initialize a node and a client with protocol" ; let* node, client = @@ -618,7 +618,7 @@ let simple_attestations_aggregation = ~title:"Simple attestations aggregation" ~tags:[team; "baker"; "attestation"; "aggregation"] ~supports:Protocol.(From_protocol 023) - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> log_step 1 "Initialize a node and a client with protocol" ; let consensus_rights_delay = 1 in @@ -704,7 +704,7 @@ let prequorum_check_levels = ~__FILE__ ~title:"prequorum monitoring check operations level" ~tags:[team; "prequorum"; "monitoring"; "check"] - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> let parameter_file = Protocol.parameter_file ~constants:Constants_mainnet protocol @@ -823,7 +823,7 @@ let attestations_aggregation_on_reproposal = ~title:"Attestations aggregation on reproposal" ~tags:[team; "baker"; "attestation"; "aggregation"; "reproposal"] ~supports:Protocol.(From_protocol 023) - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> let consensus_rights_delay = 1 in let consensus_committee_size = 256 in diff --git a/tezt/tests/cloud/dal.ml b/tezt/tests/cloud/dal.ml index ed19eb12658c..eaa2213906d9 100644 --- a/tezt/tests/cloud/dal.ml +++ b/tezt/tests/cloud/dal.ml @@ -3808,7 +3808,7 @@ let register (module Cli : Scenarios_cli.Dal) = [ "octez-dal-node"; "octez-client"; - Tezt_wrapper.Uses.path Constant.octez_agnostic_baker; + Tezt_wrapper.Uses.path Constant.octez_baker; ] @ (if Cli.etherlink then ["evm_kernel.wasm"; "octez-evm-node"; "octez-smart-rollup-node"] diff --git a/tezt/tests/cloud/tezos.ml b/tezt/tests/cloud/tezos.ml index 37398701c8df..fd0a71ecf630 100644 --- a/tezt/tests/cloud/tezos.ml +++ b/tezt/tests/cloud/tezos.ml @@ -449,8 +449,8 @@ module Agnostic_baker = struct module Agent = struct let init ?(group = "L1") ?env ?name ~delegates - ?(path = Uses.path Constant.octez_agnostic_baker) ~client - ?dal_node_rpc_endpoint ?dal_node_timeout_percentage node cloud agent = + ?(path = Uses.path Constant.octez_baker) ~client ?dal_node_rpc_endpoint + ?dal_node_timeout_percentage node cloud agent = let* path = Agent.copy agent ~source:path in let* () = Cloud.register_binary diff --git a/tezt/tests/dal.ml b/tezt/tests/dal.ml index 5defebc09fa1..92818689acf6 100644 --- a/tezt/tests/dal.ml +++ b/tezt/tests/dal.ml @@ -3557,7 +3557,7 @@ let register_end_to_end_tests ~protocols = ~activation_timestamp:(Ago activation_timestamp) ~minimal_block_delay:(string_of_int block_delay) ~tags - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) title (e2e_test_script ~slot_index @@ -4522,7 +4522,7 @@ let test_migration_accuser_issue ~migrate_from ~migrate_to = ~scenario ~tags ~description - ~uses:[Constant.octez_agnostic_baker] + ~uses:[Constant.octez_baker] ~activation_timestamp:Now ~operator_profiles:[slot_index] ~minimal_block_delay: @@ -7332,8 +7332,7 @@ let scenario_tutorial_dal_baker = ~regression:true ~__FILE__ ~tags:[team; Tag.memory_3k; "tutorial"; "dal"; "baker"] - ~uses:(fun _protocol -> - [Constant.octez_agnostic_baker; Constant.octez_dal_node]) + ~uses:(fun _protocol -> [Constant.octez_baker; Constant.octez_dal_node]) (Printf.sprintf "%s" description) (fun protocol -> (* Note: Step 1 consists in setting up docker which we don't use @@ -10207,7 +10206,7 @@ let register ~protocols = test_attester_with_bake_for protocols ; scenario_with_layer1_and_dal_nodes - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) ~attestation_threshold:100 ~attestation_lag:16 ~activation_timestamp:Now @@ -10263,7 +10262,7 @@ let register ~protocols = protocols ; scenario_with_layer1_and_dal_nodes "baker registers profiles with dal node" - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) ~activation_timestamp:Now ~prover:false test_baker_registers_profiles @@ -10382,7 +10381,7 @@ let register ~protocols = test_attesters_receive_dal_rewards (List.filter (fun p -> Protocol.number p >= 022) protocols) ; scenario_with_layer1_and_dal_nodes - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) ~tags:["restart"] ~activation_timestamp:Now ~operator_profiles:[0] @@ -10391,7 +10390,7 @@ let register ~protocols = test_restart_dal_node protocols ; scenario_with_layer1_and_dal_nodes - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) ~tags:["restart"] ~activation_timestamp:Now ~bootstrap_profile:true @@ -10488,7 +10487,7 @@ let register ~protocols = register_end_to_end_tests ~protocols ; dal_crypto_benchmark () ; scenario_with_layer1_node - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) ~activation_timestamp:Now "mockup get_attestable_slots" use_mockup_node_for_getting_attestable_slots diff --git a/tezt/tests/http_cache_headers.ml b/tezt/tests/http_cache_headers.ml index 62b282439333..56083b2a7248 100644 --- a/tezt/tests/http_cache_headers.ml +++ b/tezt/tests/http_cache_headers.ml @@ -117,7 +117,7 @@ let test_if_none_match ~rpc_external = ~title ~tags:["rpc"; "middleware"; "http_cache_headers"] ~supports:(From_protocol 19) - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> Log.info "Initialize client, node and baker" ; let* node, client = diff --git a/tezt/tests/liquidity_baking_per_block_votes.ml b/tezt/tests/liquidity_baking_per_block_votes.ml index c20211335793..aa2922d57c59 100644 --- a/tezt/tests/liquidity_baking_per_block_votes.ml +++ b/tezt/tests/liquidity_baking_per_block_votes.ml @@ -110,7 +110,7 @@ let test_all_per_block_votes = ~tags:[team; "liquidity"; "baking"; "votes"] ~supports: (Protocol.Between_protocols (Protocol.number Alpha, Protocol.number Alpha)) - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> let ( >|= ) = Lwt.( >|= ) in let error_prefix = "baker." ^ Protocol.encoding_prefix protocol ^ "." in diff --git a/tezt/tests/nonce_seed_revelation.ml b/tezt/tests/nonce_seed_revelation.ml index 185c3654b8d7..6610edccb2c4 100644 --- a/tezt/tests/nonce_seed_revelation.ml +++ b/tezt/tests/nonce_seed_revelation.ml @@ -57,7 +57,7 @@ let test_nonce_seed_revelation = ~__FILE__ ~title:"Nonce seed revelation" ~tags:[team; "nonce"; "seed"; "revelation"; Tag.memory_3k] - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> (* Run a node and a baker. The node runs in archive mode to obtain metadata with [RPC.get_chain_block]. *) @@ -235,7 +235,7 @@ let test_baking_nonce_migration = ~__FILE__ ~title:"Baking nonce format migration" ~tags:[team; "nonce"; "migration"] - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> Log.info "Initialize node and client" ; let* node, client = diff --git a/tezt/tests/protocol_migration.ml b/tezt/tests/protocol_migration.ml index f86230bed7e7..5ced32e721fc 100644 --- a/tezt/tests/protocol_migration.ml +++ b/tezt/tests/protocol_migration.ml @@ -550,7 +550,7 @@ let test_migration_with_bakers ?(migration_level = 4) "from_" ^ Protocol.tag migrate_from; "to_" ^ Protocol.tag migrate_to; ] - ~uses:[Constant.octez_agnostic_baker] + ~uses:[Constant.octez_baker] @@ fun () -> let* client, node = user_migratable_node_init ~migration_level ~migrate_to () @@ -650,7 +650,7 @@ let test_forked_migration_manual ?(migration_level = 4) "from_" ^ Protocol.tag migrate_from; "to_" ^ Protocol.tag migrate_to; ] - ~uses:[Constant.octez_agnostic_baker] + ~uses:[Constant.octez_baker] ~title: (Printf.sprintf "manually forked migration blocks from %s to %s" @@ -850,7 +850,7 @@ let test_forked_migration_bakers ~migrate_from ~migrate_to = "from_" ^ Protocol.tag migrate_from; "to_" ^ Protocol.tag migrate_to; ]) - ~uses:[Constant.octez_agnostic_baker] + ~uses:[Constant.octez_baker] ~title: (Printf.sprintf "agnostic baker forked migration blocks from %s to %s" diff --git a/tezt/tests/signer_test.ml b/tezt/tests/signer_test.ml index bf4e4d231dc2..154d1527789e 100644 --- a/tezt/tests/signer_test.ml +++ b/tezt/tests/signer_test.ml @@ -74,8 +74,7 @@ let signer_simple_test = ~__FILE__ ~title:"signer test" ~tags:[team; "node"; "baker"; "tz1"] - ~uses:(fun _protocol -> - [Constant.octez_signer; Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_signer; Constant.octez_baker]) @@ fun protocol -> let* _ = signer_test protocol ~keys:(Account.Bootstrap.keys |> Array.to_list) diff --git a/tezt/tests/synchronisation_heuristic.ml b/tezt/tests/synchronisation_heuristic.ml index 9998fff4937e..31c0426bea88 100644 --- a/tezt/tests/synchronisation_heuristic.ml +++ b/tezt/tests/synchronisation_heuristic.ml @@ -232,7 +232,7 @@ let test_threshold_zero = ~title:"bootstrap: test threshold zero" ~tags: [team; Tag.flaky; "synchronisation_threshold"; "bootstrap"; "threshold"] - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> Log.info "Setup network" ; let* node, client = @@ -269,7 +269,7 @@ let test_threshold_one = ~__FILE__ ~title:"bootstrap: test threshold one" ~tags:[team; "bootstrap"; "threshold"] - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> Log.info "Add a first peer with threshold zero" ; let* node, client = @@ -309,7 +309,7 @@ let test_threshold_two = ~title:"bootstrap: test threshold two" ~tags: [team; Tag.flaky; "synchronisation_threshold"; "bootstrap"; "threshold"] - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> Log.info "Add a first peer with threshold zero" ; let* node, client = @@ -378,7 +378,7 @@ let test_threshold_stuck = ~title:"bootstrap: test threshold stuck" ~tags: [team; Tag.flaky; "synchronisation_threshold"; "bootstrap"; "threshold"] - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> let sync_latency = 3 in @@ -442,7 +442,7 @@ let test_threshold_split_view = ~title:"bootstrap: test threshold split view" ~tags: [team; Tag.flaky; "synchronisation_threshold"; "bootstrap"; "threshold"] - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> Log.info "Add two peers with threshold zero, and one with threshold 2 and a high \ @@ -517,7 +517,7 @@ let test_many_nodes_bootstrap = "threshold"; Tag.memory_4k; ] - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> let num_nodes = 8 in let running_time = 10.0 in diff --git a/tezt/tests/vdf_test.ml b/tezt/tests/vdf_test.ml index ff785822f27b..9b54feb301a8 100644 --- a/tezt/tests/vdf_test.ml +++ b/tezt/tests/vdf_test.ml @@ -243,7 +243,7 @@ let vdf_cycles : Protocol.t list -> unit = ~__FILE__ ~title:"VDF daemon" ~tags:[team; "vdf"] - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> let n_cycles = 2 in let* node, client, blocks_per_cycle, nonce_revelation_threshold = @@ -343,7 +343,7 @@ let vdf_cancel : Protocol.t list -> unit = ~__FILE__ ~title:"Cancelling VDF computation" ~tags:[team; "vdf"] - ~uses:(fun _protocol -> [Constant.octez_agnostic_baker]) + ~uses:(fun _protocol -> [Constant.octez_baker]) @@ fun protocol -> (* Override the `vdf_difficulty` constant in order ensure that * a VDF computation started in the last block of a cycle will not be finished diff --git a/tezt/tests/voting.ml b/tezt/tests/voting.ml index ac8b4d0ae122..75d8ed44ae2a 100644 --- a/tezt/tests/voting.ml +++ b/tezt/tests/voting.ml @@ -890,7 +890,7 @@ let test_user_activated_protocol_override_baker_vote ~from_protocol ~to_protocol "from_" ^ Protocol.tag from_protocol; "to_" ^ Protocol.tag to_protocol; ] - ~uses:[Protocol.accuser to_protocol; Constant.octez_agnostic_baker] + ~uses:[Protocol.accuser to_protocol; Constant.octez_baker] @@ fun () -> let node_arguments = [Node.Synchronisation_threshold 0] in let to_protocol_hash = Protocol.hash to_protocol in -- GitLab From 7650c3b4712d5afb85d51601f4886d758163f746 Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Fri, 25 Apr 2025 12:00:00 +0300 Subject: [PATCH 09/15] Tezt_wrapper: Rename octez_agnostic_baker to octez_baker --- src/bin_tps_evaluation/benchmark_tps_command.ml | 2 +- src/bin_tps_evaluation/gas_tps_command.ml | 2 +- .../expected/tezt_wrapper.ml/runtime-dependency-tags.out | 2 +- tezt/lib_wrapper/tezt_wrapper.ml | 2 +- tezt/lib_wrapper/tezt_wrapper.mli | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bin_tps_evaluation/benchmark_tps_command.ml b/src/bin_tps_evaluation/benchmark_tps_command.ml index 6a0b1c1595f3..c470e24cc622 100644 --- a/src/bin_tps_evaluation/benchmark_tps_command.ml +++ b/src/bin_tps_evaluation/benchmark_tps_command.ml @@ -297,7 +297,7 @@ let register () = ~tags:[Dashboard.Test.benchmark_tps] ~timeout:(Long_test.Minutes 60) ~executors:Long_test.[x86_executor1] - ~uses:[Tezt_wrapper.Uses.octez_agnostic_baker] + ~uses:[Tezt_wrapper.Uses.octez_baker] (fun () -> let lift_protocol_limits = Cli.get_bool ~default:false "lift-protocol-limits" diff --git a/src/bin_tps_evaluation/gas_tps_command.ml b/src/bin_tps_evaluation/gas_tps_command.ml index f264ee697164..b96869f2d3b5 100644 --- a/src/bin_tps_evaluation/gas_tps_command.ml +++ b/src/bin_tps_evaluation/gas_tps_command.ml @@ -82,7 +82,7 @@ let register () = ~tags:[Dashboard.Test.gas_tps] ~timeout:(Long_test.Minutes 60) ~executors:Long_test.[x86_executor1] - ~uses:[Tezt_wrapper.Uses.octez_agnostic_baker] + ~uses:[Tezt_wrapper.Uses.octez_baker] (fun () -> let average_block_path = Cli.get ~default:None (fun s -> Some (Some s)) "average-block" 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 ace14c19a5b7..f16d10d6e24f 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 @@ -12,7 +12,7 @@ accuser_psquebec: octez-accuser-PsQuebec accuser_psriotum: octez-accuser-PsRiotum accuser_alpha: octez-accuser-alpha admin_client: octez-admin-client -agnostic_baker: octez-baker +baker: octez-baker baker_psquebec: octez-baker-PsQuebec baker_psriotum: octez-baker-PsRiotum baker_alpha: octez-baker-alpha diff --git a/tezt/lib_wrapper/tezt_wrapper.ml b/tezt/lib_wrapper/tezt_wrapper.ml index abb483e68704..d63a3717f805 100644 --- a/tezt/lib_wrapper/tezt_wrapper.ml +++ b/tezt/lib_wrapper/tezt_wrapper.ml @@ -57,7 +57,7 @@ module Uses = struct let octez_admin_client = make ~tag:"admin_client" ~path:"./octez-admin-client" () - let octez_agnostic_baker = make ~tag:"agnostic_baker" ~path:"./octez-baker" () + let octez_baker = make ~tag:"baker" ~path:"./octez-baker" () let register_meta_test () = Regression.register diff --git a/tezt/lib_wrapper/tezt_wrapper.mli b/tezt/lib_wrapper/tezt_wrapper.mli index b479221c1d1f..aca37f6fbd78 100644 --- a/tezt/lib_wrapper/tezt_wrapper.mli +++ b/tezt/lib_wrapper/tezt_wrapper.mli @@ -81,8 +81,8 @@ module Uses : sig (** ["./octez-admin-client"], with tag ["admin_client"]. *) val octez_admin_client : t - (** ["./octez-baker"], with tag ["agnostic_baker"]. *) - val octez_agnostic_baker : t + (** ["./octez-baker"], with tag ["baker"]. *) + val octez_baker : t (** Register a test that generates: {[ -- GitLab From 7bccd28fd1510e825dfa7361fcdcb8489d0dd711 Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Fri, 25 Apr 2025 12:06:10 +0300 Subject: [PATCH 10/15] Agnostic_baker: Rename main binary --- manifest/product_octez.ml | 6 +++--- src/{bin_agnostic_baker => bin_baker}/README.md | 0 src/{bin_agnostic_baker => bin_baker}/dune | 2 +- .../main_agnostic_baker.ml => bin_baker/main_baker.ml} | 0 src/bin_client/octez-init-sandboxed-client.sh | 2 +- tobi/config | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) rename src/{bin_agnostic_baker => bin_baker}/README.md (100%) rename src/{bin_agnostic_baker => bin_baker}/dune (97%) rename src/{bin_agnostic_baker/main_agnostic_baker.ml => bin_baker/main_baker.ml} (100%) diff --git a/manifest/product_octez.ml b/manifest/product_octez.ml index 008e0c9e58c4..2af8fba75a8c 100644 --- a/manifest/product_octez.ml +++ b/manifest/product_octez.ml @@ -8551,7 +8551,7 @@ let _octez_node = ~section:"bin"; ] -let _octez_agnostic_baker = +let _octez_baker = let (PPX {preprocess; preprocessor_deps}) = ppx_profiler in let protocol_deps = let deps_for_protocol protocol = @@ -8567,8 +8567,8 @@ let _octez_agnostic_baker = in public_exe "octez-baker" - ~path:"src/bin_agnostic_baker" - ~internal_name:"main_agnostic_baker" + ~path:"src/bin_baker" + ~internal_name:"main_baker" ~synopsis:"Tezos: `octez-baker` binary for baking" ~preprocess ~preprocessor_deps diff --git a/src/bin_agnostic_baker/README.md b/src/bin_baker/README.md similarity index 100% rename from src/bin_agnostic_baker/README.md rename to src/bin_baker/README.md diff --git a/src/bin_agnostic_baker/dune b/src/bin_baker/dune similarity index 97% rename from src/bin_agnostic_baker/dune rename to src/bin_baker/dune index f084a8bff243..7f4cf480a4e6 100644 --- a/src/bin_agnostic_baker/dune +++ b/src/bin_baker/dune @@ -2,7 +2,7 @@ ; Edit file manifest/main.ml instead. (executable - (name main_agnostic_baker) + (name main_baker) (public_name octez-baker) (package octez-baker) (instrumentation (backend bisect_ppx)) diff --git a/src/bin_agnostic_baker/main_agnostic_baker.ml b/src/bin_baker/main_baker.ml similarity index 100% rename from src/bin_agnostic_baker/main_agnostic_baker.ml rename to src/bin_baker/main_baker.ml diff --git a/src/bin_client/octez-init-sandboxed-client.sh b/src/bin_client/octez-init-sandboxed-client.sh index 43bd38f691f8..f95f18c9b779 100755 --- a/src/bin_client/octez-init-sandboxed-client.sh +++ b/src/bin_client/octez-init-sandboxed-client.sh @@ -131,7 +131,7 @@ main() { protocol_underscore=$(echo "$protocol" | tr -- - _) protocol_without_number=$(echo "$protocol" | tr -d "\-[0-9]") local_baker="$bin_dir/../../_build/default/src/proto_$protocol_underscore/bin_baker/main_baker_$protocol_underscore.exe" - local_agnostic_baker="$bin_dir/../../_build/default/src/bin_agnostic_baker/main_agnostic_baker.exe" + local_agnostic_baker="$bin_dir/../../_build/default/src/bin_baker/main_baker.exe" local_agnostic_accuser="$bin_dir/../../_build/default/src/bin_agnostic_accuser/main_agnostic_accuser.exe" local_accuser="$bin_dir/../../_build/default/src/proto_$protocol_underscore/bin_accuser/main_accuser_$protocol_underscore.exe" local_sc_rollup_node="$bin_dir/../../_build/default/src/proto_$protocol_underscore/bin_sc_rollup_node/main_sc_rollup_node_$protocol_underscore.exe" diff --git a/tobi/config b/tobi/config index 0a7f5b13442d..8e7cd5142d49 100644 --- a/tobi/config +++ b/tobi/config @@ -52,7 +52,7 @@ octez-accuser-PsQuebec: src/proto_021_PsQuebec/bin_accuser octez-accuser-PsRiotum: src/proto_022_PsRiotum/bin_accuser octez-accuser-alpha: src/proto_alpha/bin_accuser octez-alcotezt: tezt/lib_alcotezt -octez-baker: src/bin_agnostic_baker +octez-baker: src/bin_baker octez-baker-PsQuebec: src/proto_021_PsQuebec/bin_baker octez-baker-PsRiotum: src/proto_022_PsRiotum/bin_baker octez-baker-alpha: src/proto_alpha/bin_baker -- GitLab From 7c61f2e5cba3d977c800312bf1167e095dce65ed Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Fri, 25 Apr 2025 12:10:12 +0300 Subject: [PATCH 11/15] Tezt: Protocol_migration: Rename agnostic_baker --- tezt/tests/protocol_migration.ml | 36 +++++++++++++------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/tezt/tests/protocol_migration.ml b/tezt/tests/protocol_migration.ml index 5ced32e721fc..4c926ffdcdb1 100644 --- a/tezt/tests/protocol_migration.ml +++ b/tezt/tests/protocol_migration.ml @@ -518,8 +518,7 @@ let start_protocol ?consensus_threshold ?round_duration ~parameter_file client -(** Test that migration occurring through agnostic baker daemons does not halt the - chain. +(** Test that migration occurring through baker daemons does not halt the chain. This has become an issue of sort after updating the consensus protocol to Tenderbake. For one, attestations have become mandatory, and not only a sign @@ -539,7 +538,7 @@ let test_migration_with_bakers ?(migration_level = 4) daemon(s)" (Protocol.tag migrate_from) (Protocol.tag migrate_to) - "agnostic_baker") + "baker") ~tags: [ team; @@ -569,10 +568,8 @@ let test_migration_with_bakers ?(migration_level = 4) (fun account -> account.Account.alias) (Array.to_list Account.Bootstrap.keys) in - Log.info "Launching an agnostic baker" ; - let* _agnostic_baker = - Baker.init ~name:"agnostic_baker" node client ~delegates - in + Log.info "Launching a baker" ; + let* _baker = Baker.init ~name:"baker" node client ~delegates in let* _ret = Node.wait_for_level node migration_level in let* () = check_adaptive_issuance_launch_cycle ~loc:__LOC__ ~migrate_from client @@ -853,7 +850,7 @@ let test_forked_migration_bakers ~migrate_from ~migrate_to = ~uses:[Constant.octez_baker] ~title: (Printf.sprintf - "agnostic baker forked migration blocks from %s to %s" + "baker forked migration blocks from %s to %s" (Protocol.tag migrate_from) (Protocol.tag migrate_to)) @@ fun () -> @@ -886,8 +883,8 @@ let test_forked_migration_bakers ~migrate_from ~migrate_to = and* () = connect cn2 cn3 in Log.info - "Partition bootstrap delegates into 3 groups. Start agnostic bakers on a \ - separate node for each group of delegates." ; + "Partition bootstrap delegates into 3 groups. Start bakers on a separate \ + node for each group of delegates." ; (* The groups are chosen considering baker rights at levels 4 and 5, see comment further below. *) let group1 = @@ -902,8 +899,8 @@ let test_forked_migration_bakers ~migrate_from ~migrate_to = Format.pp_print_list ~pp_sep Format.pp_print_string in - let agnostic_baker (node, client, delegates) = - let name = sf "agnostic_baker_%s" (Node.name node) in + let baker (node, client, delegates) = + let name = sf "baker_%s" (Node.name node) in Log.info "Start %s for %a." name pp_delegates delegates ; let* baker = Baker.init ~name ~delegates node client in Baker.log_block_injection ~color:Log.Color.FG.yellow baker ; @@ -966,21 +963,18 @@ let test_forked_migration_bakers ~migrate_from ~migrate_to = in let* () = - let* agnostic_baker1 = agnostic_baker group1 - and* _agnostic_baker2 = agnostic_baker group2 - and* agnostic_baker3 = agnostic_baker group3 in + let* baker1 = baker group1 + and* _baker2 = baker group2 + and* baker3 = baker group3 in let* () = start_protocol () in let* () = check_adaptive_issuance_launch_cycle ~loc:__LOC__ ~migrate_from client1 in - let* () = wait_for_qc_at_level agnostic_baker1 pre_migration_level in + let* () = wait_for_qc_at_level baker1 pre_migration_level in let* () = disconnect_clusters () in let wait_for () = - let* () = - wait_for_post_migration_proposal agnostic_baker1 post_migration_level - and* () = - wait_for_post_migration_proposal agnostic_baker3 post_migration_level - in + let* () = wait_for_post_migration_proposal baker1 post_migration_level + and* () = wait_for_post_migration_proposal baker3 post_migration_level in unit in check_post_migration_proposal ~wait_for -- GitLab From f9aa16e29fb93810ea6ee298757ad12a64c0fefc Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Fri, 25 Apr 2025 12:13:36 +0300 Subject: [PATCH 12/15] Tezt_cloud: Rename agnostic_baker --- tezt/tests/cloud/layer1.ml | 10 +++++----- tezt/tests/cloud/tezos.ml | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tezt/tests/cloud/layer1.ml b/tezt/tests/cloud/layer1.ml index 7f95e84e386a..5a44f9289365 100644 --- a/tezt/tests/cloud/layer1.ml +++ b/tezt/tests/cloud/layer1.ml @@ -451,9 +451,9 @@ let init_baker_i i (configuration : configuration) cloud ~peers (agent, node, name) in let* baker = - toplog "init_baker: Initialize agnostic baker" ; - let name = name ^ "-agnostic-baker" in - let* agnostic_baker = + toplog "init_baker: Initialize baker" ; + let name = name ^ "-baker" in + let* baker = Baker.Agent.init ~env:yes_crypto_env ~name @@ -463,9 +463,9 @@ let init_baker_i i (configuration : configuration) cloud ~peers cloud agent in - let* () = Baker.wait_for_ready agnostic_baker in + let* () = Baker.wait_for_ready baker in toplog "init_baker: %s is ready!" name ; - Lwt.return agnostic_baker + Lwt.return baker in Lwt.return { diff --git a/tezt/tests/cloud/tezos.ml b/tezt/tests/cloud/tezos.ml index fd0a71ecf630..02523fd02365 100644 --- a/tezt/tests/cloud/tezos.ml +++ b/tezt/tests/cloud/tezos.ml @@ -444,8 +444,8 @@ module Client = struct end end -module Agnostic_baker = struct - include Agnostic_baker +module Baker = struct + include Baker module Agent = struct let init ?(group = "L1") ?env ?name ~delegates -- GitLab From ce3444ac54d33f3e639dba1523608c8bb790e168 Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Fri, 25 Apr 2025 12:15:56 +0300 Subject: [PATCH 13/15] Agnostic_accuser: Rename binary code --- manifest/product_octez.ml | 6 +++--- src/{bin_agnostic_accuser => bin_accuser}/README.md | 0 src/{bin_agnostic_accuser => bin_accuser}/dune | 2 +- .../main_accuser.ml} | 0 src/bin_client/octez-init-sandboxed-client.sh | 2 +- tobi/config | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) rename src/{bin_agnostic_accuser => bin_accuser}/README.md (100%) rename src/{bin_agnostic_accuser => bin_accuser}/dune (97%) rename src/{bin_agnostic_accuser/main_agnostic_accuser.ml => bin_accuser/main_accuser.ml} (100%) diff --git a/manifest/product_octez.ml b/manifest/product_octez.ml index 2af8fba75a8c..ec34098af486 100644 --- a/manifest/product_octez.ml +++ b/manifest/product_octez.ml @@ -8586,7 +8586,7 @@ let _octez_baker = @ protocol_deps) ~linkall:true -let _octez_agnostic_accuser = +let _octez_accuser = let (PPX {preprocess; preprocessor_deps}) = ppx_profiler in let protocol_deps = let deps_for_protocol protocol = @@ -8602,8 +8602,8 @@ let _octez_agnostic_accuser = in public_exe "octez-accuser" - ~path:"src/bin_agnostic_accuser" - ~internal_name:"main_agnostic_accuser" + ~path:"src/bin_accuser" + ~internal_name:"main_accuser" ~synopsis:"Tezos: `octez-accuser` binary for denunciation" ~preprocess ~preprocessor_deps diff --git a/src/bin_agnostic_accuser/README.md b/src/bin_accuser/README.md similarity index 100% rename from src/bin_agnostic_accuser/README.md rename to src/bin_accuser/README.md diff --git a/src/bin_agnostic_accuser/dune b/src/bin_accuser/dune similarity index 97% rename from src/bin_agnostic_accuser/dune rename to src/bin_accuser/dune index 93bd35e068ef..9d8c1e30d1f5 100644 --- a/src/bin_agnostic_accuser/dune +++ b/src/bin_accuser/dune @@ -2,7 +2,7 @@ ; Edit file manifest/main.ml instead. (executable - (name main_agnostic_accuser) + (name main_accuser) (public_name octez-accuser) (package octez-accuser) (instrumentation (backend bisect_ppx)) diff --git a/src/bin_agnostic_accuser/main_agnostic_accuser.ml b/src/bin_accuser/main_accuser.ml similarity index 100% rename from src/bin_agnostic_accuser/main_agnostic_accuser.ml rename to src/bin_accuser/main_accuser.ml diff --git a/src/bin_client/octez-init-sandboxed-client.sh b/src/bin_client/octez-init-sandboxed-client.sh index f95f18c9b779..a36a6f7aac65 100755 --- a/src/bin_client/octez-init-sandboxed-client.sh +++ b/src/bin_client/octez-init-sandboxed-client.sh @@ -132,7 +132,7 @@ main() { protocol_without_number=$(echo "$protocol" | tr -d "\-[0-9]") local_baker="$bin_dir/../../_build/default/src/proto_$protocol_underscore/bin_baker/main_baker_$protocol_underscore.exe" local_agnostic_baker="$bin_dir/../../_build/default/src/bin_baker/main_baker.exe" - local_agnostic_accuser="$bin_dir/../../_build/default/src/bin_agnostic_accuser/main_agnostic_accuser.exe" + local_agnostic_accuser="$bin_dir/../../_build/default/src/bin_accuser/main_accuser.exe" local_accuser="$bin_dir/../../_build/default/src/proto_$protocol_underscore/bin_accuser/main_accuser_$protocol_underscore.exe" local_sc_rollup_node="$bin_dir/../../_build/default/src/proto_$protocol_underscore/bin_sc_rollup_node/main_sc_rollup_node_$protocol_underscore.exe" parameters_file="$bin_dir/../../_build/default/src/proto_$protocol_underscore/lib_parameters/sandbox-parameters.json" diff --git a/tobi/config b/tobi/config index 8e7cd5142d49..0ae74e0d794e 100644 --- a/tobi/config +++ b/tobi/config @@ -47,7 +47,7 @@ internal-devtools: devtools/tztop internal-devtools_proto-context-du: devtools/proto_context_du kaitai: client-libs/kaitai-ocaml/src, client-libs/kaitai-ocaml/test kaitai-of-data-encoding: client-libs/lib_kaitai_of_data_encoding, client-libs/lib_kaitai_of_data_encoding/test -octez-accuser: src/bin_agnostic_accuser +octez-accuser: src/bin_accuser octez-accuser-PsQuebec: src/proto_021_PsQuebec/bin_accuser octez-accuser-PsRiotum: src/proto_022_PsRiotum/bin_accuser octez-accuser-alpha: src/proto_alpha/bin_accuser -- GitLab From 9164360e60d7a84fed319a7774f3e8e03b326968 Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Fri, 25 Apr 2025 12:16:16 +0300 Subject: [PATCH 14/15] Agnostic_baker: Rename leftovers --- docs/releases/version-22.rst | 2 +- src/lib_baker/configuration.ml | 6 +++--- src/lib_baker/protocol_plugins.ml | 12 ++++++------ tezt/manual_tests/baker_test.ml | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/releases/version-22.rst b/docs/releases/version-22.rst index f85051563bf5..ca686e33d188 100644 --- a/docs/releases/version-22.rst +++ b/docs/releases/version-22.rst @@ -54,7 +54,7 @@ a new protocol is detected by the node, such as during migrations or at startup. The v22 agnostic baker is **EXPERIMENTAL ONLY** and should **NOT** be used on ``mainnet``. You can use the agnostic baker on test networks and give feedback. -You can find more information on the agnostic baker in the corresponding :src:`README ` file. +You can find more information on the agnostic baker in the corresponding :src:`README ` file. Minimal hardware specifications ------------------------------- diff --git a/src/lib_baker/configuration.ml b/src/lib_baker/configuration.ml index d0a9667f630d..39a1f2a22d38 100644 --- a/src/lib_baker/configuration.ml +++ b/src/lib_baker/configuration.ml @@ -18,7 +18,7 @@ type error += Bad_preserved_levels of string let () = register_error_kind `Permanent - ~id:"agnostic_baker.configuration.block_vote_file_not_found" + ~id:"baker.configuration.block_vote_file_not_found" ~title: "The provided block vote file path does not point to an existing file." ~description: @@ -36,7 +36,7 @@ let () = (fun file_path -> Block_vote_file_not_found file_path) ; register_error_kind `Permanent - ~id:"agnostic_baker.configuration.badMinimalFeesArg" + ~id:"baker.configuration.badMinimalFeesArg" ~title:"Bad -minimal-fees arg" ~description:"invalid fee threshold in -fee-threshold" ~pp:(fun ppf literal -> @@ -46,7 +46,7 @@ let () = (fun parameter -> Bad_minimal_fees parameter) ; register_error_kind `Permanent - ~id:"badPreservedLevelsArg" + ~id:"baker.configuration.badPreservedLevelsArg" ~title:"Bad -preserved-levels arg" ~description:"invalid number of levels in -preserved-levels" ~pp:(fun ppf literal -> diff --git a/src/lib_baker/protocol_plugins.ml b/src/lib_baker/protocol_plugins.ml index 2ed10e0e265d..b3566826a921 100644 --- a/src/lib_baker/protocol_plugins.ml +++ b/src/lib_baker/protocol_plugins.ml @@ -9,13 +9,13 @@ type error += Unsupported_protocol of Protocol_hash.t let () = register_error_kind - ~id:"agnostic_baker.unsupported_protocol" - ~title:"Protocol not supported by agnostic baker" - ~description:"Protocol not supported by agnostic baker." + ~id:"baker.unsupported_protocol" + ~title:"Protocol not supported by baker" + ~description:"Protocol not supported by baker." ~pp:(fun ppf proto -> Format.fprintf ppf - "Protocol %a is not supported by the agnostic baker." + "Protocol %a is not supported by the baker." Protocol_hash.pp proto) `Permanent @@ -35,8 +35,8 @@ let register (plugin : proto_plugin) = if Protocol_hash.Table.mem proto_plugins Plugin.protocol_hash then Format.kasprintf invalid_arg - "The agnostic baker protocol plugin for protocol %a is already \ - registered. Did you register it manually multiple times?" + "The baker protocol plugin for protocol %a is already registered. Did \ + you register it manually multiple times?" Protocol_hash.pp Plugin.protocol_hash ; last_registered := Some Plugin.protocol_hash ; diff --git a/tezt/manual_tests/baker_test.ml b/tezt/manual_tests/baker_test.ml index ca0177ba4e61..6f276be51b81 100644 --- a/tezt/manual_tests/baker_test.ml +++ b/tezt/manual_tests/baker_test.ml @@ -111,7 +111,7 @@ let baker_early_preattestation_test = Protocol.register_test ~__FILE__ ~title:"Test baker early pre-attestation" - ~tags:["node"; "agnostic_baker"; "early"; "preattestation"] + ~tags:["node"; "early"; "preattestation"] ~uses:(fun _protocol -> [Constant.octez_baker]) ~supports:(Protocol.From_protocol 16) @@ fun protocol -> -- GitLab From bb5b83a26ca428b1a694f9942f181ad5757c2b2a Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Tue, 6 May 2025 12:14:48 +0100 Subject: [PATCH 15/15] Scripts: Update protocol manager script --- scripts/proto_manager.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/proto_manager.sh b/scripts/proto_manager.sh index 02bc2731e519..255e5f92319b 100755 --- a/scripts/proto_manager.sh +++ b/scripts/proto_manager.sh @@ -776,13 +776,13 @@ function copy_source() { commit_no_hooks "src: remove proto_${protocol_source}" fi - ## update agnostic_baker + ## update baker ## add protocol as active before alpha in parameters.ml - if ! grep -q "${long_hash}" src/lib_agnostic_baker/parameters.ml; then + if ! grep -q "${long_hash}" src/lib_baker/parameters.ml; then ## look for "ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK" and add "${longhash};" - sed -i.old -e "/ \"ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK\" /a \"${long_hash}\"; " src/lib_agnostic_baker/parameters.ml - ocamlformat -i src/lib_agnostic_baker/parameters.ml - commit "src: add protocol to agnostic_baker" + sed -i.old -e "/ \"ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK\" /a \"${long_hash}\"; " src/lib_baker/parameters.ml + ocamlformat -i src/lib_baker/parameters.ml + commit "src: add protocol to baker" fi } -- GitLab