[go: up one dir, main page]

[DAC II] Coordinator - Produced root page hashes are streamed to signers (whole payload endpoint)

Blocked by:

Series of MRs

Context

We plan to keep supporting the endpoint for sending whole payloads to the DAC coordinator (/dac/store_preimage).

The idea is that when a Coordinator serializes payload, received by the aforementioned endpoint, in addition to producing root hash and returning it back, it also pushes the produced root hash to the so called Data_streamer component. The goal here is that DAC Members are able to subscribe to the Coordinator's streaming component, so that every-time Coordinator produces a root hash, it is able to notify them about the new root hash. This way Members are able to fetch new payloads to sign.

For the moment it is fine to stream only the root page hash, later on we can include information such as the DAC id in this endpoint.

Implementation

For this to work we want to have the following:

  • Coordinator_data_streamer component responsible for pub/sub handling.
  • Integrate this component into the dac Node_context.t
  • Provide a streaming RPC service handled by the Coordinator, so that Member can make a streamed call to Coordinator (subsribe) (we would use streaming daemon here).
  • As a first iteration this would be implemented in the legacy mode, i.e. there is no notion of profiles.

Testing

  • We want a simple integration test, where having two DAC nodes running in thelegacy mode simulate pub sub pattern.

Follow-up MRs/

  • Once profiles (#4613 (closed)) are finished we also want to integrate streaming of root hashes into dac nodes running other then legacy mode
  • #4848 (closed)
Edited by Martin Tomazic