Skip to content

Commit c017cfd

Browse files
[main] Update 2025-11-04.22 (#399)
Reference commit: 98c1480bfc
1 parent b897965 commit c017cfd

File tree

261 files changed

+5262
-3513
lines changed

Some content is hidden

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

261 files changed

+5262
-3513
lines changed

UNRELEASED.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Canton CANTON_VERSION has been released on RELEASE_DATE.
44

55
## Summary
66

7+
78
_Write summary of release_
89

910
## What’s New
@@ -13,14 +14,19 @@ Template for a bigger topic
1314

1415
#### Background
1516
#### Specific Changes
17+
1618
#### Impact and Migration
1719

1820
### Minor Improvements
21+
- Ledger JSON Api changes:
22+
- extra fields in JSON objects are no longer tolerated,
23+
- All JSON values are optional by default upon decoding (this is not reflected in the openapi spec yet, but written comments should reflect the optionality),
1924
- ApiRequestLogger now also used by Ledger JSON Api. Changes:
2025
- Redundant Request TID removed from logs.
2126
- Additional CLI options added: `--log-access`, `--log-access-errors`...
2227
- Additional config options added: `debugInProcessRequests`, `prefixGrpcAddresses`
2328
- ParticipantRepairService.ExportAcsOld and ImportAcsOld are deprecated. Instead use ParticipantRepairService.ExportAcs and ImportAcs respectively as a direct replacement. For party replication use PartyManagementService.ExportPartyAcs and ImportPartyAcs instead.
29+
- Removed `packageDependencyCache` from `caching` configuration.
2430

2531
### Preview Features
2632
- preview feature
@@ -45,6 +51,19 @@ Template for a bigger topic
4551

4652
#### Recommendation
4753

54+
## Other changes
55+
56+
### Changes from NonNegativeLong to Long
57+
Some console commands using a NonNegativeLong for the offset are changed to accept a Long instead.
58+
Similarly, some console commands returning an offset now return a Long instead of a NonNegativeLong.
59+
It brings consistency and allows to pass the output of `participant.ledger_api.state.end()`.
60+
61+
Impacted commands:
62+
- `participant.repair.export_acs`
63+
- `participant.parties.find_party_max_activation_offset`
64+
- `participant.parties.find_party_max_deactivation_offset`
65+
- `participant.parties.find_highest_offset_by_timestamp`
66+
4867
## Compatibility
4968

5069
The following Canton protocol and Ethereum sequencer contract versions are supported:

community/admin-api/src/main/protobuf/com/digitalasset/canton/admin/participant/v30/synchronizer_connectivity.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ message RegisterSynchronizerRequest {
9898

9999
// Determines how well the provided sequencer connections should be validated before they are
100100
// persisted. The more paranoid the validation, the higher the chance of the command failing,
101-
// as it will require the sequencer to be online and responsive.
101+
// as it will require the sequencers to be online and responsive.
102102
com.digitalasset.canton.admin.sequencer.v30.SequencerConnectionValidation sequencer_connection_validation = 3;
103103
}
104104

@@ -141,7 +141,7 @@ message ConnectSynchronizerRequest {
141141

142142
// Determines how well the provided sequencer connections should be validated before they are
143143
// persisted. The more paranoid the validation, the higher the chance of the command failing,
144-
// as it will require the sequencer to be online and responsive.
144+
// as it will require the sequencers to be online and responsive.
145145
com.digitalasset.canton.admin.sequencer.v30.SequencerConnectionValidation sequencer_connection_validation = 2;
146146
}
147147

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class GrpcCtlRunner(
3939
def service(channel: ManagedChannel): command.Svc = {
4040
val baseService = command
4141
.createServiceInternal(channel)
42-
.withInterceptors(TraceContextGrpc.clientInterceptor)
42+
.withInterceptors(TraceContextGrpc.clientInterceptor())
4343
token.toList.foldLeft(baseService)(AuthCallCredentials.authorizingStub)
4444
}
4545
val client = GrpcClient.create(managedChannel, service)

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

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ object ParticipantAdminCommands {
561561
) extends GrpcAdminCommand[
562562
v30.GetHighestOffsetByTimestampRequest,
563563
v30.GetHighestOffsetByTimestampResponse,
564-
NonNegativeLong,
564+
Long,
565565
] {
566566
override type Svc = PartyManagementServiceStub
567567

@@ -586,15 +586,14 @@ object ParticipantAdminCommands {
586586

587587
override protected def handleResponse(
588588
response: v30.GetHighestOffsetByTimestampResponse
589-
): Either[String, NonNegativeLong] =
590-
NonNegativeLong.create(response.ledgerOffset).leftMap(_.toString)
589+
): Either[String, Long] = Right(response.ledgerOffset)
591590
}
592591

593592
final case class ExportPartyAcs(
594593
party: PartyId,
595594
synchronizerId: SynchronizerId,
596595
targetParticipantId: ParticipantId,
597-
beginOffsetExclusive: NonNegativeLong,
596+
beginOffsetExclusive: Long,
598597
waitForActivationTimeout: Option[config.NonNegativeFiniteDuration],
599598
observer: StreamObserver[v30.ExportPartyAcsResponse],
600599
) extends GrpcAdminCommand[
@@ -614,7 +613,7 @@ object ParticipantAdminCommands {
614613
party.toProtoPrimitive,
615614
synchronizerId.toProtoPrimitive,
616615
targetParticipantId.uid.toProtoPrimitive,
617-
beginOffsetExclusive.unwrap,
616+
beginOffsetExclusive,
618617
waitForActivationTimeout.map(_.toProtoPrimitive),
619618
)
620619
)
@@ -836,7 +835,7 @@ object ParticipantAdminCommands {
836835
final case class ExportAcs(
837836
parties: Set[PartyId],
838837
filterSynchronizerId: Option[SynchronizerId],
839-
offset: NonNegativeLong,
838+
offset: Long,
840839
observer: StreamObserver[v30.ExportAcsResponse],
841840
contractSynchronizerRenames: Map[SynchronizerId, SynchronizerId],
842841
excludedStakeholders: Set[PartyId],
@@ -856,7 +855,7 @@ object ParticipantAdminCommands {
856855
v30.ExportAcsRequest(
857856
parties.map(_.toProtoPrimitive).toSeq,
858857
filterSynchronizerId.map(_.toProtoPrimitive).getOrElse(""),
859-
offset.unwrap,
858+
offset,
860859
contractSynchronizerRenames.map { case (source, targetSynchronizerId) =>
861860
val target = v30.ExportAcsTargetSynchronizer(
862861
targetSynchronizerId.toProtoPrimitive
@@ -1746,6 +1745,8 @@ object ParticipantAdminCommands {
17461745
} yield synchronizerId -> receivedCmts
17471746
)
17481747
.map(_.toMap)
1748+
1749+
override def timeoutType: TimeoutType = DefaultUnboundedTimeout
17491750
}
17501751

17511752
final case class TimeRange(startExclusive: CantonTimestamp, endInclusive: CantonTimestamp)
@@ -1868,6 +1869,8 @@ object ParticipantAdminCommands {
18681869
} yield synchronizerId -> sentCmts
18691870
)
18701871
.map(_.toMap)
1872+
1873+
override def timeoutType: TimeoutType = DefaultUnboundedTimeout
18711874
}
18721875

18731876
final case class SentAcsCmt(
@@ -2146,6 +2149,8 @@ object ParticipantAdminCommands {
21462149
)
21472150
}
21482151
}.sequence
2152+
2153+
override def timeoutType: TimeoutType = ServerEnforcedTimeout
21492154
}
21502155
}
21512156

community/app-base/src/main/scala/com/digitalasset/canton/config/CantonConfig.scala

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ final case class CantonConfig(
524524
asyncWriter = sequencerNodeConfig.parameters.asyncWriter.toParameters,
525525
unsafeEnableOnlinePartyReplication =
526526
sequencerNodeConfig.parameters.unsafeEnableOnlinePartyReplication,
527-
streamLimits = sequencerNodeConfig.publicApi.stream,
527+
requestLimits = sequencerNodeConfig.publicApi.limits,
528528
)
529529
}
530530

