Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,6 @@ message MigrateSynchronizerRequest {
message MigrateSynchronizerResponse {}

message ExportAcsOldRequest {
message TargetSynchronizer {
// The ID of the synchronizer where the contract is supposed to be assigned when the export is being imported
string synchronizer_id = 1;
// The protocol version associated to the synchronizer where the contract is supposed to be assigned when the contracts snapshot is being imported
int32 protocol_version = 2;
}

// The parties for which the ACS should be exported
// Required
repeated string parties = 1;
Expand All @@ -136,7 +129,7 @@ message ExportAcsOldRequest {
// ID in the key will be assigned to the synchronizer id and protocol version in the value. This is not a proper synchronizer
// migration of contracts and it's supposed to be used only in exceptional cases.
// Optional, if not provided the contracts will be exported with the same synchronizer id as they are currently assigned
map<string, TargetSynchronizer> contract_synchronizer_renames = 4;
reserved 4; // was map<string, TargetSynchronizer> contract_synchronizer_renames

// If true, do not check whether the provided timestamp is clean (see `timestamp` field).
// NOT FOR PRODUCTION USE.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ import com.daml.ledger.api.v2.command_submission_service.{
}
import com.daml.ledger.api.v2.commands.{Command, Commands, DisclosedContract, PrefetchContractKey}
import com.daml.ledger.api.v2.completion.Completion
import com.daml.ledger.api.v2.crypto as lapicrypto
import com.daml.ledger.api.v2.event.CreatedEvent
import com.daml.ledger.api.v2.event_query_service.EventQueryServiceGrpc.EventQueryServiceStub
import com.daml.ledger.api.v2.event_query_service.{
EventQueryServiceGrpc,
GetEventsByContractIdRequest,
GetEventsByContractIdResponse,
}
import com.daml.ledger.api.v2.interactive.interactive_submission_service as iss
import com.daml.ledger.api.v2.interactive.interactive_submission_service.InteractiveSubmissionServiceGrpc.InteractiveSubmissionServiceStub
import com.daml.ledger.api.v2.interactive.interactive_submission_service.{
ExecuteSubmissionAndWaitForTransactionRequest,
Expand Down Expand Up @@ -308,11 +308,11 @@ object LedgerApiCommands {
onboardingTransactions = transactions.map { case (transaction, signatures) =>
AllocateExternalPartyRequest.SignedTransaction(
transaction.getCryptographicEvidence,
signatures.map(_.toProtoV30.transformInto[iss.Signature]),
signatures.map(_.toProtoV30.transformInto[lapicrypto.Signature]),
)
},
multiHashSignatures =
multiHashSignatures.map(_.toProtoV30.transformInto[iss.Signature]),
multiHashSignatures.map(_.toProtoV30.transformInto[lapicrypto.Signature]),
identityProviderId = "",
)
)
Expand Down Expand Up @@ -1581,6 +1581,7 @@ object LedgerApiCommands {
packageIdSelectionPreference: Seq[LfPackageId],
verboseHashing: Boolean,
prefetchContractKeys: Seq[PrefetchContractKey],
maxRecordTime: Option[CantonTimestamp],
) extends BaseCommand[
PrepareSubmissionRequest,
PrepareSubmissionResponse,
Expand All @@ -1604,6 +1605,7 @@ object LedgerApiCommands {
packageIdSelectionPreference = packageIdSelectionPreference,
verboseHashing = verboseHashing,
prefetchContractKeys = prefetchContractKeys,
maxRecordTime = maxRecordTime.map(_.toProtoTimestamp),
)
)

Expand Down Expand Up @@ -1638,13 +1640,12 @@ object LedgerApiCommands {

import com.digitalasset.canton.crypto.LedgerApiCryptoConversions.*
import io.scalaland.chimney.dsl.*
import com.daml.ledger.api.v2.interactive.interactive_submission_service as iss

private def makePartySignatures: PartySignatures = PartySignatures(
transactionSignatures.map { case (party, signatures) =>
SinglePartySignatures(
party = party.toProtoPrimitive,
signatures = signatures.map(_.toProtoV30.transformInto[iss.Signature]),
signatures = signatures.map(_.toProtoV30.transformInto[lapicrypto.Signature]),
)
}.toSeq
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ import com.digitalasset.canton.topology.{
}
import com.digitalasset.canton.tracing.TraceContext
import com.digitalasset.canton.util.{BinaryFileUtil, GrpcStreamingUtils, OptionUtil, PathUtils}
import com.digitalasset.canton.version.ProtocolVersion
import com.digitalasset.canton.{ReassignmentCounter, SequencerCounter, SynchronizerAlias, config}
import com.google.protobuf.ByteString
import com.google.protobuf.timestamp.Timestamp
Expand Down Expand Up @@ -727,7 +726,6 @@ object ParticipantAdminCommands {
filterSynchronizerId: Option[SynchronizerId],
timestamp: Option[Instant],
observer: StreamObserver[v30.ExportAcsOldResponse],
contractSynchronizerRenames: Map[SynchronizerId, (SynchronizerId, ProtocolVersion)],
force: Boolean,
) extends GrpcAdminCommand[
v30.ExportAcsOldRequest,
Expand All @@ -746,15 +744,6 @@ object ParticipantAdminCommands {
parties.map(_.toLf).toSeq,
filterSynchronizerId.map(_.toProtoPrimitive).getOrElse(""),
timestamp.map(Timestamp.apply),
contractSynchronizerRenames.map {
case (source, (targetSynchronizerId, targetProtocolVersion)) =>
val targetSynchronizer = v30.ExportAcsOldRequest.TargetSynchronizer(
synchronizerId = targetSynchronizerId.toProtoPrimitive,
protocolVersion = targetProtocolVersion.toProtoPrimitive,
)

(source.toProtoPrimitive, targetSynchronizer)
},
force = force,
partiesOffboarding = partiesOffboarding,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,8 @@ final case class CantonConfig(
automaticallyPerformLogicalSynchronizerUpgrade =
participantParameters.automaticallyPerformLogicalSynchronizerUpgrade,
reassignmentsConfig = participantParameters.reassignmentsConfig,
doNotAwaitOnCheckingIncomingCommitments =
participantParameters.doNotAwaitOnCheckingIncomingCommitments,
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ trait BaseLedgerApiAdministration extends NoTracing with StreamingCommandHelper
userPackageSelectionPreference: Seq[LfPackageId] = Seq.empty,
verboseHashing: Boolean = false,
prefetchContractKeys: Seq[PrefetchContractKey] = Seq.empty,
maxRecordTime: Option[CantonTimestamp] = None,
): PrepareResponseProto =
consoleEnvironment.run {
ledgerApiCommand(
Expand All @@ -688,6 +689,7 @@ trait BaseLedgerApiAdministration extends NoTracing with StreamingCommandHelper
userPackageSelectionPreference,
verboseHashing,
prefetchContractKeys,
maxRecordTime,
)
)
}
Expand Down Expand Up @@ -2465,6 +2467,7 @@ trait BaseLedgerApiAdministration extends NoTracing with StreamingCommandHelper
userPackageSelectionPreference: Seq[LfPackageId] = Seq.empty,
verboseHashing: Boolean = false,
prefetchContractKeys: Seq[javab.data.PrefetchContractKey] = Seq.empty,
maxRecordTime: Option[CantonTimestamp] = None,
): PrepareResponseProto =
consoleEnvironment.run {
ledgerApiCommand(
Expand All @@ -2480,6 +2483,7 @@ trait BaseLedgerApiAdministration extends NoTracing with StreamingCommandHelper
userPackageSelectionPreference,
verboseHashing,
prefetchContractKeys.map(k => PrefetchContractKey.fromJavaProto(k.toProto)),
maxRecordTime,
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ class ParticipantRepairAdministration(
outputFile: String = ParticipantRepairAdministration.ExportAcsDefaultFile,
filterSynchronizerId: Option[SynchronizerId] = None,
timestamp: Option[Instant] = None,
contractSynchronizerRenames: Map[SynchronizerId, (SynchronizerId, ProtocolVersion)] =
Map.empty,
force: Boolean = false,
timeout: NonNegativeDuration = timeouts.unbounded,
): Unit =
Expand All @@ -211,7 +209,6 @@ class ParticipantRepairAdministration(
filterSynchronizerId,
timestamp,
responseObserver,
contractSynchronizerRenames,
force = force,
)
)
Expand Down
Loading
Loading