diff --git a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/version_service.proto b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/version_service.proto index aa9cc8378c88..6fac06e6aef7 100644 --- a/ledger-api/grpc-definitions/com/daml/ledger/api/v1/version_service.proto +++ b/ledger-api/grpc-definitions/com/daml/ledger/api/v1/version_service.proto @@ -65,6 +65,7 @@ message UserManagementFeature {} message CommandDeduplicationFeatures { DeduplicationPeriodSupport deduplication_period_support = 1; + ParticipantDeduplicationSupport participant_deduplication_support = 2; } message DeduplicationPeriodSupport { @@ -80,3 +81,8 @@ message DeduplicationPeriodSupport { OffsetSupport offset_support = 1; DurationSupport duration_support = 2; } +enum ParticipantDeduplicationSupport { + PARTICIPANT_DEDUPLICATION_NOT_SUPPORTED = 0; + PARTICIPANT_DEDUPLICATION_PARALLEL_ONLY = 1; + PARTICIPANT_DEDUPLICATION_SUPPORTED = 2; +} diff --git a/ledger/participant-state/kvutils/app/src/main/scala/com/daml/ledger/participant/state/kvutils/app/Runner.scala b/ledger/participant-state/kvutils/app/src/main/scala/com/daml/ledger/participant/state/kvutils/app/Runner.scala index fe5c96b2ae10..6da0456c6000 100644 --- a/ledger/participant-state/kvutils/app/src/main/scala/com/daml/ledger/participant/state/kvutils/app/Runner.scala +++ b/ledger/participant-state/kvutils/app/src/main/scala/com/daml/ledger/participant/state/kvutils/app/Runner.scala @@ -15,6 +15,7 @@ import com.daml.ledger.api.health.HealthChecks import com.daml.ledger.api.v1.version_service.{ CommandDeduplicationFeatures, DeduplicationPeriodSupport, + ParticipantDeduplicationSupport, } import com.daml.ledger.participant.state.index.impl.inmemory.InMemoryUserManagementStore import com.daml.ledger.participant.state.v2.WritePackagesService @@ -206,7 +207,8 @@ final class Runner[T <: ReadWriteService, Extra]( durationSupport = DeduplicationPeriodSupport.DurationSupport.DURATION_NATIVE_SUPPORT, ) - ) + ), + ParticipantDeduplicationSupport.PARTICIPANT_DEDUPLICATION_NOT_SUPPORTED, ), ).acquire() } yield {} diff --git a/ledger/sandbox-classic/src/main/scala/platform/sandbox/SandboxServer.scala b/ledger/sandbox-classic/src/main/scala/platform/sandbox/SandboxServer.scala index de2055d9c3d5..0736cc3892d6 100644 --- a/ledger/sandbox-classic/src/main/scala/platform/sandbox/SandboxServer.scala +++ b/ledger/sandbox-classic/src/main/scala/platform/sandbox/SandboxServer.scala @@ -21,6 +21,7 @@ import com.daml.ledger.api.health.HealthChecks import com.daml.ledger.api.v1.version_service.{ CommandDeduplicationFeatures, DeduplicationPeriodSupport, + ParticipantDeduplicationSupport, } import com.daml.ledger.participant.state.index.impl.inmemory.InMemoryUserManagementStore import com.daml.ledger.participant.state.v2.metrics.TimedWriteService @@ -430,7 +431,8 @@ final class SandboxServer( offsetSupport = DeduplicationPeriodSupport.OffsetSupport.OFFSET_NOT_SUPPORTED, durationSupport = DeduplicationPeriodSupport.DurationSupport.DURATION_NATIVE_SUPPORT, ) - ) + ), + ParticipantDeduplicationSupport.PARTICIPANT_DEDUPLICATION_SUPPORTED, ), )(materializer, executionSequencerFactory, loggingContext) .map(_.withServices(List(resetService))) diff --git a/ledger/sandbox-on-x/src/main/scala/com/daml/ledger/sandbox/SandboxOnXRunner.scala b/ledger/sandbox-on-x/src/main/scala/com/daml/ledger/sandbox/SandboxOnXRunner.scala index 866ccdb1bbaf..958242953f6f 100644 --- a/ledger/sandbox-on-x/src/main/scala/com/daml/ledger/sandbox/SandboxOnXRunner.scala +++ b/ledger/sandbox-on-x/src/main/scala/com/daml/ledger/sandbox/SandboxOnXRunner.scala @@ -16,6 +16,7 @@ import com.daml.ledger.api.health.HealthChecks import com.daml.ledger.api.v1.version_service.{ CommandDeduplicationFeatures, DeduplicationPeriodSupport, + ParticipantDeduplicationSupport, } import com.daml.ledger.offset.Offset import com.daml.ledger.participant.state.index.impl.inmemory.InMemoryUserManagementStore @@ -252,7 +253,8 @@ object SandboxOnXRunner { DeduplicationPeriodSupport.OffsetSupport.OFFSET_NOT_SUPPORTED, DeduplicationPeriodSupport.DurationSupport.DURATION_NATIVE_SUPPORT, ) - ) + ), + ParticipantDeduplicationSupport.PARTICIPANT_DEDUPLICATION_NOT_SUPPORTED, ), ) diff --git a/ledger/sandbox/src/main/scala/platform/sandboxnext/Runner.scala b/ledger/sandbox/src/main/scala/platform/sandboxnext/Runner.scala index 408b88c9b190..44daaadcd69a 100644 --- a/ledger/sandbox/src/main/scala/platform/sandboxnext/Runner.scala +++ b/ledger/sandbox/src/main/scala/platform/sandboxnext/Runner.scala @@ -20,6 +20,7 @@ import com.daml.ledger.api.health.HealthChecks import com.daml.ledger.api.v1.version_service.{ CommandDeduplicationFeatures, DeduplicationPeriodSupport, + ParticipantDeduplicationSupport, } import com.daml.ledger.configuration.LedgerId import com.daml.ledger.on.sql.Database.InvalidDatabaseException @@ -324,7 +325,8 @@ class Runner(config: SandboxConfig) extends ResourceOwner[Port] { durationSupport = DeduplicationPeriodSupport.DurationSupport.DURATION_NATIVE_SUPPORT, ) - ) + ), + ParticipantDeduplicationSupport.PARTICIPANT_DEDUPLICATION_SUPPORTED, ), ) _ = apiServerServicesClosed.completeWith(apiServer.servicesClosed())