Skip to main content

Module proof_tree_streaming

Module proof_tree_streaming 

Source
Expand description

Distributed proof tree streaming via incremental update events.

This module provides ProofTreeStreamer which emits ProofTreeUpdate events as nodes of a crate::proof_tree::ProofTree resolve. Updates are sent through an unbounded MPSC channel so consumers can process them asynchronously or aggregate them into a ProofTreeStreamSummary.

§Design

  • Each derivation session is identified by a session_id string shared across all updates.
  • Sequence numbers (seq) are assigned atomically and monotonically so receivers can detect gaps or re-ordering.
  • A “final” update (is_final = true) signals that the session is complete. ProofTreeStreamSummary::apply sets is_complete = true when it encounters such an update.

Structs§

ProofTreeStreamSummary
Aggregated statistics collected by folding a stream of ProofTreeUpdates.
ProofTreeStreamer
Streams partial proof tree updates as nodes resolve.
ProofTreeUpdate
A single update event in an ongoing proof tree derivation.
ProofTreeUpdateSink
Receives streamed proof tree updates via an unbounded channel.