Tezt_tezos.BakerSourceA baker instance
Send SIGTERM and wait for the process to terminate.
Default timeout is 30 seconds, after which SIGKILL is sent.
See Daemon.Make.wait_for.
Wait until the baker is ready.
More precisely, wait until a "Baker started" event occurs. If this event alreay happened, return immediately.
Raw events.
val run :
?event_level:Daemon.Level.default_level ->
?event_sections_levels:(string * Daemon.Level.level) list ->
t ->
unit Lwt.tSpawn octez-baker run.
The resulting promise is fulfilled as soon as the baker has been spawned. It continues running in the background.
Liquidity baking vote values.
Returns the liquidity_baking_vote corresponding to a string, or None if the string is not a valid liquidity baking vote.
Returns the string representation of a liquidity_baking_vote.
Writes a liquidity baking votefile, as read by the bakers --votefile argument.
If path is set, the vote file is written there. Otherwise, it is written to a temporary file.
Returns the path to the file that was written.
val create :
protocol:Protocol.t ->
?name:string ->
?color:Tezt.Log.Color.t ->
?event_pipe:string ->
?runner:Tezt.Runner.t ->
?delegates:string list ->
?votefile:string ->
?liquidity_baking_toggle_vote:liquidity_baking_vote option ->
?force_apply:bool ->
?remote_mode:bool ->
?operations_pool:string ->
?dal_node:Dal_node.t ->
?minimal_nanotez_per_gas_unit:int ->
Node.t ->
Client.t ->
tCreate a baker.
This function just creates a value of type t, it does not call run.
The path to the baker binary is chosen from the protocol.
The standard output and standard error output of the baker will be logged with prefix name and color color.
Default event_pipe is a temporary file whose name is derived from name. It will be created as a named pipe so that baker events can be received.
The Node.t parameter is the node used by the baker. The baker is configured to use the node's data dir.
The Client.t parameter is the client used by the baker. The baker is configured to use the client's base directory.
If runner is specified, the baker will be spawned on this runner using SSH.
delegates is a list of account aliases (see Account.key.alias), e.g., bootstrap accounts (see Constant.bootstrap_keys), delegated to this baker. This defaults to the empty list, which is a shortcut for "every known account".
votefile and liquidity_baking_toggle_vote are passed to the baker daemon through the flags --votefile and --liquidity-baking-toggle-vote. If --liquidity-baking-toggle-vote is None, then --liquidity-baking-toggle-vote is not passed. If it is Some x then --liquidity-baking-toggle-vote x is passed. The default value is Some Pass.
operations_pool and force_apply are passed to the baker daemon through the flag --operations-pool and --force_apply.
If remote_mode is specified, the baker will run in RPC-only mode.
If dal_node is specified, then it is the DAL node that the baker queries in order to determine the attestations it sends to the L1 node. A --dal_node argument is passed to specify the DAL node's endpoint.
minimal_nanotez_per_gas_unit is an integer passed to the baker daemon through the flag --minimal-nanotez-per-gas-unit.
val init :
protocol:Protocol.t ->
?name:string ->
?color:Tezt.Log.Color.t ->
?event_pipe:string ->
?runner:Tezt.Runner.t ->
?event_sections_levels:(string * Daemon.Level.level) list ->
?delegates:string list ->
?votefile:string ->
?liquidity_baking_toggle_vote:liquidity_baking_vote option ->
?force_apply:bool ->
?remote_mode:bool ->
?operations_pool:string ->
?dal_node:Dal_node.t ->
?minimal_nanotez_per_gas_unit:int ->
Node.t ->
Client.t ->
t Lwt.tInitialize a baker.
This creates a baker, waits for it to be ready, and then returns it.
As the baker usually relies on a node, we first wait for the node to be ready and then, run the baker.
The path to the baker binary is chosen from the protocol.
The standard output and standard error output of the baker will be logged with prefix name and color color.
Default event_pipe is a temporary file whose name is derived from name. It will be created as a named pipe so that baker events can be received.
The Node.t parameter is the node used by the baker. The baker is configured to use the node's data dir.
The Client.t parameter is the client used by the baker. The baker is configured to use the client's base directory.
If runner is specified, the baker will be spawned on this runner using SSH.
delegates is a list of account aliases (see Account.key.alias), e.g., bootstrap accounts (see Constant.bootstrap_keys), delegated to this baker. This defaults to the empty list, which is a shortcut for "every known account".
votefile, liquidity_baking_toggle_vote, force_apply respectively operations_pool are passed to the baker daemon through the flags --votefile, --liquidity-baking-toggle-vote, --should-apply respectively --operations-pool.
If remote_mode is specified, the baker will run in RPC-only mode.
If dal_node is specified, then it is the DAL node that the baker queries in order to determine the attestations it sends to the L1 node. A --dal_node argument is passed to specify the DAL node's endpoint.
Log block injection events.
Show the baker daemon name, level and round of the block, and delegate for which it was injected.
This log is relatively lightweight and a good indicator of chain progress during a test. It can also be useful to observe baking rights at the levels and rounds featured in a test.
Log all baker events with Log.info on a single line each, which should be easily readable by a human.
This function should not be called by any test on a permanent basis, but is available for debugging.
If an event has an unexpected format, the anomaly is signaled with Log.warn.
If you want to see all events, don't forget to launch the baker with
~event_sections_levels:
[(String.concat "." [Protocol.encoding_prefix protocol; "baker"], `Debug)]