package protocol
- Alphabetic
- Public
- Protected
Package Members
- package conflictdetection
- package party
- package reassignment
- package submission
- package v30
- package validation
Type Members
- abstract class AbstractMessageProcessor extends NamedLogging with FlagCloseable with HasCloseContext
Collects helper methods for message processing
- class BadRootHashMessagesRequestProcessor extends AbstractMessageProcessor
- trait ContractAuthenticator extends AnyRef
- class ContractAuthenticatorImpl extends ContractAuthenticator
- final case class EngineController(participantId: ParticipantId, requestId: RequestId, loggerFactory: NamedLoggerFactory, testHookFor: (String) => () => Unit = _ => () => ()) extends NamedLogging with Product with Serializable
Simple class to embody the connection between a component that wants to abort an engine computation and the engine itself.
Simple class to embody the connection between a component that wants to abort an engine computation and the engine itself. An instance of this class is created by the protocol processor for each request and passed along during processing. When a condition determines that the computation should be aborted, the component calls abort. The instance is also passed to the engine when performing a computation. During the execution of a
ResultInterruption
, the engine will call abortStatus to determine whether it should abort or continue.- participantId
the participant processing the associated request
- requestId
the associated request
- testHookFor
hooks meant to be used in tests to perform actions during engine processing, such as slowing it down; see com.digitalasset.canton.config.TestingConfigInternal for a more detailed explanation
- 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(nextRequestCounter: RequestCounter, nextSequencerCounter: SequencerCounter, lastSequencerTimestamp: CantonTimestamp, currentRecordTime: CantonTimestamp, nextRepairCounter: RepairCounter) extends PrettyPrinting with Product with Serializable
Summarizes the counters and timestamps where request processing
Summarizes the counters and timestamps where request processing
- 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.
- lastSequencerTimestamp
The last processed sequencer timestamp
- currentRecordTime
The current record time, which should be a lower (inclusive) bound for floating event publication This timestamp can be higher than lastSequencerTimestamp (which relates directly to sequenced events), but must be less than the timestamp of the next sequencer counter. In practice scheduled floating events (events which are not associated with a specific sequencer counter) can push this timestamp higher than lastSequencerTimestamp, and record order processing ensures this invariant.
- nextRepairCounter
The next repair counter for any subsequent repair at the current record time.
- class ParallelMessageDispatcher extends MessageDispatcher with NamedLogging 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 ParticipantTopologyTerminateProcessing extends TerminateProcessing with NamedLogging
- 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.ConnectedSynchronizer.
Starting points for processing on a com.digitalasset.canton.participant.sync.ConnectedSynchronizer. 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, SubmissionError <: WrapsProcessorError] extends AnyRef
Interface for processing steps that are specific to request types (transaction / reassignment).
Interface for processing steps that are specific to request types (transaction / reassignment). 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
- SubmissionError
The type of errors that can occur during submission processing
- abstract class ProtocolProcessor[SubmissionParam, SubmissionResult, RequestViewType <: ViewType, SubmissionError <: WrapsProcessorError] extends AbstractMessageProcessor with RequestProcessor[RequestViewType]
The ProtocolProcessor orchestrates Phase 3, 4, and 7 of the synchronization protocol.
The ProtocolProcessor orchestrates Phase 3, 4, and 7 of the synchronization protocol. For this, it combines ProcessingSteps specific to a particular kind of request (transaction / reassignment) with the common processing steps.
- SubmissionParam
The bundled submission parameters
- SubmissionResult
The bundled submission results
- RequestViewType
The type of view trees used by the request
- SubmissionError
The type of errors that occur during submission processing
- final class ReassignmentSynchronizer extends NamedLogging with FlagCloseable
- 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
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.
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.
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 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, TransactionSubmissionResult, TransactionViewType, 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, TransactionSubmissionResult, TransactionViewType, TransactionSubmissionError]
Value Members
- object ContractAuthenticator
- object EngineController extends Serializable
- object MessageCleanReplayStartingPoint extends Serializable
- object MessageProcessingStartingPoint extends Serializable
- object ParallelMessageDispatcherFactory extends Factory[ParallelMessageDispatcher]
- object ParticipantTopologyTerminateProcessing
- object Phase37Synchronizer
- object ProcessingStartingPoints extends Serializable
- object ProcessingSteps
- object ProtocolProcessor
- object RequestJournal
- object SubmissionTracker
- object TransactionProcessingSteps
- object TransactionProcessor