mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-19 16:57:40 +03:00
update canton to 20240403.13026.v4a622ee4 (#18936)
tell-slack: canton Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
This commit is contained in:
parent
09e7d8029e
commit
7a2509d6f4
@ -383,6 +383,8 @@ trait CantonConfig {
|
||||
journalGarbageCollectionDelay =
|
||||
participantParameters.journalGarbageCollectionDelay.toInternal,
|
||||
disableUpgradeValidation = participantParameters.disableUpgradeValidation,
|
||||
allowForUnauthenticatedContractIds =
|
||||
participantParameters.allowForUnauthenticatedContractIds,
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ object CryptoKeyPair extends HasVersionedMessageCompanion[CryptoKeyPair[PublicKe
|
||||
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> ProtoCodec(
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
supportedProtoVersion(v30.CryptoKeyPair)(fromProtoCryptoKeyPairV30),
|
||||
_.toProtoCryptoKeyPairV30.toByteString,
|
||||
)
|
||||
@ -218,7 +218,7 @@ object PublicKeyWithName extends HasVersionedMessageCompanion[PublicKeyWithName]
|
||||
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> ProtoCodec(
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
supportedProtoVersion(v30.PublicKeyWithName)(fromProto30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -312,7 +312,7 @@ object SymmetricKey extends HasVersionedMessageCompanion[SymmetricKey] {
|
||||
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> ProtoCodec(
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
supportedProtoVersion(v30.SymmetricKey)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
@ -426,7 +426,7 @@ object EncryptionPublicKey
|
||||
override def name: String = "encryption public key"
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> ProtoCodec(
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
supportedProtoVersion(v30.EncryptionPublicKey)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
@ -505,7 +505,7 @@ final case class EncryptionPrivateKey private[crypto] (
|
||||
object EncryptionPrivateKey extends HasVersionedMessageCompanion[EncryptionPrivateKey] {
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> ProtoCodec(
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
supportedProtoVersion(v30.EncryptionPrivateKey)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -47,7 +47,7 @@ object PasswordBasedEncrypted extends HasVersionedMessageCompanion[PasswordBased
|
||||
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> ProtoCodec(
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
supportedProtoVersion(v30.PasswordBasedEncrypted)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -165,7 +165,7 @@ object Signature
|
||||
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> ProtoCodec(
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
supportedProtoVersion(v30.Signature)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
@ -364,7 +364,7 @@ object SigningPublicKey
|
||||
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> ProtoCodec(
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
supportedProtoVersion(v30.SigningPublicKey)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
@ -448,7 +448,7 @@ final case class SigningPrivateKey private[crypto] (
|
||||
object SigningPrivateKey extends HasVersionedMessageCompanion[SigningPrivateKey] {
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> ProtoCodec(
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
supportedProtoVersion(v30.SigningPrivateKey)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -71,7 +71,7 @@ object ActionDescription extends HasProtocolVersionedCompanion[ActionDescription
|
||||
override lazy val name: String = "ActionDescription"
|
||||
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.ActionDescription)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.ActionDescription)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -69,7 +69,7 @@ object CommonMetadata
|
||||
override val name: String = "CommonMetadata"
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.CommonMetadata)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.CommonMetadata)(
|
||||
supportedProtoVersionMemoized(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -72,7 +72,7 @@ object FullInformeeTree
|
||||
override val name: String = "FullInformeeTree"
|
||||
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.FullInformeeTree)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.FullInformeeTree)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -89,7 +89,7 @@ object LightTransactionViewTree
|
||||
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> ProtoCodec(
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
supportedProtoVersion(v30.LightTransactionViewTree)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -163,7 +163,7 @@ object MerkleSeq
|
||||
|
||||
override def supportedProtoVersions: SupportedProtoVersions =
|
||||
SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.MerkleSeq)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.MerkleSeq)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
@ -413,7 +413,7 @@ object MerkleSeq
|
||||
|
||||
override def supportedProtoVersions: SupportedProtoVersions =
|
||||
SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.MerkleSeqElement)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.MerkleSeqElement)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -62,7 +62,7 @@ object ParticipantMetadata
|
||||
override val name: String = "ParticipantMetadata"
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.ParticipantMetadata)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.ParticipantMetadata)(
|
||||
supportedProtoVersionMemoized(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -78,7 +78,7 @@ object SubmitterMetadata
|
||||
override val name: String = "SubmitterMetadata"
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.SubmitterMetadata)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.SubmitterMetadata)(
|
||||
supportedProtoVersionMemoized(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -389,7 +389,7 @@ object TransactionView
|
||||
override def name: String = "TransactionView"
|
||||
override def supportedProtoVersions: SupportedProtoVersions =
|
||||
SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.ViewNode)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.ViewNode)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -87,7 +87,7 @@ object TransferInViewTree
|
||||
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> ProtoCodec(
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
supportedProtoVersion(v30.TransferViewTree)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
@ -176,7 +176,7 @@ object TransferInCommonData
|
||||
override val name: String = "TransferInCommonData"
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.TransferInCommonData)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.TransferInCommonData)(
|
||||
supportedProtoVersionMemoized(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
@ -333,7 +333,7 @@ object TransferInView
|
||||
}
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.TransferInView)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.TransferInView)(
|
||||
supportedProtoVersionMemoized(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -85,7 +85,7 @@ object TransferOutViewTree
|
||||
override val name: String = "TransferOutViewTree"
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.TransferViewTree)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.TransferViewTree)(
|
||||
supportedProtoVersion(_)((context, proto) => fromProtoV30(context)(proto)),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
@ -197,7 +197,7 @@ object TransferOutCommonData
|
||||
override val name: String = "TransferOutCommonData"
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.TransferOutCommonData)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.TransferOutCommonData)(
|
||||
supportedProtoVersionMemoized(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
@ -326,7 +326,7 @@ object TransferOutView
|
||||
override val name: String = "TransferOutView"
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.TransferOutView)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.TransferOutView)(
|
||||
supportedProtoVersionMemoized(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -91,7 +91,7 @@ object ViewCommonData
|
||||
override val name: String = "ViewCommonData"
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.ViewCommonData)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.ViewCommonData)(
|
||||
supportedProtoVersionMemoized(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -338,7 +338,7 @@ object ViewParticipantData
|
||||
override val name: String = "ViewParticipantData"
|
||||
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.ViewParticipantData)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.ViewParticipantData)(
|
||||
supportedProtoVersionMemoized(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -19,7 +19,7 @@ object CantonContractIdVersion {
|
||||
def fromProtocolVersion(
|
||||
protocolVersion: ProtocolVersion
|
||||
): Either[String, CantonContractIdVersion] =
|
||||
if (protocolVersion >= ProtocolVersion.v30) Right(AuthenticatedContractIdVersionV10)
|
||||
if (protocolVersion >= ProtocolVersion.v31) Right(AuthenticatedContractIdVersionV10)
|
||||
else Left(s"No contract ID scheme found for ${protocolVersion.v}")
|
||||
|
||||
def ensureCantonContractId(
|
||||
|
@ -72,7 +72,7 @@ object ContractMetadata
|
||||
with HasVersionedMessageCompanionDbHelpers[ContractMetadata] {
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> ProtoCodec(
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
supportedProtoVersion(v30.SerializableContract.Metadata)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -106,7 +106,7 @@ object StaticDomainParameters
|
||||
|
||||
val supportedProtoVersions: protocol.StaticDomainParameters.SupportedProtoVersions =
|
||||
SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(
|
||||
v30.StaticDomainParameters
|
||||
)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
@ -430,7 +430,7 @@ final case class DynamicDomainParameters private (
|
||||
override def pretty: Pretty[DynamicDomainParameters] = {
|
||||
if (
|
||||
representativeProtocolVersion >= companionObj.protocolVersionRepresentativeFor(
|
||||
ProtocolVersion.v30
|
||||
ProtocolVersion.v31
|
||||
)
|
||||
) {
|
||||
prettyOfClass(
|
||||
@ -467,7 +467,7 @@ object DynamicDomainParameters extends HasProtocolVersionedCompanion[DynamicDoma
|
||||
|
||||
val supportedProtoVersions: canton.protocol.DynamicDomainParameters.SupportedProtoVersions =
|
||||
SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(
|
||||
v30.DynamicDomainParameters
|
||||
)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
|
@ -38,7 +38,7 @@ object DriverContractMetadata extends HasVersionedMessageCompanion[DriverContrac
|
||||
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> ProtoCodec(
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
supportedProtoVersion(v30.DriverContractMetadata)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -90,7 +90,7 @@ object SerializableContract
|
||||
with HasVersionedMessageCompanionDbHelpers[SerializableContract] {
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> ProtoCodec(
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
supportedProtoVersion(v30.SerializableContract)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -159,7 +159,7 @@ object AcsCommitment extends HasMemoizedProtocolVersionedWrapperCompanion[AcsCom
|
||||
override val name: String = "AcsCommitment"
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.AcsCommitment)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.AcsCommitment)(
|
||||
supportedProtoVersionMemoized(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -144,7 +144,7 @@ object ConfirmationResponse
|
||||
override val name: String = "ConfirmationResponse"
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.ConfirmationResponse)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.ConfirmationResponse)(
|
||||
supportedProtoVersionMemoized(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -99,7 +99,7 @@ object ConfirmationResultMessage
|
||||
override val name: String = "ConfirmationResultMessage"
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(
|
||||
v30.ConfirmationResultMessage
|
||||
)(
|
||||
supportedProtoVersionMemoized(_)(fromProtoV30),
|
||||
|
@ -236,7 +236,7 @@ final case class EncryptedViewMessage[+VT <: ViewType](
|
||||
object EncryptedViewMessage extends HasProtocolVersionedCompanion[EncryptedViewMessage[ViewType]] {
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.EncryptedViewMessage)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.EncryptedViewMessage)(
|
||||
supportedProtoVersion(_)(EncryptedViewMessage.fromProto),
|
||||
_.toByteString,
|
||||
)
|
||||
|
@ -28,7 +28,7 @@ object EnvelopeContent
|
||||
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(
|
||||
ProtocolVersion.v30
|
||||
ProtocolVersion.v31
|
||||
)(v30.EnvelopeContent)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
_.toByteStringUnversioned,
|
||||
|
@ -90,7 +90,7 @@ object InformeeMessage
|
||||
extends HasProtocolVersionedWithContextCompanion[InformeeMessage, (HashOps, ProtocolVersion)] {
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.InformeeMessage)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.InformeeMessage)(
|
||||
supportedProtoVersion(_)((hashOps, proto) => fromProtoV30(hashOps)(proto)),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -46,7 +46,7 @@ object LocalVerdict extends HasProtocolVersionedCompanion[LocalVerdict] {
|
||||
|
||||
override def supportedProtoVersions: messages.LocalVerdict.SupportedProtoVersions =
|
||||
SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.LocalVerdict)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.LocalVerdict)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -90,7 +90,7 @@ object RootHashMessage
|
||||
], ByteString => ParsingResult[RootHashMessagePayload]] {
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.RootHashMessage)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.RootHashMessage)(
|
||||
supportedProtoVersion(_)((deserializer, proto) => fromProtoV30(deserializer)(proto)),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -69,7 +69,7 @@ object SetTrafficBalanceMessage
|
||||
override val name: String = "SetTrafficBalanceMessage"
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(1) -> VersionedProtoConverter(ProtocolVersion.v30)(
|
||||
ProtoVersion(1) -> VersionedProtoConverter(ProtocolVersion.v31)(
|
||||
v30.SetTrafficBalanceMessage
|
||||
)(
|
||||
supportedProtoVersionMemoized(_)(fromProtoV30),
|
||||
|
@ -122,7 +122,7 @@ object SignedProtocolMessage
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(
|
||||
ProtocolVersion.v30
|
||||
ProtocolVersion.v31
|
||||
)(v30.SignedProtocolMessage)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
|
@ -70,7 +70,7 @@ object TopologyTransactionsBroadcastX
|
||||
}
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(
|
||||
v30.TopologyTransactionsBroadcast
|
||||
)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
|
@ -91,7 +91,7 @@ object TransferInMediatorMessage
|
||||
] {
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.TransferInMediatorMessage)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.TransferInMediatorMessage)(
|
||||
supportedProtoVersion(_)((context, proto) => fromProtoV30(context)(proto)),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -89,7 +89,7 @@ object TransferOutMediatorMessage
|
||||
] {
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(
|
||||
v30.TransferOutMediatorMessage
|
||||
)(
|
||||
supportedProtoVersion(_)((context, proto) => fromProtoV30(context)(proto)),
|
||||
|
@ -65,7 +65,7 @@ object TypedSignedProtocolMessageContent
|
||||
|
||||
override def supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(
|
||||
ProtocolVersion.v30
|
||||
ProtocolVersion.v31
|
||||
)(v30.TypedSignedProtocolMessageContent)(
|
||||
supportedProtoVersionMemoized(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
|
@ -50,7 +50,7 @@ object Verdict
|
||||
|
||||
val supportedProtoVersions: protocol.messages.Verdict.SupportedProtoVersions =
|
||||
SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.Verdict)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.Verdict)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -198,7 +198,7 @@ object SequencerConnections
|
||||
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> ProtoCodec(
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
supportedProtoVersion(v30.SequencerConnections)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -45,7 +45,7 @@ object AcknowledgeRequest extends HasMemoizedProtocolVersionedWrapperCompanion[A
|
||||
|
||||
override def supportedProtoVersions: SupportedProtoVersions =
|
||||
SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.AcknowledgeRequest)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.AcknowledgeRequest)(
|
||||
supportedProtoVersionMemoized(_) { req => bytes =>
|
||||
fromProtoV30(req)(Some(bytes))
|
||||
},
|
||||
|
@ -72,7 +72,7 @@ object AggregationRule
|
||||
override def name: String = "AggregationRule"
|
||||
|
||||
override def supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.AggregationRule)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.AggregationRule)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -86,7 +86,7 @@ object Batch extends HasProtocolVersionedCompanion2[Batch[Envelope[?]], Batch[Cl
|
||||
|
||||
override val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(
|
||||
ProtocolVersion.v30
|
||||
ProtocolVersion.v31
|
||||
)(v30.CompressedBatch)(
|
||||
supportedProtoVersion(_)(
|
||||
// TODO(i10428) Prevent zip bombing when decompressing the request
|
||||
|
@ -130,7 +130,7 @@ object ClosedEnvelope extends HasProtocolVersionedCompanion[ClosedEnvelope] {
|
||||
|
||||
override def supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(
|
||||
ProtocolVersion.v30
|
||||
ProtocolVersion.v31
|
||||
)(v30.Envelope)(
|
||||
protoCompanion =>
|
||||
ProtoConverter.protoParser(protoCompanion.parseFrom)(_).flatMap(fromProtoV30),
|
||||
|
@ -77,7 +77,7 @@ object SequencedEvent
|
||||
override def name: String = "SequencedEvent"
|
||||
|
||||
override val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.SequencedEvent)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.SequencedEvent)(
|
||||
supportedProtoVersionMemoized(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -106,14 +106,14 @@ object SignedContent
|
||||
override def name: String = "SignedContent"
|
||||
|
||||
override def supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.SignedContent)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.SignedContent)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
)
|
||||
|
||||
val multipleSignaturesSupportedSince: RepresentativeProtocolVersion[SignedContent.type] =
|
||||
protocolVersionRepresentativeFor(ProtocolVersion.v30)
|
||||
protocolVersionRepresentativeFor(ProtocolVersion.v31)
|
||||
|
||||
// TODO(i12076): Start using multiple signatures
|
||||
def apply[A <: HasCryptographicEvidence](
|
||||
|
@ -157,7 +157,7 @@ object SubmissionRequest
|
||||
] {
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(
|
||||
ProtocolVersion.v30
|
||||
ProtocolVersion.v31
|
||||
)(v30.SubmissionRequest)(
|
||||
supportedProtoVersionMemoized(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
|
@ -37,7 +37,7 @@ object SubscriptionRequest extends HasProtocolVersionedCompanion[SubscriptionReq
|
||||
override val name: String = "SubscriptionRequest"
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.SubscriptionRequest)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.SubscriptionRequest)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -30,7 +30,7 @@ object TopologyStateForInitRequest
|
||||
override val name: String = "TopologyStateForInitRequest"
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(
|
||||
v30.DownloadTopologyStateForInitRequest
|
||||
)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
|
@ -132,7 +132,7 @@ object StoredTopologyTransactionsX
|
||||
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> ProtoCodec(
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
supportedProtoVersion(v30.TopologyTransactions)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -140,7 +140,7 @@ object SignedTopologyTransactionX
|
||||
SignedTopologyTransactionX[TopologyChangeOpX.Replace, TopologyMappingX]
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(
|
||||
v30.SignedTopologyTransaction
|
||||
)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
|
@ -190,7 +190,7 @@ object TopologyTransactionX
|
||||
|
||||
val supportedProtoVersions: transaction.TopologyTransactionX.SupportedProtoVersions =
|
||||
SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.TopologyTransaction)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.TopologyTransaction)(
|
||||
supportedProtoVersionMemoized(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -47,7 +47,7 @@ object SerializableTraceContext
|
||||
with HasVersionedMessageCompanionDbHelpers[SerializableTraceContext] {
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> ProtoCodec(
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
supportedProtoVersion(v30.TraceContext)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -211,10 +211,11 @@ object ProtocolVersion {
|
||||
ProtocolVersion(4),
|
||||
ProtocolVersion(5),
|
||||
ProtocolVersion(6),
|
||||
ProtocolVersion(30),
|
||||
)
|
||||
|
||||
val unstable: NonEmpty[List[ProtocolVersionWithStatus[ProtocolVersionAnnotation.Unstable]]] =
|
||||
NonEmpty.mk(List, ProtocolVersion.v30, ProtocolVersion.dev)
|
||||
NonEmpty.mk(List, ProtocolVersion.v31, ProtocolVersion.dev)
|
||||
|
||||
val supported: NonEmpty[List[ProtocolVersion]] = (unstable ++ stableAndSupported).sorted
|
||||
|
||||
@ -224,11 +225,11 @@ object ProtocolVersion {
|
||||
lazy val dev: ProtocolVersionWithStatus[ProtocolVersionAnnotation.Unstable] =
|
||||
ProtocolVersion.unstable(Int.MaxValue)
|
||||
|
||||
lazy val v30: ProtocolVersionWithStatus[ProtocolVersionAnnotation.Unstable] =
|
||||
lazy val v31: ProtocolVersionWithStatus[ProtocolVersionAnnotation.Unstable] =
|
||||
ProtocolVersion.unstable(30)
|
||||
|
||||
// Minimum stable protocol version introduced
|
||||
lazy val minimum: ProtocolVersion = v30
|
||||
lazy val minimum: ProtocolVersion = v31
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3,7 +3,7 @@
|
||||
-- Proprietary code. All rights reserved.
|
||||
|
||||
create table blocks (
|
||||
id bigint primary key,
|
||||
request bytea not null,
|
||||
uuid varchar(36) collate "C" unique not null
|
||||
id bigint primary key,
|
||||
request bytea not null,
|
||||
uuid varchar(36) collate "C" unique not null
|
||||
);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
||||
b12935677afe90c0b5203bf01e2e4fb27e19f949bb73750a32dbbd8a33600439
|
||||
47dea221db663c1cf9362cb9291e12ca95ad74dee8b66b9a4b58af08fd50b26a
|
||||
|
@ -43,8 +43,8 @@ CREATE INDEX lapi_transaction_metering_ledger_offset_idx ON lapi_transaction_met
|
||||
---------------------------------------------------------------------------------------------------
|
||||
-- Package entries
|
||||
--
|
||||
-- A table for tracking DAML-LF package submissions
|
||||
-- It includes id to track the package submission and status
|
||||
-- A table for tracking DAML-LF package submissions.
|
||||
-- It includes id to track the package submission and status.
|
||||
---------------------------------------------------------------------------------------------------
|
||||
CREATE TABLE lapi_package_entries (
|
||||
ledger_offset varchar(4000) collate "C" primary key not null,
|
||||
|
@ -31,7 +31,7 @@ object StoredParties
|
||||
with HasVersionedMessageCompanionDbHelpers[StoredParties] {
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> ProtoCodec(
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
supportedProtoVersion(v30.StoredParties)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -14,7 +14,7 @@ object DamlLfVersionToProtocolVersions {
|
||||
/** This Map links the Daml Lf-version to the minimum protocol version that supports it. */
|
||||
val damlLfVersionToMinimumProtocolVersions: SortedMap[TransactionVersion, ProtocolVersion] =
|
||||
SortedMap(
|
||||
TransactionVersion.V31 -> ProtocolVersion.v30,
|
||||
TransactionVersion.V31 -> ProtocolVersion.v31,
|
||||
TransactionVersion.VDev -> ProtocolVersion.dev,
|
||||
)
|
||||
|
||||
|
@ -10,6 +10,7 @@ object ReleaseVersionToProtocolVersions {
|
||||
private val v3 = ProtocolVersion(3)
|
||||
private val v4 = ProtocolVersion(4)
|
||||
private val v5 = ProtocolVersion(5)
|
||||
private val v30 = ProtocolVersion(30)
|
||||
|
||||
import ProtocolVersion.*
|
||||
|
||||
@ -25,9 +26,9 @@ object ReleaseVersionToProtocolVersions {
|
||||
ReleaseVersions.v2_6_0 -> List(v3, v4),
|
||||
ReleaseVersions.v2_7_0 -> List(v3, v4, v5),
|
||||
ReleaseVersions.v2_8_0 -> List(v3, v4, v5),
|
||||
ReleaseVersions.v2_9_0_snapshot -> List(v3, v4, v5),
|
||||
ReleaseVersions.v2_9_0 -> List(v3, v4, v5),
|
||||
ReleaseVersions.v3_0_0 -> List(v30),
|
||||
ReleaseVersions.v3_1_0_snapshot -> List(v30),
|
||||
ReleaseVersions.v3_1_0_snapshot -> List(v31),
|
||||
).map { case (release, pvs) => (release.majorMinor, NonEmptyUtil.fromUnsafe(pvs)) }
|
||||
|
||||
def get(
|
||||
|
@ -13,7 +13,7 @@ object ReleaseVersions {
|
||||
lazy val v2_6_0: ReleaseVersion = ReleaseVersion(2, 6, 0)
|
||||
lazy val v2_7_0: ReleaseVersion = ReleaseVersion(2, 7, 0)
|
||||
lazy val v2_8_0: ReleaseVersion = ReleaseVersion(2, 8, 0)
|
||||
lazy val v2_9_0_snapshot: ReleaseVersion = ReleaseVersion(2, 9, 0, Some("SNAPSHOT"))
|
||||
lazy val v2_9_0: ReleaseVersion = ReleaseVersion(2, 9, 0)
|
||||
lazy val v3_0_0: ReleaseVersion = ReleaseVersion(3, 0, 0)
|
||||
lazy val v3_1_0_snapshot: ReleaseVersion = ReleaseVersion(3, 1, 0, Some("SNAPSHOT"))
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ object MerkleTreeTest {
|
||||
override def supportedProtoVersions: data.MerkleTreeTest.AbstractLeaf.SupportedProtoVersions =
|
||||
SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter.raw(
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
fromProto(30),
|
||||
_.getCryptographicEvidence,
|
||||
)
|
||||
|
@ -78,7 +78,7 @@ object UntypedVersionedMessageTest {
|
||||
object Message extends HasVersionedMessageCompanion[Message] {
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> ProtoCodec(
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
supportedProtoVersion(DummyMessage)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -42,7 +42,7 @@ class SubmissionRequestTest extends BaseTestWordSpec {
|
||||
|
||||
"aggregation id" should {
|
||||
"authenticate the relevant fields" in {
|
||||
if (testedProtocolVersion >= ProtocolVersion.v30) {
|
||||
if (testedProtocolVersion >= ProtocolVersion.v31) {
|
||||
|
||||
val envelope1 = ClosedEnvelope.create(
|
||||
ByteString.copyFromUtf8("Content1"),
|
||||
@ -102,7 +102,7 @@ class SubmissionRequestTest extends BaseTestWordSpec {
|
||||
}
|
||||
|
||||
"ignore sender-specific fields" in {
|
||||
if (testedProtocolVersion >= ProtocolVersion.v30) {
|
||||
if (testedProtocolVersion >= ProtocolVersion.v31) {
|
||||
val envelope1 = ClosedEnvelope.create(
|
||||
ByteString.copyFromUtf8("some-content"),
|
||||
Recipients.cc(DefaultTestIdentities.participant1, DefaultTestIdentities.participant3),
|
||||
|
@ -115,7 +115,7 @@ object MemoizedEvidenceSUT
|
||||
val name: String = "MemoizedEvidenceSUT"
|
||||
|
||||
val supportedProtoVersions: MemoizedEvidenceSUT.SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> UnsupportedProtoCodec(ProtocolVersion.v30)
|
||||
ProtoVersion(30) -> UnsupportedProtoCodec(ProtocolVersion.v31)
|
||||
)
|
||||
|
||||
private val defaultProtocolVersionRepresentative = protocolVersionRepresentativeFor(
|
||||
|
@ -34,7 +34,7 @@ trait DbTest
|
||||
/** Flag to define the migration mode for the schemas */
|
||||
def migrationMode: MigrationMode =
|
||||
// TODO(i15561): Revert back to `== ProtocolVersion.dev` once v30 is a stable Daml 3 protocol version
|
||||
if (BaseTest.testedProtocolVersion >= ProtocolVersion.v30) MigrationMode.DevVersion
|
||||
if (BaseTest.testedProtocolVersion >= ProtocolVersion.v31) MigrationMode.DevVersion
|
||||
else MigrationMode.Standard
|
||||
|
||||
protected def mkDbConfig(basicConfig: DbBasicConfig): DbConfig
|
||||
|
@ -170,7 +170,7 @@ trait TopologyStoreXTest extends AsyncWordSpec with TopologyStoreXTestBase {
|
||||
txProtocolVersion <- store.findStoredForVersion(
|
||||
CantonTimestamp.MaxValue,
|
||||
tx1_NSD_Proposal.transaction,
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
)
|
||||
|
||||
proposalTransactions <- inspect(
|
||||
|
@ -33,14 +33,14 @@ class TopologyStoreXTestData(
|
||||
op,
|
||||
serial,
|
||||
mapping,
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
),
|
||||
signatures = NonEmpty(Set, Signature.noSignature),
|
||||
isProposal = isProposal,
|
||||
)(
|
||||
SignedTopologyTransactionX.supportedProtoVersions
|
||||
.protocolVersionRepresentativeFor(
|
||||
ProtocolVersion.v30
|
||||
ProtocolVersion.v31
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -12,7 +12,7 @@ class ProtocolVersionCompatibilityTest extends AnyWordSpec with BaseTest {
|
||||
"version check" should {
|
||||
"be successful for matching versions" in {
|
||||
canClientConnectToServer(
|
||||
clientSupportedVersions = Seq(ProtocolVersion.v30, ProtocolVersion.dev),
|
||||
clientSupportedVersions = Seq(ProtocolVersion.v31, ProtocolVersion.dev),
|
||||
server = ProtocolVersion.dev,
|
||||
None,
|
||||
) shouldBe Right(())
|
||||
@ -20,12 +20,12 @@ class ProtocolVersionCompatibilityTest extends AnyWordSpec with BaseTest {
|
||||
|
||||
"fail with a nice message if incompatible" in {
|
||||
canClientConnectToServer(
|
||||
clientSupportedVersions = Seq(ProtocolVersion.v30),
|
||||
clientSupportedVersions = Seq(ProtocolVersion.v31),
|
||||
server = ProtocolVersion.dev,
|
||||
None,
|
||||
).left.value shouldBe (VersionNotSupportedError(
|
||||
ProtocolVersion.dev,
|
||||
Seq(ProtocolVersion.v30),
|
||||
Seq(ProtocolVersion.v31),
|
||||
))
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ class ProtocolVersionTest extends AnyWordSpec with BaseTest {
|
||||
|
||||
"parse version string if valid" in {
|
||||
// New format
|
||||
ProtocolVersion.create("30").value shouldBe ProtocolVersion.v30
|
||||
ProtocolVersion.create("30").value shouldBe ProtocolVersion.v31
|
||||
|
||||
ProtocolVersion
|
||||
.create(Int.MaxValue.toString)
|
||||
@ -31,19 +31,19 @@ class ProtocolVersionTest extends AnyWordSpec with BaseTest {
|
||||
}
|
||||
|
||||
"be comparable" in {
|
||||
ProtocolVersion.v30 < ProtocolVersion.dev shouldBe true
|
||||
ProtocolVersion.v30 <= ProtocolVersion.dev shouldBe true
|
||||
ProtocolVersion.v31 < ProtocolVersion.dev shouldBe true
|
||||
ProtocolVersion.v31 <= ProtocolVersion.dev shouldBe true
|
||||
ProtocolVersion.dev <= ProtocolVersion.dev shouldBe true
|
||||
|
||||
ProtocolVersion.dev < ProtocolVersion.v30 shouldBe false
|
||||
ProtocolVersion.dev <= ProtocolVersion.v30 shouldBe false
|
||||
ProtocolVersion.dev < ProtocolVersion.v31 shouldBe false
|
||||
ProtocolVersion.dev <= ProtocolVersion.v31 shouldBe false
|
||||
|
||||
ProtocolVersion.dev <= ProtocolVersion.dev shouldBe true
|
||||
ProtocolVersion.v30 < ProtocolVersion.dev shouldBe true
|
||||
ProtocolVersion.dev <= ProtocolVersion.v30 shouldBe false
|
||||
ProtocolVersion.v31 < ProtocolVersion.dev shouldBe true
|
||||
ProtocolVersion.dev <= ProtocolVersion.v31 shouldBe false
|
||||
|
||||
ProtocolVersion.dev == ProtocolVersion.dev shouldBe true
|
||||
ProtocolVersion.dev == ProtocolVersion.v30 shouldBe false
|
||||
ProtocolVersion.dev == ProtocolVersion.v31 shouldBe false
|
||||
}
|
||||
|
||||
val invalidProtocolVersionNumber = Int.MinValue
|
||||
|
@ -682,7 +682,7 @@ object DbSequencerStateManagerStore {
|
||||
|
||||
override def supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter.storage(
|
||||
ReleaseProtocolVersion(ProtocolVersion.v30),
|
||||
ReleaseProtocolVersion(ProtocolVersion.v31),
|
||||
v30.AggregatedSignaturesOfSender,
|
||||
)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
|
@ -46,7 +46,7 @@ object OnboardingStateForSequencer
|
||||
)
|
||||
|
||||
override val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(
|
||||
v30.OnboardingStateForSequencer
|
||||
)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
|
@ -78,7 +78,7 @@ final case class SequencerSnapshot(
|
||||
|
||||
object SequencerSnapshot extends HasProtocolVersionedCompanion[SequencerSnapshot] {
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.SequencerSnapshot)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.SequencerSnapshot)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -28,7 +28,7 @@ object VersionedStatus extends HasProtocolVersionedCompanion2[VersionedStatus, V
|
||||
override def supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter
|
||||
.storage(
|
||||
ReleaseProtocolVersion(ProtocolVersion.v30),
|
||||
ReleaseProtocolVersion(ProtocolVersion.v31),
|
||||
v30.VersionedStatus.messageCompanion,
|
||||
)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
|
@ -198,7 +198,7 @@ class DefaultVerdictSenderTest
|
||||
val initialDomainParameters = TestDomainParameters.defaultDynamic
|
||||
|
||||
val domainSyncCryptoApi: DomainSyncCryptoClient =
|
||||
if (testedProtocolVersion >= ProtocolVersion.v30) {
|
||||
if (testedProtocolVersion >= ProtocolVersion.v31) {
|
||||
val topology = TestingTopologyX(
|
||||
Set(domainId),
|
||||
Map(
|
||||
|
@ -722,7 +722,7 @@ class GrpcSequencerServiceTest
|
||||
.replace(unauthenticatedMember)
|
||||
|
||||
val errorMsg =
|
||||
if (testedProtocolVersion >= ProtocolVersion.v30)
|
||||
if (testedProtocolVersion >= ProtocolVersion.v31)
|
||||
"Unauthenticated member is trying to send message to members other than the topology broadcast address All"
|
||||
else
|
||||
"Unauthenticated member is trying to send message to members other than the domain manager"
|
||||
|
@ -164,6 +164,7 @@ class CantonLedgerApiServerFactory(
|
||||
startLedgerApiServer = sync.isActive(),
|
||||
futureSupervisor = futureSupervisor,
|
||||
packageNameMapResolver = packageNameMapResolver,
|
||||
parameters = parameters,
|
||||
)(executionContext, actorSystem)
|
||||
.leftMap { err =>
|
||||
// The MigrateOnEmptySchema exception is private, thus match on the expected message
|
||||
|
@ -39,6 +39,7 @@ final case class ParticipantNodeParameters(
|
||||
iterationsBetweenInterruptions: Long,
|
||||
journalGarbageCollectionDelay: NonNegativeFiniteDuration,
|
||||
disableUpgradeValidation: Boolean,
|
||||
allowForUnauthenticatedContractIds: Boolean,
|
||||
) extends CantonNodeParameters
|
||||
with HasGeneralCantonNodeParameters {
|
||||
override def dontWarnOnDeprecatedPV: Boolean = protocolConfig.dontWarnOnDeprecatedPV
|
||||
@ -88,5 +89,6 @@ object ParticipantNodeParameters {
|
||||
10000, // 10000 is the default value in the engine configuration
|
||||
journalGarbageCollectionDelay = NonNegativeFiniteDuration.Zero,
|
||||
disableUpgradeValidation = true,
|
||||
allowForUnauthenticatedContractIds = false,
|
||||
)
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ private[canton] object ActiveContract extends HasProtocolVersionedCompanion[Acti
|
||||
override def name: String = "ActiveContract"
|
||||
|
||||
override def supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v30)(v30.ActiveContract)(
|
||||
ProtoVersion(30) -> VersionedProtoConverter(ProtocolVersion.v31)(v30.ActiveContract)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -336,6 +336,9 @@ object TestingTimeServiceConfig {
|
||||
* @param iterationsBetweenInterruptions Number of engine iterations between forced interruptions (outside needs of information).
|
||||
* @param journalGarbageCollectionDelay How much time to delay the canton journal garbage collection
|
||||
* @param disableUpgradeValidation Disable the package upgrade verification on DAR upload
|
||||
* @param allowForUnauthenticatedContractIds Skip contract id authentication check, if the contract id scheme does not support authentication.
|
||||
* You should enable this only if all participants on a domain mutually trust each other.
|
||||
* Otherwise, an attacker may compromise integrity of the ledger.
|
||||
*/
|
||||
final case class ParticipantNodeParameterConfig(
|
||||
adminWorkflow: AdminWorkflowConfig = AdminWorkflowConfig(),
|
||||
@ -346,7 +349,7 @@ final case class ParticipantNodeParameterConfig(
|
||||
stores: ParticipantStoreConfig = ParticipantStoreConfig(),
|
||||
transferTimeProofFreshnessProportion: NonNegativeInt = NonNegativeInt.tryCreate(3),
|
||||
minimumProtocolVersion: Option[ParticipantProtocolVersion] = Some(
|
||||
ParticipantProtocolVersion(ProtocolVersion.v30)
|
||||
ParticipantProtocolVersion(ProtocolVersion.v31)
|
||||
),
|
||||
initialProtocolVersion: ParticipantProtocolVersion = ParticipantProtocolVersion(
|
||||
ProtocolVersion.latest
|
||||
@ -367,6 +370,7 @@ final case class ParticipantNodeParameterConfig(
|
||||
override val useNewTrafficControl: Boolean = false,
|
||||
disableUpgradeValidation: Boolean = false,
|
||||
override val useUnifiedSequencer: Boolean = false,
|
||||
allowForUnauthenticatedContractIds: Boolean = false,
|
||||
) extends LocalNodeParametersConfig
|
||||
|
||||
/** Parameters for the participant node's stores
|
||||
|
@ -131,7 +131,7 @@ object DomainConnectionConfig
|
||||
with HasVersionedMessageCompanionDbHelpers[DomainConnectionConfig] {
|
||||
val supportedProtoVersions: SupportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> ProtoCodec(
|
||||
ProtocolVersion.v30,
|
||||
ProtocolVersion.v31,
|
||||
supportedProtoVersion(v30.DomainConnectionConfig)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -88,6 +88,7 @@ object CantonLedgerApiServerWrapper extends NoTracing {
|
||||
*/
|
||||
def initialize(
|
||||
config: Config,
|
||||
parameters: ParticipantNodeParameters,
|
||||
startLedgerApiServer: Boolean,
|
||||
futureSupervisor: FutureSupervisor,
|
||||
packageNameMapResolver: MutablePackageNameMapResolver,
|
||||
@ -128,6 +129,7 @@ object CantonLedgerApiServerWrapper extends NoTracing {
|
||||
telemetry = new DefaultOpenTelemetry(config.tracerProvider.openTelemetry),
|
||||
futureSupervisor = futureSupervisor,
|
||||
packageNameMapResolver = packageNameMapResolver,
|
||||
parameters = parameters,
|
||||
)
|
||||
val startFUS = for {
|
||||
_ <-
|
||||
|
@ -19,8 +19,8 @@ import com.digitalasset.canton.ledger.api.auth.CachedJwtVerifierLoader
|
||||
import com.digitalasset.canton.ledger.api.domain.{Filters, TransactionFilter}
|
||||
import com.digitalasset.canton.ledger.api.health.HealthChecks
|
||||
import com.digitalasset.canton.ledger.api.util.TimeProvider
|
||||
import com.digitalasset.canton.ledger.localstore.*
|
||||
import com.digitalasset.canton.ledger.localstore.api.UserManagementStore
|
||||
import com.digitalasset.canton.ledger.localstore.{CachedIdentityProviderConfigStore, *}
|
||||
import com.digitalasset.canton.ledger.offset.Offset
|
||||
import com.digitalasset.canton.ledger.participant.state.v2.InternalStateService
|
||||
import com.digitalasset.canton.ledger.participant.state.v2.metrics.{
|
||||
@ -30,9 +30,10 @@ import com.digitalasset.canton.ledger.participant.state.v2.metrics.{
|
||||
import com.digitalasset.canton.lifecycle.*
|
||||
import com.digitalasset.canton.logging.{LoggingContextWithTrace, NamedLoggerFactory, NamedLogging}
|
||||
import com.digitalasset.canton.networking.grpc.{ApiRequestLogger, ClientChannelBuilder}
|
||||
import com.digitalasset.canton.participant.ParticipantNodeParameters
|
||||
import com.digitalasset.canton.participant.admin.MutablePackageNameMapResolver
|
||||
import com.digitalasset.canton.participant.config.LedgerApiServerConfig
|
||||
import com.digitalasset.canton.participant.protocol.SerializableContractAuthenticatorImpl
|
||||
import com.digitalasset.canton.participant.protocol.SerializableContractAuthenticator
|
||||
import com.digitalasset.canton.platform.LedgerApiServer
|
||||
import com.digitalasset.canton.platform.apiserver.execution.StoreBackedCommandExecutor.AuthenticateContract
|
||||
import com.digitalasset.canton.platform.apiserver.ratelimiting.{
|
||||
@ -51,7 +52,6 @@ import com.digitalasset.canton.platform.store.DbSupport
|
||||
import com.digitalasset.canton.platform.store.DbSupport.ParticipantDataSourceConfig
|
||||
import com.digitalasset.canton.platform.store.dao.events.ContractLoader
|
||||
import com.digitalasset.canton.platform.store.packagemeta.InMemoryPackageMetadataStore
|
||||
import com.digitalasset.canton.protocol.UnicumGenerator
|
||||
import com.digitalasset.canton.tracing.TraceContext
|
||||
import com.digitalasset.canton.util.{FutureUtil, SimpleExecutionQueue}
|
||||
import com.digitalasset.canton.{DiscardOps, LfPartyId}
|
||||
@ -80,6 +80,7 @@ class StartableStoppableLedgerApiServer(
|
||||
telemetry: Telemetry,
|
||||
futureSupervisor: FutureSupervisor,
|
||||
packageNameMapResolver: MutablePackageNameMapResolver,
|
||||
parameters: ParticipantNodeParameters,
|
||||
)(implicit
|
||||
executionContext: ExecutionContextIdlenessExecutorService,
|
||||
actorSystem: ActorSystem,
|
||||
@ -295,8 +296,9 @@ class StartableStoppableLedgerApiServer(
|
||||
executionContext = executionContext,
|
||||
loggerFactory = loggerFactory,
|
||||
)
|
||||
serializableContractAuthenticator = new SerializableContractAuthenticatorImpl(
|
||||
new UnicumGenerator(config.syncService.pureCryptoApi)
|
||||
serializableContractAuthenticator = SerializableContractAuthenticator(
|
||||
config.syncService.pureCryptoApi,
|
||||
parameters,
|
||||
)
|
||||
|
||||
authenticateContract: AuthenticateContract = c =>
|
||||
|
@ -4,7 +4,8 @@
|
||||
package com.digitalasset.canton.participant.protocol
|
||||
|
||||
import com.daml.lf.value.Value.ContractId
|
||||
import com.digitalasset.canton.crypto.Salt
|
||||
import com.digitalasset.canton.crypto.{HashOps, HmacOps, Salt}
|
||||
import com.digitalasset.canton.participant.ParticipantNodeParameters
|
||||
import com.digitalasset.canton.protocol.SerializableContract.LedgerCreateTime
|
||||
import com.digitalasset.canton.protocol.{
|
||||
AuthenticatedContractIdVersionV10,
|
||||
@ -38,8 +39,24 @@ trait SerializableContractAuthenticator {
|
||||
|
||||
}
|
||||
|
||||
class SerializableContractAuthenticatorImpl(unicumGenerator: UnicumGenerator)
|
||||
extends SerializableContractAuthenticator {
|
||||
object SerializableContractAuthenticator {
|
||||
|
||||
def apply(
|
||||
cryptoOps: HashOps & HmacOps,
|
||||
parameters: ParticipantNodeParameters,
|
||||
): SerializableContractAuthenticator = new SerializableContractAuthenticatorImpl(
|
||||
// This unicum generator is used for all domains uniformly. This means that domains cannot specify
|
||||
// different unicum generator strategies (e.g., different hash functions).
|
||||
new UnicumGenerator(cryptoOps),
|
||||
parameters.allowForUnauthenticatedContractIds,
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
class SerializableContractAuthenticatorImpl(
|
||||
unicumGenerator: UnicumGenerator,
|
||||
allowForUnauthenticatedContractIds: Boolean,
|
||||
) extends SerializableContractAuthenticator {
|
||||
|
||||
def authenticate(contract: SerializableContract): Either[String, Unit] = {
|
||||
authenticate(
|
||||
@ -95,9 +112,9 @@ class SerializableContractAuthenticatorImpl(unicumGenerator: UnicumGenerator)
|
||||
s"Mismatching contract id suffixes. expected: $recomputedSuffix vs actual: $cantonContractSuffix",
|
||||
)
|
||||
} yield ()
|
||||
// Future upgrades to the contract id scheme must also be supported
|
||||
// - hence we treat non-recognized contract id schemes as non-authenticated contract ids.
|
||||
case Left(_) => Right(())
|
||||
case Left(scheme) =>
|
||||
if (allowForUnauthenticatedContractIds) Right(())
|
||||
else Left(s"Unsupported contract authentication id scheme: $scheme")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,13 +22,11 @@ import com.digitalasset.canton.ledger.participant.state.v2.{
|
||||
import com.digitalasset.canton.lifecycle.FutureUnlessShutdown
|
||||
import com.digitalasset.canton.logging.NamedLoggerFactory
|
||||
import com.digitalasset.canton.logging.pretty.{Pretty, PrettyPrinting}
|
||||
import com.digitalasset.canton.participant.ParticipantNodeParameters
|
||||
import com.digitalasset.canton.participant.metrics.TransactionProcessingMetrics
|
||||
import com.digitalasset.canton.participant.protocol.ProcessingSteps.WrapsProcessorError
|
||||
import com.digitalasset.canton.participant.protocol.ProtocolProcessor.ProcessorError
|
||||
import com.digitalasset.canton.participant.protocol.TransactionProcessor.{
|
||||
TransactionSubmitted,
|
||||
buildAuthenticator,
|
||||
}
|
||||
import com.digitalasset.canton.participant.protocol.TransactionProcessor.TransactionSubmitted
|
||||
import com.digitalasset.canton.participant.protocol.submission.TransactionConfirmationRequestFactory.TransactionConfirmationRequestCreationError
|
||||
import com.digitalasset.canton.participant.protocol.submission.TransactionTreeFactory.PackageUnknownTo
|
||||
import com.digitalasset.canton.participant.protocol.submission.{
|
||||
@ -61,6 +59,7 @@ class TransactionProcessor(
|
||||
domainId: DomainId,
|
||||
damle: DAMLe,
|
||||
staticDomainParameters: StaticDomainParameters,
|
||||
parameters: ParticipantNodeParameters,
|
||||
crypto: DomainSyncCryptoClient,
|
||||
sequencerClient: SequencerClient,
|
||||
inFlightSubmissionTracker: InFlightSubmissionTracker,
|
||||
@ -90,7 +89,7 @@ class TransactionProcessor(
|
||||
ModelConformanceChecker(
|
||||
damle,
|
||||
confirmationRequestFactory.transactionTreeFactory,
|
||||
buildAuthenticator(crypto),
|
||||
SerializableContractAuthenticator(crypto.pureCrypto, parameters),
|
||||
participantId,
|
||||
packageResolver,
|
||||
loggerFactory,
|
||||
@ -99,7 +98,7 @@ class TransactionProcessor(
|
||||
crypto,
|
||||
ephemeral.contractStore,
|
||||
metrics,
|
||||
buildAuthenticator(crypto),
|
||||
SerializableContractAuthenticator(crypto.pureCrypto, parameters),
|
||||
new AuthenticationValidator(),
|
||||
new AuthorizationValidator(participantId),
|
||||
new InternalConsistencyChecker(
|
||||
@ -147,12 +146,6 @@ class TransactionProcessor(
|
||||
|
||||
object TransactionProcessor {
|
||||
|
||||
private def buildAuthenticator(
|
||||
crypto: DomainSyncCryptoClient
|
||||
): SerializableContractAuthenticatorImpl = new SerializableContractAuthenticatorImpl(
|
||||
new UnicumGenerator(crypto.pureCrypto)
|
||||
)
|
||||
|
||||
sealed trait TransactionProcessorError
|
||||
extends WrapsProcessorError
|
||||
with Product
|
||||
|
@ -71,7 +71,7 @@ object SubmissionTrackingData
|
||||
|
||||
val supportedProtoVersions = SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter
|
||||
.storage(ReleaseProtocolVersion(ProtocolVersion.v30), v30.SubmissionTrackingData)(
|
||||
.storage(ReleaseProtocolVersion(ProtocolVersion.v31), v30.SubmissionTrackingData)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -36,7 +36,7 @@ import scala.annotation.tailrec
|
||||
import scala.collection.mutable
|
||||
import scala.concurrent.{ExecutionContext, Future}
|
||||
|
||||
/** Generate transaction trees as used from protocol version [[com.digitalasset.canton.version.ProtocolVersion.v30]] on
|
||||
/** Generate transaction trees as used from protocol version [[com.digitalasset.canton.version.ProtocolVersion.v31]] on
|
||||
*/
|
||||
class TransactionTreeFactoryImplV3(
|
||||
submittingParticipant: ParticipantId,
|
||||
|
@ -15,16 +15,14 @@ import com.digitalasset.canton.data.ProcessedDisclosedContract
|
||||
import com.digitalasset.canton.ledger.participant.state.v2.{SubmitterInfo, TransactionMeta}
|
||||
import com.digitalasset.canton.lifecycle.{FlagCloseable, FutureUnlessShutdown}
|
||||
import com.digitalasset.canton.logging.{NamedLoggerFactory, NamedLogging}
|
||||
import com.digitalasset.canton.participant.ParticipantNodeParameters
|
||||
import com.digitalasset.canton.participant.domain.DomainAliasManager
|
||||
import com.digitalasset.canton.participant.protocol.SerializableContractAuthenticator
|
||||
import com.digitalasset.canton.participant.protocol.TransactionProcessor.{
|
||||
TransactionSubmissionError,
|
||||
TransactionSubmitted,
|
||||
}
|
||||
import com.digitalasset.canton.participant.protocol.submission.routing.DomainRouter.inputContractRoutingParties
|
||||
import com.digitalasset.canton.participant.protocol.{
|
||||
SerializableContractAuthenticator,
|
||||
SerializableContractAuthenticatorImpl,
|
||||
}
|
||||
import com.digitalasset.canton.participant.store.DomainConnectionConfigStore
|
||||
import com.digitalasset.canton.participant.sync.TransactionRoutingError.ConfigurationErrors.{
|
||||
MultiDomainSupportNotEnabled,
|
||||
@ -266,8 +264,7 @@ object DomainRouter {
|
||||
domainAliasManager: DomainAliasManager,
|
||||
cryptoPureApi: CryptoPureApi,
|
||||
participantId: ParticipantId,
|
||||
autoTransferTransaction: Boolean,
|
||||
timeouts: ProcessingTimeout,
|
||||
parameters: ParticipantNodeParameters,
|
||||
loggerFactory: NamedLoggerFactory,
|
||||
)(implicit ec: ExecutionContext): DomainRouter = {
|
||||
|
||||
@ -294,10 +291,9 @@ object DomainRouter {
|
||||
loggerFactory = loggerFactory,
|
||||
)
|
||||
|
||||
val serializableContractAuthenticator = new SerializableContractAuthenticatorImpl(
|
||||
// This unicum generator is used for all domains uniformly. This means that domains cannot specify
|
||||
// different unicum generator strategies (e.g., different hash functions).
|
||||
new UnicumGenerator(cryptoPureApi)
|
||||
val serializableContractAuthenticator = SerializableContractAuthenticator(
|
||||
cryptoPureApi,
|
||||
parameters,
|
||||
)
|
||||
|
||||
new DomainRouter(
|
||||
@ -305,9 +301,9 @@ object DomainRouter {
|
||||
transfer,
|
||||
domainStateProvider,
|
||||
serializableContractAuthenticator,
|
||||
autoTransferTransaction = autoTransferTransaction,
|
||||
autoTransferTransaction = parameters.enablePreviewFeatures,
|
||||
domainSelectorFactory,
|
||||
timeouts,
|
||||
parameters.processingTimeouts,
|
||||
loggerFactory,
|
||||
)
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ private[store] object SerializableLedgerSyncEvent
|
||||
override val supportedProtoVersions: SupportedProtoVersions =
|
||||
SupportedProtoVersions(
|
||||
ProtoVersion(30) -> VersionedProtoConverter
|
||||
.storage(ReleaseProtocolVersion(ProtocolVersion.v30), v30.LedgerSyncEvent)(
|
||||
.storage(ReleaseProtocolVersion(ProtocolVersion.v31), v30.LedgerSyncEvent)(
|
||||
supportedProtoVersion(_)(fromProtoV30),
|
||||
_.toProtoV30.toByteString,
|
||||
)
|
||||
|
@ -281,8 +281,7 @@ class CantonSyncService(
|
||||
aliasManager,
|
||||
syncCrypto.pureCrypto,
|
||||
participantId,
|
||||
autoTransferTransaction = parameters.enablePreviewFeatures,
|
||||
parameters.processingTimeouts,
|
||||
parameters,
|
||||
loggerFactory,
|
||||
)(ec)
|
||||
|
||||
|
@ -183,6 +183,7 @@ class SyncDomain(
|
||||
domainId,
|
||||
damle,
|
||||
staticDomainParameters,
|
||||
parameters,
|
||||
domainCrypto,
|
||||
sequencerClient,
|
||||
inFlightSubmissionTracker,
|
||||
|
@ -38,7 +38,9 @@ class SerializableContractAuthenticatorImplTest extends AnyWordSpec with BaseTes
|
||||
val nonAuthenticatedContractId = ExampleTransactionFactory.suffixedId(1, 2)
|
||||
contractAuthenticator.authenticate(
|
||||
contract.copy(contractId = nonAuthenticatedContractId)
|
||||
) shouldBe Right(())
|
||||
) shouldBe Left(
|
||||
"Unsupported contract authentication id scheme: Suffix 0002 does not start with one of the supported prefixes: Bytes(ca10)"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@ -228,7 +230,8 @@ class SerializableContractAuthenticatorImplTest extends AnyWordSpec with BaseTes
|
||||
class WithContractAuthenticator(contractIdVersion: CantonContractIdVersion) extends BaseTest {
|
||||
protected lazy val unicumGenerator = new UnicumGenerator(new SymbolicPureCrypto())
|
||||
protected lazy val contractAuthenticator = new SerializableContractAuthenticatorImpl(
|
||||
unicumGenerator
|
||||
unicumGenerator,
|
||||
false,
|
||||
)
|
||||
|
||||
protected lazy val contractInstance = ExampleTransactionFactory.contractInstance()
|
||||
|
@ -76,7 +76,7 @@ class DomainsFilterTest extends AnyWordSpec with BaseTest with HasExecutionConte
|
||||
import SimpleTopology.*
|
||||
|
||||
// LanguageVersion.VDev needs pv=dev so we use pv=6
|
||||
val currentDomainPV = ProtocolVersion.v30
|
||||
val currentDomainPV = ProtocolVersion.v31
|
||||
val filter =
|
||||
DomainsFilterForTx(Transactions.Create.tx(TransactionVersion.VDev), currentDomainPV)
|
||||
|
||||
|
@ -130,7 +130,7 @@ class DomainSelectorTest extends AnyWordSpec with BaseTest with HasExecutionCont
|
||||
|
||||
// TODO(#15561) Re-enable this test when we have a stable protocol version
|
||||
"take minimum protocol version into account" ignore {
|
||||
val oldPV = ProtocolVersion.v30
|
||||
val oldPV = ProtocolVersion.v31
|
||||
|
||||
val transactionVersion = LfTransactionVersion.VDev
|
||||
val newPV = DamlLfVersionToProtocolVersions.damlLfVersionToMinimumProtocolVersions
|
||||
|
@ -374,7 +374,7 @@ class TransferInProcessingStepsTest extends AsyncWordSpec with BaseTest with Has
|
||||
"fail when protocol version are incompatible" in {
|
||||
// source domain does not support transfer counters
|
||||
val submissionParam2 =
|
||||
submissionParam.copy(sourceProtocolVersion = SourceProtocolVersion(ProtocolVersion.v30))
|
||||
submissionParam.copy(sourceProtocolVersion = SourceProtocolVersion(ProtocolVersion.v31))
|
||||
for {
|
||||
transferData <- transferDataF
|
||||
deps <- statefulDependencies
|
||||
|
@ -247,7 +247,7 @@ class TransferInValidationTest
|
||||
|
||||
"disallow transfers from source domain supporting transfer counter to destination domain not supporting them" in {
|
||||
val transferDataSourceDomainPVCNTestNet =
|
||||
transferData.copy(sourceProtocolVersion = SourceProtocolVersion(ProtocolVersion.v30))
|
||||
transferData.copy(sourceProtocolVersion = SourceProtocolVersion(ProtocolVersion.v31))
|
||||
for {
|
||||
result <-
|
||||
transferInValidation
|
||||
@ -260,7 +260,7 @@ class TransferInValidationTest
|
||||
)
|
||||
.value
|
||||
} yield {
|
||||
if (transferOutRequest.targetProtocolVersion.v >= ProtocolVersion.v30) {
|
||||
if (transferOutRequest.targetProtocolVersion.v >= ProtocolVersion.v31) {
|
||||
result shouldBe Right(Some(TransferInValidationResult(Set(party1))))
|
||||
} else {
|
||||
result shouldBe Left(
|
||||
|
@ -1 +1 @@
|
||||
20240403.13021.v8c185ad5
|
||||
20240403.13026.v4a622ee4
|
||||
|
Loading…
Reference in New Issue
Block a user