class CantonSyncService extends SyncService with ParticipantPruningSyncService with FlagCloseable with Spanning with NamedLogging with HasCloseContext with InternalIndexServiceProviderImpl

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CantonSyncService
  2. InternalIndexServiceProviderImpl
  3. HasCloseContext
  4. PromiseUnlessShutdownFactory
  5. NamedLogging
  6. Spanning
  7. FlagCloseable
  8. PerformUnlessClosing
  9. HasSynchronizeWithReaders
  10. HasSynchronizeWithClosing
  11. OnShutdownRunner
  12. HasRunOnClosing
  13. HasUnlessClosing
  14. AutoCloseable
  15. SyncService
  16. InternalIndexServiceProvider
  17. ReportsHealth
  18. ParticipantPruningSyncService
  19. PartySyncService
  20. PackageSyncService
  21. SubmissionSyncService
  22. AnyRef
  23. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new CantonSyncService(participantId: ParticipantId, synchronizerRegistry: SynchronizerRegistry, synchronizerConnectionConfigStore: SynchronizerConnectionConfigStore, aliasManager: SynchronizerAliasManager, participantNodePersistentState: Eval[ParticipantNodePersistentState], participantNodeEphemeralState: ParticipantNodeEphemeralState, syncPersistentStateManager: SyncPersistentStateManager, packageService: Eval[PackageService], partyOps: PartyOps, identityPusher: ParticipantTopologyDispatcher, partyNotifier: LedgerServerPartyNotifier, syncCrypto: SyncCryptoApiParticipantProvider, pruningProcessor: PruningProcessor, engine: Engine, commandProgressTracker: CommandProgressTracker, syncEphemeralStateFactory: SyncEphemeralStateFactory, clock: Clock, resourceManagementService: ResourceManagementService, parameters: ParticipantNodeParameters, connectedSynchronizerFactory: Factory[ConnectedSynchronizer], metrics: ParticipantMetrics, sequencerInfoLoader: SequencerInfoLoader, isActive: () => Boolean, declarativeChangeTrigger: () => Unit, futureSupervisor: FutureSupervisor, loggerFactory: NamedLoggerFactory, testingConfig: TestingConfigInternal, ledgerApiIndexer: LifeCycleContainer[LedgerApiIndexer], connectedSynchronizersLookupContainer: ConnectedSynchronizersLookupContainer)(implicit ec: ExecutionContextExecutor, mat: Materializer, tracer: Tracer)

    participantId

    The participant node id hosting this sync service.

    synchronizerRegistry

    registry for connecting to synchronizers.

    synchronizerConnectionConfigStore

    Storage for synchronizer connection configs

    packageService

    Underlying package management service.

    syncCrypto

    Synchronisation crypto utility combining IPS and Crypto operations.

    isActive

    Returns true of the node is the active replica

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. def acsCommitmentProcessorHealth: MutableHealthComponent
  5. def activePSIdForLSId(id: SynchronizerId): Option[PhysicalSynchronizerId]

    Return the active PSId corresponding to the given id, if any.

    Return the active PSId corresponding to the given id, if any. Since at most one synchronizer connection per LSId can be active, this is well-defined.

  6. def addReader(reader: String)(implicit traceContext: TraceContext): UnlessShutdown[ReaderHandle]

    TODO(#16601) Make this method private once PerformUnlessClosing doesn't need it any more

    TODO(#16601) Make this method private once PerformUnlessClosing doesn't need it any more

    Attributes
    protected[this]
    Definition Classes
    HasSynchronizeWithReaders
  7. def addSynchronizer(config: SynchronizerConnectionConfig, sequencerConnectionValidation: SequencerConnectionValidation)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, SyncServiceError, Unit]

    Adds a new synchronizer to the sync service's configuration.

    Adds a new synchronizer to the sync service's configuration.

    NOTE: Does not automatically connect the sync service to the new synchronizer.

    config

    The synchronizer configuration.

    returns

    Error or unit.

  8. def allocateParty(hint: LfPartyId, rawSubmissionId: LedgerSubmissionId, synchronizerIdO: Option[SynchronizerId])(implicit traceContext: TraceContext): FutureUnlessShutdown[SubmissionResult]

    Adds a new party to the set managed by the ledger.

    Adds a new party to the set managed by the ledger.

    Caller specifies a party identifier suggestion, the actual identifier allocated might be different and is implementation specific.

    In particular, a ledger may:

    • Disregard the given hint and choose a completely new party identifier
    • Construct a new unique identifier from the given hint, e.g., by appending a UUID
    • Use the given hint as is, and reject the call if such a party already exists

    Successful party allocations will result in a com.digitalasset.canton.ledger.participant.state.Update.PartyAddedToParticipant message. See the comments on com.digitalasset.canton.ledger.participant.state.Update for further details.

    hint

    A party identifier suggestion

    synchronizerIdO

    The synchronizer on which the party should be allocated. Can be omitted if the participant is connected to only one synchronizer.

    returns

    an async result of a SubmissionResult

    Definition Classes
    CantonSyncServicePartySyncService
  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def checkOverloaded(traceContext: TraceContext): Option[SubmissionResult]
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  12. final def close(): Unit

    Blocks until all earlier tasks have completed and then prevents further tasks from being run.

    Blocks until all earlier tasks have completed and then prevents further tasks from being run.

    Definition Classes
    FlagCloseableOnShutdownRunner → AutoCloseable
  13. implicit val closeContext: CloseContext
    Definition Classes
    HasCloseContext
  14. def closingTimeout: FiniteDuration
    Attributes
    protected
    Definition Classes
    FlagCloseablePerformUnlessClosing
  15. val commitmentsService: CommitmentsService
  16. def computeHighestRankedSynchronizerFromAdmissible(submitterInfo: SubmitterInfo, transaction: LfSubmittedTransaction, transactionMeta: TransactionMeta, admissibleSynchronizers: NonEmpty[Set[PhysicalSynchronizerId]], disclosedContractIds: List[LfContractId], routingSynchronizerState: RoutingSynchronizerState)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, TransactionRoutingError, PhysicalSynchronizerId]

    Computes the highest ranked synchronizer from the given admissible synchronizers without performing topology checks.

    Computes the highest ranked synchronizer from the given admissible synchronizers without performing topology checks.

    This method is used internally in command processing to pre-select a synchronizer for determining the package preference set used in command interpretation.

    For the definitive synchronizer selection to be used for routing of a submitted transaction, use selectRoutingSynchronizer.

    submitterInfo

    The submitter info

    transaction

    The submitted transaction

    transactionMeta

    The transaction metadata

    admissibleSynchronizers

    The list of synchronizers from which the best one should be selected

    disclosedContractIds

    The list of disclosed contracts used in command interpretation

    routingSynchronizerState

    The routing synchronizer state the computation should be based on

    returns

    The ID of the best ranked synchronizer

    Definition Classes
    CantonSyncServiceSyncService
  17. def computeTotalLoad: Int
  18. def connectSynchronizer(synchronizerAlias: SynchronizerAlias, keepRetrying: Boolean, connectSynchronizer: ConnectSynchronizer)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, SyncServiceError, Option[PhysicalSynchronizerId]]

    Connect the sync service to the given synchronizer.

    Connect the sync service to the given synchronizer. This method makes sure there can only be one connection in progress at a time.

  19. def connectToPSIdWithHandshake(synchronizerId: PhysicalSynchronizerId)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, SyncServiceError, PhysicalSynchronizerId]

    Perform a handshake with the given synchronizer.

    Perform a handshake with the given synchronizer.

    synchronizerId

    the physical synchronizer id of the synchronizer.

  20. def connectedSynchronizerHealth: MutableHealthComponent
  21. def currentHealth(): HealthStatus

    Reports the current health of the object.

    Reports the current health of the object. This should always return immediately.

    Definition Classes
    CantonSyncServiceReportsHealth
  22. def currentWriteHealth(): HealthStatus
  23. def disconnectSynchronizer(synchronizerAlias: SynchronizerAlias)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, SyncServiceError, Unit]

    Disconnect the given synchronizer from the sync service.

  24. def disconnectSynchronizers()(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, SyncServiceError, Unit]

    Disconnect from all connected synchronizers.

  25. val dynamicSynchronizerParameterGetter: CantonDynamicSynchronizerParameterGetter
  26. def ephemeralHealth: MutableHealthComponent
  27. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  29. implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  30. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  31. def getConnectedSynchronizers(request: ConnectedSynchronizerRequest)(implicit traceContext: TraceContext): FutureUnlessShutdown[ConnectedSynchronizerResponse]
    Definition Classes
    CantonSyncServiceSyncService
  32. def getLfArchive(packageId: PackageId)(implicit traceContext: TraceContext): Future[Option[Archive]]
  33. def getPackageMetadataSnapshot(implicit errorLoggingContext: ErrorLoggingContext): PackageMetadata
  34. def getRoutingSynchronizerState(implicit traceContext: TraceContext): RoutingSynchronizerState

    Constructs and fetches the current synchronizer state, to be used throughout command execution

    Constructs and fetches the current synchronizer state, to be used throughout command execution

    Definition Classes
    CantonSyncServiceSyncService
  35. def getSynchronizerConnectionConfigForAlias(synchronizerAlias: SynchronizerAlias, onlyActive: Boolean)(implicit traceContext: TraceContext): Either[SyncServiceError, StoredSynchronizerConnectionConfig]

    Get the synchronizer connection corresponding to the alias.

    Get the synchronizer connection corresponding to the alias. Fail if no connection can be found. If more than one connections are found, takes the highest one.

    synchronizerAlias

    Synchronizer alias

    onlyActive

    Restrict connection to active ones (default).

  36. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  37. def incompleteReassignmentOffsets(validAt: Offset, stakeholders: Set[LfPartyId])(implicit traceContext: TraceContext): FutureUnlessShutdown[Vector[Offset]]

    Get the offsets of the incomplete assigned/unassigned events for a set of stakeholders.

    Get the offsets of the incomplete assigned/unassigned events for a set of stakeholders.

    validAt

    The offset of validity in participant offset terms.

    stakeholders

    Only offsets are returned which have at least one stakeholder from this set.

    returns

    All the offset of assigned/unassigned events which do not have their counterparts visible at the validAt offset, and only for the reassignments for which this participant is reassigning.

    Definition Classes
    CantonSyncServiceSyncService
  38. def initializeState()(implicit traceContext: TraceContext): Unit
  39. def internalIndexService: Option[InternalIndexService]
  40. val isActive: () => Boolean
  41. def isClosing: Boolean

    Check whether we're closing.

    Check whether we're closing. Susceptible to race conditions; unless you're using this as a flag to the retry lib or you really know what you're doing, prefer performUnlessClosing and friends.

    Definition Classes
    OnShutdownRunnerHasUnlessClosing
  42. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  43. def keepTrackOfReaderCallStack: Boolean

    Set this to true to get detailed information about all futures that did not complete during shutdown.

    Set this to true to get detailed information about all futures that did not complete during shutdown.

    Attributes
    protected[this]
    Definition Classes
    PerformUnlessClosingHasSynchronizeWithReaders
  44. val ledgerApiIndexer: LifeCycleContainer[LedgerApiIndexer]
  45. def listLfPackages()(implicit traceContext: TraceContext): Future[Seq[PackageDescription]]
  46. def logger: TracedLogger
    Attributes
    protected
    Definition Classes
    NamedLogging
  47. val loggerFactory: NamedLoggerFactory
    Attributes
    protected
    Definition Classes
    CantonSyncServiceNamedLogging
  48. def logout(synchronizerAlias: SynchronizerAlias)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, Status, Unit]
  49. def lookupSynchronizerTimeTracker(synchronizer: Synchronizer): Either[String, SynchronizerTimeTracker]

    Lookup a time tracker for the given synchronizer.

    Lookup a time tracker for the given synchronizer. A time tracker will only be returned if the synchronizer is registered and connected.

  50. def lookupTopologyClient(synchronizerId: PhysicalSynchronizerId): Option[SynchronizerTopologyClientWithInit]
  51. val maxDeduplicationDuration: NonNegativeFiniteDuration
  52. def migrateSynchronizer(source: Source[SynchronizerAlias], target: Target[SynchronizerConnectionConfig], force: Boolean)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, SyncServiceError, Unit]

    Migrates contracts from a source synchronizer to target synchronizer by re-associating them in the participant's persistent store.

    Migrates contracts from a source synchronizer to target synchronizer by re-associating them in the participant's persistent store. Prune some of the synchronizer stores after the migration.

    The migration only starts when certain preconditions are fulfilled:

    • the participant is disconnected from the source and target synchronizer
    • there are neither in-flight submissions nor dirty requests

    You can force the migration in case of in-flight transactions but it may lead to a ledger fork. Consider:

    • Transaction involving participants P1 and P2 that create a contract c
    • P1 migrates (D1 -> D2) when processing is done, P2 when it is in-flight
    • Final state:
      • P1 has the contract on D2 (it was created and migrated)
      • P2 does have the contract because it will not process the mediator verdict

    Instead of forcing a migration when there are in-flight transactions reconnect all participants to the source synchronizer, halt activity and let the in-flight transactions complete or time out.

    Using the force flag should be a last resort, that is for disaster recovery when the source synchronizer is unrecoverable.

  53. def mkPromise[A](description: String, futureSupervisor: FutureSupervisor, logAfter: Duration = 10.seconds, logLevel: Level = Level.DEBUG)(implicit elc: ErrorLoggingContext): PromiseUnlessShutdown[A]

    Use this method to create a PromiseUnlessShutdown that will automatically be cancelled when the close context is closed.

    Use this method to create a PromiseUnlessShutdown that will automatically be cancelled when the close context is closed. This allows proper clean up of stray promises when the node is transitioning to a passive state.

    Note: you should *not* invoke success on the returned promise but rather use trySuccess. The reason is that the call to success may fail in case of shutdown.

    Definition Classes
    PromiseUnlessShutdownFactory
  54. def modifySynchronizer(psidO: Option[PhysicalSynchronizerId], config: SynchronizerConnectionConfig, sequencerConnectionValidation: SequencerConnectionValidation)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, SyncServiceError, Unit]

    Modifies the settings of the synchronizer connection

    Modifies the settings of the synchronizer connection

    psidO

    If empty, the request will update the single active connection for the alias in config NOTE: This does not automatically reconnect to the synchronizer.

  55. def nameInternal: String
    Attributes
    protected[this]
    Definition Classes
    PerformUnlessClosingHasSynchronizeWithReaders
  56. implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  57. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  58. def noTracingLogger: Logger
    Attributes
    protected
    Definition Classes
    NamedLogging
  59. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  60. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  61. def onCloseFailure(e: Throwable): Unit
    Attributes
    protected
    Definition Classes
    PerformUnlessClosing
  62. def onClosed(): Unit
  63. final def onFirstClose(): Unit

    Blocks until all earlier tasks have completed and then prevents further tasks from being run.

    Blocks until all earlier tasks have completed and then prevents further tasks from being run.

    Definition Classes
    PerformUnlessClosingOnShutdownRunner
  64. def packageMapFor(submitters: Set[LfPartyId], informees: Set[LfPartyId], vettingValidityTimestamp: CantonTimestamp, prescribedSynchronizer: Option[SynchronizerId], routingSynchronizerState: RoutingSynchronizerState)(implicit traceContext: TraceContext): FutureUnlessShutdown[Map[PhysicalSynchronizerId, Map[LfPartyId, Set[LfPackageId]]]]

    Computes a SynchronizerId -> PartyId -> PackageId relation that describes:

    Computes a SynchronizerId -> PartyId -> PackageId relation that describes:

    • for each synchronizer that hosts all the provided submitters that can submit. The provided submitters can be empty (for externally signed transactions), in which case synchronizers are not restricted by parties with submission rights on the local participant
    • which package-ids can be accepted (i.e. they are vetting-valid) in a transaction by each of the informees provided
    • if the prescribed synchronizer is provided, only that one is considered
    Definition Classes
    CantonSyncServiceSyncService
  65. val participantId: ParticipantId
  66. def prune(pruneUpToInclusive: Offset, submissionId: LedgerSubmissionId): CompletionStage[PruningResult]

    Prune the participant ledger specifying the offset up to which participant ledger events can be removed.

    Prune the participant ledger specifying the offset up to which participant ledger events can be removed.

    As this interface applies only to the local participant unlike other administrator services, returns a (completion stage of a) PruningResult rather than a SubmissionResult.

    Ledgers that do not elect to support participant pruning, return NotPruned(Status.UNIMPLEMENTED). Returning an error also keeps the ledger api server from pruning its index.

    Ledgers whose participants hold no participant-local state, but want the ledger api server to prune, return ParticipantPruned.

    For pruning implementations to be fault tolerant, the following aspects are important:

    • Consider failing a prune request before embarking on destructive operations for example if certain safety conditions are not met (such as being low on resources). This helps minimize the chances of partially performed prune operations. If the system cannot prune up to the specified offset, the call should not alter the system and return NotPruned rather than prune partially.
    • Implement pruning either atomically (performing all operations or none), or break down pruning steps into idempotent pieces that pick up after retries or system recovery in case of a mid-pruning crash.
    • To the last point, be aware that pruning of the ledger api server index happens in such an idempotent follow-up step upon successful completion of each prune call. To reach eventual consistency upon failures, be sure to return ParticipantPruned even if the specified offset has already been pruned to allow ledger api server index pruning to proceed in case of an earlier failure.
    pruneUpToInclusive

    The offset up to which contracts should be pruned.

    submissionId

    The submission id.

    returns

    The pruning result.

    Definition Classes
    CantonSyncServiceParticipantPruningSyncService
  67. def pruneInternally(pruneUpToInclusive: Offset)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, RpcError, Unit]
  68. val pruningProcessor: PruningProcessor
  69. def pureCryptoApi: CryptoPureApi

    Returns the pure crypto operations used for the sync protocol

  70. def purgeDeactivatedSynchronizer(synchronizerAlias: SynchronizerAlias)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, SyncServiceError, Unit]
  71. def readySynchronizers: Map[SynchronizerAlias, (PhysicalSynchronizerId, SubmissionReady)]

    Returns the ready synchronizers this sync service is connected to.

  72. def reconnectSynchronizers(ignoreFailures: Boolean, isTriggeredManually: Boolean, mustBeActive: Boolean)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, SyncServiceError, Seq[SynchronizerAlias]]

    Reconnect configured synchronizers

    Reconnect configured synchronizers

    ignoreFailures

    If true, a failure will not interrupt reconnects

    isTriggeredManually

    True if the call of this method is triggered by an explicit call to the connectivity service, false if the call of this method is triggered by a node restart or transition to active

    mustBeActive

    If true, only executes if the instance is active

    returns

    The list of connected synchronizers

  73. def refreshCaches()(implicit traceContext: TraceContext): FutureUnlessShutdown[Unit]
  74. def registerInternalIndexService(internalIndexService: InternalIndexService): Unit
  75. def registeredSynchronizers: Seq[StoredSynchronizerConnectionConfig]

    Returns the synchronizers this sync service is configured with.

  76. def remainingReaders(): Seq[String]
    Attributes
    protected[this]
    Definition Classes
    HasSynchronizeWithReaders
  77. def removeReader(handle: ReaderHandle): Unit

    TODO(#16601) Make this method private once PerformUnlessClosing doesn't need it any more

    TODO(#16601) Make this method private once PerformUnlessClosing doesn't need it any more

    Attributes
    protected[this]
    Definition Classes
    HasSynchronizeWithReaders
  78. val repairService: RepairService
  79. def runOnClose(task: RunOnClosing): UnlessShutdown[LifeCycleRegistrationHandle]

    Schedules the given task to be run upon closing.

    Schedules the given task to be run upon closing.

    returns

    An com.digitalasset.canton.lifecycle.UnlessShutdown.Outcome indicates that the task will have been run when the LifeCycleManager's closeAsync method completes or when AutoCloseable's close method returns, unless the returned LifeCycleRegistrationHandle was used to cancel the task or the task has been done beforehand. com.digitalasset.canton.lifecycle.UnlessShutdown.AbortedDueToShutdown if the task is not run due to closing. This always happens if isClosing returns true.

    Definition Classes
    OnShutdownRunnerHasRunOnClosing
  80. def runOnOrAfterClose(task: RunOnClosing)(implicit traceContext: TraceContext): LifeCycleRegistrationHandle

    Register a task to run when closing is initiated, or run it immediately if closing is already ongoing.

    Register a task to run when closing is initiated, or run it immediately if closing is already ongoing. Unlike runOnClose, this method does not guarantee that this task will have run by the time the LifeCycleManager's closeAsync method completes or AutoCloseable's close returns. This is because the task is run immediately if the component has already been closed.

    Definition Classes
    HasRunOnClosing
  81. final def runOnOrAfterClose_(task: RunOnClosing)(implicit traceContext: TraceContext): Unit

    Variant of runOnOrAfterClose that does not return a com.digitalasset.canton.lifecycle.LifeCycleRegistrationHandle.

  82. def runTaskUnlessDone(task: RunOnClosing)(implicit traceContext: TraceContext): Unit
    Attributes
    protected[this]
    Definition Classes
    OnShutdownRunnerHasRunOnClosing
  83. def selectRoutingSynchronizer(submitterInfo: SubmitterInfo, transaction: LfSubmittedTransaction, transactionMeta: TransactionMeta, disclosedContractIds: List[LfContractId], optSynchronizerId: Option[SynchronizerId], transactionUsedForExternalSigning: Boolean, synchronizerState: RoutingSynchronizerState)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, TransactionError, SynchronizerRank]

    Computes the best synchronizer for a submitted transaction by checking the submitted transaction against the topology of the connected synchronizers and ranking the admissible ones using the synchronizer ranking (by priority, minimum number of reassignments and synchronizer-id).

    Computes the best synchronizer for a submitted transaction by checking the submitted transaction against the topology of the connected synchronizers and ranking the admissible ones using the synchronizer ranking (by priority, minimum number of reassignments and synchronizer-id).

    submitterInfo

    The submitter info

    transaction

    The submitted transaction

    transactionMeta

    The transaction metadata

    disclosedContractIds

    The list of disclosed contracts used in command interpretation

    optSynchronizerId

    If provided, only this synchronizer id is considered as a candidate for routing

    transactionUsedForExternalSigning

    If true, the topology checks do not required that the submitters of the transaction have submission rights on the local participant since they are supposed to externally sign the transaction.

    returns

    The rank of the routing synchronizer

    Definition Classes
    CantonSyncServiceSyncService
  84. def sequencerClientHealth: MutableHealthComponent
  85. lazy val stateInspection: SyncStateInspection
  86. def submitReassignment(submitter: Party, userId: daml.lf.data.Ref.UserId, commandId: daml.lf.data.Ref.CommandId, submissionId: Option[SubmissionId], workflowId: Option[daml.lf.data.Ref.WorkflowId], reassignmentCommands: Seq[ReassignmentCommand])(implicit traceContext: TraceContext): CompletionStage[SubmissionResult]

    Submit a reassignment command for acceptance to the ledger.

    Submit a reassignment command for acceptance to the ledger.

    To complete a reassignment, first a submission of an unassign command followed by an assign command is required. The com.digitalasset.canton.ledger.participant.state.ReassignmentCommand.Assign command must include the unassign ID which can be observed in the accepted event marking the corresponding successful unassign command.

    submitter

    The submitter of the reassignment.

    userId

    An identifier for the user that submitted the command. This is used for monitoring, command deduplication, and to allow Daml applications subscribe to their own submissions only.

    commandId

    A submitter-provided identifier to identify an intended ledger change within all the submissions by the same parties and application.

    submissionId

    An identifier for the submission that allows an application to correlate completions to its submissions.

    workflowId

    A submitter-provided identifier used for monitoring and to traffic-shape the work handled by Daml applications communicating over the ledger.

    reassignmentCommands

    The commands specifying this reassignment further.

    Definition Classes
    CantonSyncServiceSubmissionSyncService
  87. def submitTransaction(transaction: LfSubmittedTransaction, synchronizerRank: SynchronizerRank, routingSynchronizerState: RoutingSynchronizerState, submitterInfo: SubmitterInfo, transactionMeta: TransactionMeta, _estimatedInterpretationCost: Long, keyResolver: LfKeyResolver, processedDisclosedContracts: ImmArray[LfFatContractInst])(implicit traceContext: TraceContext): CompletionStage[SubmissionResult]

    Submit a transaction for acceptance to the ledger.

    Submit a transaction for acceptance to the ledger.

    This method must be thread-safe.

    The result of the transaction submission is communicated asynchronously via a sequence of com.digitalasset.canton.ledger.participant.state.Update implementation backed by the same participant state as this com.digitalasset.canton.ledger.participant.state.SyncService. Successful transaction acceptance is communicated using a com.digitalasset.canton.ledger.participant.state.Update.TransactionAccepted message. Failed transaction acceptance is communicated when possible via a com.digitalasset.canton.ledger.participant.state.Update.CommandRejected message referencing the same submitterInfo as provided in the submission. There can be failure modes where a transaction submission is lost in transit, and no com.digitalasset.canton.ledger.participant.state.Update.CommandRejected is generated. See the comments on com.digitalasset.canton.ledger.participant.state.Update for further details.

    A note on ledger time and record time: transactions are submitted together with a ledgerTime provided as part of the transactionMeta information. The ledger time is used by the Daml Engine to resolve calls to the getTime :: Update Time function. Letting the submitter freely choose the ledger time is though a problem for the other stakeholders in the contracts affected by the submitted transaction. The submitter can in principle choose to submit transactions that are effective far in the past or future relative to the wall-clock time of the other participants. This gives the submitter an unfair advantage and make the semantics of getTime quite surprising. We've chosen the following solution to provide useful guarantees for contracts relying on getTime.

    The ledger is charged with (1) associating record-time stamps to accepted transactions and (2) to provide a guarantee on the maximal skew between the ledger effective time and the record time stamp associated to an accepted transaction. The ledger is also expected to provide guarantees on the distribution of the maximal skew between record time stamps on accepted transactions and the wall-clock time at delivery of accepted transactions to a ledger participant. Thereby providing ledger participants with a guarantee on the maximal skew between the ledger effective time of an accepted transaction and the wall-clock time at delivery to these participants.

    Concretely, we typically expect the allowed skew between record time and ledger time to be in the minute range. Thereby leaving ample time for submitting and validating large transactions before they are timestamped with their record time.

    The com.digitalasset.canton.ledger.participant.state.SyncService is responsible for deduplicating commands with the same com.digitalasset.canton.ledger.participant.state.SubmitterInfo.changeId within the com.digitalasset.canton.ledger.participant.state.SubmitterInfo.deduplicationPeriod.

    transaction

    the submitted transaction. This transaction can contain local contract-ids that need suffixing. The participant state may have to suffix those contract-ids in order to guaranteed their global uniqueness. See the Contract Id specification for more detail daml-lf/spec/contract-id.rst.

    synchronizerRank

    The synchronizer rank based on which:

    • the participant performs the required reassignments of the transaction's input contracts
    • the participant routes the transaction to the synchronizer
    routingSynchronizerState

    The synchronizer state used for synchronizer selection. This is subsequently used for synchronizer routing.

    submitterInfo

    the information provided by the submitter for correlating this submission with its acceptance or rejection on the associated com.digitalasset.canton.ledger.participant.state.Update.

    transactionMeta

    the meta-data accessible to all consumers of the transaction. See com.digitalasset.canton.ledger.participant.state.TransactionMeta for more information.

    _estimatedInterpretationCost

    Estimated cost of interpretation that may be used for handling submitted transactions differently.

    keyResolver

    Input key mapping inferred by interpretation. The map should contain all contract keys that were used during interpretation. A value of None means no contract was found with this contract key.

    processedDisclosedContracts

    Explicitly disclosed contracts used during interpretation.

    Definition Classes
    CantonSyncServiceSubmissionSyncService
  88. def subscribeToConnections(subscriber: ConnectionListener): Unit
  89. val syncCrypto: SyncCryptoApiParticipantProvider
  90. val synchronizeVettingOnConnectedSynchronizers: PackageVettingSynchronization

    Validates that the provided packages are vetted on the currently connected synchronizers.

  91. def synchronizeWithClosing[F[_], A](name: String)(f: => F[A])(implicit traceContext: TraceContext, F: Thereafter[F], A: CanAbortDueToShutdown[F]): F[A]

    Runs the computation f only if the component is not yet closing.

    Runs the computation f only if the component is not yet closing. If so, the component will delay releasing its resources until f has completed (as defined by the com.digitalasset.canton.util.Thereafter instance) or the synchronizeWithClosingPatience has elapsed.

    DO NOT CALL this.close as part of f, because it will result in a deadlock. DO NOT PUT retries, especially indefinite ones, inside f.

    returns

    The computation completes with com.digitalasset.canton.lifecycle.UnlessShutdown.AbortedDueToShutdown if f has not run. Otherwise it is the result of running f.

    Definition Classes
    HasSynchronizeWithClosing
    See also

    HasRunOnClosing.isClosing

  92. def synchronizeWithClosingF[A](name: String)(f: => Future[A])(implicit ec: ExecutionContext, traceContext: TraceContext): FutureUnlessShutdown[A]

    Convenience method for synchronizing on Futures instead of FutureUnlessShutdowns.

    Convenience method for synchronizing on Futures instead of FutureUnlessShutdowns. Equivalent to

    synchronizeWithClosing(name)(FutureUnlessShutdown.outcomeF(f))
    Definition Classes
    PerformUnlessClosing
  93. def synchronizeWithClosingPatience: FiniteDuration
    Attributes
    protected[this]
    Definition Classes
    PerformUnlessClosingHasSynchronizeWithReaders
  94. def synchronizeWithClosingSync[A](name: String)(f: => A)(implicit traceContext: TraceContext): UnlessShutdown[A]

    Runs the computation f only if the component is not yet closing.

    Runs the computation f only if the component is not yet closing. If so, the component will delay releasing its resources until f has finished or the synchronizeWithClosingPatience has elapsed.

    DO NOT CALL this.close as part of f, because it will result in a deadlock. DO NOT PUT retries, especially indefinite ones, inside f.

    returns

    com.digitalasset.canton.lifecycle.UnlessShutdown.AbortedDueToShutdown if f has not run.

    Definition Classes
    HasSynchronizeWithClosing
    Annotations
    @SuppressWarnings()
    See also

    HasRunOnClosing.isClosing

  95. def synchronizeWithClosingUS[F[_], A](name: String)(f: => F[A])(implicit traceContext: TraceContext, F: Thereafter[F]): UnlessShutdown[F[A]]

    Runs the computation f only if the component is not yet closing.

    Runs the computation f only if the component is not yet closing. If so, the component will delay releasing its resources until f has completed (as defined by the com.digitalasset.canton.util.Thereafter instance) or the synchronizeWithClosingPatience has elapsed.

    DO NOT CALL this.close as part of f, because it will result in a deadlock. DO NOT PUT retries, especially indefinite ones, inside f.

    returns

    com.digitalasset.canton.lifecycle.UnlessShutdown.AbortedDueToShutdown if f has not run. Otherwise the result of running f.

    Definition Classes
    PerformUnlessClosingHasSynchronizeWithClosing
    See also

    HasRunOnClosing.isClosing

  96. def synchronizeWithReaders()(implicit traceContext: TraceContext): Boolean
    Attributes
    protected[this]
    Definition Classes
    HasSynchronizeWithReaders
  97. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  98. def timeouts: ProcessingTimeout
    Attributes
    protected
    Definition Classes
    CantonSyncServiceFlagCloseable
  99. def toString(): String
    Definition Classes
    CantonSyncService → AnyRef → Any
  100. implicit val tracer: Tracer
  101. final def unlessClosing[F[_], A](fa: => F[A])(implicit F: CanAbortDueToShutdown[F]): F[A]

    Runs the computation fa unless isClosing returns true.

    Runs the computation fa unless isClosing returns true.

    This method does not delay the closing while fa is running, unlike the methods in HasSynchronizeWithClosing. Accordingly, this method is useful for intermittent checks whether the result of the computation is still relevant.

    returns

    The result of fa or com.digitalasset.canton.lifecycle.UnlessShutdown.AbortedDueToShutdown if isClosing is true

    Definition Classes
    HasUnlessClosing
    Annotations
    @inline()
  102. def unregisterInternalIndexService(): Unit
  103. def upgradeSynchronizerTo(currentPSId: PhysicalSynchronizerId, synchronizerSuccessor: SynchronizerSuccessor)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, String, Unit]
    Annotations
    @VisibleForTesting()
  104. def uploadDar(dars: Seq[ByteString], submissionId: SubmissionId)(implicit traceContext: TraceContext): Future[SubmissionResult]

    Upload a DAR to the ledger.

    Upload a DAR to the ledger.

    This method must be thread-safe, not throw, and not block on IO. It is though allowed to perform significant computation.

    submissionId

    Submitter chosen submission identifier.

    returns

    an async result of a com.digitalasset.canton.ledger.participant.state.SubmissionResult

    Definition Classes
    CantonSyncServicePackageSyncService
  105. def validateDar(dar: ByteString, darName: String)(implicit traceContext: TraceContext): Future[SubmissionResult]
  106. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  107. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  108. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  109. def withNewTrace[A](description: String)(f: (TraceContext) => (SpanWrapper) => A)(implicit tracer: Tracer): A
    Attributes
    protected
    Definition Classes
    Spanning
  110. def withReader[F[_], A](name: String)(f: => F[A])(implicit traceContext: TraceContext, F: Thereafter[F]): UnlessShutdown[F[A]]
    Attributes
    protected[this]
    Definition Classes
    HasSynchronizeWithReaders
  111. def withSpan[A](description: String)(f: (TraceContext) => (SpanWrapper) => A)(implicit traceContext: TraceContext, tracer: Tracer): A
    Attributes
    protected
    Definition Classes
    Spanning
  112. def withSpanFromGrpcContext[A](description: String)(f: (TraceContext) => (SpanWrapper) => A)(implicit tracer: Tracer): A
    Attributes
    protected
    Definition Classes
    Spanning

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 HasCloseContext

Inherited from NamedLogging

Inherited from Spanning

Inherited from FlagCloseable

Inherited from PerformUnlessClosing

Inherited from OnShutdownRunner

Inherited from HasRunOnClosing

Inherited from HasUnlessClosing

Inherited from AutoCloseable

Inherited from SyncService

Inherited from ReportsHealth

Inherited from PartySyncService

Inherited from PackageSyncService

Inherited from SubmissionSyncService

Inherited from AnyRef

Inherited from Any

Ungrouped