package processing

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. final case class ApproximateTime(value: CantonTimestamp) extends Product with Serializable
  2. trait AuthorizationCheck extends AnyRef
  3. class AuthorizationGraph extends AuthorizationCheck with NamedLogging

    Stores a set of namespace delegations, tracks dependencies and determines which keys are authorized to sign on behalf of a namespace.

    Stores a set of namespace delegations, tracks dependencies and determines which keys are authorized to sign on behalf of a namespace.

    Namespace delegations are a bit tricky as there can be an arbitrary number of delegations between the namespace key and the key that will be used for authorizations. Think of it as a certificate chain where we get a series of certificates and we need to figure out a path from one certificate to the root certificate.

    NOTE: this class is not thread-safe

    Properties of the graph:

    • Each node corresponds to a target key
    • The node with key fingerprint of the namespace is the root node
    • The edges between nodes are namespace delegations. If key A signs a namespace delegation with target key B, then key A authorizes key B to act on the namespace. In this case, the edge is outgoing from node A and incoming into node B.
    • The graph may have cycles. The implementation does not get confused by this.

    Computation task: The graph maintains a set of nodes that are connected to the root node. Those correspond to the keys that are authorized to sign on behalf of the namespace.

    Limitation: clients need to ensure that the namespace delegations added have valid signatures. If delegations with invalid signatures are added, authorization will break.

  4. final case class AuthorizedTopologyTransaction[T <: TopologyMapping](transaction: SignedTopologyTransaction[TopologyChangeOp, T]) extends DelegatedTopologyTransactionLike[TopologyChangeOp, T] with Product with Serializable

    An authorized topology transaction

  5. final case class DecentralizedNamespaceAuthorizationGraph(dnd: DecentralizedNamespaceDefinition, ownerGraphs: Seq[AuthorizationGraph]) extends AuthorizationCheck with Product with Serializable

    Authorization graph for a decentralized namespace.

    Authorization graph for a decentralized namespace.

    Exceptions thrown

    java.lang.IllegalArgumentException if dnd and ownerGraphs refer to different namespaces.

  6. final case class EffectiveTime(value: CantonTimestamp) extends Product with Serializable
  7. class InitialTopologySnapshotValidator extends TopologyTransactionHandling

    Validates an initial topology snapshot by:

    Validates an initial topology snapshot by:

    • running transaction authorization validation
    • deduplicating topology transactions
    • removing superfluous signatures
    • checking that serials are strictly monotonic
    • checking that rejected transactions in the initial snapshot also are rejected in stored snapshot
    • checking that the effective times valid_from and valid_until of the transactions are the same in the initial snapshot and the stored snapshot

    Also compares the computed effective time with the effective provided in the snapshot.

    Any inconsistency between the topology snapshot and the outcome of the validation is reported.

  8. final case class SequencedTime(value: CantonTimestamp) extends Product with Serializable
  9. trait TerminateProcessing extends AnyRef

    An implementation of this trait allows to schedule code to be executed at the end of the processing of a batch of topology transactions.

    An implementation of this trait allows to schedule code to be executed at the end of the processing of a batch of topology transactions. On the participant, this *must* tick the record order publisher before returning.

  10. class TopologyManagerSigningKeyDetection[+PureCrypto <: CryptoPureApi] extends TransactionAuthorizationCache[PureCrypto] with NamedLogging

    Component that determines the signing keys both relevant for the transaction and available on the node.

    Component that determines the signing keys both relevant for the transaction and available on the node.

    The selection rules are as follows:

    General objectives:

    • the selected keys must be in the node's private crypto store
    • if possible, select a key other than the root certificate key

    For namespaces: select the key with the longest certificate chain from the root certificate. This way we always favor keys that are not the root certificate key. We define chainLength(ns, k) as number of namespace delegations required to construct a valid certificate chain from the root certificate of namespace ns to the target key k.

    If there are multiple keys with the same chainLength, sort the keys lexicographically and take the last one. While this decision is arbitrary (because there is no other criteria easily available), it is deterministic.

    Example:

    Given:

    • NSD(ns1, target k1, signedBy = k1) // root certificate
    • NSD(ns1, target = k2, signedBy = k1)
    • NSD(ns1, target = k3, signedBy = k2)

    Then:

    • chainLength(ns1, k1) = 1
    • chainLength(ns1, k2) = 2
    • chainLength(ns1, k3) = 3

    For decentralized namespaces: apply the mechanism used for determining keys for namespaces separately for each of the decentralized namespace owners' namespace.

    If there are multiple keys with the same chainLength, sort the keys lexicographically and take the last one. While this decision is arbitrary (because there is no other criteria easily available), it is deterministic.

  11. class TopologyTimestampPlusEpsilonTracker extends NamedLogging

    Computes the effective timestamps of topology transactions

    Computes the effective timestamps of topology transactions

    Transaction validation and processing depends on the topology state at the given sequencing time. If topology transactions became effective immediately, we would have to inspect every event first if there is a topology state and wait until all the topology processing has finished before evaluating the transaction. This would cause a sequential bottleneck.

    To avoid this bottleneck, topology transactions become effective only in the future at an "effective time", where effective time >= sequencingTime + synchronizerParameters.topologyChangeDelay.

    However, the synchronizerParameters can change and so can the topologyChangeDelay. So it is non-trivial to apply the right topologyChangeDelay. Also, if the topologyChangeDelay is decreased, the effective timestamps of topology transactions could "run backwards", which would break topology management.

    This class computes the effective timestamps of topology transactions from their sequencing timestamps. It makes sure that effective timestamps are strictly monotonically increasing. For better performance, it keeps the current as well as all future topologyChangeDelays in memory, so that all computations can be performed without reading from the database.

  12. class TopologyTransactionAuthorizationValidator[+PureCrypto <: CryptoPureApi] extends NamedLogging with TransactionAuthorizationCache[PureCrypto]

    validate topology transactions

    validate topology transactions

    NOT THREAD SAFE. Note that this class is not thread safe

    we check three things:

    1. are the signatures valid
    2. are the signatures properly authorized
      1. load current set of authorized keys
      2. for each transaction, verify that the authorization keys are valid. a key is a valid authorization if there is a certificate chain that originates from the root certificate at the time when the transaction is added (one by one).
      3. if the transaction is a namespace, update its impact on the authorization set. This means that if we add or remove a namespace delegation, then we need to perform a cascading update that activates or deactivates states that depend on this delegation.
    3. finally, what we compute as the "authorized graph" is then used to compute the derived table of "namespace delegations"
  13. abstract class TopologyTransactionHandling extends NamedLogging
  14. trait TopologyTransactionProcessingSubscriber extends AnyRef
  15. class TopologyTransactionProcessor extends TopologyTransactionHandling with NamedLogging with FlagCloseable

    Main incoming topology transaction validation and processing

    Main incoming topology transaction validation and processing

    The topology transaction processor is subscribed to the event stream and processes the synchronizer topology transactions sent via the sequencer.

    It validates and then computes the updates to the data store in order to be able to represent the topology state at any point in time.

    The processor works together with the StoreBasedSynchronizerTopologyClient

  16. trait TransactionAuthorizationCache[+PureCrypto <: CryptoPureApi] extends AnyRef

    cache for working with topology transaction authorization

Ungrouped