[go: up one dir, main page]

[DAC] Sign root page hashes when storing reveal pre-images, and return L1 operation to inject

Context

When receiving a request to store a reveal preimage, the DAL node will need to sign the root page hash with the signatures of the data availability committee. A Bitset is computed to indicate which members of the DAC signed the message. These two, together with the root page hash, are used to produce and return the L1 message that will need to be added to the rollup external inbox on L1 to trigger a reveal hash request.

The encoding currently agreed for external inbox messages changes from the one agreed as follows:

let l1_message_encoding =
    let open Data_encoding in
    let open Protocol in
    let open Alpha_context in
    union
      ~tag_size:`Uint8
      [
        case
          ~title:"Dac reveal hash message"
-          (Tag 0)
+          (Tag 42)
          (obj3
             (req "root_page_hash" Sc_rollup.Reveal_hash.encoding)
             (req "signature" Aggregate_signature.encoding)
-             (req "bitmap" uint8))
+             (req "witnesses" Bitset.encoding)
          (fun x -> Some x)
          (fun x -> x);
      ]

Closes: #3982 (closed)

Manually testing the MR

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Andrea Cerone

Merge request reports

Loading