Packages

package mediator

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Package Members

  1. package admin
  2. package service
  3. package store
  4. package topology

Type Members

  1. class CommunityMediatorRuntime extends MediatorRuntime with NamedLogging
  2. class ConfirmationResponseProcessor extends NamedLogging with Spanning

    Scalable service to check the received Stakeholder Trees and Confirmation Responses, derive a verdict and post result messages to stakeholders.

  3. trait DomainNodeMediatorFactory extends AnyRef
  4. class EnterpriseMediatorRuntime extends MediatorRuntime with NamedLogging
  5. class EnterpriseMediatorRuntimeFactory extends MediatorRuntimeFactory
  6. class GrpcEnterpriseMediatorAdministrationService extends EnterpriseMediatorAdministrationService
  7. class Mediator extends NamedLogging with StartAndCloseable[Unit] with NoTracing

    The Mediator that acts as transaction coordinator.

  8. sealed trait MediatorError extends Product with Serializable
  9. sealed trait MediatorEvent extends AnyRef

    The MediatorEventsProcessor looks through all sequencer events provided by the sequencer client in a batch to pick out events for the Mediator with the same request-id while also scheduling timeouts and running topology transactions at appropriate times.

    The MediatorEventsProcessor looks through all sequencer events provided by the sequencer client in a batch to pick out events for the Mediator with the same request-id while also scheduling timeouts and running topology transactions at appropriate times. We map all the mediator events we generate into this simplified structure so the ConfirmationResponseProcessor processes these events without having to perform the same extraction and error handling of the original SequencerEvent.

  10. case class MediatorEventStage(requests: Map[RequestId, Seq[Traced[MediatorEvent]]]) extends Product with Serializable

    The MediatorEventsProcessor divides incoming events into a series of stages where each stage should be executed sequentially but the actions in the stage itself may execute in parallel.

    The MediatorEventsProcessor divides incoming events into a series of stages where each stage should be executed sequentially but the actions in the stage itself may execute in parallel.

    All mediator request related events that can be processed concurrently grouped by requestId.

  11. class MediatorEventsProcessor extends NamedLogging

    Attempt to process a sequence of sequential events from the sequencer for the mediator in an optimal manner.

    Attempt to process a sequence of sequential events from the sequencer for the mediator in an optimal manner. We could correctly process them sequentially however this is suboptimal. We can parallelize their processing by respecting the following rules:

    • TODO(soren) Only the active mediator for the domain can send messages to sequencer, and this active state could change within the events we are processing. So this must be determined before processing any Mediator requests.
    • Mediator requests/responses with different request ids can be processed in parallel. For events referencing the same request-id we can provide these to the confirmation request processor as a group so it can make optimizations such as deferring persistence of a response state until the final message to avoid unnecessary database writes.
    • Identity transactions must be processed by the identity client before subsequent mediator request/responses as the confirmation response processor may require knowing the latest relevant topology state.
    • Pending mediator requests could timeout during the execution of this batch and should be handled with the timestamp of the event from the sequencer that caused them to timeout (it is tempting to just use the last timestamp to determine timeouts however we would like to ensure we use the closest timestamp to ensure a consistent version is applied across Mediators regardless of the batches of events they process). Unlikely however technically possible is that requests that are created while processing these events could also timeout due to sequencer time passing within this event range (think a low timeout value with a sequencer that is catching up so a long period could elapse even during a short range of events).

    Crashes can occur at any point during this processing (or even afterwards as it's the persistence in the sequencer client that would move us to following events). Processing should be effectively idempotent to handle this.

  12. sealed trait MediatorMessageId extends AnyRef

    Structure serialized into a sequencer message id to convey what the sequencer event means for a mediator between a send and a receipt (witnessing the sequenced event).

  13. class MediatorNode extends CantonNode with NamedLogging with HasUptime
  14. class MediatorNodeBootstrap extends CantonNodeBootstrapBase[MediatorNode, MediatorNodeConfig, MediatorNodeParameters]
  15. case class MediatorNodeConfig(adminApi: EnterpriseAdminServerConfig = EnterpriseAdminServerConfig(), storage: EnterpriseStorageConfig = EnterpriseStorageConfig.Memory(), crypto: CryptoConfig = CryptoConfig(), init: InitConfig = InitConfig(autoInit = false), replication: ReplicationConfig = ReplicationConfig(), timeTracker: DomainTimeTrackerConfig = DomainTimeTrackerConfig(), sequencerClient: SequencerClientConfig = SequencerClientConfig(), caching: CachingConfigs = CachingConfigs()) extends EnterpriseLocalNodeConfig with ConfigDefaults[MediatorNodeConfig] with Product with Serializable

    Mediator Node configuration

    Mediator Node configuration

    init

    all nodes must provided a init config however the mediator cannot auto initialize itself so defaults autoInit to false

    timeTracker

    configuration for how time is tracked on the connected domain using the sequencer

  16. case class MediatorNodeParameters(tracing: TracingConfig, delayLoggingThreshold: NonNegativeFiniteDuration, loggingConfig: LoggingConfig, logQueryCost: Option[QueryCostMonitoringConfig], enableAdditionalConsistencyChecks: Boolean, enablePreviewFeatures: Boolean, processingTimeouts: ProcessingTimeout, sequencerClient: SequencerClientConfig, cachingConfigs: CachingConfigs, nonStandardConfig: Boolean) extends LocalNodeParameters with Product with Serializable
  17. class MediatorReadyCheck extends NamedLogging

    When a Mediator starts they will not be able to sign any events until their key has been assigned to the mediator identifier.

    When a Mediator starts they will not be able to sign any events until their key has been assigned to the mediator identifier. For the first mediator on the domain this will happen immediately when the domain is initialized so has historically hasn't been a problem. However for additional mediators their key may not be added for many events after genesis and will be unable to send anything until this happens. MediatorReadyCheck efficiently checks that the local mediator is able to sign events on the local domain. We then cache the result of this check so it can be regularly queried without performing identity operations. Callers should ensure to call reset after every topology transaction where the state could change.

  18. class MediatorReplicaManager extends ReplicaManager

    Manages replicas of a single Mediator instance.

    Manages replicas of a single Mediator instance. Passive instances are currently entirely passive and have no components running at runtime. When becoming active a MediatorRuntime is started and connected to the admin services. When becoming passive the running MediatorRuntime is shutdown and the admin services are disconnected.

    If the admin services are called while passive every method will return an unavailable response.

  19. class MediatorReplicaManagerException extends RuntimeException

    An unexpected error occurred while transitioning between replica states

  20. case class MediatorRequestAlreadyFinalized(requestId: RequestId, existingVerdict: Verdict) extends ResponseAggregationError with Product with Serializable
  21. case class MediatorRequestNotFound(requestId: RequestId, viewHashO: Option[ViewHash] = None, rootHashO: Option[RootHash] = None) extends ResponseAggregationError with Product with Serializable
  22. trait MediatorRuntime extends FlagCloseable

    Mediator component and its supporting services

  23. trait MediatorRuntimeFactory extends AnyRef
  24. class MediatorStateInspection extends AnyRef
  25. final case class RemoteMediatorConfig(adminApi: ClientConfig, crypto: CryptoConfig = CryptoConfig()) extends NodeConfig with Product with Serializable
  26. case class ResponseAggregation extends NamedLogging with PrettyPrinting with Product with Serializable

  27. sealed trait ResponseAggregationError extends MediatorError
  28. case class StaleVersion(requestId: RequestId, newVersion: CantonTimestamp, staleVersion: CantonTimestamp) extends MediatorError with Product with Serializable
  29. case class UnauthorizedMediatorResponse(requestId: RequestId, viewHash: ViewHash, sender: ParticipantId, parties: Set[LfPartyId]) extends ResponseAggregationError with Product with Serializable
  30. case class UnexpectedMediatorResponse(requestId: RequestId, viewHash: ViewHash, parties: Set[LfPartyId]) extends ResponseAggregationError with Product with Serializable

Ungrouped