t
com.digitalasset.canton.synchronizer.block.update
BlockUpdateGenerator
Companion object BlockUpdateGenerator
trait BlockUpdateGenerator extends AnyRef
Exposes functions that take the deserialized contents of a block from a blockchain integration and compute the new BlockUpdates.
These functions correspond to the following steps in the block processing stream pipeline:
- Extracting block events from a raw ledger block (extractBlockEvents).
- Chunking such block events into either event chunks terminated by a sequencer-addessed event or a block completion (chunkBlock).
- Validating and enriching chunks to yield block updates (processBlockChunk).
In particular, these functions are responsible for the final timestamp assignment of a given submission request. The timestamp assignment works as follows:
- an initial timestamp is assigned to the submission request by the sequencer that writes it to the ledger
- each sequencer that reads the block potentially adapts the previously assigned timestamp
deterministically via
ensureStrictlyIncreasingTimestamp
- this timestamp is used to compute the BlockUpdates
Reasoning:
- Step 1 is done so that every sequencer sees the same timestamp for a given event.
- Step 2 is needed because different sequencers may assign the same timestamps to different events or may not assign strictly increasing timestamps due to clock skews.
Invariants: For step 2, we assume that every sequencer observes the same stream of events from the underlying ledger (and especially that events are always read in the same order).
Linear Supertypes
Known Subclasses
Ordering
- Alphabetic
- By Inheritance
Inherited
- BlockUpdateGenerator
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Type Members
- abstract type InternalState
Abstract Value Members
- abstract def chunkBlock(block: BlockEvents)(implicit traceContext: TraceContext): Iterable[BlockChunk]
- abstract def extractBlockEvents(block: RawLedgerBlock): BlockEvents
- abstract def internalStateFor(state: BlockEphemeralState): InternalState
- abstract def processBlockChunk(state: InternalState, chunk: BlockChunk)(implicit ec: ExecutionContext, traceContext: TraceContext): FutureUnlessShutdown[(InternalState, OrderedBlockUpdate)]
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]) @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])