Skip to content

Commit e07d5ed

Browse files
[main] Update 2025-04-29.14 (#322)
Reference commit: eea1db8cc8
1 parent a7ca1d8 commit e07d5ed

File tree

308 files changed

+8700
-7753
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

308 files changed

+8700
-7753
lines changed

UNRELEASED.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# Release of Canton CANTON_VERSION
22

3-
## Until 2025-04-23 (Exclusive)
4-
- The error code `ABORTED_DUE_TO_SHUTDOWN` is now used instead of the (duplicate) error code `SERVER_IS_SHUTTING_DOWN` that was previously used.
5-
63
Canton CANTON_VERSION has been released on RELEASE_DATE. You can download the Daml Open Source edition from the Daml Connect [Github Release Section](https://github.com/digital-asset/daml/releases/tag/vCANTON_VERSION). The Enterprise edition is available on [Artifactory](https://digitalasset.jfrog.io/artifactory/canton-enterprise/canton-enterprise-CANTON_VERSION.zip).
74
Please also consult the [full documentation of this release](https://docs.daml.com/CANTON_VERSION/canton/about.html).
85

@@ -12,8 +9,37 @@ schedule, i.e. if you add an entry effective at or after the first
129
header, prepend the new date header that corresponds to the
1310
Wednesday after your change.
1411

15-
## Until 2025-04-23 (Exclusive)
12+
## Until 2025-04-30 (Exclusive)
13+
- JSON API - fixed openapi documentation for maps: (`eventsById`,`filtersByParty`).
14+
15+
### Changed return values in the console `grant` and `revoke` commands
16+
The console commands `ledger_api.users.rights.grant` and `ledger_api.users.rights.revoke`
17+
have been changed to return the complete state of current rights assigned to a user instead of
18+
the "delta" induced by the command. The previous behavior was counterintuitive and was a source
19+
of confusion that resulted in support tickets.
20+
21+
### BREAKING CHANGE: Per-synchronizer party allocation
22+
Console commands and API endpoints for allocating/enabling and removing/disabling parties now operate on a per-synchronizer basis.
23+
This means that party allocations must be done explicitly for each synchronizer, and that the participant
24+
must be connected to each synchronizer at the time of enabling or disabling the party.
25+
26+
The console commands `participant.parties.enable` and `participant.parties.disable` have a new parameter `synchronizer: Option[SynchronizerAlias]`
27+
that specifies on which synchronizer the party should be enabled or disabled. The parameter can be "omitted" or set to `None`, if the participant
28+
is connected to only one synchronizer. The parameter `waitForSynchronizer: SynchronizerChoice` has been removed.
1629

30+
The console command `participant.ledger_api.parties.allocate` has a new parameter `synchronizer_id` for specifying the target synchronizer for the party allocation.
31+
Similar to the parameter for the other console commands, this parameter can be omitted if the participant is connected to only one synchronizer.
32+
33+
The Ledger API request `PartyManagementService.AllocatePartyRequest` now has a new field `string synchronizer_id` for specifying the target synchronizer of the party allocation.
34+
Similar to the parameter for the console commands, this parameter can be omitted if the participant is connected to only a one synchronizer.
35+
36+
If the synchronizer parameter is not specified and the participant is connected to multiple synchronizers, the request fails with the error `PARTY_ALLOCATION_CANNOT_DETERMINE_SYNCHRONIZER`.
37+
If the participant is not connected to any synchronizer, the request fails with the error `PARTY_ALLOCATION_WITHOUT_CONNECTED_SYNCHRONIZER`.
38+
39+
The authorized store can still be used to store `PartyToParticipant` topology transactions, but users are discouraged from doing so.
40+
41+
## Until 2025-04-23 (Exclusive)
42+
- The error code `ABORTED_DUE_TO_SHUTDOWN` is now used instead of the (duplicate) error code `SERVER_IS_SHUTTING_DOWN` that was previously used.
1743

1844
- JSON API - changed encoding for protobuf based enums.
1945
Following types are now encoded as strings:

community/app-base/src/main/scala/com/digitalasset/canton/admin/api/client/commands/LedgerApiCommands.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,13 +210,15 @@ object LedgerApiCommands {
210210
partyIdHint: String,
211211
annotations: Map[String, String],
212212
identityProviderId: String,
213+
synchronizerId: String,
213214
) extends BaseCommand[AllocatePartyRequest, AllocatePartyResponse, PartyDetails] {
214215
override protected def createRequest(): Either[String, AllocatePartyRequest] =
215216
Right(
216217
AllocatePartyRequest(
217218
partyIdHint = partyIdHint,
218219
localMetadata = Some(ObjectMeta(resourceVersion = "", annotations = annotations)),
219220
identityProviderId = identityProviderId,
221+
synchronizerId = synchronizerId,
220222
)
221223
)
222224
override protected def submitRequest(

community/app-base/src/main/scala/com/digitalasset/canton/admin/api/client/commands/TopologyAdminCommands.scala

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ import com.digitalasset.canton.topology.*
2020
import com.digitalasset.canton.topology.admin.grpc.{BaseQuery, TopologyStoreId}
2121
import com.digitalasset.canton.topology.admin.v30
2222
import com.digitalasset.canton.topology.admin.v30.*
23-
import com.digitalasset.canton.topology.admin.v30.AuthorizeRequest.Type.{Proposal, TransactionHash}
23+
import com.digitalasset.canton.topology.admin.v30.AuthorizeRequest.Type.{
24+
Proposal,
25+
TransactionHashBytes,
26+
}
2427
import com.digitalasset.canton.topology.admin.v30.IdentityInitializationServiceGrpc.IdentityInitializationServiceStub
2528
import com.digitalasset.canton.topology.admin.v30.TopologyAggregationServiceGrpc.TopologyAggregationServiceStub
2629
import com.digitalasset.canton.topology.admin.v30.TopologyManagerReadServiceGrpc.TopologyManagerReadServiceStub
@@ -912,7 +915,7 @@ object TopologyAdminCommands {
912915
}
913916

914917
final case class Authorize[M <: TopologyMapping: ClassTag](
915-
transactionHash: String,
918+
transactionHash: ByteString,
916919
mustFullyAuthorize: Boolean,
917920
signedBy: Seq[Fingerprint],
918921
store: TopologyStoreId,
@@ -925,7 +928,7 @@ object TopologyAdminCommands {
925928

926929
override protected def createRequest(): Either[String, AuthorizeRequest] = Right(
927930
AuthorizeRequest(
928-
TransactionHash(transactionHash),
931+
TransactionHashBytes(transactionHash),
929932
mustFullyAuthorize = mustFullyAuthorize,
930933
forceChanges = Seq.empty,
931934
signedBy = signedBy.map(_.toProtoPrimitive),

community/app-base/src/main/scala/com/digitalasset/canton/console/ConsoleEnvironment.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,8 @@ object ConsoleEnvironment {
551551
SynchronizerAlias.tryCreate(alias)
552552
implicit def toSynchronizerAliases(aliases: Seq[String]): Seq[SynchronizerAlias] =
553553
aliases.map(SynchronizerAlias.tryCreate)
554+
implicit def toSomeSynchronizerAlias(alias: SynchronizerAlias): Option[SynchronizerAlias] =
555+
Some(alias)
554556

555557
implicit def toInstanceName(name: String): InstanceName = InstanceName.tryCreate(name)
556558

community/app-base/src/main/scala/com/digitalasset/canton/console/GrpcAdminCommandRunner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ class GrpcAdminCommandRunner(
8080
case _ => awaitTimeout
8181
}
8282

83+
logger.debug(s"Running command $command on $instanceName against $clientConfig")
8384
val resultET = for {
8485
_ <- {
8586
channels.get((instanceName, clientConfig.address, clientConfig.port)) match {
@@ -104,7 +105,6 @@ class GrpcAdminCommandRunner(
104105
}
105106
}
106107
channel = getOrCreateChannel(instanceName, clientConfig)
107-
_ = logger.debug(s"Running command $command on $instanceName against $clientConfig")
108108
result <- grpcRunner.run(
109109
instanceName,
110110
command,

community/app-base/src/main/scala/com/digitalasset/canton/console/RepairMacros.scala

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -486,14 +486,17 @@ class RepairMacros(override val loggerFactory: NamedLoggerFactory)
486486
partyId: PartyId,
487487
synchronize: Boolean,
488488
)(implicit env: ConsoleEnvironment): Unit = {
489-
// remove any topology transaction that points to source participant
490-
sourceParticipant.topology.party_to_participant_mappings
491-
.propose_delta(
492-
partyId,
493-
removes = List(sourceParticipant.id),
494-
forceFlags = ForceFlags(DisablePartyWithActiveContracts),
495-
)
496-
.discard
489+
sourceParticipant.synchronizers.list_connected().foreach { synchronizer =>
490+
// remove any topology transaction that points to source participant
491+
sourceParticipant.topology.party_to_participant_mappings
492+
.propose_delta(
493+
partyId,
494+
removes = List(sourceParticipant.id),
495+
forceFlags = ForceFlags(DisablePartyWithActiveContracts),
496+
store = synchronizer.synchronizerId,
497+
)
498+
.discard
499+
}
497500
if (synchronize) {
498501
// there's a gap between having received the transaction, but it hasn't been fully processed yet,
499502
// so the node status will return that the node is idle, when that's not really the case.

community/app-base/src/main/scala/com/digitalasset/canton/console/commands/LedgerApiAdministration.scala

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1542,19 +1542,24 @@ trait BaseLedgerApiAdministration extends NoTracing with StreamingCommandHelper
15421542
"""Allocates a new party on the ledger.
15431543
party: a hint for generating the party identifier
15441544
annotations: key-value pairs associated with this party and stored locally on this Ledger API server
1545-
identityProviderId: identity provider id"""
1545+
identityProviderId: identity provider id
1546+
synchronizerId: The synchronizer on which the party should be allocated.
1547+
The participant must be connected to the synchronizer.
1548+
The parameter may be omitted if the participant is connected to only one synchronizer."""
15461549
)
15471550
def allocate(
15481551
party: String,
15491552
annotations: Map[String, String] = Map.empty,
15501553
identityProviderId: String = "",
1554+
synchronizerId: String = "",
15511555
): PartyDetails = {
15521556
val proto = check(FeatureFlag.Testing)(consoleEnvironment.run {
15531557
ledgerApiCommand(
15541558
LedgerApiCommands.PartyManagementService.AllocateParty(
15551559
partyIdHint = party,
15561560
annotations = annotations,
15571561
identityProviderId = identityProviderId,
1562+
synchronizerId = synchronizerId,
15581563
)
15591564
)
15601565
})
@@ -2071,6 +2076,13 @@ trait BaseLedgerApiAdministration extends NoTracing with StreamingCommandHelper
20712076
identityProviderId = identityProviderId,
20722077
readAsAnyParty = readAsAnyParty,
20732078
)
2079+
).flatMap(_ =>
2080+
ledgerApiCommand(
2081+
LedgerApiCommands.Users.Rights.List(
2082+
id = id,
2083+
identityProviderId = identityProviderId,
2084+
)
2085+
)
20742086
)
20752087
})
20762088

@@ -2104,6 +2116,13 @@ trait BaseLedgerApiAdministration extends NoTracing with StreamingCommandHelper
21042116
identityProviderId = identityProviderId,
21052117
readAsAnyParty = readAsAnyParty,
21062118
)
2119+
).flatMap(_ =>
2120+
ledgerApiCommand(
2121+
LedgerApiCommands.Users.Rights.List(
2122+
id = id,
2123+
identityProviderId = identityProviderId,
2124+
)
2125+
)
21072126
)
21082127
})
21092128

0 commit comments

Comments
 (0)