Release of Daml 2.2.0
Daml 2.2.0 has been released. You can install it using:
daml install 2.2.0
Summary
- Disallowed contract IDs in contract keys in the Daml language
- More accurate error reporting
- Early access: improved support for Daml interfaces in our client libraries
Impact and Migration
Contract IDs in contract keys currently cause runtime errors. They are now no longer allowed at compile time. If you were using them, the section below explains the migration path in detail.
An error code on the Canton shell sequence pruning command has been changed to ensure that error reporting is accurate. If you use the sequencer pruning command and have code that depends on specific error codes, please check the section below.
What's New
Disallowed contract IDs in contract keys in the Daml language
Background
Having contract IDs as part of a contract key will cause a runtime error. To mitigate the possibility of this happening, a compile-time check now prevents this from happening.
Specific Changes
- Implemented compile-time check disallowing
ContractId
types in contract key types. This check looks for potential problems with the contract key type only within the template's module.
Impact and Migration
This early feedback requires you to change Daml models to remove the contract ID from the contract key to make sure it compiles. Due to it causing a runtime error, the only impact on your application runtime is that the error can no longer happen.
More accurate error reporting
Background
Error reporting is extremely important to write robust applications that handle errors appropriately. As such, we took steps to make error reporting better reflect the state of the system.
Specific Changes
- The error code of the command
<sequencer>.pruning.prune_at
is now more accurate: if the given timestamp is unsafe to prune the gRPC status will beFAILED_PRECONDITION
instead ofINVALID_ARGUMENT
. - If the participant is overloaded, it will log a degradation warning. More precisely, if all incoming commands have been rejected for a duration specified by
<participant>.parameters.warnIfOverloadedFor
(which defaults to 20 seconds) due toPARTICIPANT_BACKPRESSURE
, the participant will log aPARTICIPANT_OVERLOADED
warning.
Impact and Migration
If you were using <sequencer>.pruning.prune_at
and relying on INVALID_ARGUMENT
as an error code when the timestamp is unsafe to prune, be sure to change your code to look for FAILED_PRECONDITION
.
Early access: improved support for Daml interfaces in our client libraries
Background
As part of our early access features, Daml interfaces receive constant updates. In this release, we took steps to ensure that end users can take full advantage of interfaces through our client libraries. Note that Daml interfaces are not stable yet and subject to changes in the future that may reflect on the client libraries and affect your application. Please check the release notes regularly for relevant updates until the feature is declared stable.
Specific Changes
- The JavaScript codegen supports templates implementing interfaces that are defined in separate modules. See https://github.com/digital-asset/daml/pull/13636.
- The Java codegen now generates methods to convert between template
ContractIds
and interfaceContractIds
.
Impact and Migration
Fully backward compatible changes.
Security and bug fixes
- In the Ledger API, the
ExercisedEvent
nodes used in theTransactionTree
streams containedchild_event_ids
in an incorrect order. Now the order corresponds to the order of child event execution. - The Java codegen now restricts its output to Daml definitions that are either directly or indirectly referred to as part of a template or interface (that is, only the types that can be seen over the Ledger API). See https://github.com/digital-asset/daml/pull/13324.
- We've fixed a bug in the participant that rarely causes the participant to refuse to reconnect to a domain and wrongly report that a ledger fork has happened.
Minor improvements
- We've improved the error message emitted due to misconfigurations of the Besu driver in order to provide better and clearer feedback to the user.
- We've improved the Besu driver configuration used in our Ethereum example.
- We've renamed the
query-wait-time
andinvoke-wait-time
in Fabric configuration toquery-wait-time-millis
andinvoke-wait-time-millis
respectively. These are expert settings and shouldn't be changed normally. - The current
<participant>.domains.connect_ha
command has been deprecated. We've added another one with a slightly different argument list in order to support backwards compatible future extensions. Users are encouraged to migrate to the new version of the command, but the previous command will remain available until the next major release. - Improvements to participant topology dispatching in order to support a larger number of parties on a participant node.