package client
- Alphabetic
- By Inheritance
- client
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Package Members
- package grpc
- package transports
Type Members
- abstract class CheckedSubscriptionErrorRetryPolicy[SE <: SubscriptionError] extends SubscriptionErrorRetryPolicy
Allows implementors to only specify policy for an error hierarchy they've defined.
Allows implementors to only specify policy for an error hierarchy they've defined. Avoids adding type parameters to all sequencer client components. TODO(11067): work out if type parameters are really required and if so are they that bad
- trait DelaySequencedEvent extends AnyRef
- case class DelayedSequencerClient(domain: DomainId, member: String) extends DelaySequencedEvent with Product with Serializable
- case class Fatal(msg: String) extends SequencerSubscriptionCreationError with Product with Serializable
When a fatal error occurs on the creation of a sequencer subscription, the com.digitalasset.canton.sequencing.client.ResilientSequencerSubscription will not retry the subscription creation.
When a fatal error occurs on the creation of a sequencer subscription, the com.digitalasset.canton.sequencing.client.ResilientSequencerSubscription will not retry the subscription creation. Instead, the subscription will fail.
- sealed trait GrpcSequencerAuthenticationSupport extends AnyRef
- class PeriodicAcknowledgements extends NamedLogging with FlagCloseable with HasFlushFuture
Periodically pull the latest clean timestamp and if it has changed acknowledge it with the sequencer.
Periodically pull the latest clean timestamp and if it has changed acknowledge it with the sequencer. This indicates that we have successfully processed all events up to and including this event. We always acknowledge the current clean timestamp on startup if available to indicate to the sequencer that we are running. The periodic interval is based on the host clock not in sequencer time, however any drift is likely insignificant for the purpose of the sequencer acknowledgements (pruning hourly/daily). Errors are logged at error level - periodic failures are likely not problematic however continuous errors could eventually be problematic for the sequencer operator.
- case class RecordingConfig(directory: Path, filename: Option[String] = None) extends Product with Serializable
Configuration for where to record sequencer sends and events to.
Configuration for where to record sequencer sends and events to.
- directory
Root directory for holding all recording files
- filename
Filename that is initially empty and updated to a name based on the member-id at runtime. Use setFilename to ensure this can only be set once.
- sealed trait ReplayAction extends AnyRef
- case class ReplayConfig(recordingConfig: RecordingConfig, action: ReplayAction) extends Product with Serializable
Configuration for setting up a sequencer client to replay requests or received events.
Configuration for setting up a sequencer client to replay requests or received events.
- recordingConfig
The path to where all recorded content is stored
- action
What type of replay we'll be performing
- trait RequestSigner extends AnyRef
- class ResilientSequencerSubscription[HandlerError] extends SequencerSubscription[HandlerError] with NamedLogging with FlagCloseableAsync with ComponentHealth
Attempts to create a resilient SequencerSubscription for the SequencerClient by creating underlying subscriptions using the com.digitalasset.canton.sequencing.client.transports.SequencerClientTransport and then recreating them if they fail with a reason that is deemed retryable.
Attempts to create a resilient SequencerSubscription for the SequencerClient by creating underlying subscriptions using the com.digitalasset.canton.sequencing.client.transports.SequencerClientTransport and then recreating them if they fail with a reason that is deemed retryable. If a subscription is closed or fails with a reason that is not retryable the failure will be passed upstream from this subscription. We determine whether an error is retryable by calling the supplied SubscriptionErrorRetryPolicy. We also will delay recreating subscriptions by an interval determined by the com.digitalasset.canton.sequencing.client.SubscriptionRetryDelayRule. As we have to know where to restart a subscription from when it is recreated we use a com.digitalasset.canton.sequencing.handlers.CounterCapture handler wrapper to keep track of the last event that was successfully provided by the provided handler, and use this value to restart new subscriptions from. For this subscription ResilientSequencerSubscription.start must be called for the underlying subscriptions to begin.
- sealed trait SendAsyncClientError extends Product with Serializable with PrettyPrinting
Errors returned from the AsyncSend where we are sure the request has not potentially been accepted by the server so may be retried using a new message id (as a tracked message id for the failed request may remain in the pending send set).
Errors returned from the AsyncSend where we are sure the request has not potentially been accepted by the server so may be retried using a new message id (as a tracked message id for the failed request may remain in the pending send set). If a technical error is encountered by the sequencer client where there is a chance that the send will be sequenced it should not be returned to the caller through this error.
- type SendCallback = (UnlessShutdown[SendResult]) => Unit
Signature for callbacks provided to the send operation to take advantage of the SendTracker to provide tracking of the eventual send result.
Signature for callbacks provided to the send operation to take advantage of the SendTracker to provide tracking of the eventual send result. Callback is ephemeral and will be lost if the SequencerClient is recreated or the process exits.
- See also
- sealed trait SendResult extends Product with Serializable
Possible outcomes for a send operation can be observed by a SequencerClient
- type SendTimeoutHandler = (MessageId) => EitherT[Future, TimeoutHandlerError, Unit]
Signature for handlers that are notified that the sequencer clock has progressed beyond the max sequencing time of a send previously done by the client and receipt has not been witnessed.
Signature for handlers that are notified that the sequencer clock has progressed beyond the max sequencing time of a send previously done by the client and receipt has not been witnessed. It's currently unclear what we'll do when handling these timeouts so the error type is left intentionally undefined.
- class SendTracker extends NamedLogging with FlagCloseableAsync with AutoCloseable
When a we make a send request to the sequencer it will not be sequenced until some point in the future and may not be sequenced at all.
When a we make a send request to the sequencer it will not be sequenced until some point in the future and may not be sequenced at all. To track a request call
send
with the messageId and max-sequencing-time of the request, the tracker then observes sequenced events and will notify the provided handler if the send times out. - sealed trait SendType extends AnyRef
What type of message is being sent.
What type of message is being sent. Used by the domain and surrounding infrastructure for prioritizing send requests.
- sealed trait SequencedEventValidationError extends Product with Serializable with PrettyPrinting
- trait SequencedEventValidator extends FlagCloseable
Validate whether a received event is valid for processing.
- trait SequencedEventValidatorFactory extends AnyRef
- class SequencedEventValidatorImpl extends SequencedEventValidator with HasCloseContext with NamedLogging
Validate whether a received event is valid for processing.
- class SequencerClient extends SequencerClientSend with FlagCloseableAsync with NamedLogging with HasFlushFuture with Spanning
The sequencer client facilitates access to the individual domain sequencer.
The sequencer client facilitates access to the individual domain sequencer. A client centralizes the message signing operations, as well as the handling and storage of message receipts and delivery proofs, such that this functionality does not have to be duplicated throughout the participant node.
- case class SequencerClientConfig(eventInboxSize: PositiveInt = PositiveInt.tryCreate(100), startupConnectionRetryDelay: NonNegativeFiniteDuration = NonNegativeFiniteDuration.ofSeconds(1), initialConnectionRetryDelay: NonNegativeFiniteDuration = NonNegativeFiniteDuration.ofMillis(10), warnDisconnectDelay: NonNegativeFiniteDuration = NonNegativeFiniteDuration.ofSeconds(5), maxConnectionRetryDelay: NonNegativeFiniteDuration = NonNegativeFiniteDuration.ofSeconds(30), handshakeRetryAttempts: NonNegativeInt = NonNegativeInt.tryCreate(50), handshakeRetryDelay: NonNegativeFiniteDuration = NonNegativeFiniteDuration.ofSeconds(5), defaultMaxSequencingTimeOffset: NonNegativeFiniteDuration = NonNegativeFiniteDuration.ofMinutes(5), acknowledgementInterval: NonNegativeFiniteDuration = NonNegativeFiniteDuration.ofMinutes(1), keepAliveClient: Option[KeepAliveClientConfig] = Some(KeepAliveClientConfig()), authToken: AuthenticationTokenManagerConfig = AuthenticationTokenManagerConfig(), optimisticSequencedEventValidation: Boolean = true, skipSequencedEventValidation: Boolean = false, overrideMaxRequestSize: Option[NonNegativeInt] = None) extends Product with Serializable
Client configured options for how to connect to a sequencer
Client configured options for how to connect to a sequencer
- eventInboxSize
The size of the inbox queue used to store received events. Must be at least one. Events in the inbox are processed in parallel. A larger inbox may result in higher throughput at the price of higher memory consumption, larger database queries, and longer crash recovery.
- startupConnectionRetryDelay
Initial delay before we attempt to establish an initial connection
- initialConnectionRetryDelay
Initial delay before a reconnect attempt
- warnDisconnectDelay
Consider sequencer to be degraded after delay
- maxConnectionRetryDelay
Maximum delay before a reconnect attempt
- handshakeRetryAttempts
How many attempts should we make to get a handshake response
- handshakeRetryDelay
How long to delay between attempts to fetch a handshake response
- defaultMaxSequencingTimeOffset
if no max-sequencing-time is supplied to send, our current time will be offset by this amount
- acknowledgementInterval
Controls how frequently the client acknowledges how far it has successfully processed to the sequencer which allows the sequencer to remove this data when pruning.
- authToken
configuration settings for the authentication token manager
- optimisticSequencedEventValidation
if true, sequenced event signatures will be validated first optimistically and only strict if the optimistic evaluation failed. this means that for a split second, we might still accept an event signed with a key that has just been revoked.
- skipSequencedEventValidation
if true, sequenced event validation will be skipped. the default setting is false. this option should only be enabled if a defective validation is blocking processing. therefore, unless you know what you are doing, you shouldn't touch this setting.
- overrideMaxRequestSize
overrides the maxRequestSize configured in the dynamic domain parameters. If overrideMaxRequestSize, is set, modifying the maxRequestSize won't have any effect.
- trait SequencerClientFactory extends AnyRef
- trait SequencerClientSend extends AnyRef
- sealed trait SequencerClientSubscriptionError extends Product with Serializable
- case class SequencerClientSubscriptionException(error: SequencerClientSubscriptionError) extends RuntimeException with Product with Serializable
- Annotations
- @SuppressWarnings()
- trait SequencerClientTransportFactory extends AnyRef
- trait SequencerSubscription[HandlerError] extends FlagCloseableAsync with NamedLogging
A running subscription to a sequencer.
A running subscription to a sequencer. Can be closed by the consumer or the producer. Once closed the closeReason value will be fulfilled with the reason the subscription was closed. Implementations are expected to immediately start their subscription unless otherwise stated. If close is called while the handler is running closeReason should not be completed until the handler has completed.
- sealed trait SequencerSubscriptionCreationError extends SubscriptionError
Errors that may occur on the creation of a sequencer subscription
- trait SequencerSubscriptionFactory[HandlerError] extends AnyRef
- sealed trait SubscriptionCloseReason[+E] extends AnyRef
Why did the sequencer subscription terminate
- trait SubscriptionErrorRetryPolicy extends AnyRef
Policy for what errors are considered retryable.
Policy for what errors are considered retryable. Each transports.SequencerClientTransport is expected to supply their own policy which can consider error types they have defined.
- trait SubscriptionRetryDelayRule extends AnyRef
Calculator for how to select the next retry duration and specifies what duration is enough to log a warning.
Value Members
- object DelayedSequencerClient extends Serializable
- object GrpcSequencerAuthenticationSupport
- case object NoDelay extends DelaySequencedEvent with Product with Serializable
- object PeriodicAcknowledgements
- object ReplayAction
- object ReplayConfig extends Serializable
- object RequestSigner
- object ResilientSequencerSubscription extends SequencerSubscriptionErrorGroup
- object SendAsyncClientError extends Serializable
- object SendCallback
Utilities for a SendCallback passed to the send method of the SequencerClient
- object SendResult extends Serializable
- object SendTrackerUpdateError
- object SendType
- object SequencedEventValidationError extends Serializable
- object SequencedEventValidator extends HasLoggerName
- object SequencedEventValidatorFactory
- object SequencedEventValidatorImpl
- object SequencerClient
- object SequencerClientSubscriptionError extends Serializable
- object SubscriptionCloseReason
- object SubscriptionErrorRetryPolicy
- object SubscriptionRetryDelayRule