Skip to content

Adapt protocol genesis initial fitness

vbot requested to merge nomadic-labs/tezos:vbot@adapt_genesis_fitness into master

Context

In !6274 (merged), the introduced Mempool.init function expect that the predecessor's fitness was in a tenderbake-compatible format. This is the case for mainnet protocols (since ithaca) but it is not for the genesis protocol (used for tests). Therefore, initializing the mempool from a genesis activation block raises an error.

In this MR, the genesis produced fitness is now in the tenderbake format. This change is transparent for the rest of the code. On the other hand, this makes alpha's legacy fitness support not required anymore.

The only modification is in the genesis's client and, to discriminate genesis blocks on their fitness, the tenderbake locked round part of the fitness is used. Most other fields would be problematic as, partly, explained in the comment: version is static, level would prevent tenderbake protocols to produce blocks, predecessor round and round would impact some of the consensus logic and are supposed to be 0 when the genesis produced block is considered.

Checklist

  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR

Merge request reports