trait ProcessingSteps[SubmissionParam, SubmissionResult, RequestViewType <: ViewType, SubmissionError <: WrapsProcessorError] extends AnyRef

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

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ProcessingSteps
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. case class CommitAndStoreContractsAndPublishEvent(commitSet: Option[FutureUnlessShutdown[CommitSet]], contractsToBeStored: Seq[SerializableContract], maybeEvent: Option[SequencedUpdate]) extends Product with Serializable

    Phase 7, step 3:

    Phase 7, step 3:

    commitSet

    scala.None$ if the request should be rejected scala.Some$ a future that will produce the commit set for updating the active contract store

    contractsToBeStored

    The contracts to be persisted to the contract store.

    maybeEvent

    The event to be published via the com.digitalasset.canton.participant.event.RecordOrderPublisher

  2. type DecryptedView = RequestViewType.View

    The type of decrypted view trees

  3. case class DecryptedViews(views: Seq[(WithRecipients[DecryptedView], Option[Signature])], decryptionErrors: Seq[EncryptedViewMessageError]) extends Product with Serializable

    Phase 3, step 1a:

    Phase 3, step 1a:

    views

    The successfully decrypted views and their signatures. Signatures are only present for top-level views (where the submitter metadata is not blinded)

    decryptionErrors

    The decryption errors while trying to decrypt the views

  4. type FullView = RequestViewType.FullView

    The type of full view trees, i.e., after decomposing light views.

  5. abstract type ParsedRequestType <: ParsedRequest[ViewSubmitterMetadata]

    Type of a request that has been parsed and contains at least one well-formed view.

  6. abstract type PendingSubmissionData

    The data stored for submissions that have been sent out, if any.

    The data stored for submissions that have been sent out, if any. It is created by createSubmission and passed to createSubmissionResult

  7. abstract type PendingSubmissionId

    The type used for look-ups into the PendingSubmissions

  8. abstract type PendingSubmissions

    A store of data on submissions that have been sent out, if any

  9. trait PreparedBatch extends AnyRef

    The actual batch to be sent for a TrackedSubmission

  10. abstract type RejectionArgs

    The type of data needed to create a rejection event in createRejectionEvent.

    The type of data needed to create a rejection event in createRejectionEvent. Created by constructPendingDataAndResponse

  11. type RequestBatch = RequestAndRootHashMessage[OpenEnvelope[EncryptedViewMessage[RequestViewType]]]

    The type of request messages

  12. abstract type RequestError <: WrapsProcessorError

    The type of errors that can occur during request processing

  13. abstract type RequestType <: ProcessingSteps.RequestType

    The type of the request (transaction, unassignment, assignment)

  14. abstract type ResultError <: WrapsProcessorError

    The type of errors that can occur during result processing

  15. case class StorePendingDataAndSendResponseAndCreateTimeout(pendingData: RequestType.PendingRequestData, confirmationResponsesF: EitherT[FutureUnlessShutdown, RequestError, Option[(ConfirmationResponses, Recipients)]], rejectionArgs: RejectionArgs) extends Product with Serializable

    Phase 3:

    Phase 3:

    pendingData

    The requestType.PendingRequestData to be stored until Phase 7

    confirmationResponsesF

    The responses to be sent to the mediator

    rejectionArgs

    The implementation-specific arguments needed to create a rejection event on timeout

  16. sealed trait Submission extends AnyRef
  17. abstract type SubmissionResultArgs

    The type of data needed to generate the submission result in createSubmissionResult.

    The type of data needed to generate the submission result in createSubmissionResult. The data is created by updatePendingSubmissions.

  18. abstract type SubmissionSendError

    The submission errors that can occur during sending the batch to the sequencer and updating the pending submission map.

  19. trait TrackedSubmission extends Submission

    Submission to be tracked in-flight and with deduplication.

    Submission to be tracked in-flight and with deduplication.

    The actual batch to be sent is computed only later by TrackedSubmission.prepareBatch so that tracking information (e.g., the chosen deduplication period) can be incorporated into the batch.

  20. trait UntrackedSubmission extends Submission

    Submission to be sent off without tracking the in-flight submission and without deduplication.

  21. type ViewSubmitterMetadata = RequestViewType.ViewSubmitterMetadata