@@ -671,6 +671,7 @@ private[canton] object CantonNodeParameterConverter {
671671
exitOnFatalFailures = parent.parameters.exitOnFatalFailures,
672672
watchdog = node.parameters.watchdog,
673673
startupMemoryCheckConfig = parent.parameters.startupMemoryCheckConfig,
674+
dispatchQueueBackpressureLimit = node.topology.dispatchQueueBackpressureLimit,
674675
)
675676

676677
def protocol(parent: CantonConfig, config: ProtocolConfig): CantonNodeParameters.Protocol =
@@ -1354,8 +1355,9 @@ object CantonConfig {
13541355
lazy implicit final val startupMemoryCheckConfigReader: ConfigReader[StartupMemoryCheckConfig] =
13551356
deriveReader[StartupMemoryCheckConfig]
13561357

1357-
lazy implicit final val streamLimitConfigReader: ConfigReader[StreamLimitConfig] =
1358-
deriveReader[StreamLimitConfig]
1358+
lazy implicit final val activeRequestLimitsConfigReader
1359+
: ConfigReader[ActiveRequestLimitsConfig] =
1360+
deriveReader[ActiveRequestLimitsConfig]
13591361

13601362
implicit val participantReplicationConfigReader: ConfigReader[ReplicationConfig] =
13611363
deriveReader[ReplicationConfig]
@@ -2022,8 +2024,9 @@ object CantonConfig {
20222024
lazy implicit final val startupMemoryCheckConfigWriter: ConfigWriter[StartupMemoryCheckConfig] =
20232025
deriveWriter[StartupMemoryCheckConfig]
20242026

2025-
lazy implicit final val streamLimitConfigWriter: ConfigWriter[StreamLimitConfig] =
2026-
deriveWriter[StreamLimitConfig]
2027+
lazy implicit final val activeRequestLimitsConfigWriter
2028+
: ConfigWriter[ActiveRequestLimitsConfig] =
2029+
deriveWriter[ActiveRequestLimitsConfig]
20272030

20282031
implicit val participantReplicationConfigWriter: ConfigWriter[ReplicationConfig] =
20292032
deriveWriter[ReplicationConfig]

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import cats.syntax.either.*
88
import cats.syntax.foldable.*
99
import com.digitalasset.canton.admin.api.client.commands.ParticipantAdminCommands
1010
import com.digitalasset.canton.admin.participant.v30.{ExportAcsOldResponse, ExportAcsResponse}
11-
import com.digitalasset.canton.config.RequireTypes.NonNegativeLong
1211
import com.digitalasset.canton.config.{ConsoleCommandTimeout, NonNegativeDuration}
1312
import com.digitalasset.canton.console.{
1413
AdminCommandRunner,
@@ -303,7 +302,7 @@ class ParticipantRepairAdministration(
303302
)
304303
def export_acs(
305304
parties: Set[PartyId],
306-
ledgerOffset: NonNegativeLong,
305+
ledgerOffset: Long,
307306
exportFilePath: String = "canton-acs-export.gz",
308307
excludedStakeholders: Set[PartyId] = Set.empty,
309308
synchronizerId: Option[SynchronizerId] = None,

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ class ParticipantPartiesAdministrationGroup(
934934
endOffsetInclusive: Option[Long] = None,
935935
completeAfter: PositiveInt = PositiveInt.MaxValue,
936936
timeout: NonNegativeDuration = timeouts.bounded,
937-
): NonNegativeLong = {
937+
): Long = {
938938
val filter = TopologyTxFiltering.getTopologyFilter(
939939
partyId,
940940
participantId,
@@ -999,7 +999,7 @@ class ParticipantPartiesAdministrationGroup(
999999
endOffsetInclusive: Option[Long] = None,
10001000
completeAfter: PositiveInt = PositiveInt.MaxValue,
10011001
timeout: NonNegativeDuration = timeouts.bounded,
1002-
): NonNegativeLong = {
1002+
): Long = {
10031003
val filter = TopologyTxFiltering.getTopologyFilter(
10041004
partyId,
10051005
participantId,
@@ -1025,7 +1025,7 @@ class ParticipantPartiesAdministrationGroup(
10251025
completeAfter: PositiveInt,
10261026
timeout: NonNegativeDuration,
10271027
filter: UpdateWrapper => Boolean,
1028-
): NonNegativeLong = {
1028+
): Long = {
10291029
val topologyTransactions: Seq[com.daml.ledger.api.v2.topology_transaction.TopologyTransaction] =
10301030
reference.ledger_api.updates
10311031
.topology_transactions(
@@ -1040,7 +1040,6 @@ class ParticipantPartiesAdministrationGroup(
10401040

10411041
topologyTransactions
10421042
.map(_.offset)
1043-
.map(NonNegativeLong.tryCreate)
10441043
.lastOption
10451044
.getOrElse(
10461045
consoleEnvironment.raiseError(
@@ -1080,7 +1079,7 @@ class ParticipantPartiesAdministrationGroup(
10801079
synchronizerId: SynchronizerId,
10811080
timestamp: Instant,
10821081
force: Boolean = false,
1083-
): NonNegativeLong = consoleEnvironment.run {
1082+
): Long = consoleEnvironment.run {
10841083
reference.adminCommand(
10851084
ParticipantAdminCommands.PartyManagement
10861085
.GetHighestOffsetByTimestamp(synchronizerId, timestamp, force)
@@ -1143,7 +1142,7 @@ class ParticipantPartiesAdministrationGroup(
11431142
party,
11441143
synchronizerId,
11451144
targetParticipantId,
1146-
NonNegativeLong.tryCreate(beginOffsetExclusive),
1145+
beginOffsetExclusive,
11471146
waitForActivationTimeout,
11481147
responseObserver,
11491148
)

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

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3387,7 +3387,8 @@ class TopologyAdministrationGroup(
33873387

33883388
object synchronizer_upgrade extends Helpful {
33893389

3390-
@Help.Summary("Inspect synchronizer migration announcements")
3390+
// TODO(#28972) Remove preview flag once LSU is stable
3391+
@Help.Summary("Inspect synchronizer migration announcements", FeatureFlag.Preview)
33913392
@Help.Group("Synchronizer Migration Announcement")
33923393
object announcement extends Helpful {
33933394
def list(
@@ -3446,28 +3447,29 @@ class TopologyAdministrationGroup(
34463447
synchronize: Option[config.NonNegativeDuration] = Some(
34473448
consoleEnvironment.commandTimeouts.unbounded
34483449
),
3449-
): SignedTopologyTransaction[TopologyChangeOp, SynchronizerUpgradeAnnouncement] = {
3450-
3451-
val mapping = SynchronizerUpgradeAnnouncement(
3452-
successorPhysicalSynchronizerId,
3453-
upgradeTime,
3454-
)
3450+
): SignedTopologyTransaction[TopologyChangeOp, SynchronizerUpgradeAnnouncement] =
3451+
// TODO(#28972) Remove preview flag once LSU is stable
3452+
check(FeatureFlag.Preview) {
3453+
val mapping = SynchronizerUpgradeAnnouncement(
3454+
successorPhysicalSynchronizerId,
3455+
upgradeTime,
3456+
)
34553457

3456-
consoleEnvironment.run {
3457-
adminCommand(
3458-
TopologyAdminCommands.Write.Propose(
3459-
mapping = mapping,
3460-
signedBy = signedBy.toList,
3461-
serial = serial,
3462-
change = TopologyChangeOp.Replace,
3463-
mustFullyAuthorize = mustFullyAuthorize,
3464-
forceChanges = ForceFlags.none,
3465-
store = store.getOrElse(successorPhysicalSynchronizerId.logical),
3466-
waitToBecomeEffective = synchronize,
3458+
consoleEnvironment.run {
3459+
adminCommand(
3460+
TopologyAdminCommands.Write.Propose(
3461+
mapping = mapping,
3462+
signedBy = signedBy.toList,
3463+
serial = serial,
3464+
change = TopologyChangeOp.Replace,
3465+
mustFullyAuthorize = mustFullyAuthorize,
3466+
forceChanges = ForceFlags.none,
3467+
store = store.getOrElse(successorPhysicalSynchronizerId.logical),
3468+
waitToBecomeEffective = synchronize,
3469+
)
34673470
)
3468-
)
3471+
}
34693472
}
3470-
}
34713473

34723474
@Help.Summary("Propose the revocation of a synchronizer migration announcement")
34733475
@Help.Description(
@@ -3502,27 +3504,29 @@ class TopologyAdministrationGroup(
35023504
synchronize: Option[config.NonNegativeDuration] = Some(
35033505
consoleEnvironment.commandTimeouts.unbounded
35043506
),
3505-
): SignedTopologyTransaction[TopologyChangeOp, SynchronizerUpgradeAnnouncement] = {
3506-
val mapping = SynchronizerUpgradeAnnouncement(
3507-
successorPhysicalSynchronizerId,
3508-
upgradeTime,
3509-
)
3507+
): SignedTopologyTransaction[TopologyChangeOp, SynchronizerUpgradeAnnouncement] =
3508+
// TODO(#28972) Remove preview flag once LSU is stable
3509+
check(FeatureFlag.Preview) {
3510+
val mapping = SynchronizerUpgradeAnnouncement(
3511+
successorPhysicalSynchronizerId,
3512+
upgradeTime,
3513+
)
35103514

3511-
consoleEnvironment.run {
3512-
adminCommand(
3513-
TopologyAdminCommands.Write.Propose(
3514-
mapping = mapping,
3515-
signedBy = signedBy.toList,
3516-
serial = serial,
3517-
change = TopologyChangeOp.Remove,
3518-
mustFullyAuthorize = mustFullyAuthorize,
3519-
forceChanges = ForceFlags.none,
3520-
store = store.getOrElse(successorPhysicalSynchronizerId.logical),
3521-
waitToBecomeEffective = synchronize,
3515+
consoleEnvironment.run {
3516+
adminCommand(
3517+
TopologyAdminCommands.Write.Propose(
3518+
mapping = mapping,
3519+
signedBy = signedBy.toList,
3520+
serial = serial,
3521+
change = TopologyChangeOp.Remove,
3522+
mustFullyAuthorize = mustFullyAuthorize,
3523+
forceChanges = ForceFlags.none,
3524+
store = store.getOrElse(successorPhysicalSynchronizerId.logical),
3525+
waitToBecomeEffective = synchronize,
3526+
)
35223527
)
3523-
)
3528+
}
35243529
}
3525-
}
35263530
}
35273531

35283532
object sequencer_successors extends Helpful {

0 commit comments

Comments
 (0)