Packages

package version

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

Type Members

  1. sealed trait CantonVersion extends Ordered[CantonVersion] with PrettyPrinting

    Trait that represents how a version in Canton is modelled.

  2. sealed trait CompanionTrait extends AnyRef
  3. final case class DomainProtocolVersion(version: ProtocolVersion) extends Product with Serializable

    Wrapper around a ProtocolVersion so we can verify during configuration loading that domain operators only configure a ProtocolVersion which is supported by the corresponding sequencer release.

  4. sealed trait HandshakeError extends AnyRef
  5. trait HasMemoizedVersionedMessageCompanion[ValueClass <: HasVersionedWrapper[VersionedMessage[ValueClass]]] extends AnyRef
  6. trait HasMemoizedVersionedMessageWithContextCompanion[ValueClass, Ctx] extends AnyRef
  7. trait HasProtoV0[ProtoClass <: GeneratedMessage] extends AnyRef

    Trait for classes that have a corresponding Protobuf definition but **don't** need the ability to be directly serialized into a ByteString or ByteArray.

    Trait for classes that have a corresponding Protobuf definition but **don't** need the ability to be directly serialized into a ByteString or ByteArray. Commonly, this interface should be used when the corresponding Protobuf message is only used in other Protobuf messages or for gRPC calls and responses, but never sent around or stored as a bytestring. E.g. an Envelope is always embedded in a Batch, and therefore doesn't need a serialization method itself because it will be indirectly serialized when the enclosing Batch is serialized.

  8. trait HasProtoV0WithVersion[ProtoClass <: GeneratedMessage] extends AnyRef

    Same as HasProtoV0 but toProtoV0 takes a version argument.This trait generally only be used in rare cases when a Protobuf message contains a nested UntypedVersionedMessage wrapper - see e.g.

    Same as HasProtoV0 but toProtoV0 takes a version argument.This trait generally only be used in rare cases when a Protobuf message contains a nested UntypedVersionedMessage wrapper - see e.g. Batch and Envelope

  9. trait HasVersionedMessageCompanion[ValueClass <: HasVersionedWrapper[VersionedMessage[ValueClass]]] extends AnyRef

    Traits for the companion objects of classes that implement HasVersionedWrapper.

    Traits for the companion objects of classes that implement HasVersionedWrapper. Provide default methods.

    We provide two traits:

  10. trait HasVersionedMessageWithContextCompanion[ValueClass, Ctx] extends AnyRef

    Traits for the companion objects of classes that implement HasVersionedWrapper.

    Traits for the companion objects of classes that implement HasVersionedWrapper. They provide default methods. Unlike HasVersionedMessageCompanion these traits allow to pass additional context to the conversion methods (see, e.g., com.digitalasset.canton.data.TransferInViewTree.fromProtoVersioned which takes a HashOps parameter).

    We provide two traits:

  11. trait HasVersionedToByteString extends AnyRef

    Trait for classes that can be serialized to a com.google.protobuf.ByteString.

    Trait for classes that can be serialized to a com.google.protobuf.ByteString. Typical use cases of toByteString include:

    • saving data in the database in serialized form (e.g. as in SequencedEvent)
    • encrypting data (e.g. as in Encryption.scala) *

    In some exceptional cases, we also convert an object to a ByteString before including it in a Proto message (e.g. ViewCommonData or Envelope)

    Classes that use Protobuf for serialization should implement HasVersionedWrapper instead. See "CONTRIBUTING.md" for our guidelines on serialization.

  12. trait HasVersionedWrapper[+ProtoClass <: GeneratedMessage] extends HasVersionedToByteString

    Trait for classes that can be serialized by using ProtoBuf.

    Trait for classes that can be serialized by using ProtoBuf. See "CONTRIBUTING.md" for our guidelines on serialization.

    The underlying ProtoClass is com.digitalasset.canton.version.UntypedVersionedMessage but we often specify the typed alias com.digitalasset.canton.version.VersionedMessage instead.

  13. final case class MinProtocolError(server: ProtocolVersion, clientMinimumProtocolVersion: Option[ProtocolVersion], clientSupportsRequiredVersion: Boolean) extends HandshakeError with Product with Serializable
  14. final case class ParticipantProtocolVersion(version: ProtocolVersion) extends Product with Serializable

    Wrapper around a ProtocolVersion so we can verify during configuration loading that participant operators only configure a minimum ProtocolVersion in com.digitalasset.canton.participant.config.LocalParticipantConfig which is supported by the corresponding participant release.

  15. final case class ProtocolVersion(major: Int, minor: Int, patch: Int, optSuffix: Option[String] = None) extends CantonVersion with Product with Serializable

    A Canton protocol version is a snapshot of how the Canton protocols, that nodes use to communicate, function at a certain point in time (e.g., this ‘snapshot’ contains the information what exactly a SubmissionRequest to the sequencer looks like and how exactly a Sequencer handles a call of the SendAsync RPC).

    A Canton protocol version is a snapshot of how the Canton protocols, that nodes use to communicate, function at a certain point in time (e.g., this ‘snapshot’ contains the information what exactly a SubmissionRequest to the sequencer looks like and how exactly a Sequencer handles a call of the SendAsync RPC). It is supposed to capture everything that is involved in two different Canton nodes interacting with each other.

    The protocol version is important for ensuring we meet our compatibility guarantees such that we can

    • update systems running older Canton versions
    • migrate data from older versions in the database
    • communicate with Canton nodes of different releases

    We identify protocol versions through a major, minor and patch digit. Technically, each functional change to a protocol version is a breaking change in the sense of semantic versioning and thus should lead to a major version according to SemVer. To communicate in a more practical, still semantic-versioning-adjacent manner, which protocol versions a certain Canton node supports, each Canton node documents the highest protocol it supports and also supports all previous protocol versions (of the same major version). For example, if the latest protocol version is 1.2.0, and the previous protocol versions are 1.0.0, 1.1.0, and 1.1.1, then a Canton component that exposes protocol version 1.2.0 as highest protocol version also supports 1.0.0, 1.1.0, and 1.1.1.

    We say that two protocol versions are compatible if they share the same major version (e.g. 1.3 and 1.7 are compatible, 1.3 and 2.2 are not). If two Canton nodes have a protocol version which is compatible, they can transact and interact with each-other (using one of the protocol versions they share). Two Canton nodes coming from the same release are always guaranteed to be compatible in such a way.

    For more details, please refer to the versioning documentation in the user manual.

  16. final case class ReleaseVersion(major: Int, minor: Int, patch: Int, optSuffix: Option[String] = None) extends CantonVersion with Product with Serializable

    This class represent a release version.

    This class represent a release version. Please refer to the versioning documentation in the user manual for details.

  17. final case class UntypedVersionedMessage(wrapper: Wrapper, version: Int) extends GeneratedMessage with Updatable[UntypedVersionedMessage] with Product with Serializable

    UntypedVersionedMessage is the generic wrapper for versioned messages The version is included in the version integer and the serialized message is contained in data.

    UntypedVersionedMessage is the generic wrapper for versioned messages The version is included in the version integer and the serialized message is contained in data.

    Internally, we use the typed alias VersionedMessage[ValueClass] to avoid the risk of confusion between different proto versioned messaged (see, e.g., the return type of the HasVersionedWrapper.toProtoVersioned method).

    The oneof prevents the serialized message to be empty if data is empty and version is 0 (the default value for an integer). Such an empty message cannot be deserialized using previous version of our parsing method.

    Annotations
    @SerialVersionUID()
  18. final case class VersionNotSupportedError(server: ProtocolVersion, clientSupportedVersions: Seq[ProtocolVersion]) extends HandshakeError with Product with Serializable
  19. type VersionedMessage[+M] = version.VersionedMessageImpl.VersionedMessage[M]
  20. sealed abstract class VersionedMessageImpl extends AnyRef

Inherited from AnyRef

Inherited from Any

Ungrouped