trait SequencerDriver extends AutoCloseable

Defines methods for synchronizing data in blocks among all sequencer nodes of a domain.

The write operations sequence and distribute different kinds of requests. They can all be implemented by the same mechanism of sequencing a bytestring, but are kept separately for legacy reasons: The Fabric and Ethereum drivers have separate entry points or messages for the different request kinds.

Sequenced requests are delivered in a stream of RawLedgerBlocks ordered by their block height. The driver must make sure that all sequencer nodes of a domain receive the same stream of RawLedgerBlocks eventually. That is, if one sequencer node receives a block b at block height h, then every other sequencer node has already or will eventually receive b at height h unless the node fails permanently. Each RawLedgerBlock contains com.digitalasset.canton.domain.block.RawLedgerBlock.RawBlockEvents that correspond to the sequenced requests. The com.digitalasset.canton.tracing.TraceContext passed to the write operations should be propagated into the corresponding com.digitalasset.canton.domain.block.RawLedgerBlock.RawBlockEvent.

All write operations are asynchronous: the scala.concurrent.Future may complete before the request is actually sequenced. Under normal circumstances, the request should then also eventually be delivered in a com.digitalasset.canton.domain.block.RawLedgerBlock.RawBlockEvent, but there is no guarantee. A write operation may fail with an exception; in that case, the request must not be sequenced. Every write operation may result in at most one corresponding com.digitalasset.canton.domain.block.RawLedgerBlock.RawBlockEvent.

The SequencerDriver is responsible for assigning timestamps to com.digitalasset.canton.domain.block.RawLedgerBlock.RawBlockEvent.Send events. The assigned timestamps must be close to real-world time given the trust assumptions of the SequencerDriver. For example, assume that the clocks among all honest sequencer nodes are synchronized up to a given skew. Let ts0 be the local sequencer's time when an honest sequencer node calls SequencerDriver.send. Let ts1 be the local sequencer's time when it receives the corresponding com.digitalasset.canton.domain.block.RawLedgerBlock.RawBlockEvent.Send. Then the assigned timestamp ts must satisfy ts0 - skew <= ts <= ts1 + skew.

Several com.digitalasset.canton.domain.block.RawLedgerBlock.RawBlockEvent.Send events may have the same timestamp or go backwards, as long as they remain close to real-world time.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SequencerDriver
  2. AutoCloseable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def acknowledge(acknowledgement: ByteString)(implicit traceContext: TraceContext): Future[Unit]

    Distribute an acknowledgement request.

    Distribute an acknowledgement request. Results in a com.digitalasset.canton.domain.block.RawLedgerBlock.RawBlockEvent.Acknowledgment.

  2. abstract def adminServices: Seq[BindableService]

    Services for administering the ledger driver.

    Services for administering the ledger driver. These services will be exposed on the sequencer node's admin API endpoint.

  3. abstract def close(): Unit
    Definition Classes
    AutoCloseable
    Annotations
    @throws(classOf[java.lang.Exception])
  4. abstract def health(implicit traceContext: TraceContext): Future[SequencerDriverHealthStatus]
  5. abstract def registerMember(member: String)(implicit traceContext: TraceContext): Future[Unit]

    Register the given member.

  6. abstract def send(request: ByteString)(implicit traceContext: TraceContext): Future[Unit]

    Send a submission request.

  7. abstract def subscribe()(implicit traceContext: TraceContext): Source[RawLedgerBlock, KillSwitch]

    Delivers a stream of blocks starting with firstBlockHeight (if specified in the factory call) or the first block serveable.

    Delivers a stream of blocks starting with firstBlockHeight (if specified in the factory call) or the first block serveable. Block heights must be consecutive.

    If firstBlockHeight refers to a block whose sequencing number the sequencer node has not yet observed, returns a source that will eventually serve that block when it gets created.

    Must succeed if an earlier call to subscribe delivered a block with height firstBlockHeight unless the block has been pruned in between, in which case it fails

    This method will be called only once, so implementations do not have to try to create separate sources on every call to this method. It is acceptable to for the driver to have one internal source and just return it here.

Concrete 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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
    Deprecated

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped