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

Type Members

  1. case class BlockEvents(height: Long, events: Seq[Traced[LedgerBlockEvent]]) extends Product with Serializable
  2. class BlockSequencerStateManager extends FlagCloseable with NamedLogging with AutoCloseable

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

  3. class BlockUpdateGenerator extends NamedLogging

    Exposes functions that take the deserialized contents of a block from a blockchain integration and computes the new com.digitalasset.canton.domain.block.BlockUpdates.

    Exposes functions that take the deserialized contents of a block from a blockchain integration and computes the new com.digitalasset.canton.domain.block.BlockUpdates. Used by Ethereum and Fabric integrations.

    In particular, these functions are responsible for the final timestamp assignment of a given submission request. The timestamp assignment works as follows: 1. an initial timestamp is assigned to the submission request by the sequencer that writes it to the ledger 2. each sequencer that reads the block potentially adapts the previously assigned timestamp deterministically via ensureStrictlyIncreasingTimestamp 3. this timestamp is used by com.digitalasset.canton.domain.sequencing.integrations.state.EventGenerator and to compute the com.digitalasset.canton.domain.block.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).

  4. case class BlockUpdates(height: Long, newMembers: Map[Member, CantonTimestamp] = Map.empty, membersDisabled: Seq[Member] = Seq.empty, acknowledgements: Map[Member, CantonTimestamp] = Map.empty, events: List[Traced[EventsForSigning]] = List.empty, pruningRequests: Seq[CantonTimestamp] = Seq.empty, state: EphemeralState) extends Product with Serializable

    Changes from processing a series of updates from the blockchain.

    Changes from processing a series of updates from the blockchain. We expect all values to be consistent with one another:

    • new members must exist in the registered members
    • the provided timestamps must not be after the latest sequencer timestamp
    • members receiving events must be registered
    • timestamps of events must not be after the latest sequencer timestamp
    • counter values for each member should be continuous These preconditions are asserted so will be disabled for release builds.
    newMembers

    members that were added along with the timestamp that they are considered registered from

    events

    new sequenced events for members

    state

    updated ephemeral state to be used for processing subsequent events

  5. case class EventsForSigning(signingTimestamp: CantonTimestamp, events: MemberEvents) extends Product with Serializable
  6. sealed trait LedgerBlockEvent extends AnyRef

    Trait that generalizes over the kind of events that could be observed in a blockchain integration.

    Trait that generalizes over the kind of events that could be observed in a blockchain integration.

    Used by Ethereum and Fabric.

  7. 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.

Value Members

  1. val UNINITIALIZED_BLOCK_HEIGHT: 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 LedgerBlockEvent

Inherited from AnyRef

Inherited from Any

Ungrouped