trait Sequencer extends AutoCloseable
Interface for sequencer operations. The default DatabaseSequencer implementation is backed by a database run by a single operator. Other implementations support operating a Sequencer on top of third party ledgers or other infrastructure.
- Alphabetic
- By Inheritance
- Sequencer
- AutoCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def acknowledge(member: Member, timestamp: CantonTimestamp)(implicit traceContext: TraceContext): Future[Unit]
Acknowledge that a member has successfully handled all events up to and including the timestamp provided.
Acknowledge that a member has successfully handled all events up to and including the timestamp provided. Makes earlier events for this member available for pruning. The timestamp is in sequencer time and will likely correspond to an event that the client has processed however this is not validated. It is assumed that members in consecutive calls will never acknowledge an earlier timestamp however this is also not validated (and could be invalid if the member has many subscriptions from the same or many processes). It is expected that members will periodically call this endpoint with their latest clean timestamp rather than calling it for every event they process. The default interval is in the range of once a minute.
- abstract def authorizeLedgerIdentity(identity: LedgerIdentity)(implicit traceContext: TraceContext): EitherT[Future, String, Unit]
Currently this method is only implemented by the enterprise-only Ethereum driver.
Currently this method is only implemented by the enterprise-only Ethereum driver. It immediately returns a Left for ledgers where it is not implemented.
This method authorizes a com.digitalasset.canton.domain.sequencing.sequencer.LedgerIdentity on the underlying ledger. In the Ethereum-backed ledger, this enables the given Ethereum account to also write to the deployed
Sequencer.sol
contract. Therefore, this method needs to be called before being able to use an Ethereum sequencer with a given Ethereum account.NB: in Ethereum, this method needs to be called by an Ethereum sequencer whose associated Ethereum account is already authorized. Else the authorization itself will fail. To bootstrap the authorization, the Ethereum account that deploys the
Sequencer.sol
contract is the first account to be authorized. - abstract def close(): Unit
- Definition Classes
- AutoCloseable
- Annotations
- @throws(classOf[java.lang.Exception])
- abstract def disableMember(member: Member)(implicit traceContext: TraceContext): Future[Unit]
Disable the provided member.
Disable the provided member. Should prevent them from reading or writing in the future (although they can still be addressed). Their unread data can also be pruned. Effectively disables all instances of this member.
- abstract def health(implicit traceContext: TraceContext): Future[SequencerHealthStatus]
Return a structure indicating the health status of the sequencer implementation.
Return a structure indicating the health status of the sequencer implementation. Should succeed even if the configured datastore is unavailable.
- abstract def isLedgerIdentityRegistered(identity: LedgerIdentity)(implicit traceContext: TraceContext): Future[Boolean]
Always returns false for Sequencer drivers that don't support ledger identity authorization.
Always returns false for Sequencer drivers that don't support ledger identity authorization. Otherwise returns whether the given ledger identity is registered on the underlying ledger (and configured smart contract).
- abstract def isRegistered(member: Member)(implicit traceContext: TraceContext): Future[Boolean]
- abstract val loggerFactory: NamedLoggerFactory
- Attributes
- protected
- abstract def prune(requestedTimestamp: CantonTimestamp)(implicit traceContext: TraceContext): EitherT[Future, PruningError, String]
Prune as much sequencer data as safely possible without breaking operation (except for members that have been previously flagged as disabled).
Prune as much sequencer data as safely possible without breaking operation (except for members that have been previously flagged as disabled). Sequencers are permitted to prune to an earlier timestamp if required to for their own consistency. For example, the Database Sequencer will adjust this time to a potentially earlier point in time where counter checkpoints are available for all members (who aren't being ignored).
- abstract def pruningStatus(implicit traceContext: TraceContext): Future[SequencerPruningStatus]
Return a structure containing the members registered with the sequencer and the latest positions of clients reading events.
- abstract def read(member: Member, offset: SequencerCounter)(implicit traceContext: TraceContext): EitherT[Future, CreateSubscriptionError, EventSource]
- abstract def registerMember(member: Member)(implicit traceContext: TraceContext): EitherT[Future, SequencerWriteError[RegisterMemberError], Unit]
- abstract def sendAsync(submission: SubmissionRequest)(implicit traceContext: TraceContext): EitherT[Future, SendAsyncError, Unit]
- abstract def snapshot(timestamp: CantonTimestamp)(implicit traceContext: TraceContext): EitherT[Future, String, SequencerSnapshot]
Return a snapshot state that other newly onboarded sequencers can use as an initial state from which to support serving events.
Return a snapshot state that other newly onboarded sequencers can use as an initial state from which to support serving events. This state depends on the provided timestamp and will contain registered members, counters per member, latest timestamp (which will be greater than or equal to the provided timestamp) as well as a sequencer implementation specific piece of information such that all together form the point after which the new sequencer can safely operate. The provided timestamp is typically the timestamp of the requesting sequencer's private key, which is the point in time where it can effectively sign events.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def ensureRegistered(member: Member)(implicit executionContext: ExecutionContext, traceContext: TraceContext): EitherT[Future, SequencerWriteError[RegisterMemberError], Unit]
First check is the member is registered and if not call
registerMember
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])