Packages

package update

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. final class BlockChunkProcessor extends NamedLogging

    Processes a chunk of events in a block, yielding a ChunkUpdate.

  2. sealed trait BlockUpdate extends Product with Serializable

    Summarizes the updates that are to be persisted and signalled individually

  3. trait BlockUpdateGenerator extends AnyRef

    Exposes functions that take the deserialized contents of a block from a blockchain integration and compute the new BlockUpdates.

    Exposes functions that take the deserialized contents of a block from a blockchain integration and compute the new BlockUpdates.

    These functions correspond to the following steps in the block processing stream pipeline:

    1. Extracting block events from a raw ledger block (extractBlockEvents).
    2. Chunking such block events into either event chunks terminated by a sequencer-addessed event or a block completion (chunkBlock).
    3. Validating and enriching chunks to yield block updates (processBlockChunk).

    In particular, these functions are responsible for the final timestamp assignment of a given submission request. The timestamp assignment works as follows:

    1. an initial timestamp is assigned to the submission request by the sequencer that writes it to the ledger
    2. each sequencer that reads the block potentially adapts the previously assigned timestamp deterministically via ensureStrictlyIncreasingTimestamp
    3. this timestamp is used to compute the BlockUpdates

    Reasoning:

    • Step 1 is done so that every sequencer sees the same timestamp for a given event.
    • Step 2 is needed because different sequencers may assign the same timestamps to different events or may not assign strictly increasing timestamps due to clock skews.

    Invariants: For step 2, we assume that every sequencer observes the same stream of events from the underlying ledger (and especially that events are always read in the same order).

  4. class BlockUpdateGeneratorImpl extends BlockUpdateGenerator with NamedLogging
  5. final case class ChunkUpdate(acknowledgements: Map[Member, CantonTimestamp] = Map.empty, invalidAcknowledgements: Seq[(Member, CantonTimestamp, BaseAlarm)] = Seq.empty, inFlightAggregationUpdates: InFlightAggregationUpdates = Map.empty, lastSequencerEventTimestamp: Option[CantonTimestamp], inFlightAggregations: InFlightAggregations, submissionsOutcomes: Seq[SubmissionOutcome] = Seq.empty) extends OrderedBlockUpdate with Product with Serializable

    Changes from processing a consecutive part of updates within a block from the blockchain.

    Changes from processing a consecutive part of updates within a block from the blockchain. We expect all values to be consistent with one another:

    • new members must exist in the registered members
    • the provided timestamps must be at or after the latest sequencer timestamp of the previous chunk or block
    • members receiving events must be registered
    • timestamps of events must not after the latest sequencer timestamp of the previous chunk or block
    • counter values for each member should be continuous
    acknowledgements

    The highest valid acknowledged timestamp for each member in the block.

    invalidAcknowledgements

    All invalid acknowledgement timestamps in the block for each member.

    inFlightAggregationUpdates

    The updates to the in-flight aggregation states. Includes the clean-up of expired aggregations.

    lastSequencerEventTimestamp

    The highest timestamp of an event in events addressed to the sequencer, if any.

    inFlightAggregations

    Updated inFlightAggregations to be used for processing subsequent chunks.

    submissionsOutcomes

    A list of internal block sequencer states after processing submissions for the chunk. This is used by the unified sequencer to generate and write events in the database sequencer.

  6. final case class CompleteBlockUpdate(block: BlockInfo) extends OrderedBlockUpdate with Product with Serializable

    Signals that all updates in a block have been delivered as chunks.

    Signals that all updates in a block have been delivered as chunks. The com.digitalasset.canton.synchronizer.block.data.BlockInfo must be consistent with the updates in all earlier ChunkUpdates. In particular:

  7. sealed trait OrderedBlockUpdate extends BlockUpdate

    Denotes an update that is generated from a block that went through ordering

Ungrouped