Originally asked here but probably more appropriate to ask on SE.
I'm working on creating a better baker binary. This baker would have more advanced features than what we get with tezos-baker such as a retry mechanism, multiple-bakers with quorum/leadership, election, etc.
Many questions have come up, but all are related to the topic:
How do calculate the
proof_of_work_nonce? In reading ocaml code, this appears to be a completely random set of bytes encoded as hex. Is this PoW based on anything? Is it checked/compared to the previous block's nonce?
It is the responsibility of the block forger to include operations (endorsements, transactions, reveals, etc) when creating the block. At level-in-cycle 4095, the block is supposed to include all
balance_updatesfor cycle rewards. What happens if the baker of 4095 does not include this information? Are the rewards forever frozen? Lost?