Skip to content

Epoch Allocation And Scoping

Jonathan Lifflander edited this page Jan 12, 2021 · 14 revisions

The current epoch allocation/bit layout follows this pattern:

Basic epoch Layout:

   w-1 .............. w-h-1 ...............w-h-c-1 ....................0
   | <EpochHeader> ... | <EpochCategory> ... |      <SeqEpochID>       |

       where     h = epoch_header_num_bits (~2 bits)
                 c = epoch_category_num_bits (1 bit)
                 w = sizeof(EpochType) * 8 (i.e., 64-bit/int64_t field)
                 

Rooted epoch breakdown:

                                          w-h-c-1      w-h-c-n-1       0
                                             ^             ^           ^
                                             | .... n .... | ..........|
                                               <NodeType>  <SeqEpochID>

      where      n = sizeof(NodeType) (configurable, default 16 bits)

Thus, with default sizes, a collective epoch has 61 bits for the sequential epoch ID; a rooted epoch has 16 less bits 45 bits for the sequential epoch ID (assuming # of nodes fit in 16-bits).