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

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CantonSyncService
  2. InternalStateServiceProviderImpl
  3. HasCloseContext
  4. PromiseUnlessShutdownFactory
  5. NamedLogging
  6. Spanning
  7. FlagCloseable
  8. PerformUnlessClosing
  9. HasSynchronizeWithReaders
  10. OnShutdownRunner
  11. HasRunOnClosing
  12. HasUnlessClosing
  13. AutoCloseable
  14. SyncService
  15. InternalStateServiceProvider
  16. ReportsHealth
  17. ParticipantPruningSyncService
  18. PartySyncService
  19. PackageSyncService
  20. SubmissionSyncService
  21. AnyRef
  22. 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], storage: Storage, 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. val acsCommitmentProcessorHealth: MutableHealthComponent
  5. 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
  6. 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.

  7. def allocateParty(hint: LfPartyId, rawSubmissionId: LedgerSubmissionId, externalPartyOnboardingDetails: Option[ExternalPartyOnboardingDetails])(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

    externalPartyOnboardingDetails

    Onboarding information when allocating an external party

    returns

    an async result of a SubmissionResult

    Definition Classes
    CantonSyncServicePartySyncService
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def checkOverloaded(traceContext: TraceContext): Option[SubmissionResult]
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  11. 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
  12. implicit val closeContext: CloseContext
    Definition Classes
    HasCloseContext
  13. def closingTimeout: FiniteDuration
    Attributes
    protected
    Definition Classes
    FlagCloseablePerformUnlessClosing
  14. val commitmentsService: CommitmentsService
  15. def computeHighestRankedSynchronizerFromAdmissible(submitterInfo: SubmitterInfo, transaction: LfSubmittedTransaction, transactionMeta: TransactionMeta, admissibleSynchronizers: NonEmpty[Set[SynchronizerId]], disclosedContractIds: List[LfContractId], routingSynchronizerState: RoutingSynchronizerState)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, TransactionRoutingError, SynchronizerId]

    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
  16. def computeTotalLoad: Int
  17. def connectSynchronizer(synchronizerAlias: SynchronizerAlias, keepRetrying: Boolean, connectSynchronizer: ConnectSynchronizer)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, SyncServiceError, Boolean]

    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.

  18. val connectedSynchronizerHealth: MutableHealthComponent
  19. 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
  20. def currentWriteHealth(): HealthStatus
  21. def disconnectSynchronizer(synchronizerAlias: SynchronizerAlias)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, SyncServiceError, Unit]

    Disconnect the given synchronizer from the sync service.

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

    Disconnect from all connected synchronizers.

  23. val dynamicSynchronizerParameterGetter: CantonDynamicSynchronizerParameterGetter
  24. val ephemeralHealth: MutableHealthComponent
  25. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  27. implicit def errorLoggingContext(implicit traceContext: TraceContext): ErrorLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  28. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  29. def getConnectedSynchronizers(request: ConnectedSynchronizerRequest)(implicit traceContext: TraceContext): FutureUnlessShutdown[ConnectedSynchronizerResponse]
    Definition Classes
    CantonSyncServiceSyncService
  30. def getLfArchive(packageId: PackageId)(implicit traceContext: TraceContext): Future[Option[Archive]]
  31. def getPackageMetadataSnapshot(implicit errorLoggingContext: ErrorLoggingContext): PackageMetadata
  32. def getProtocolVersionForSynchronizer(synchronizerId: Traced[SynchronizerId]): Option[ProtocolVersion]
    Definition Classes
    CantonSyncServiceSyncService
  33. 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
  34. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  35. 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
  36. def initializeState()(implicit traceContext: TraceContext): Unit
  37. def internalStateService: Option[InternalStateService]
  38. val isActive: () => Boolean
  39. 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
  40. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  41. 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
  42. val ledgerApiIndexer: LifeCycleContainer[LedgerApiIndexer]
  43. def listLfPackages()(implicit traceContext: TraceContext): Future[Seq[PackageDescription]]
  44. def logger: TracedLogger
    Attributes
    protected
    Definition Classes
    NamedLogging
  45. val loggerFactory: NamedLoggerFactory
    Attributes
    protected
    Definition Classes
    CantonSyncServiceNamedLogging
  46. def logout(synchronizerAlias: SynchronizerAlias)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, Status, Unit]
  47. def lookupSynchronizerTimeTracker(synchronizerId: SynchronizerId): Option[SynchronizerTimeTracker]

    Lookup a time tracker for the given synchronizerId.

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

  48. def lookupTopologyClient(synchronizerId: SynchronizerId): Option[SynchronizerTopologyClientWithInit]
  49. val maxDeduplicationDuration: NonNegativeFiniteDuration
  50. def maxSleepMillis: Long

    How often to poll to check that all tasks have completed.

    How often to poll to check that all tasks have completed.

    Attributes
    protected
    Definition Classes
    PerformUnlessClosing
  51. 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.

  52. 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
  53. def modifySynchronizer(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

    NOTE: This does not automatically reconnect to the synchronizer.

  54. def nameInternal: String
    Attributes
    protected[this]
    Definition Classes
    PerformUnlessClosingHasSynchronizeWithReaders
  55. implicit def namedLoggingContext(implicit traceContext: TraceContext): NamedLoggingContext
    Attributes
    protected
    Definition Classes
    NamedLogging
  56. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  57. def noTracingLogger: Logger
    Attributes
    protected
    Definition Classes
    NamedLogging
  58. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  59. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  60. def onCloseFailure(e: Throwable): Unit
    Attributes
    protected
    Definition Classes
    PerformUnlessClosing
  61. def onClosed(): Unit
  62. 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
    Annotations
    @SuppressWarnings()
  63. def packageMapFor(submitters: Set[LfPartyId], informees: Set[LfPartyId], vettingValidityTimestamp: CantonTimestamp, prescribedSynchronizer: Option[SynchronizerId], routingSynchronizerState: RoutingSynchronizerState)(implicit traceContext: TraceContext): FutureUnlessShutdown[Map[SynchronizerId, 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
  64. val participantId: ParticipantId
  65. def performUnlessClosing[A](name: String)(f: => A)(implicit traceContext: TraceContext): UnlessShutdown[A]

    Performs the task given by f unless a shutdown has been initiated.

    Performs the task given by f unless a shutdown has been initiated. The shutdown will only begin after f completes, but other tasks may execute concurrently with f, if started using this function, or one of the other variants (performUnlessClosingF and performUnlessClosingEitherT). The tasks are assumed to take less than closingTimeout to complete.

    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.

    f

    The task to perform

    returns

    scala.None$ if a shutdown has been initiated. Otherwise the result of the task.

    Definition Classes
    PerformUnlessClosing
  66. def performUnlessClosingCheckedT[A, N, R](name: String, onClosing: => Checked[A, N, R])(etf: => CheckedT[Future, A, N, R])(implicit ec: ExecutionContext, traceContext: TraceContext): CheckedT[Future, A, N, R]
    Definition Classes
    PerformUnlessClosing
  67. def performUnlessClosingCheckedUST[A, N, R](name: String, onClosing: => Checked[A, N, R])(etf: => CheckedT[FutureUnlessShutdown, A, N, R])(implicit ec: ExecutionContext, traceContext: TraceContext): CheckedT[FutureUnlessShutdown, A, N, R]
    Definition Classes
    PerformUnlessClosing
  68. def performUnlessClosingEitherT[E, R](name: String, onClosing: => E)(etf: => EitherT[Future, E, R])(implicit ec: ExecutionContext, traceContext: TraceContext): EitherT[Future, E, R]

    Performs the EitherT[Future] given by etf unless a shutdown has been initiated, in which case the provided error is returned instead.

    Performs the EitherT[Future] given by etf unless a shutdown has been initiated, in which case the provided error is returned instead. Both etf and the error are lazy; etf is only evaluated if there is no shutdown, the error only if we're shutting down. The shutdown will only begin after etf completes, but other tasks may execute concurrently with etf, if started using this function, or one of the other variants (performUnlessClosing and performUnlessClosingF). The tasks are assumed to take less than closingTimeout to complete.

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

    etf

    The task to perform

    Definition Classes
    PerformUnlessClosing
  69. def performUnlessClosingEitherU[E, R](name: String)(etf: => EitherT[Future, E, R])(implicit ec: ExecutionContext, traceContext: TraceContext): EitherT[FutureUnlessShutdown, E, R]
    Definition Classes
    PerformUnlessClosing
  70. def performUnlessClosingEitherUSF[E, R](name: String)(etf: => EitherT[FutureUnlessShutdown, E, R])(implicit ec: ExecutionContext, traceContext: TraceContext): EitherT[FutureUnlessShutdown, E, R]
    Definition Classes
    PerformUnlessClosing
  71. def performUnlessClosingEitherUSFAsync[E, R](name: String)(etf: => EitherT[FutureUnlessShutdown, E, R])(asyncResultToWaitForF: (R) => FutureUnlessShutdown[_])(implicit ec: ExecutionContext, traceContext: TraceContext): EitherT[FutureUnlessShutdown, E, R]

    Use this method if closing/shutdown of the object should wait for asynchronous computation to finish too.

    Use this method if closing/shutdown of the object should wait for asynchronous computation to finish too.

    etf

    closing of this object will wait for all such spawned Futures to finish

    asyncResultToWaitForF

    closing of this object will wait also wait for all such asynchronous Futures to finish too

    returns

    the future spawned by etf

    Definition Classes
    PerformUnlessClosing
  72. def performUnlessClosingF[A](name: String)(f: => Future[A])(implicit ec: ExecutionContext, traceContext: TraceContext): FutureUnlessShutdown[A]

    Performs the Future given by f unless a shutdown has been initiated.

    Performs the Future given by f unless a shutdown has been initiated. The future is lazy and not evaluated during shutdown. The shutdown will only begin after f completes, but other tasks may execute concurrently with f, if started using this function, or one of the other variants (performUnlessClosing and performUnlessClosingEitherT). The tasks are assumed to take less than closingTimeout to complete.

    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.

    f

    The task to perform

    returns

    The future completes with com.digitalasset.canton.lifecycle.UnlessShutdown.AbortedDueToShutdown if a shutdown has been initiated. Otherwise the result of the task wrapped in com.digitalasset.canton.lifecycle.UnlessShutdown.Outcome.

    Definition Classes
    PerformUnlessClosing
  73. def performUnlessClosingOptionUSF[R](name: String)(otf: => OptionT[FutureUnlessShutdown, R])(implicit ec: ExecutionContext, traceContext: TraceContext): OptionT[FutureUnlessShutdown, R]
    Definition Classes
    PerformUnlessClosing
  74. def performUnlessClosingUSF[A](name: String)(f: => FutureUnlessShutdown[A])(implicit ec: ExecutionContext, traceContext: TraceContext): FutureUnlessShutdown[A]
    Definition Classes
    PerformUnlessClosing
  75. def performUnlessClosingUSFAsync[A](name: String)(f: => FutureUnlessShutdown[A])(asyncResultToWaitForF: (A) => FutureUnlessShutdown[_])(implicit ec: ExecutionContext, traceContext: TraceContext): FutureUnlessShutdown[A]

    Use this method if closing/shutdown of the object should wait for asynchronous computation to finish too.

    Use this method if closing/shutdown of the object should wait for asynchronous computation to finish too.

    f

    closing of this object will wait for all such spawned Futures to finish

    asyncResultToWaitForF

    closing of this object will wait also wait for all such asynchronous Futures to finish too

    returns

    the future spawned by f

    Definition Classes
    PerformUnlessClosing
  76. def protocolVersionForSynchronizerId(synchronizerId: SynchronizerId): Option[ProtocolVersion]

    Return the protocol version for a synchronizer ID if the node is connected to it.

    Return the protocol version for a synchronizer ID if the node is connected to it.

    Definition Classes
    CantonSyncServicePartySyncService
  77. val protocolVersionGetter: (Traced[SynchronizerId]) => Option[ProtocolVersion]
  78. def prune(pruneUpToInclusive: Offset, submissionId: LedgerSubmissionId, _pruneAllDivulgedContracts: Boolean): 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
  79. def pruneInternally(pruneUpToInclusive: Offset)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, RpcError, Unit]
  80. val pruningProcessor: PruningProcessor
  81. def pureCryptoApi: CryptoPureApi

    Returns the pure crypto operations used for the sync protocol

  82. def purgeDeactivatedSynchronizer(synchronizerAlias: SynchronizerAlias)(implicit traceContext: TraceContext): EitherT[FutureUnlessShutdown, SyncServiceError, Unit]
  83. def readySynchronizers: Map[SynchronizerAlias, (SynchronizerId, SubmissionReady)]

    Returns the ready synchronizers this sync service is connected to.

  84. 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

  85. def refreshCaches()(implicit traceContext: TraceContext): FutureUnlessShutdown[Unit]
  86. def registerInternalStateService(internalStateService: InternalStateService): Unit
  87. def registeredSynchronizers: Seq[StoredSynchronizerConnectionConfig]

    Returns the synchronizers this sync service is configured with.

  88. def remainingReaders(): Seq[String]
    Attributes
    protected[this]
    Definition Classes
    HasSynchronizeWithReaders
  89. 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
  90. val repairService: RepairService
  91. 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
  92. 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
  93. final def runOnOrAfterClose_(task: RunOnClosing)(implicit traceContext: TraceContext): Unit

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

  94. def runTaskUnlessDone(task: RunOnClosing)(implicit traceContext: TraceContext): Unit
    Attributes
    protected[this]
    Definition Classes
    OnShutdownRunnerHasRunOnClosing
  95. 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
  96. val sequencerClientHealth: MutableHealthComponent
  97. lazy val stateInspection: SyncStateInspection
  98. 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
  99. def submitTransaction(transaction: LfSubmittedTransaction, synchronizerRank: SynchronizerRank, routingSynchronizerState: RoutingSynchronizerState, submitterInfo: SubmitterInfo, transactionMeta: TransactionMeta, _estimatedInterpretationCost: Long, keyResolver: LfKeyResolver, processedDisclosedContracts: ImmArray[FatContractInstance])(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
  100. def subscribeToConnections(subscriber: ConnectionListener): Unit
  101. val syncCrypto: SyncCryptoApiParticipantProvider
  102. val synchronizeVettingOnConnectedSynchronizers: PackageVettingSynchronization

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

  103. def synchronizeWithClosingPatience: FiniteDuration
    Attributes
    protected[this]
    Definition Classes
    PerformUnlessClosingHasSynchronizeWithReaders
  104. def synchronizeWithReaders()(implicit traceContext: TraceContext): Boolean
    Attributes
    protected[this]
    Definition Classes
    HasSynchronizeWithReaders
  105. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  106. def synchronizerConnectionConfigByAlias(synchronizerAlias: SynchronizerAlias): EitherT[Future, MissingConfigForAlias, StoredSynchronizerConnectionConfig]
  107. def timeouts: ProcessingTimeout
    Attributes
    protected
    Definition Classes
    CantonSyncServiceFlagCloseable
  108. def toString(): String
    Definition Classes
    CantonSyncService → AnyRef → Any
  109. implicit val tracer: Tracer
  110. 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()
  111. def unregisterInternalStateService(): Unit
  112. 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
  113. def validateDar(dar: ByteString, darName: String)(implicit traceContext: TraceContext): Future[SubmissionResult]
  114. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  115. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  116. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  117. def withNewTrace[A](description: String)(f: (TraceContext) => (SpanWrapper) => A)(implicit tracer: Tracer): A
    Attributes
    protected
    Definition Classes
    Spanning
  118. def withReader[F[_], A](name: String)(f: => F[A])(implicit traceContext: TraceContext, F: Thereafter[F]): UnlessShutdown[F[A]]
    Attributes
    protected[this]
    Definition Classes
    HasSynchronizeWithReaders
  119. def withSpan[A](description: String)(f: (TraceContext) => (SpanWrapper) => A)(implicit traceContext: TraceContext, tracer: Tracer): A
    Attributes
    protected
    Definition Classes
    Spanning
  120. 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