[go: up one dir, main page]

Baker: keep-alive is partially broken

This is probably a duplicate of #1880 and #2873, we should close these when we close this issue I think.

I noticed that keep-alive doesn't work in 2 setups:

Version check

If you run your baker with --node-version-check-bypass it'll work correctly

$ ./octez-baker-PsQuebec run with local node ~/.octez-node-ghostnet --liquidity-baking-toggle-vote off --without-dal --node-version-check-bypass tmp --keep-alive 
Apr 11 15:22:54.114: Compatibility between node version and baker version by passed
Apr 11 15:22:54.115: read liquidity baking toggle vote = off
Apr 11 15:22:54.115: read adaptive issuance vote = pass
Apr 11 15:22:54.115: No DAL node endpoint has been provided.
Apr 11 15:22:54.115: Future protocols might integrate DAL participation into participation rewards.
Apr 11 15:22:54.115: Bakers are encouraged
Apr 11 15:22:54.115:   to set up a DAL attester node instead of using the `--without-dal` option.
Apr 11 15:22:54.115: For instructions on how to run a DAL node, please visit
Apr 11 15:22:54.115:   https://docs.tezos.com/tutorials/join-dal-baker.
Connection failed. Retrying in 1.00 seconds...
Waiting for the node to be bootstrapped...
Connection failed. Retrying in 1.50 seconds...
Connection failed. Retrying in 2.25 seconds...
Connection failed. Retrying in 3.38 seconds...
^C(/home/valentin/work/working-tezos/octez-baker-PsQuebec) INT: triggering shutdown.

but if you don't provide the argument:

./octez-baker-PsQuebec run with local node ~/.octez-node-ghostnet --liquidity-baking-toggle-vote off --without-dal  tmp --keep-alive        
Error:
  Rpc request failed:
     - meth: GET
     - uri: http://localhost:8732/version
     - error: Unable to connect to the node: "Unix.Unix_error(Unix.ECONNREFUSED, "connect", "")"

the retry is missing for this rpc

Node bootstrap

If the nodes when the baker is running smoothly, it correctly waits to be reconnected. But this isn't true if the baker is waiting for the node to be bootstrapped for the first time:

Current head: BLbPoW5JKKnL (timestamp: 2025-04-11T13:44:53.000-00:00, validation: 2025-04-11T14:03:17.091-00:00)
Current head: BL9FCQpA625W (timestamp: 2025-04-11T13:44:57.000-00:00, validation: 2025-04-11T14:03:17.140-00:00)
Node is bootstrapped.
Waiting for protocol 021-PsQuebec to start...
Error:
  Rpc request failed:
     - meth: GET
     - uri: http://localhost:8732/monitor/heads/main?next_protocol=PsQuebecnLByd3JwTiGadoG4nGWi3HYiLXUjkibeFV8dCFeVMUg
     - error: Unable to connect to the node: "Unix.Unix_error(Unix.ECONNREFUSED, "connect", "")"

All this make the baker impossible to start if the node is not up and running.