Determine baker for next epoch

A user in the Bakery Telegram group posted a link to a Cardano forum, that discusses determining the baker for the next epoch.

Is this also possible for Concordium? And if so, is the implemented as a command in Concordium-client (or elsewhere)? Would be very helpful with baker management, ie when it’s the best time to perform an upgrade for example.

There is no direct command for this, but bakers are frozen an epoch in advance so you could get this information by using raw GetBakerList or alternatively looking at accounts and checking whether they are bakers. The bakers for the next epoch (i.e., those that can produce blocks) will be those that were registered as bakers (i.e., have sent ConfigureBaker/BakerAdd transaction) before the current epoch started.

Note that everybody that is registered as a baker will be a baker in all epochs until they deregister. There is no committee selection between different epochs.

Yes I use the raw GetBakerList to get a list of bakers, but that doesn’t tell me who’s is actually baking a block in the current epoch, right? It only tells me who has the chance of baking a block.

I am not sure what you mean exactly by “actually baking”. The way the protocol works is that there is a list of bakers with their stake, which determines the probability they will produce a block in each slot.

Up-front you cannot determine which of the bakers will win the lottery. Only the bakers themselves can check for up to 1 epoch in advance whether they will produce any blocks or not.

That’s exactly what I’m looking for. What command should a baker issue to get output where they can see if they will bake a block in the current epoch?

There is no command like that at the moment, although it has been requested before and will eventually be added to the node.

Ok, thank you. Is there a GitHub issue for this that I can follow?

I am not sure, but I can’t find it at the moment. It should be part of https://github.com/concordium/concordium-node/issues/291