Skip to content

Commit d240212

Browse files
[main] Update 2025-04-14.07 (#311)
Reference commit: d4a48308bb Co-authored-by: Canton <[email protected]>
1 parent 1f2db05 commit d240212

File tree

508 files changed

+11468
-9131
lines changed

Some content is hidden

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

508 files changed

+11468
-9131
lines changed

UNRELEASED.md

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,119 @@
33
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).
44
Please also consult the [full documentation of this release](https://docs.daml.com/CANTON_VERSION/canton/about.html).
55

6+
## Until 2025-04-16 (Exclusive)
7+
### `InvalidGivenCurrentSystemStateSeekAfterEnd` error category
8+
The description of existing error category `InvalidGivenCurrentSystemStateSeekAfterEnd` has been generalized.
9+
As such this error category now describes a failure due to requesting a resource using a parameter value that
10+
falls beyond the current upper bound (or 'end') defined by the system's state. For example, a request that asks
11+
for data at a ledger offset which is past the current ledger's end.
12+
13+
With this change, the error category `InvalidGivenCurrentSystemStateSeekAfterEnd` has also been marked as
14+
`retryable`. Because, it makes sense to retry a failed request assuming the system has progressed in the meantime.
15+
For example, new ledger entries have been added; and thus a previously requested ledger offset has become valid.
16+
17+
### Traffic fees
18+
A base event cost can now be added to every sequenced submission.
19+
The amount is controlled via a new optional field in the `TrafficControlParameters` called `base_event_cost`.
20+
If not set, the base event cost is 0.
21+
22+
### Acknowledgements
23+
Sequencers will now conflate acknowledgements coming from a participant within a time window.
24+
This means that if 2 or more acknowledgements from a given member get submitted during the window,
25+
only the first will be sequenced and the others will be discarded, until the window has elapsed.
26+
The conflate time window can be configured with a key in the sequencer configuration.
27+
Defaults to 45 seconds.
28+
29+
Example: `sequencers.sequencer1.acknowledgements-conflate-window = "1 minute"`
30+
31+
### BREAKING CHANGE: Automatic Node Initialization and Configuration
32+
33+
The node initialization has been modified to better support root namespace keys and using static identities
34+
for our documentation. Mainly, while before, we had the ``init.auto-init`` flag, we now support a bit more
35+
versatile configurations.
36+
37+
The config structure looks like this now:
38+
```
39+
canton.participants.participant.init = {
40+
identity = {
41+
type = auto
42+
identifier = {
43+
type = config // random // explicit(name)
44+
}
45+
}
46+
generate-intermediate-key = false
47+
generate-topology-transactions-and-keys = true
48+
}
49+
```
50+
51+
A manual identity can be specified via the GRPC API if the configuration is set to ``manual``.
52+
```
53+
identity = {
54+
type = manual
55+
}
56+
```
57+
58+
Alternatively, the identity can be defined in the configuration file, which is equivalent to an
59+
API based initialization using the ``external`` config:
60+
```
61+
identity = {
62+
type = external
63+
identifier = name
64+
namespace = "optional namespace"
65+
delegations = ["namespace delegation files"]
66+
}
67+
```
68+
69+
The old behaviour of ``auto-init = false`` (or ``init.identity = null``) can be recovered using
70+
```
71+
canton.participants.participant1.init = {
72+
generate-topology-transactions-and-keys = false
73+
identity.type = manual
74+
}
75+
```
76+
77+
This means that auto-init is now split into two parts: generating the identity and generating
78+
the subsequent topology transactions.
79+
80+
Additionally, the console command ``node.topology.init_id`` has been changed slightly too:
81+
It now supports additional parameters ``delegations`` and ``delegationFiles``. These can be used
82+
to specify the delegations that are necessary to control the identity of the node, which means that
83+
the ``init_id`` call combined with ``identity.type = manual`` is equivalent to the
84+
``identity.type = external`` in the config, except that one is declarative via the config, the
85+
other is interactive via the console. In addition, on the API level, the ``InitId`` request now expects
86+
the ``unique_identifier`` as its components, ``identifier`` and ``namespace``.
87+
88+
### Ledger API endpoint to submit-and-wait for reassignments
89+
- Added new endpoint SubmitAndWaitForReassignment to be able to submit a single composite reassignment command, and wait
90+
for the reassignment to be returned.
91+
- The SubmitAndWaitForReassignmentRequest message was added that contains the reassignment commands to be submitted and
92+
the event format that defines how the Reassignment will be presented.
93+
- The java bindings and the json api were extended accordingly.
94+
95+
### NamespaceDelegation can be restricted to a specific set of topology mappings
96+
- Added field `NamespaceDelegation.restricted_to_mappings` to restrict the target key of a namespace delegation to only be allowed
97+
to sign a set of topology mappings. See the documentation for the field in topology.proto.
98+
**BREAKING CHANGE**
99+
- The console command `topology.namespace_delegation.propose_delegation` was changed. The parameter `isRootDelegation: Boolean` is replaced with the parameter
100+
`delegationRestriction: DelegationRestriction`, which can be one of the following values:
101+
- `CanSignAllMappings`: This is equivalent to the previously known "root delegation", meaning that the target key of the delegation can be used
102+
to sign all topology mappings.
103+
- `CanSignAllButNamespaceDelegations`: This is equivalent to the previously known "non-root delegation", meaning that the target key of the delegation
104+
can be used to sign all topology mappings other than namespace delegations.
105+
- `CanSignSpecificMappings(TopologyMapping.Code*)`: The target key of the delegation can only be used to sign the specified mappings.
106+
6107
## Until 2025-04-08 (Exclusive)
108+
- Json API: openapi.yaml generated using 3.0.3 version of specification.
7109
- Json API: http response status codes are based on the corresponding gRPC errors where applicable.
8110
- Json API: `/v2/users` and `/v2/parties` now support paging
9111
- Json API: Updated openapi.yaml to correctly represent Timestamps as strings in the JSON API schema
112+
- Json API: Fields that are mapped to Option, Seq or Map in gRPC are no longer required (default to empty).
10113
- The package vetting ledger-effective-time boundaries change to validFrom being inclusive and validUntil being exclusive
11114
whereas previously validFrom was exclusive and validUntil was inclusive.
115+
- Ledger Metering has been removed. This involved
116+
- deleting MeteringReportService in the Ledger API
117+
- deleting /v2/metering endpoint in the JSON API
118+
- deleting the console ledger_api.metering.get_report command
12119

13120
### Ledger API topology transaction to represent addition for (party, participant)
14121
- The ParticipantAuthorizationAdded message was added to express the inception of a party in a participant.
@@ -17,6 +124,19 @@ Please also consult the [full documentation of this release](https://docs.daml.c
17124
state of the participant authorization (Added, Changed, Revoked)
18125
- The JSON api and the java bindings have changed accordingly to accommodate the changes.
19126

127+
### Ledger API interface query upgrading
128+
Streaming and pointwise queries support for smart contract upgrading:
129+
- Dynamic upgrading of interface filters: on a query for interface `iface`, the Ledger API will deliver events
130+
for all templates that can be upgraded to a template version that implements `iface`.
131+
The interface filter resolution is dynamic throughout a stream's lifetime: it is re-evaluated on each DAR upload.
132+
**Note**: No redaction of history: a DAR upload during an ongoing stream does not affect the already scanned ledger for the respective stream.
133+
If clients are interested in re-reading the history in light of the upgrades introduced by a DAR upload,
134+
the relevant portion of the ACS view of the client should be rebuilt by re-subscribing to the ACS stream
135+
and continuing from there with an update subscription for the interesting interface filter.
136+
- Dynamic upgrading of interface views: rendering of interface view values is adapted to use
137+
the latest infinitely-vetted (with no validUntil bound) package version of an interface instance.
138+
**Note**: For performance considerations, the selected version to be rendered for an interface instance is memoized
139+
per stream subscription and does not change as the vetting state evolves.
20140

21141
## Until 2025-04-05 (Exclusive)
22142
### Breaking: New External Signing Hashing Scheme
@@ -33,6 +153,7 @@ Support for `V1` has been dropped and will not be supported in Canton 3.3 onward
33153
This is relevant for applications that re-compute the hash client-side.
34154
Such applications must update their implementation in order to use the interactive submission service on Canton 3.3.
35155

156+
36157
## Until 2025-04-04 (Exclusive)
37158
### ACS Export and Import
38159
The ACS export and import now use an ACS snapshot containing LAPI active contracts, as opposed to the Canton internal

base/errors/src/main/scala/com/digitalasset/base/error/BaseError.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ trait BaseError extends LocationMixin {
5050
def resources: Seq[(ErrorResource, String)] = Seq()
5151

5252
def logWithContext(extra: Map[String, String] = Map())(implicit
53-
contextualizedErrorLogger: BaseErrorLogger
53+
errorLoggingContext: BaseErrorLogger
5454
): Unit =
55-
contextualizedErrorLogger.logError(this, extra)
55+
errorLoggingContext.logError(this, extra)
5656

5757
/** Returns retryability information of this particular error
5858
*

base/errors/src/main/scala/com/digitalasset/base/error/ErrorCategory.scala

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -332,20 +332,28 @@ object ErrorCategory {
332332
)
333333
with ErrorCategory
334334

335-
/** The supplied offset is out of range
335+
/** A failure due to requesting a resource using a parameter value that falls beyond the current
336+
* upper bound (or 'end') defined by the system's state.
336337
*/
337338
@Description(
338-
"""This error is only used by the Ledger API server in connection with invalid offsets."""
339+
"""The request failed because it resulted in an operation beyond the current upper bound (or 'end')
340+
|defined by the system's state. For example, supplying a ledger offset which is larger than the current
341+
|ledger end, or a record time that is in the future."""
342+
)
343+
@RetryStrategy(
344+
"""Wait and retry. For example, retry a limited number of times with potentially increasing backoff.
345+
|Hint: Inspect the retryable value of the error code to decide on the particular retry duration."""
339346
)
340-
@RetryStrategy("""Retry after application operator intervention.""")
341347
@Resolution(
342-
"""Expectation: this error is only used by the Ledger API server in connection with invalid offsets."""
348+
"""Resolution can occur naturally as the system progresses. The requested operation may become valid
349+
|eventually once the system's state has advanced further. For example, when new ledger entries are added.
350+
|If however the situation does not resolve as expected, operator intervention may be required."""
343351
)
344352
case object InvalidGivenCurrentSystemStateSeekAfterEnd
345353
extends ErrorCategoryImpl(
346354
grpcCode = Some(Code.OUT_OF_RANGE),
347355
logLevel = Level.INFO,
348-
retryable = None,
356+
retryable = Some(ErrorCategoryRetry(1.second)),
349357
redactDetails = false,
350358
asInt = 12,
351359
rank = 3,

base/errors/src/main/scala/com/digitalasset/base/error/ErrorResource.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ object ErrorResource {
1616
lazy val ContractIds: ErrorResource = ErrorResource("CONTRACT_IDS")
1717
lazy val ContractKey: ErrorResource = ErrorResource("CONTRACT_KEY")
1818
lazy val ContractArg: ErrorResource = ErrorResource("CONTRACT_ARG")
19+
lazy val CryptoValue: ErrorResource = ErrorResource("CRYPTO_VALUE")
1920
lazy val TransactionId: ErrorResource = ErrorResource("TRANSACTION_ID")
2021
lazy val UpdateId: ErrorResource = ErrorResource("UPDATE_ID")
2122
lazy val DalfPackage: ErrorResource = ErrorResource("PACKAGE")
@@ -45,6 +46,7 @@ object ErrorResource {
4546
ContractIds,
4647
ContractKey,
4748
ContractKeyHash,
49+
CryptoValue,
4850
DalfPackage,
4951
DevErrorType,
5052
ExceptionText,

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

Lines changed: 103 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ syntax = "proto3";
55

66
package com.digitalasset.canton.admin.participant.v30;
77

8+
import "google/protobuf/timestamp.proto";
9+
import "scalapb/scalapb.proto";
10+
811
/**
912
* The PartyManagementService allows modifying party hosting on participants.
1013
*/
@@ -14,14 +17,27 @@ service PartyManagementService {
1417
// Performs some checks synchronously and then starts the replication asynchronously.
1518
rpc AddPartyAsync(AddPartyAsyncRequest) returns (AddPartyAsyncResponse);
1619

20+
// Status endpoint that given an add_party_request_id returns status information about progress,
21+
// completion, or errors of a previous call to AddPartyAsync on the source or target
22+
// participant.
23+
//
24+
// Note that the status reflects the state as perceived by the local participant and does not
25+
// imply the state of remote participants. The status on the target participant is more
26+
// authoritative as the target participant drives the process of adding the party. For example
27+
// when the target participant status indicates "completed", the party has been added
28+
// successfully.
29+
rpc GetAddPartyStatus(GetAddPartyStatusRequest) returns (GetAddPartyStatusResponse);
30+
1731
// Export the ACS for the given parties from the participant
1832
rpc ExportAcs(ExportAcsRequest) returns (stream ExportAcsResponse);
1933
}
2034

2135
message AddPartyAsyncRequest {
36+
option (scalapb.message).companion_extends = "com.digitalasset.canton.version.AlphaProtoVersion";
37+
2238
// The party to replicate
2339
// Required
24-
string party_uid = 1;
40+
string party_id = 1;
2541
// The synchronizer in which to replicate the party
2642
// Required
2743
string synchronizer_id = 2;
@@ -36,8 +52,92 @@ message AddPartyAsyncRequest {
3652
}
3753

3854
message AddPartyAsyncResponse {
39-
// A identifier used to uniquely track add party activity
40-
string party_replication_id = 1;
55+
option (scalapb.message).companion_extends = "com.digitalasset.canton.version.AlphaProtoVersion";
56+
57+
// The identifier used to uniquely track the add party request.
58+
string add_party_request_id = 1;
59+
}
60+
61+
message GetAddPartyStatusRequest {
62+
option (scalapb.message).companion_extends = "com.digitalasset.canton.version.AlphaProtoVersion";
63+
64+
// The add party request ID returned by AddPartyAsync
65+
// Required
66+
string add_party_request_id = 1;
67+
}
68+
69+
message GetAddPartyStatusResponse {
70+
option (scalapb.message).companion_extends = "com.digitalasset.canton.version.AlphaProtoVersion";
71+
72+
string party_id = 1;
73+
string synchronizer_id = 2;
74+
string source_participant_uid = 3;
75+
string target_participant_uid = 4;
76+
77+
message Status {
78+
// The add-party request has been submitted by the target participant, or accepted by the
79+
// source participant.
80+
message ProposalProcessed {
81+
optional uint32 topology_serial = 1;
82+
}
83+
// The add-party request has been observed as agreed to by all participants.
84+
message AgreementAccepted {
85+
string sequencer_uid = 1;
86+
optional uint32 topology_serial = 2;
87+
}
88+
// The PartyToParticipant topology transaction has been authorized by all party and
89+
// participant signers.
90+
message TopologyAuthorized {
91+
string sequencer_uid = 1;
92+
uint32 topology_serial = 2;
93+
// The timestamp at which the ACS snapshot for replication is taken.
94+
google.protobuf.Timestamp timestamp = 3;
95+
}
96+
// The local participant has connected to the sequencer channel for ACS replication.
97+
message ConnectionEstablished {
98+
string sequencer_uid = 1;
99+
uint32 topology_serial = 2;
100+
google.protobuf.Timestamp timestamp = 3;
101+
}
102+
// The local participant is ready for ACS replication or has started replicating the ACS.
103+
message ReplicatingAcs {
104+
string sequencer_uid = 1;
105+
uint32 topology_serial = 2;
106+
google.protobuf.Timestamp timestamp = 3;
107+
uint32 contracts_replicated = 4;
108+
}
109+
// The local participant has completed its part of the ACS replication.
110+
message Completed {
111+
string sequencer_uid = 1;
112+
uint32 topology_serial = 2;
113+
google.protobuf.Timestamp timestamp = 3;
114+
uint32 contracts_replicated = 4;
115+
}
116+
// The add-party request has failed after the specified last successful status.
117+
message Error {
118+
string error_message = 1;
119+
Status status_prior_to_error = 2;
120+
}
121+
122+
oneof status {
123+
// Party Replication Daml admin workflow proposal and agreement handling
124+
ProposalProcessed proposal_processed = 1;
125+
AgreementAccepted agreement_accepted = 2;
126+
127+
// Topology management
128+
TopologyAuthorized topology_authorized = 3;
129+
130+
// Party Replication ACS replication
131+
ConnectionEstablished connection_established = 4;
132+
ReplicatingAcs replicating_acs = 5;
133+
Completed completed = 6;
134+
135+
// Error indicating that party replication has failed.
136+
Error error = 7;
137+
}
138+
}
139+
140+
Status status = 5;
41141
}
42142

43143
message ExportAcsTargetSynchronizer {

0 commit comments

Comments
 (0)