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

Package Members

  1. package v1

Type Members

  1. trait AlphaProtoVersion extends Alpha

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

  2. trait BaseVersioningCompanion[ValueClass <: HasRepresentativeProtocolVersion, Context, DeserializedValueClass <: HasRepresentativeProtocolVersion, Dependency] extends AnyRef

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

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

    Parameters and concepts are explained in contributing guide

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

    Trait that represents how a version in Canton is modelled.

  4. type DataByteString = ByteString
  5. final case class DefaultValueFromInclusive[ValueClass, Comp, T](attribute: (ValueClass) => T, attributeName: String, startInclusive: RepresentativeProtocolVersion[Comp], defaultValue: T)(implicit evidence$1: ClassTag[Comp]) extends DefaultValue[ValueClass, Comp, T] with Product with Serializable
  6. final case class DefaultValueUntilExclusive[ValueClass, Comp, T](attribute: (ValueClass) => T, attributeName: String, untilExclusive: RepresentativeProtocolVersion[Comp], defaultValue: T)(implicit evidence$2: ClassTag[Comp]) extends DefaultValue[ValueClass, Comp, T] with Product with Serializable
  7. final case class EmptyOptionExactlyUntilExclusive[ValueClass, Comp, T](attribute: (ValueClass) => Option[T], attributeName: String, untilExclusive: RepresentativeProtocolVersion[Comp]) extends DefaultValue[ValueClass, Comp, Option[T]] with Product with Serializable
  8. sealed trait HandshakeError extends AnyRef

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

  9. 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.v1.UntypedVersionedMessage but we often specify the typed alias com.digitalasset.canton.version.VersionedMessage instead.

    Annotations
    @SuppressWarnings()
  10. trait HasRepresentativeProtocolVersion extends AnyRef
  11. 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.

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

  13. trait HasVersionedMessageCompanionCommon[ValueClass] extends AnyRef
  14. trait HasVersionedMessageCompanionDbHelpers[ValueClass <: HasVersionedWrapper[ValueClass]] extends AnyRef
  15. 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.

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

  17. 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.v1.UntypedVersionedMessage but we often specify the typed alias com.digitalasset.canton.version.VersionedMessage instead.

    Annotations
    @SuppressWarnings()
  18. sealed abstract class HashingSchemeVersion extends AnyRef
  19. trait Invariant[ValueClass, Comp] extends AnyRef

    Invariants that an instance of ValueClass should respect.

    Invariants that an instance of ValueClass should respect.

    ValueClass

    Type of the instance

    Comp

    Companion object

  20. final case class MinProtocolError(server: ProtocolVersion, clientMinimumProtocolVersion: Option[ProtocolVersion], clientSupportsRequiredVersion: Boolean) extends HandshakeError with Product with Serializable
  21. type OriginalByteString = ByteString
  22. final case class ParticipantProtocolVersion(version: ProtocolVersion) extends UniformCantonConfigValidation with 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.ParticipantNodeConfig which is supported by the corresponding participant release.

  23. sealed trait ProtoCodec[ValueClass, Context, DeserializedValueClass, Comp, Dependency] extends PrettyPrinting

    Base class for (de)serializing from/to protobuf of ValueClass from a specific PV

  24. final case class ProtoVersion(v: Int) extends AnyVal with Product with Serializable
  25. 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[Alpha] = ProtocolVersion.alpha(<N>)

    How to release a protocol version N:

    How to release a protocol version N as Beta:

  26. sealed trait ProtocolVersionValidation extends Product with Serializable

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

  27. trait ProtocolVersionedCompanionDbHelpers[ValueClass <: HasProtocolVersionedWrapper[ValueClass]] extends AnyRef

    Trait to be mixed in to have the set parameters defined in terms of the .toByteString

  28. final case class ReleaseProtocolVersion(v: ProtocolVersion) extends AnyVal with Product with Serializable
  29. 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.

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

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

  31. trait StableProtoVersion extends Stable with Alpha

    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.ProtocolVersionAnnotation.Stable and com.digitalasset.canton.version.ProtocolVersionAnnotation.Alpha means that StableProtoVersion messages can be used in stable and alpha protocol versions.

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

  33. final case class SupportedProtoVersions[ValueClass, Context, DeserializedValueClass, Comp, Dependency] extends Product with Serializable
  34. final case class SynchronizerProtocolVersion(version: ProtocolVersion) extends Product with Serializable

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

  35. final case class UnsupportedProtoCodec[ValueClass, Context, DeserializedValueClass, Comp] extends ProtoCodec[ValueClass, Context, DeserializedValueClass, Comp, Unit] with PrettyPrinting with Product with Serializable
  36. final case class VersionNotSupportedError(server: ProtocolVersion, clientSupportedVersions: Seq[ProtocolVersion]) extends HandshakeError with Product with Serializable
  37. type VersionedMessage[+M] = version.VersionedMessageImpl.VersionedMessage[M]
  38. sealed abstract class VersionedMessageImpl extends AnyRef
  39. class VersionedProtoCodec[ValueClass, Context, DeserializedValueClass, Comp, Dependency] extends ProtoCodec[ValueClass, Context, DeserializedValueClass, Comp, Dependency]

    Supported Proto version

  40. type VersioningCompanion[ValueClass <: HasRepresentativeProtocolVersion] = VersioningCompanion2[ValueClass, ValueClass]
  41. trait VersioningCompanion2[ValueClass <: HasRepresentativeProtocolVersion, DeserializedValueClass <: HasRepresentativeProtocolVersion] extends BaseVersioningCompanion[ValueClass, Unit, DeserializedValueClass, Unit]
  42. type VersioningCompanionContext[ValueClass <: HasRepresentativeProtocolVersion, Context] = VersioningCompanionContext2[ValueClass, ValueClass, Context]
  43. trait VersioningCompanionContext2[ValueClass <: HasRepresentativeProtocolVersion, DeserializedValueClass <: HasRepresentativeProtocolVersion, Context] extends BaseVersioningCompanion[ValueClass, Context, DeserializedValueClass, Unit]
  44. type VersioningCompanionContextMemoization[ValueClass <: HasRepresentativeProtocolVersion, Context] = VersioningCompanionContextMemoization2[ValueClass, Context, ValueClass, Unit]
  45. trait VersioningCompanionContextMemoization2[ValueClass <: HasRepresentativeProtocolVersion, Context, DeserializedValueClass <: HasRepresentativeProtocolVersion, Dependency] extends BaseVersioningCompanion[ValueClass, Context, DeserializedValueClass, Dependency]
  46. type VersioningCompanionContextMemoizationWithDependency[ValueClass <: HasRepresentativeProtocolVersion, Context, Dependency] = VersioningCompanionContextMemoization2[ValueClass, Context, ValueClass, Dependency]
  47. trait VersioningCompanionContextPVValidation2[ValueClass <: HasRepresentativeProtocolVersion, RawContext] extends VersioningCompanionContext2[ValueClass, 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).

  48. trait VersioningCompanionContextTaggedPVValidation2[ValueClass <: HasRepresentativeProtocolVersion, T[X] <: ReassignmentTag[X], RawContext] extends VersioningCompanionContext2[ValueClass, ValueClass, (RawContext, T[ProtocolVersion])]

    Similar to VersioningCompanionContextPVValidation2 but the deserialization context contains a Source or Target of com.digitalasset.canton.version.ProtocolVersion for validation.

  49. type VersioningCompanionMemoization[ValueClass <: HasRepresentativeProtocolVersion] = VersioningCompanionMemoization2[ValueClass, ValueClass]
  50. trait VersioningCompanionMemoization2[ValueClass <: HasRepresentativeProtocolVersion, DeserializedValueClass <: HasRepresentativeProtocolVersion] extends BaseVersioningCompanion[ValueClass, Unit, DeserializedValueClass, Unit]

Inherited from AnyRef

Inherited from Any

Ungrouped