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 with HasCloseContext
Collects helper methods for message processing
- class AuthenticationValidator extends AnyRef
- class AuthorizationValidator extends AnyRef
- class BadRootHashMessagesRequestProcessor extends AbstractMessageProcessor
- 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.
- final case class MessageCleanReplayStartingPoint(nextRequestCounter: RequestCounter, nextSequencerCounter: SequencerCounter, prenextTimestamp: CantonTimestamp) extends PrettyPrinting with Product with Serializable
Summarizes the counters and timestamps where replay can start
Summarizes the counters and timestamps where replay can start
- nextRequestCounter
The request counter for the next request to be replayed
- nextSequencerCounter
The sequencer counter for the next event to be replayed
- 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
.
- 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.
- final case class MessageProcessingStartingPoint(cleanRequestPrehead: Option[RequestCounter], nextRequestCounter: RequestCounter, nextSequencerCounter: SequencerCounter, prenextTimestamp: CantonTimestamp) extends PrettyPrinting with Product with Serializable
Summarizes the counters and timestamps where request processing
Summarizes the counters and timestamps where request processing
- cleanRequestPrehead
The request offset corresponding to the prehead of the clean request if any.
- 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 with FlagCloseable with HasCloseContext
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 been confirmed via the handle returned by registerRequest. At the beginning of phase 7, requests can wait on the completion of phase 3 via awaitConfirmed.
Eventually, all requests should either return a None or the corresponding data if it is the first valid request. After this point the request is cleaned from memory, otherwise, the synchronizer becomes a memory leak.
- final case class ProcessingStartingPoints extends 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.RequestCounters for the transaction processor.
- class RequestCounterAllocatorImpl extends RequestCounterAllocator with NamedLogging
Allocator for com.digitalasset.canton.RequestCounters.
Allocator for com.digitalasset.canton.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.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
- trait SerializableContractAuthenticator extends AnyRef
- class SerializableContractAuthenticatorImpl extends SerializableContractAuthenticator
- trait SubmissionTracker extends AutoCloseable
Tracker for submission, backed by a
SubmissionTrackerStore
.Tracker for submission, backed by a
SubmissionTrackerStore
.The purpose of this tracker is to detect replayed requests, and allow the participant to emit a command completion only for genuine requests that it has submitted.
A request R1 is considered fresh iff it has the minimal requestId among all requests that have the same root hash, for which SubmissionData has been provided. In particular, for a given root hash there is at most one fresh request.
The ScalaDocs of the individual methods prescribe when to call the methods. Calling the methods in a different order will result in undefined behavior. Failure to call either
cancelRegistration()
orprovideSubmissionData()
after callingregister()
for a request may result in a deadlock. - class SubmissionTrackerImpl extends SubmissionTracker with FlagCloseableAsync with NamedLogging
- 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]
Value Members
- object EnterpriseMessageDispatcherFactory extends Factory[EnterpriseMessageDispatcher]
- object MessageCleanReplayStartingPoint extends Serializable
- object MessageProcessingStartingPoint extends Serializable
- object Phase37Synchronizer
- object ProcessingStartingPoints extends Serializable
- object ProcessingSteps
- object ProtocolProcessor
- object RepairProcessor
- object RequestJournal
- object SerializableContractAuthenticator
- object SubmissionTracker
- object TransactionProcessingSteps
- object TransactionProcessor