[go: up one dir, main page]

DAL/Proto: Migrate skip list cells content to a richer representation

Stacked on !15352 (merged)

This MR introduces the new content of the DAL skip list cells, where we remember the publishers of the commitments and the amount of attested shards:

The new content is now:

    type t =
      | Unpublished of Header.id
      | Published of {
          header : Header.t;
          publisher : Signature.public_key_hash;
          is_proto_attested : bool;
          attested_shards : int;
          total_shards : int;
        }

while the old one was:

    type t = Unattested of Header.id | Attested of Header.t

Note that,

  • The encoding of the new content is still able to decode cells of the old format (and convert them into the new one), but no cells of the old format as supposed to be encoded anymore (except for hashing). When hashing the (new) content, an indication of when the cell was constructed (migration level) allows choosing the appropriate hash function (new vs old function/representation). This is important to keep having a deterministic hash function to preserve consistency of back-pointers.

The content is not plugged yet in the skip list. This will be done in the next MRs

Edited by Mohamed IGUERNLALA

Merge request reports

Loading