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

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

    This class represents a revision of the Sequencer.sol contract.

  4. sealed trait HandshakeError extends AnyRef

    Trait for errors that are returned to clients when handshake fails.

  5. trait HasMemoizedProtocolVersionedWithContextAndValidationCompanion[ValueClass <: HasRepresentativeProtocolVersion, RawContext] extends HasMemoizedProtocolVersionedWithContextCompanion2[ValueClass, ValueClass, (RawContext, ProtocolVersion)]

    Similar to HasProtocolVersionedWithContextAndValidationCompanion but with memoization.

  6. type HasMemoizedProtocolVersionedWithContextCompanion[ValueClass <: HasRepresentativeProtocolVersion, Context] = HasMemoizedProtocolVersionedWithContextCompanion2[ValueClass, ValueClass, Context]
  7. trait HasMemoizedProtocolVersionedWithContextCompanion2[ValueClass <: HasRepresentativeProtocolVersion, DeserializedValueClass <: HasRepresentativeProtocolVersion, Context] extends HasProtocolVersionedWrapperWithContextCompanion[ValueClass, DeserializedValueClass, Context]

    Trait for companion objects of serializable classes with memoization and a (de)serialization context.

    Trait for companion objects of serializable classes with memoization and a (de)serialization context. Use this class if deserialization produces a different type than where serialization starts. For example, if a container can serialize its elements, but the container's deserializer does not deserialize the elements and instead leaves them as Bytestring.

    Use HasMemoizedProtocolVersionedWithContextCompanion if the type distinction between serialization and deserialization is not needed.

  8. trait HasMemoizedProtocolVersionedWithOptionalValidationCompanion[ValueClass <: HasRepresentativeProtocolVersion] extends HasMemoizedProtocolVersionedWithContextCompanion2[ValueClass, ValueClass, ProtocolVersionValidation]

    Similar to HasProtocolVersionedWithOptionalValidationCompanion but with memoization.

  9. type HasMemoizedProtocolVersionedWrapperCompanion[ValueClass <: HasRepresentativeProtocolVersion] = HasMemoizedProtocolVersionedWrapperCompanion2[ValueClass, ValueClass]
  10. trait HasMemoizedProtocolVersionedWrapperCompanion2[ValueClass <: HasRepresentativeProtocolVersion, DeserializedValueClass <: HasRepresentativeProtocolVersion] extends HasProtocolVersionedWrapperWithoutContextCompanion[ValueClass, DeserializedValueClass]

    Trait for companion objects of serializable classes with memoization.

    Trait for companion objects of serializable classes with memoization. Use this class if deserialization produces a different type than where serialization starts. For example, if a container can serialize its elements, but the container's deserializer does not deserialize the elements and instead leaves them as Bytestring.

    Use HasMemoizedProtocolVersionedWrapperCompanion if the type distinction between serialization and deserialization is not needed.

  11. type HasProtocolVersionedCompanion[ValueClass <: HasRepresentativeProtocolVersion] = HasProtocolVersionedCompanion2[ValueClass, ValueClass]
  12. trait HasProtocolVersionedCompanion2[ValueClass <: HasRepresentativeProtocolVersion, DeserializedValueClass <: HasRepresentativeProtocolVersion] extends HasProtocolVersionedWrapperWithoutContextCompanion[ValueClass, DeserializedValueClass]

    Trait for companion objects of serializable classes without memoization.

    Trait for companion objects of serializable classes without memoization. Use this class if deserialization produces a different type than where serialization starts. For example, if a container can serialize its elements, but the container's deserializer does not deserialize the elements and instead leaves them as Bytestring.

    Use HasProtocolVersionedCompanion if the type distinction between serialization and deserialization is not needed.

  13. trait HasProtocolVersionedWithContextAndValidationCompanion[ValueClass <: HasRepresentativeProtocolVersion, RawContext] extends HasProtocolVersionedWithContextCompanion[ValueClass, (RawContext, ProtocolVersion)]

    For readability, replaces the deserialization methods for value classes that require the protocol version for the deserialization validation to be passed in as part of the deserialization context.

    For readability, replaces the deserialization methods for value classes that require the protocol version for the deserialization validation to be passed in as part of the deserialization context.

    Replaces .fromByteString(protocolVersion)((context, protocolVersion))(bytes) with .fromByteString(context, protocolVersion)(bytes).

  14. trait HasProtocolVersionedWithContextAndValidationWithSourceProtocolVersionCompanion[ValueClass <: HasRepresentativeProtocolVersion, RawContext] extends HasProtocolVersionedWithContextCompanion[ValueClass, (RawContext, SourceProtocolVersion)]

    Similar to HasProtocolVersionedWithContextAndValidationCompanion but the deserialization context contains a com.digitalasset.canton.version.Transfer.SourceProtocolVersion for validation.

  15. trait HasProtocolVersionedWithContextAndValidationWithTargetProtocolVersionCompanion[ValueClass <: HasRepresentativeProtocolVersion, RawContext] extends HasProtocolVersionedWithContextCompanion[ValueClass, (RawContext, TargetProtocolVersion)]

    Similar to HasProtocolVersionedWithContextAndValidationCompanion but the deserialization context contains a com.digitalasset.canton.version.Transfer.TargetProtocolVersion for validation.

  16. trait HasProtocolVersionedWithContextCompanion[ValueClass <: HasRepresentativeProtocolVersion, Context] extends HasProtocolVersionedWrapperWithContextCompanion[ValueClass, ValueClass, Context]
  17. trait HasProtocolVersionedWithOptionalValidationCompanion[ValueClass <: HasRepresentativeProtocolVersion] extends HasProtocolVersionedWithContextCompanion[ValueClass, ProtocolVersionValidation]

    Similar to HasProtocolVersionedWithContextAndValidationCompanion but the deserialization context contains only the protocol version which may or may not be available for validation.

  18. trait HasProtocolVersionedWithValidationCompanion[ValueClass <: HasRepresentativeProtocolVersion] extends HasProtocolVersionedWithContextCompanion[ValueClass, ProtocolVersion]

    Similar to HasProtocolVersionedWithContextAndValidationCompanion but the deserialization context contains only the protocol version for validation.

  19. trait HasProtocolVersionedWrapper[ValueClass <: HasRepresentativeProtocolVersion] extends HasRepresentativeProtocolVersion with HasToByteString

    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.

    This wrapper is to be used when every instance can be tied to a single protocol version. Consequently, some attributes of the class may depend on the protocol version (e.g., the signature). The protocol version is then bundled with the instance and does not need to be passed to the toProtoVersioned, toByteString and getCryptographicEvidence methods.

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

  20. trait HasProtocolVersionedWrapperCompanion[ValueClass <: HasRepresentativeProtocolVersion, DeserializedValueClass <: HasRepresentativeProtocolVersion] extends HasSupportedProtoVersions[ValueClass] with Serializable
  21. trait HasProtocolVersionedWrapperWithContextCompanion[ValueClass <: HasRepresentativeProtocolVersion, DeserializedValueClass <: HasRepresentativeProtocolVersion, Context] extends HasProtocolVersionedWrapperCompanion[ValueClass, DeserializedValueClass]
  22. trait HasProtocolVersionedWrapperWithoutContextCompanion[ValueClass <: HasRepresentativeProtocolVersion, DeserializedValueClass <: HasRepresentativeProtocolVersion] extends HasProtocolVersionedWrapperCompanion[ValueClass, DeserializedValueClass]
  23. trait HasRepresentativeProtocolVersion extends AnyRef
  24. trait HasSupportedProtoVersions[ValueClass] extends AnyRef

    This trait has the logic to store proto (de)serializers and retrieve them by protocol version.

  25. trait HasToByteString 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.

    Typically, these classes also implement the HasProtocolVersionedWrapper trait. Such classes embed logic together with a representative protocol version that determines the ProtoBuf serialization and deserialization. Hence, HasToByteString.toByteString does not take any arguments. In contrast, HasVersionedToByteString is tailored towards another ProtoBuf serialization/deserialization tooling.

    See "README.md" for our guidelines on the (de-)serialization tooling.

  26. trait HasVersionedMessageCompanion[ValueClass] extends HasVersionedMessageCompanionCommon[ValueClass]

    Traits for the companion objects of classes that implement HasVersionedWrapper.

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

  27. trait HasVersionedMessageCompanionCommon[ValueClass] extends AnyRef
  28. trait HasVersionedMessageCompanionDbHelpers[ValueClass <: HasVersionedWrapper[ValueClass]] extends AnyRef
  29. trait HasVersionedMessageWithContextCompanion[ValueClass, Ctx] extends HasVersionedMessageCompanionCommon[ValueClass]

    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.

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

  31. trait HasVersionedWrapper[ValueClass] 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.

    This wrapper is to be used if a single instance needs to be serialized to different proto versions.

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

  32. final case class MinProtocolError(server: ProtocolVersion, clientMinimumProtocolVersion: Option[ProtocolVersion], clientSupportsRequiredVersion: Boolean) extends HandshakeError with Product with Serializable
  33. 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.

  34. final case class ProtoVersion(v: Int) extends AnyVal with Product with Serializable
  35. sealed case class ProtocolVersion extends Ordered[ProtocolVersion] with PrettyPrinting 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

    Two Canton nodes can interact if they can speak the same protocol version.

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

    How to add a new protocol version N:

    lazy val v<N>: ProtocolVersionWithStatus[Unstable] = ProtocolVersion.unstable(<N>)

    How to release a protocol version N:

    How to release a protocol version N as Beta:

  36. sealed trait ProtocolVersionValidation extends Product with Serializable

    Represents the domain protocol version for the deserialization validation such that cases where no protocol version is defined can be clearly expressed with ProtocolVersionValidation.NoValidation.

  37. trait ProtocolVersionedCompanionDbHelpers[ValueClass <: HasProtocolVersionedWrapper[ValueClass]] extends AnyRef
  38. final case class ReleaseProtocolVersion(v: ProtocolVersion) extends AnyVal with Product with Serializable
  39. 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.

  40. sealed abstract case class RepresentativeProtocolVersion[ValueCompanion] extends PrettyPrinting with Product with Serializable

    See com.digitalasset.canton.version.HasProtocolVersionedWrapper.representativeProtocolVersion for more context

  41. trait StableProtoVersion extends Stable with Unstable with Beta

    Marker trait for Protobuf messages generated by scalapb that are used in some stable protocol versions

    Marker trait for Protobuf messages generated by scalapb that are used in some stable protocol versions

    Implements both com.digitalasset.canton.version.ProtocolVersion.Stable and com.digitalasset.canton.version.ProtocolVersion.Unstable means that StableProtoVersion messages can be used in stable and unstable protocol versions.

  42. trait StorageProtoVersion extends AnyRef

    Marker trait for Protobuf messages generated by scalapb that are used only to persist data in node storage.

    Marker trait for Protobuf messages generated by scalapb that are used only to persist data in node storage. These messages are never exchanged as part of a protocol.

  43. trait UnstableProtoVersion extends Unstable

    Marker trait for Protobuf messages generated by scalapb that are used only in unstable protocol versions

  44. 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()
  45. final case class VersionNotSupportedError(server: ProtocolVersion, clientSupportedVersions: Seq[ProtocolVersion]) extends HandshakeError with Product with Serializable
  46. type VersionedMessage[+M] = version.VersionedMessageImpl.VersionedMessage[M]
  47. sealed abstract class VersionedMessageImpl extends AnyRef

Inherited from AnyRef

Inherited from Any

Ungrouped