package protocol
- Alphabetic
- Public
- Protected
Package Members
- package conflictdetection
- package submission
- package transfer
- package v0
- package validation
Type Members
- abstract class AbstractMessageProcessor extends NamedLogging with FlagCloseable
Collects helper methods for message processing
- class BadRootHashMessagesRequestProcessor extends AbstractMessageProcessor
- sealed trait CausalityUpdate extends HasProtoV0[protocol.v0.CausalityUpdate] with HasVersionedWrapper[VersionedMessage[CausalityUpdate]] with PrettyPrinting
Represents the causal dependencies of a given request.
- class DefaultMessageDispatcher extends MessageDispatcher with Spanning with NamedLogging
- 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.
- class GlobalCausalOrderer extends NamedLogging with AutoCloseable
TODO(i5352): - Consider whether we need better performance here, or if the current implementation is sufficient
- 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.
- 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 thannextSequencerCounter
or request counter lower thannextRequestCounter
, then the timestamp of the event must be less than or equal toprenextTimestamp
. No sequenced event has both a higher timestamp thanprenextTimestamp
and a lower sequencer counter thannextSequencerCounter
. No request has both a higher timestamp thanprenextTimestamp
and a lower request counter thannextRequestCounter
.
- 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. - 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 theprocessing
(in all components).- Exceptions thrown
ProcessingStartingPoints.InvalidStartingPointsException
ifcleanReplay
is after (in any component)processing
- 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
- 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
- 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.
- trait RequestCounterAllocator extends AnyRef
Allocates com.digitalasset.canton.participant.RequestCounters for the transaction processor.
- 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
ifinitRc
isLong.MaxValue
.
- 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:
- For every request, which is identified by a participant-local request counter, the request journal records the com.digitalasset.canton.participant.protocol.RequestJournal.RequestState associated with the request counter.
- For com.digitalasset.canton.participant.protocol.RequestJournal.RequestStateWithCursor states, a cursor tracks the head request for that state.
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.
- trait RequestJournalReader extends AnyRef
- 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.
- 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()
- class TransactionProcessor extends ProtocolProcessor[SubmissionParam, TransactionSubmitted, TransactionViewType, TransactionResultMessage, TransactionSubmissionError]
- 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.
- 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. - 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.
Value Members
- object CausalityUpdate extends HasVersionedMessageCompanion[CausalityUpdate]
- object EnterpriseMessageDispatcherFactory extends Factory[EnterpriseMessageDispatcher]
- object MessageDispatcher
- object MessageProcessingStartingPoint extends Serializable
- object Phase37Synchronizer
- object ProcessingStartingPoints extends Serializable
- object ProcessingSteps
- object ProtocolProcessor
- object RepairProcessor
- object RequestJournal
- object SingleDomainCausalTracker
- object TransactionProcessingSteps
- object TransactionProcessor