Packages

package block

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

Package Members

  1. package data
  2. package update

Type Members

  1. final case class BlockEvents(height: Long, events: Seq[Traced[LedgerBlockEvent]], tickTopologyAtLeastAt: Option[CantonTimestamp] = None) extends Product with Serializable

  2. class BlockSequencerStateManager extends BlockSequencerStateManagerBase with NamedLogging
  3. trait BlockSequencerStateManagerBase extends FlagCloseable

    State manager for operating a sequencer using Blockchain based infrastructure (such as fabric or ethereum)

  4. sealed trait LedgerBlockEvent extends Product with Serializable

    Trait that generalizes over the kind of events that could be observed from a com.digitalasset.canton.synchronizer.sequencer.block.BlockOrderer.

  5. final case class RawLedgerBlock(blockHeight: Long, events: Seq[Traced[RawBlockEvent]], tickTopologyAtMicrosFromEpoch: Option[Long] = None) extends Product with Serializable

    A block that a SequencerDriver delivers to the sequencer node.

    A block that a SequencerDriver delivers to the sequencer node.

    blockHeight

    The height of the block. Block heights must be consecutive.

    events

    The events in the given block.

    tickTopologyAtMicrosFromEpoch

    Set by the block orderer whenever it assesses that it may need to retrieve an up-to-date topology; it is set to the sequencing instant being used to query the topology snapshot. A non-byzantine block orderer will set it to a sequencing time later than or equal to all already ordered requests and earlier than 1 time tick before all future ordered requests. It will also set it as sporadically as possible to reduce sequencer storage consumption. The extra time tick reserved between blocks is for the sequencer to use, typically to inject an event that will update the topology processor's latest known time, so that the block orderer can successfully retrieve an up-to-date topology at tickTopologyAtMicrosFromEpoch. The block orderer needs to communicate this timestamp to the sequencer because the sequencer cannot possibly guess it, as some requests in ordered blocks may fail to be validated and be dropped by the sequencer after the blocks are ordered.

  6. trait SequencerDriver extends AutoCloseable

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

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

    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 synchronizer 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.synchronizer.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.synchronizer.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.synchronizer.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.synchronizer.block.RawLedgerBlock.RawBlockEvent.

    The SequencerDriver is responsible for assigning timestamps to com.digitalasset.canton.synchronizer.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.synchronizer.block.RawLedgerBlock.RawBlockEvent.Send. Then the assigned timestamp ts must satisfy ts0 - skew <= ts <= ts1 + skew.

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

  7. trait SequencerDriverFactory extends AnyRef

    Factory for creating a SequencerDriver for a block-based sequencer, including methods for dealing with configuration of the ledger driver.

  8. final case class SequencerDriverHealthStatus(isActive: Boolean, description: Option[String]) extends Product with Serializable
  9. class SequencerUnexpectedStateChange extends RuntimeException

    Thrown if the ephemeral state does not match what is expected in the persisted store.

    Thrown if the ephemeral state does not match what is expected in the persisted store. This is not expected to be able to occur, but if it does likely means that the ephemeral state is inconsistent with the persisted state. The sequencer should be restarted and logs verified to ensure that the persisted state is correct.

  10. final case class TransactionSignature(signature: Array[Byte], submitterSvNodeId: String, submitterKeyId: String) extends Product with Serializable

    Signature of a BlockOrdered request.

    Signature of a BlockOrdered request.

    signature

    ed25519 signature for the content param

    submitterSvNodeId

    id of a signing node (as in canton network)

    submitterKeyId

    id of a key (fingerprint)

Value Members

  1. val UninitializedBlockHeight: Long

    Height used by the block stores before a height has been set.

    Height used by the block stores before a height has been set. The DB store should be initialized to this value in its initial migration.

  2. object BlockFormat
  3. object BlockSequencerStateManager
  4. object LedgerBlockEvent extends HasLoggerName with Serializable
  5. object RawLedgerBlock extends Serializable
  6. object SequencerDriver

Inherited from AnyRef

Inherited from Any

Ungrouped