All Versions
31
Latest Version
Avg Release Cycle
15 days
Latest Release
1255 days ago

Changelog History
Page 2

  • v0.13.55 Changes

    March 18, 2020

    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 can now produce random ContractIds consistent with other ledger implementations. This can be activated using the flags --contract-id-seeding=weak or --contract-id-seeding=strong. The weak version uses a less safe, non-blocking random number source.

    πŸ”’ Security

    0️⃣ All services now bind to localhost (127.0.0.1) instead to all interfaces (0.0.0.0). This default can be overridden using command line flags:

    - `daml sandbox --address 0.0.0.0`
    - `daml navigator 0.0.0.0 6865`
    - `daml json-api --address 0.0.0.0`
    

    What's Next

    πŸš€ We are working towards the first stable DAML SDK release in April. The majority of work between now and then amounts to tidying up, cleaning up UX issues, reducing architectural debt, and removing deprecated features.

    • πŸ“š The Quickstart / Getting Started documentation will be overhauled
    • The Ledger Time model will be upgraded so ledger_effective_time no longer needs to be supplied as part of command submission
      • Record time will no longer be guaranteed to be linearly ordered
      • Maximum Record Time will be removed from the API
      • Checkpoints will be removed from the CompletionStream
    • The DAML Sandbox will have a new architecture much more closely aligned with other DAML Ledgers
      • Contract Ids will be hashes rather than sequence numbers
      • The default time mode will switch to wall-clock
      • Ledger initialization via scenarios will be removed
      • Ledger Offsets will no longer be sequence numbers, but instead increasing integers
    • Maven artifacts will be versioned in line with the SDK
    • DAML will get a generic Map type to replace the current TextMap
  • v0.13.54 Changes

    February 20, 2020

    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.
  • v0.13.53 Changes

    February 19, 2020

    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.
  • v0.13.52 Changes

    February 12, 2020

    DAML Assistant

    The assistant can now do completions for SDK commands, e.g., daml ledger upl<TAB> will complete to daml ledger upload-dar.

    The new behavior introduced in 0.13.51 to shut down when stdin is closed is now disabled unless you explicitly enable it by passing --shutdown-stdin-close.

    DAML Script - Experimental

    0️⃣ The time mode must now always be specified explicitly. Use --static-time to recover the previous default time mode.

    βž• Add a sleep function that pauses the script for the given duration. This is primarily useful in tests where you repeatedly call query until a certain state is reached.

    βž• Add a HasTime instance for Script which allows you to get the current time (UTC in wallclock mode, UNIX epoch otherwise)

    DAML SDK

    • πŸ›  Fix computation of witnesses of top-level fetch nodes in scenario results ("known to").

    DAML Studio

    • πŸ“š You can now open DAML Studio in the root of a multi-package project instead of opening it separately for each package. Take a look at the documentation for details on how to set this up.

    DAML Triggers - Experimental

    • 0️⃣ The time mode must now always be specified explicitly. Use --static-time to recover the previous default time mode.

    JSON API - Experimental

    πŸ‘€ wrap Streaming API events in JSON object: { "events": [E1, E2, ...] }. See issue #4384.

    πŸ‘€ The format of archived responses from WebSocket endpoints has changed to include template IDs, similar to exercise responses. See issue #4383.

    πŸ‘€ Rename JSON API endpoints. See issue #4289 and issue #3145.

        /command/create => /v1/create
        /command/exercise => /v1/exercise
        /contracts/lookup => /v1/fetch
        /contracts/search => /v1/query
        /contracts/searchForever => /v1/stream/query
        /contracts/lookupForever => /v1/stream/fetch
        /parties => /v1/parties
    

    πŸ‘€ Exercise response field "contracts" renamed to "events". See issue #4385.

    βž• Added streaming version of fetch by key: /stream/fetch. See issue #4705.

    πŸ‘€ /contracts/searchForever accepts multiple queries, and includes with each created result the matchedQueries indicating which queries matched. See issue #4363.

    Sandbox

    πŸ›  Fixed a memory leak when using the ResetService; not everything was cleaned up correctly.

    Preliminary work to rebuild Sandbox on top of the DAML Ledger Integration Kit. Currently not exposed through the CLI.

  • v0.13.51 Changes

    February 05, 2020

    JSON API - Experimental

    • In websocket endpoints, if a created and archived contract
      in the same result array share a contract key, the archived is
      πŸ‘€ guaranteed to occur earlier in the array than the created. See
      issue #4354.

    DAML Assistant

    • Bash and Zsh completions will now fall back to regular file
      completions after the command argument.
    • The DAML assistant will now shut down long-running processes like
      daml sandbox when stdin is closed. This is mainly useful on
      🏁 Windows, where process APIs often kill the process in a way that
      does not allow it to do any cleanup, in particular, we cannot stop
      child processes.

    KVUtils

    • βž• Added a test case to the participant state tests to ensure your
      ledger state is resumable upon restart.

    Sandbox

    • πŸ›  Fix an error that stops the server from exiting cleanly if API
      server initialization fails.

    DAML Stdlib

    • βž• Added partition function to prelude.

    πŸ“š Documentation

    • ⚑️ Updated roadmap to reflect the current state.
  • v0.13.50 Changes

    January 30, 2020

    DAML Compiler

    • πŸ“¦ damlc test now initializes the packagedb automatically which means
      that it will work on projects that declare custom dependencies in
      daml.yaml without having to call damlc init first.
    • Choices marked explicitly as preconsuming are now equivalent to a
      nonconsuming choice that calls archive self at the beginning.

    DAML Integration Kit

    • The simplified kvutils API now uses com.digitalasset.resources to
      manage acquiring and releasing resources instead of Closeable.

    DAML Standard Library

    • βž• Add CanAbort instance for Either Text.

    DAML Studio

    • πŸ‘Œ Support all build-options supported by daml build.

    Sandbox

    • On initialization error, report the error correctly and exit with a
      status code of 1. Previously, the program would hang indefinitely.
      (This regression was introduced in v0.13.41.)
    • ⬆️ Upgrade the Flyway database migrations library from v5 to v6.

    DAML Triggers - Experimental

    • βœ… DAML triggers can now be tested in scenarios. Specifically, a
      trigger's rule can be executed in a scenario and assertions
      performed on the emitted commands.
  • v0.13.49

    January 30, 2020
  • v0.13.46 Changes

    January 22, 2020

    Sandbox

    πŸ›° The sandbox uses a new payload format for authentication tokens (JWTs). The old format is
    πŸ—„ deprecated, but still works.

    Metrics are now namespaced by "daml" and their names have been standardized to snake_case.

    DAML Studio

    Scenarios with unserializable result types no longer crash the scenario service.

    πŸ›  Fix a bug introduced in 0.13.43 that caused DAML studio to stop responding after code completions were requested.

    DAML-LF

    • Prohibit contract IDs in contract keys completely. Previously, creating keys containing absolute (but not relative) contract IDs was allowed, but lookupByKey on such a key would crash.

    DAML Compiler

    • βž• Added a --drop-orphan-instances flag in daml damlc docs.
    • πŸ— The modification times in a DAR are now fixed to a given value which makes the output of daml build deterministic in single-threaded mode (which is the default).

    JSON API - Experimental

    • πŸ›° The HTTP JSON API now uses the same payload format for authentication tokens as the sandbox. The
      πŸ—„ old format is deprecated, but still works.
    • πŸ‘Œ Support Exercise by Key. See issue #4099 .
    • πŸ‘€ Response format in searchForever changed to be more like exercise. See issue #4072 .
    • In 'search' endpoint arguments, %templates is now templateIds.
      βž• Additionally, all contract query fields must occur under 'query'. See issue #3450 .
    • πŸ‘€ WebSocket contract search at /contracts/searchForever. See issue #3936 .

    Indexer

    • Potentially fix a bug when recovering from failure.

    DAML Standard Library

    • The Template, Choice, and TemplateKey typeclasses have been split up into many small typeclasses to improve forward compatibility of DAML models. Template, Choice and TemplateKey constraints can still be used as before.

    Ledger API Server

    • Publish the resource management code as a library under com.digitalasset:resources.

    Ledger API Authorization

    • πŸ‘Œ Support EC256 and EC512 algorithms for JWT
  • v0.13.43 Changes

    January 15, 2020

    DAML Compiler

    • πŸ— The build-options field from daml.yaml is now also respected
      when --project-root is used.

    DAML SDK

    • πŸš€ Docker images for this release and releases in the future are built
      🐳 using the Dockerfile of the corresponding git tag and are therefore
      ⚑️ stable. Previously, they were updated whenever the Dockerfile
      πŸ”„ changed.

    Ledger API Server

    • πŸ’₯ BREAKING CHANGE lookupByKey now requires the submitter to be a
      πŸ‘€ stakeholder on the referenced contract. See issue
      #2311
      and
      issue #3543.
    • ⚑️ Metrics: Update dropwizard to version 4.1.2.
    • πŸ‘ Authorization: Support elliptic curve algorithm for JWT
      verification.

    Sandbox

    • πŸ‘ Allow submitMustFail in scenarios used for sandbox initialization.
    • Loosen database schema to allow persistence of transaction ledger
      entries where no submitter info is present (typically when the
      submitter is hosted by another participant node).
    • πŸ”Š DAML trace logs (trace, traceRaw, traceId) are now logged via the
      🌲 regular logging system (slf4j+logback) at interpretation time via
      the logger daml.tracelog at DEBUG level.
    • πŸ›  Fix bug that can cause the transaction stream to not terminate. See
      issue #3984.

    DAML Triggers - Experimental

    • πŸ”§ You can now configure a heartbeat message to be sent at a regular
      time interval.

    JSON API - Experimental

    The /contracts/search endpoint reports unresolved template IDs as
    πŸ‘€ warnings. See [issue

    3771](https://github.com/digital-asset/daml/issues/3771).

    πŸ‘‰ Use JSON string to encode template IDs. Use colon (:) to separate
    πŸ“¦ parts of the ID. The request format, with optional package ID:

    • "<module>:<entity>"

      • πŸ“¦ "<package ID>:<module>:<entity>" The response always contains
        fully qualified template ID in the format:
      • πŸ‘€ "<package ID>:<module>:<entity>" See issue
        #3647
        .

    Align contract table with domain.ActiveContract class. The
    database schema has changed, if using --query-store-jdbc-config,
    πŸ‘€ you must rebuild the database by adding ,createSchema=true. See
    issue #3754.

    🚚 The witnessParties field is removed from all JSON responses.

  • v0.13.42 Changes

    January 08, 2020

    JSON API - Experimental

    • πŸ‘€ Rename argument in active contract to payload. See #3826.
    • πŸ”„ Change variant JSON encoding. The new format is { tag: data-constructor, value: argument }.
      For example, if we have: data Foo = Bar Int | Baz, these are all valid JSON encodings for
      values of type Foo:
      • {"tag": "Bar", "value": 42}
      • {"tag": "Baz", "value": {}}
        πŸ‘€ See #3622
    • πŸ›  Fix /contracts/lookup find by contract key.
    • πŸ›  Fix /command/exercise to support any LF type as a choice argument.
      πŸ‘€ See #3390

    DAML Compiler

    πŸ“¦ Move more types from daml-stdlib to standalone LF packages. The module names for the types have
    also changed slightly. This only matters over the Ledger API when you specify the module name
    explicitly. In DAML you should continue to use the existing module names.

    • The types from DA.Semigroup are now in a separate package under
      DA.Semigroup.Types
    • The types from DA.Monoid are now in a separate package under
      DA.Monoid.Types
    • The types from DA.Time are now in a separate package under
      DA.Time.Types
    • The types from DA.Validation are now in a separate package
      under DA.Validation.Types
    • The types from DA.Logic are now in a separate package under
      DA.Logic.Types
    • The types from DA.Date are now in a separate package under
      DA.Date.Types.
    • The Down type from DA.Internal.Prelude is now in a separate
      πŸ“¦ package under DA.Internal.Down.

    DAML SDK

    • πŸ“„ daml damlc docs now accepts a --exclude-instances option to exclude unwanted instance docs
      by class name.

    DAML-ON-X-SERVER

    • 0️⃣ Made ledger api server to bind to localhost by default instead to the public
      πŸ”’ interface for security reasons.

    DAML Assistant

    Bash completions for the DAML assistant are now available via daml install. These will be
    🐧 installed automatically on Linux and Mac. If you use bash and have bash completions installed,
    these bash completions let you use the tab key to autocomplete many DAML Assistant commands, such
    as daml install and daml version.

    Zsh completions for the DAML Assistant are now installed as part of daml install. To activate
    them you need to add ~/.daml/zsh to your $fpath, e.g., by adding fpath=(~/.daml/zsh $fpath) to the beginning of your ~/.zshrc before you call compinit.

    DAML Script - Experimental

    🍎 are you sure you are actually using bash? iirc macos switched the default to

    • πŸ‘ Allow running DAML scripts as test-cases. Executing daml test-script --dar mydar.dar will
      βœ… execute all definitions matching the type Script a as test-cases.
      πŸ‘€ See #3687.

    Reference v2

    • πŸ‘» On an exception, shut down everything and crash.
      Previously, the server would stay in a half-running state.