Packages

package protocol

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Package Members

  1. package conflictdetection
  2. package submission
  3. package transfer
  4. package v0
  5. package validation
  6. package version

Type Members

  1. abstract class AbstractMessageProcessor extends NamedLogging with FlagCloseable

    Collects helper methods for message processing

  2. class BadRootHashMessagesRequestProcessor extends AbstractMessageProcessor
  3. sealed trait CausalityUpdate extends HasProtoV0[protocol.v0.CausalityUpdate] with HasVersionedWrapper[VersionedCausalityUpdate] with PrettyPrinting

    Represents the causal dependencies of a given request.

  4. class DefaultMessageDispatcher extends MessageDispatcher with Spanning with NamedLogging
  5. class EnterpriseMessageDispatcher extends MessageDispatcher with NamedLogging with HasFlushFuture with Spanning

    Dispatches the incoming messages of the com.digitalasset.canton.sequencing.client.SequencerClient to the different processors.

    Dispatches the incoming messages of the com.digitalasset.canton.sequencing.client.SequencerClient to the different processors. It also informs the com.digitalasset.canton.participant.protocol.conflictdetection.RequestTracker about the passing of time for messages that are not processed by the com.digitalasset.canton.participant.protocol.ProtocolProcessor.

  6. class GlobalCausalOrderer extends NamedLogging with AutoCloseable

    TODO(i5352): - Consider whether we need better performance here, or if the current implementation is sufficient

  7. trait MessageDispatcher extends AnyRef

    Dispatches the incoming messages of the com.digitalasset.canton.sequencing.client.SequencerClient to the different processors.

    Dispatches the incoming messages of the com.digitalasset.canton.sequencing.client.SequencerClient to the different processors. It also informs the conflictdetection.RequestTracker about the passing of time for messages that are not processed by the TransactionProcessor.

  8. case class MessageProcessingStartingPoint(nextRequestCounter: RequestCounter, nextSequencerCounter: SequencerCounter, prenextTimestamp: CantonTimestamp) extends PrettyPrinting with Product with Serializable

    Summarizes the counters and timestamps where request processing or replay can start

    Summarizes the counters and timestamps where request processing or replay can start

    nextRequestCounter

    The request counter for the next request to be replayed or processed.

    nextSequencerCounter

    The sequencer counter for the next event to be replayed or processed.

    prenextTimestamp

    A strict lower bound on the timestamp for the nextSequencerCounter. The bound must be tight, i.e., if a sequenced event has sequencer counter lower than nextSequencerCounter or request counter lower than nextRequestCounter, then the timestamp of the event must be less than or equal to prenextTimestamp. No sequenced event has both a higher timestamp than prenextTimestamp and a lower sequencer counter than nextSequencerCounter. No request has both a higher timestamp than prenextTimestamp and a lower request counter than nextRequestCounter.

  9. class Phase37Synchronizer extends NamedLogging

    Synchronizes the request processing of phases 3 and 7.

    Synchronizes the request processing of phases 3 and 7. At the end of phase 3, every request must signal that it has reached com.digitalasset.canton.participant.protocol.RequestJournal.RequestState.Confirmed via markConfirmed. At the beginning of phase 7, requests can wait on the completion of phase 3 via awaitConfirmed.

    Eventually, all requests above initRc should signal via markConfirmed or skipRequestCounter. Otherwise, the synchronizer becomes a memory leak. This class assumes that the timestamps in request IDs grow strictly with the non-skipped request counters.

  10. case class ProcessingStartingPoints extends NoCopy with PrettyPrinting with Product with Serializable

    Starting points for processing on a com.digitalasset.canton.participant.sync.SyncDomain.

    Starting points for processing on a com.digitalasset.canton.participant.sync.SyncDomain. The cleanReplay should be no later than the processing (in all components).

    Exceptions thrown

    ProcessingStartingPoints.InvalidStartingPointsException if cleanReplay is after (in any component) processing

  11. trait ProcessingSteps[SubmissionParam, SubmissionResult, RequestViewType <: ViewType, Result <: SignedProtocolMessageContent, SubmissionError <: WrapsProcessorError] extends AnyRef

    Interface for processing steps that are specific to request types.

    Interface for processing steps that are specific to request types. The ProtocolProcessor wires up these steps with the necessary synchronization and state management, including common processing steps.

    Every phase has one main entry method (Phase i, step 1), which produces data for the ProtocolProcessor, The phases also have methods to be called using the results from previous methods for each step.

    SubmissionParam

    The bundled submission parameters

    SubmissionResult

    The bundled submission results

    RequestViewType

    The type of view trees used by the request

    Result

    The specific type of the result message

    SubmissionError

    The type of errors that can occur during submission processing

  12. abstract class ProtocolProcessor[SubmissionParam, SubmissionResult, RequestViewType <: ViewType, Result <: MediatorResult with SignedProtocolMessageContent, SubmissionError <: WrapsProcessorError] extends AbstractMessageProcessor with RequestProcessor[RequestViewType]

    The ProtocolProcessor combines ProcessingSteps specific to a particular kind of request with the common processing steps and wires them up with the state updates and synchronization.

    The ProtocolProcessor combines ProcessingSteps specific to a particular kind of request with the common processing steps and wires them up with the state updates and synchronization.

    SubmissionParam

    The bundled submission parameters

    SubmissionResult

    The bundled submission results

    RequestViewType

    The type of view trees used by the request

    Result

    The specific type of the result message

    SubmissionError

    The type of errors that occur during submission processing

  13. class RepairProcessor extends NamedLogging

    Deals with repair request as part of messsage processing.

    Deals with repair request as part of messsage processing. As is, it merely skips the request counters.

  14. trait RequestCounterAllocator extends AnyRef

    Allocates com.digitalasset.canton.participant.RequestCounters for the transaction processor.

  15. class RequestCounterAllocatorImpl extends RequestCounterAllocator with NamedLogging

    Allocator for com.digitalasset.canton.participant.RequestCounters.

    Allocator for com.digitalasset.canton.participant.RequestCounters.

    This class is not thread safe.

    Annotations
    @SuppressWarnings()
    Exceptions thrown

    java.lang.IllegalArgumentException if initRc is Long.MaxValue.

  16. class RequestJournal extends RequestJournalReader with NamedLogging with HasFlushFuture

    The request journal records the committed com.digitalasset.canton.participant.protocol.RequestJournal.RequestState! associated with particular requests.

    The request journal records the committed com.digitalasset.canton.participant.protocol.RequestJournal.RequestState! associated with particular requests. The request journal is only written to by the com.digitalasset.canton.participant.protocol.ProtocolProcessors. In particular, reads of request journal state are used for maintaining consistency in reads from contract stores. The request journal is also used for bookkeeping and recovery. The only exception to the writing rule is the com.digitalasset.canton.participant.store.RequestJournalStore.prune method, which may be user-triggered, though the call's pre-conditions must be respected.

    The request journal uses two strategies to persistently organize states:

    The head request for a state value is a com.digitalasset.canton.participant.RequestCounter defined as follows:

    • Normally, the least request (ordering by request counter) which has not yet reached or progressed past that state value. However, the actual head may lag behind arbitrarily because the head is not updated atomically with the request states.
    • In the edge case where no such request exists in the journal, the head points to the first request counter that has not been added to the journal.

    The prehead request is the request before the head request, or scala.None$ if there is no such request.

    The request journal also stores the timestamp associated with the request. The assumption is made that every request is associated with only one timestamp. However, several requests may have the same timestamp.

  17. trait RequestJournalReader extends AnyRef
  18. class SingleDomainCausalTracker extends NamedLogging

    Class to create event vector clocks for events on a single domain.

    Class to create event vector clocks for events on a single domain.

    This class should not be used concurrently.

  19. class TransactionProcessingSteps extends ProcessingSteps[SubmissionParam, TransactionSubmitted, TransactionViewType, TransactionResultMessage, TransactionSubmissionError] with NamedLogging

    The transaction processor that coordinates the Canton transaction protocol.

    The transaction processor that coordinates the Canton transaction protocol.

    Annotations
    @nowarn()
  20. class TransactionProcessor extends ProtocolProcessor[SubmissionParam, TransactionSubmitted, TransactionViewType, TransactionResultMessage, TransactionSubmissionError]
  21. case class TransactionUpdate(hostedInformeeStakeholders: Set[LfPartyId], ts: CantonTimestamp, domain: DomainId, rc: RequestCounter) extends CausalityUpdate with Product with Serializable

    A transaction is causally dependant on all earlier events in the same domain.

  22. case class TransferInUpdate(hostedInformeeStakeholders: Set[LfPartyId], ts: CantonTimestamp, domain: DomainId, rc: RequestCounter, transferId: TransferId) extends CausalityUpdate with Product with Serializable

    A transfer-in is causally dependant on all earlier events in the same domain, as well as all events causally observed by hostedInformeeStakeholders at the time of the transfer-out on the target domain.

  23. case class TransferOutUpdate(hostedInformeeStakeholders: Set[LfPartyId], ts: CantonTimestamp, transferId: TransferId, rc: RequestCounter) extends CausalityUpdate with Product with Serializable

    A transfer-out is causally dependant on all earlier events in the same domain.

Ungrouped