Abstract Value Members

  1. abstract def authenticateInputContracts(parsedRequest: ParsedRequestType)(implicit traceContext: TraceContext): EitherT[Future, RequestError, Unit]
  2. abstract def computeActivenessSet(parsedRequest: ParsedRequestType)(implicit traceContext: TraceContext): Either[RequestError, ActivenessSet]

    Phase 3, step 2 (some good views)

  3. abstract def computeFullViews(decryptedViewsWithSignatures: Seq[(WithRecipients[DecryptedView], Option[Signature])]): (Seq[(WithRecipients[FullView], Option[Signature])], Seq[MalformedPayload])

    Phase 3, step 1b

    Phase 3, step 1b

    Converts the decrypted (possible light-weight) view trees to the corresponding full view trees. Views that cannot be converted are mapped to ProtocolProcessor.MalformedPayload errors.

  4. abstract def computeParsedRequest(rc: RequestCounter, ts: CantonTimestamp, sc: SequencerCounter, rootViewsWithMetadata: NonEmpty[Seq[(WithRecipients[FullView], Option[Signature])]], submitterMetadataO: Option[ViewSubmitterMetadata], isFreshOwnTimelyRequest: Boolean, malformedPayloads: Seq[MalformedPayload], mediator: MediatorGroupRecipient, snapshot: SynchronizerSnapshotSyncCryptoApi, synchronizerParameters: DynamicSynchronizerParametersWithValidity)(implicit traceContext: TraceContext): FutureUnlessShutdown[ParsedRequestType]

    Phase 3, step 1c

    Phase 3, step 1c

    Create a ParsedRequest out of the data computed so far.

  5. abstract def constructPendingDataAndResponse(parsedRequest: ParsedRequestType, reassignmentLookup: ReassignmentLookup, activenessResultFuture: FutureUnlessShutdown[ActivenessResult], engineController: EngineController, decisionTimeTickRequest: TickRequest)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, RequestError, StorePendingDataAndSendResponseAndCreateTimeout]

    Phase 3, step 3: Yields the pending data and confirmation responses for the case that at least one payload is well-formed.

    Phase 3, step 3: Yields the pending data and confirmation responses for the case that at least one payload is well-formed.

    reassignmentLookup

    Read-only interface of the com.digitalasset.canton.participant.store.memory.ReassignmentCache

    activenessResultFuture

    Future of the result of the activeness check

    returns

    Returns the requestType.PendingRequestData to be stored until Phase 7 and the responses to be sent to the mediator.

  6. abstract def constructResponsesForMalformedPayloads(requestId: RequestId, rootHash: RootHash, malformedPayloads: Seq[MalformedPayload])(implicit traceContext: TraceContext): Option[ConfirmationResponses]

    Phase 3: Yields the mediator responses (i.e.

    Phase 3: Yields the mediator responses (i.e. rejections) for the case that all payloads are malformed.

  7. abstract def createRejectionEvent(rejectionArgs: RejectionArgs)(implicit traceContext: TraceContext): Either[ResultError, Option[SequencedUpdate]]

    Phase 3, step 4:

    Phase 3, step 4:

    rejectionArgs

    The implementation-specific information needed for the creation of the rejection event

  8. abstract def createSubmission(submissionParam: SubmissionParam, mediator: MediatorGroupRecipient, ephemeralState: SyncEphemeralStateLookup, recentSnapshot: SynchronizerSnapshotSyncCryptoApi)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, SubmissionError, Submission]

    Phase 1, step 1:

    Phase 1, step 1:

    submissionParam

    The parameter object encapsulating the parameters of the submit method

    mediator

    The mediator ID to use for this submission

    ephemeralState

    Read-only access to the com.digitalasset.canton.participant.sync.SyncEphemeralState

    recentSnapshot

    A recent snapshot of the topology state to be used for submission

  9. abstract def createSubmissionResult(deliver: Deliver[Envelope[_]], submissionResultArgs: SubmissionResultArgs): SubmissionResult

    Phase 1, step 3:

  10. abstract def decryptViews(batch: NonEmpty[Seq[OpenEnvelope[EncryptedViewMessage[RequestViewType]]]], snapshot: SynchronizerSnapshotSyncCryptoApi, sessionKeyStore: ConfirmationRequestSessionKeyStore)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, RequestError, DecryptedViews]

    Phase 3, step 1:

    Phase 3, step 1:

    batch

    The batch of messages in the request to be processed

    snapshot

    Snapshot of the topology state at the request timestamp

    returns

    The decrypted views and the errors encountered during decryption

  11. abstract def embedNoMediatorError(error: NoMediatorError): SubmissionError
  12. abstract def embedRequestError(err: RequestProcessingError): RequestError

    Wrap an error in request processing from the generic request processor

  13. abstract def embedResultError(err: ResultProcessingError): ResultError

    Wrap an error in result processing from the generic request processor

  14. abstract def eventAndSubmissionIdForRejectedCommand(ts: CantonTimestamp, sc: SequencerCounter, submitterMetadata: ViewSubmitterMetadata, rootHash: RootHash, freshOwnTimelyTx: Boolean, error: TransactionError)(implicit traceContext: TraceContext): (Option[SequencedUpdate], Option[PendingSubmissionId])

    Phase 3, step 2: Some good views, but we are rejecting (e.g.

    Phase 3, step 2: Some good views, but we are rejecting (e.g. because the chosen mediator is inactive or there are no valid recipients).

    ts

    The timestamp of the request

    sc

    The com.digitalasset.canton.SequencerCounter of the request

    submitterMetadata

    Metadata of the submitter

    rootHash

    Root hash of the transaction

    freshOwnTimelyTx

    The resolved status from com.digitalasset.canton.participant.protocol.SubmissionTracker.register

    error

    Error to be included in the generated event

    returns

    The optional rejection event to be published in the event log, and the optional submission ID corresponding to this request

  15. abstract def explicitMediatorGroup(param: SubmissionParam): Option[MediatorGroupIndex]

    Extract an optionally explicitly chosen mediator group index

  16. abstract def getCommitSetAndContractsToBeStoredAndEvent(event: WithOpeningErrors[SignedContent[Deliver[DefaultOpenEnvelope]]], verdict: Verdict, pendingRequestData: RequestType.PendingRequestData, pendingSubmissions: PendingSubmissions, hashOps: HashOps)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, ResultError, CommitAndStoreContractsAndPublishEvent]

    Phase 7, step 2:

    Phase 7, step 2:

    event

    The signed com.digitalasset.canton.sequencing.protocol.Deliver event containing the confirmation result. It is ensured that the event contains exactly one com.digitalasset.canton.protocol.messages.ConfirmationResultMessage

    verdict

    The verdict that is contained in the event

    pendingRequestData

    The requestType.PendingRequestData produced in Phase 3

    pendingSubmissions

    The data stored on submissions in the PendingSubmissions

    returns

    The com.digitalasset.canton.participant.protocol.conflictdetection.CommitSet, the contracts from Phase 3 to be persisted to the contract store, and the event to be published

  17. abstract def getSubmitterInformation(views: Seq[DecryptedView]): Option[ViewSubmitterMetadata]

    Return the submitter metadata

  18. abstract def handleTimeout(parsedRequest: ParsedRequestType)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, ResultError, Unit]

    Processor specific handling of the timeout

  19. abstract def pendingSubmissions(state: SyncEphemeralState): PendingSubmissions

    Selector to get the PendingSubmissions, if any

  20. abstract def postProcessResult(verdict: Verdict, pendingSubmission: PendingSubmissionData)(implicit traceContext: TraceContext): Unit

    Phase 7, step 4:

    Phase 7, step 4:

    Called after the request reached the state com.digitalasset.canton.participant.protocol.RequestJournal.RequestState.Clean in the request journal, if the participant is the submitter. Also called if a timeout occurs with com.digitalasset.canton.protocol.messages.Verdict.MediatorReject.

    verdict

    The verdict on the request

  21. abstract def postProcessSubmissionRejectedCommand(error: TransactionError, pendingSubmission: PendingSubmissionData)(implicit traceContext: TraceContext): Unit

    Phase 3, step 2 (rejected submission, e.g.

    Phase 3, step 2 (rejected submission, e.g. chosen mediator is inactive, invalid recipients)

    Called when we are rejecting the submission and eventAndSubmissionIdForRejectedCommand returned a submission ID that was pending.

    pendingSubmission

    The PendingSubmissionData for the submission ID returned by eventAndSubmissionIdForRejectedCommand

    See also

    com.digitalasset.canton.participant.protocol.ProcessingSteps.postProcessResult

  22. abstract def removePendingSubmission(pendingSubmissions: PendingSubmissions, pendingSubmissionId: PendingSubmissionId): Option[PendingSubmissionData]

    Phase 1, step 4; and Phase 7, step 1:

    Phase 1, step 4; and Phase 7, step 1:

    Remove the pending submission from the pending submissions. Called when sending the submission failed or did not lead to a result in time or a result has arrived for the request.

  23. abstract def requestKind: String

    The kind of request, used for logging and error reporting

  24. abstract val requestType: RequestType
  25. abstract def setDecisionTimeTickRequest(pendingSubmissions: PendingSubmissions, pendingSubmissionId: PendingSubmissionId, requestedTick: TickRequest): Unit

    Phase 1, step 3:

    Phase 1, step 3:

    Remember the com.digitalasset.canton.time.SynchronizerTimeTracker.TickRequest for the decision time in the PendingSubmissionData so that the tick request can be cancelled if the tick is no longer needed. Called when sending the submission succeeded.

  26. abstract def submissionDescription(param: SubmissionParam): String

    Extract a description for a submission, used for logging and error reporting

  27. abstract def submissionIdOfPendingRequest(pendingData: RequestType.PendingRequestData): PendingSubmissionId

    Extract the submission ID that corresponds to a pending request, if any

  28. abstract def updatePendingSubmissions(pendingSubmissions: PendingSubmissions, submissionParam: SubmissionParam, pendingSubmissionId: PendingSubmissionId): EitherT[Future, SubmissionSendError, SubmissionResultArgs]

    Phase 1, step 2:

    Phase 1, step 2:

    pendingSubmissions

    Stateful store to be updated with data on the pending submission

    submissionParam

    Implementation-specific details on the submission, used for logging

    pendingSubmissionId

    The key used for updates to the pendingSubmissions

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. object DecryptedViews extends Serializable

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped