trait BlockOrderer extends AutoCloseable
The interface to the ordering functionality for a block sequencer.
It is not BFT-specific, but an implementation may be Byzantine Fault tolerant with respect to the ordering functionality.
BFT reads and writes require, however client cooperation: if f
is the maximum number of
tolerated faulty sequencer nodes, then a BFT read requires reading f+1
streams and BFT writes
require either writing to f+1
sequencers or writing to a single sequencer and be prepared to
retry on another sequencer if a BFT read for the corresponding event fails.
- Alphabetic
- By Inheritance
- BlockOrderer
- AutoCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def acknowledge(signedAcknowledgeRequest: SignedContent[AcknowledgeRequest])(implicit traceContext: TraceContext): Future[Unit]
Orders an event reception acknowledgement.
Orders an event reception acknowledgement. If the sequencer node is honest, this normally results in a block.RawLedgerBlock.RawBlockEvent.Acknowledgment. In exceptional cases (crashes, high load, ...), a sequencer may drop acknowledgements.
- abstract def close(): Unit
- Definition Classes
- AutoCloseable
- Annotations
- @throws(classOf[java.lang.Exception])
- abstract def firstBlockHeight: Long
The height of the first block to be returned by
subscribe
. - abstract def health(implicit traceContext: TraceContext): Future[SequencerDriverHealthStatus]
- abstract def orderingTimeFixMode: OrderingTimeFixMode
Determines if block timestamps emitted by
subscribe
are strictly monotonically increasing. - abstract def send(signedOrderingRequest: SignedOrderingRequest)(implicit traceContext: TraceContext): EitherT[Future, SequencerDeliverError, Unit]
Orders a submission.
Orders a submission. If the sequencer node is honest, this normally results in a block.RawLedgerBlock.RawBlockEvent.Send. In exceptional cases (crashes, high load, ...), a sequencer may drop submissions. There's a double com.digitalasset.canton.sequencing.protocol.SignedContent wrapping because the outer signature is the sequencer's, and the inner signature is the sender's. The sequencer signature may be used by the implementation to ensure that the submission originates from the expected sequencer node. This may be necessary if the implementation is split across multiple processes.
- abstract def sequencerSnapshotAdditionalInfo(timestamp: CantonTimestamp): EitherT[Future, SequencerError, Option[BftSequencerSnapshotAdditionalInfo]]
Provides information for the SequencerSnapshot.additional field, which can be used for onboarding.
- abstract def subscribe()(implicit traceContext: TraceContext): Source[RawLedgerBlock, KillSwitch]
Delivers a stream of blocks.
Delivers a stream of blocks.
Honest and correct implementations must ensure the following:
- 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. - This method can be called only once per instance, so implementations do not have to try to create separate sources on every call to this method: it is acceptable for the implementation to have one internal source and just return it.
- The call must succeed if an earlier (across instances and restarts) call to
subscribe
delivered a block with heightfirstBlockHeight
unless the block has been pruned in between, in which case it fails. - Block heights must be consecutive and start at
firstBlockHeight
. - For a given block height, all sequencer nodes of a synchronizer must emit the same block for that height.
- Every submission that has been sent to an honest node through
send
will be included in the output stream on a best effort basis. That means, the output stream normally contains every submission, but submissions may sometimes be dropped due to high load, crashes, etc... - A submission may occur more than once in the output stream, as malicious sequencer nodes may replay requests.
- An event in the output can not necessarily be parsed to com.digitalasset.canton.synchronizer.block.LedgerBlockEvent. If they can be parsed, the embedded signatures are not necessarily valid.
- If
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
- def adminServices: Seq[ServerServiceDefinition]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- 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
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- 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
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- 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])