Skip to content

Releases: digital-asset/daml

v0.13.56-snapshot.20200404.3816.0.30f2c742

04 Apr 18:07
30f2c74
Compare
Choose a tag to compare
Only publish protobuf zip from Linux (#5438)

Last release attempt failed because when we tried to publish it from
macos it was already published from Linux.

Also includes a fix for the name of the zip.

changelog_begin
changelog_end

v0.13.56-snapshot.20200331.3729.0.b43b8d86

01 Apr 07:33
b43b8d8
Compare
Choose a tag to compare

This is a snapshot release. Use at your own risk.

v0.13.56-snapshot.20200325.3626.0.a3ddde3a

25 Mar 18:02
a3ddde3
Compare
Choose a tag to compare

This is a snapshot release. Use at your own risk.

v0.13.56-snapshot.20200318.3529.0.6ea118d6

18 Mar 13:41
6ea118d
Compare
Choose a tag to compare

This is a snapshot release. Use at your own risk.

v0.13.55

18 Mar 12:14
6f8c3ad
Compare
Choose a tag to compare

0.13.55 - 2020-03-18

Summary

  • DAML Script is officially supported
    • Action required by April 2020 if you use scenarios for Sandbox initialization
  • DAML Repl is available as an experimental feature
  • Support for cross-SDK DAR Dependencies and Contract Upgrades
    • Action required to mitigate an upcoming restriction to DAML type naming
  • Improved daml.yaml features
  • More consistent APIs regarding contract visibility
    • Potentially breaking change that is unlikely to affect any existing DAML applications
  • New command deduplication feature
    • Action required by April 2020 if you rely on maximum record time for command deduplication
  • Security improvement
    • Immediate action required to make SDK components continue to listen on external network interface

What's New

DAML Script - A better way to initialize and test your ledger

Background

Being able to script the interaction with a DAML ledger is useful for testing, application initialization, and even one-off operations in production use. DAML scenarios cover a subset of those uses: Realtime testing and feedback in the IDE and ledger initialization in the Sandbox in static time mode. The main drawback of scenarios is that outside of the IDE, they only work with the Sandbox in static time mode and only during ledger initialisation. We have, therefore, built DAML Script, which generalizes the concepts behind Scenarios to work for any DAML Ledger, at any time. Going forward, we will deprecate ledger initialization based on Scenarios, and we recommend users to start using DAML Script now.

Specific Changes

  • DAML Script is no longer experimental
  • daml.yaml now supports the specification of an initialization script via the init-script field, which is analogous to the scenario field.
  • DAML Script now works against ledgers with authentication with tokens passed in via the --access-token-file flag
  • DAML Sandbox now shows a deprecation warning if a scenario is used for initialization

Impact and Migration

Scenarios for Sandbox initialization will no longer be supported with the next SDK release in April 2020, but will continue to be supported for DAML model testing in the IDE and command line. If you are using a scenario to initialize the Sandbox today, we recommend migrating that to a DAML script. DAML Script has similar syntax to Scenarios. Take a look at the documentation for instructions on how to migrate from scenarios to DAML script.

Experimental: DAML Repl - Interactive DAML Script

Background

We are introducing an interactive read-eval-print-loop (REPL) for interacting with a DAML ledger. This feature is analogous to using an interactive shell session to examine and change the data in a relational database. It is based on DAML Script and allows accessing all functions from your DAML code. We encourage you to test this feature and provide feedback. It is still marked as experimental, so we can incorporate your feedback effectively and efficiently.

Specific Changes

  • Introduction of the daml repl cli command

Impact and Migration

DAML Repl is an entirely new feature, and no changes to existing projects are needed. Please refer to the docs for more information on this new functionality.

DAML-LF 1.8 brings cross-SDK upgrades and data dependencies

Background

One of DAML's unique features is that the clear data ownership based on signatories allows for clean contract upgrades directly from within DAML. So far, this required SDK versions of the original and the new DAML contracts to be equal, a limitation that we obviously wanted to lift. This release lifts this restriction and adds support for contract migrations across SDK versions thanks to adding support for data-dependencies in daml.yaml.

dependencies and data-dependencies are source and binary dependencies respectively. dependencies should be used to include any libraries (e.g. the DAML Standard Library) that are always deployed together with the project, whereas data-dependencies should be used for any dependencies that are independently deployable, for example the DAML Finance Library, or applications already running on the target ledger.

Specific Changes

  • daml.yaml now supports a section for data-dependencies in addition to dependencies
  • The already deprecated daml migrate command has been removed
  • Data constructors for record types have to be the same as the type name.

Impact and Migration

To make use of this feature, DAML projects have to be compiled to DAML-LF 1.8. The current default is still 1.7, and so this has to be done by passing in the flag --target=1.8. Detailed information on the upgrading and dependency functionality can be found in the docs.
Data constructors that don’t match record type names have to be renamed. For example, if you had a record type data Foo = Bar with .., you need to change it to data Foo = Foo with ...

More functionality in daml.yaml

Background

The project file daml.yaml should tell the DAML Assistant CLI everything it needs to know to set up a test environment using daml start. However, until this release, there were certain Sandbox, Navigator, and HTTP JSON API settings that needed to be set through additional command line flags. These can now be set using sandbox-options, navigator-options and json-api-options sections in daml.yaml.

Specific Changes

  • Items under the sandbox-options, navigator-options and json-api-options sections in daml.yaml are picked up by daml start and passed to the respective components.

Impact and Migration

Command line arguments like daml start --sandbox-option="--wall-clock-time" will keep working as before, but you can now simplify your CLI usage moving them into daml.yaml.

Cleanup of some API services and components

Background

Privacy is one of DAML's primary concerns, with visibility of data usually constrained to signatories and observers of contracts. However, there are two well-documented and controlled mechanisms through which non-observers can learn about contracts: Divulgence and Witnessing.

Whether events or contracts that are known due to those mechanisms are shown in APIs or tools used to be inconsistent and led to oddities such as the Navigator showing assets that had been transferred. This change addresses these inconsistencies and ensures divulged and witnessed contracts are only included in APIs returning transaction trees.

Specific Changes

  • The Flat Transaction Service and Active Contract Service no longer include divulged and witnessed contracts
  • The JSON API no longer includes divulged and witnessed contracts
  • The Extractor no longer stores divulged and witnessed contracts and the column contract.witness_parties has been renamed to contract.stakeholders.

Impact and Migration

Applications are unlikely to be accidentally relying on the current behaviour so there is probably little to no impact on existing DAML applications. In general, if you want to share data on a DAML ledger, we recommend using the observer mechanism or sharing it in dedicated sharing contracts as highlighted in the Broadcast Example.

New Command Deduplication Mechanism

Background

For certain applications, it is crucially important that commands will not be processed twice, even if application or ledger components crash or network links fail. The new command deduplication mechanism gives a way to achieve that.

The previous mechanism based on Maximum Record Time (MRT) and Checkpoints on the CompletionStream was difficult to use in practice and didn’t generalise to ledgers without a linearly ordered record time. The new mechanism is designed to replace the old one over the course of the next DAML SDK releases.

Specific Changes

  • The Command and CommandSubmission services add a deduplication_time parameter to commands during which no second command with the commandId can be submitted.

Impact and Migration

The maximum record time based mechanism for command deduplication is now deprecated and will be removed with the next SDK release. We recommend switching from the MRT-based mechanism to deduplication_time based one. Detailed documentation here.

Minor Improvements

  • JSON API

    • The JSON API has a new /v1/create-and-exercise endpoint that allows the submission of commands creating a contract and then immediately exercising a choice on it.

    • The experimental websocket streaming version no longer sends a {"live": true} marker to indicate live data is starting. Instead, live data is indicated by the presence of an offset.

    • The /v1/parties endpoint now allows POST requests, which expect a JSON array of party identifiers as input, and returns the corresponding party details.

  • Language

    • The pragma daml 1.2 is now optional. This is in preparation for DAML SDK 1.0 from which time on the language won’t be versioned independently from the SDK.
  • Ledgers

    • Rejected submissions are now logged at a lower "INFO" level to remove a source of warnings/errors without relation to server health.

    • The Sandbox c...

Read more

v0.13.55-snapshot.20200309.3401.0.6f8c3ad8

09 Mar 20:52
6f8c3ad
Compare
Choose a tag to compare

This is a snapshot release. Use at your own risks.

v0.13.55-snapshot.20200304.3329.6a1c75cf

04 Mar 15:23
6a1c75c
Compare
Choose a tag to compare

This is a snapshot release. Use at your own risks.

v0.13.55-snapshot.20200226.3267.c9b9293d

27 Feb 17:06
c9b9293
Compare
Choose a tag to compare

This is a snapshot release. Use at your own risks.

Note: this was made primarily to test out our new release infrastructure. The process did not fully complete and as a result the Windows installer is not signed. You can still verify the (external) signature file we provide to confirm the provenance of the artifact you download, but, depending on your security settings, Windows may refuse to run it.

v0.13.54

20 Feb 18:01
820563b
Compare
Choose a tag to compare

Sandbox

  • Removed the warnings regarding static time and scenarios on
    initialization. We will not deprecate these until we have a stable
    alternative.
  • If no ledger ID is provided when running against an existing ledger,
    use the existing ID. Previously, Sandbox would fail to start.

DAML Standard Library

  • Add subtractDays to the DAML Standard Library.

Release 0.13.53 - 2020-02-19

19 Feb 15:54
f22ea41
Compare
Choose a tag to compare

DAML Stdlib

  • Restrict the (>>) operator to instances of Action and make it lazy in its second argument. This gives expressions of the form do A; B the desirable semantics of only running B when A is a successful action.

  • Remove the Action and ActionFail instances for Validation in DA.Validation. Please enable the ApplicativeDo language extension if you want to use Validation with do-notation and replace fail with DA.Validation.invalid.

DAML Ledger Integration Kit

  • Enforce that all parties referenced as stakeholders, actors, or maintainers in a transaction have been allocated.

  • Ledger API Test Tool default tests modified. Use --list for the updated list of default tests. Time service test dropped from the suite.

Sandbox

  • Static time mode is being deprecated in the future. A warning has been added to notify users of this fact.

  • Scenarios for ledger initialization are being deprecated in the future, in favor of DAML Script. A warning has been added to notify users of this fact. Scenarios can still be used for testing in DAML studio.

  • Participant index contract lookups simplified. This should speed up command interpretation.

  • If authentication is enabled, requests without a valid authentication are going to be rejected with an UNAUTHENTICATED return code instead of PERMISSION_DENIED.

JSON API - Experimental

  • Add {"live": true} to WebSocket streams to mark the beginning of "live" data. See #4461. This marker is a placeholder feature; issue #4509 bookmarks in query streams will obsolete this marker, after which it will no longer be emitted. When building features on the marker, be aware of this forthcoming replacement.

DAML Standard Library

  • Add a subtract function which is useful as a replacement for sections of (-), e.g., subtract 1 is equivalent to \x -> x - 1.