Daml SDK 1.5.0 has been released on September 16th 2020. You can install it using:
daml install latest
There are no changes requiring migration. However we do recommend using Daml Script in favor of Scenarios going forward. Learn more about Script in the notes below.
Interested in what's happening in the Daml community and broader ecosystem? If so we've got a jam packed summary for you in our latest community update.
Background
Daml Script was designed from the ground up to be “Scenarios 2.0”: A single scripting language for Daml for all use-cases. To make sure Scripts could be used truly universally, the first covered use-case was scripted interaction with live ledgers, introduced with SDK 0.13.55 in March 2020. Daml Repl and Triggers added interactive tooling and reactive automation. This latest release now completes the journey by providing the same real-time IDE integration that Scenarios have always offered, as well as adding a few more Script features that ease migration.
Scenarios offer functionality that cannot be offered via the Ledger API, which made it impossible to extend them into what Daml Script now is without breaking backwards compatibility. They are also in such widespread use that breaking backwards compatibility on Scenarios would have been costly. The two features will therefore live in parallel for a while, but Scenarios are going to be deprecated in an upcoming release, which means they may be removed with a major SDK version from 12 months after the date of deprecation and will not receive new features.
For more details on Daml Script and its role as “Scenarios 2.0”, please refer to our latest blog post.
Specific Changes
script
function to aid type inference. This is the equivalent of scenario
.queryContractId
function for querying for a contract with the given identifier. This offers the Scenario functionality of submit p do fetch cid
in a way that’s consistent with Ledger API use, but also allows for negative results by returning an Optional.passTime
helper to advance the time by the given interval.archiveCmd cid
as a convenience wrapper around exerciseCmd cid Archive
.
Impact and Migration
Given Scenarios’ widespread use and the fact that Script does not have complete feature parity with Scenarios, Scenarios will go through the proper deprecation cycle:
Given Daml Script’s additional capabilities and the fact that Scenarios will not receive new features after deprecation, we recommend developing any new tests or initialization scripts using Daml Script instead of Scenarios.
If you would like to migrate existing Scenarios, please refer to the migration guide. If you are not sure how to migrate your Scenario to Daml Script, please get in touch with us.
--application-id
or --participant-config
command line flags. This is needed if you are working against a ledger with authentication and need to match the application id in your token.:json
. For example: :json [1, 2, 3]
. This allows you to test how the JSON API would convert to JSON.--package-max-inbound-message-size
command line option sets the maximum inbound message size in bytes used for uploading and downloading package updates. It defaults to the max-inbound-message-size
setting.visibleByKey
, together with improved documentation on the authorization rules of the various byKey
functions.Show
instance for Ordering
.fetch
a contractId using the useFetch
hook.foldl
and foldr
are each four times as fast as beforeR with f_1 = E_1; ...; f_n = E_n
are much more efficient.
--init-db
is no longer required. See issue #7092.--address
option can be used to listen for HTTP connections on interfaces other than localhost, such as 0.0.0.0
for all addresses. See issue #7090.
/v1/stream/fetch
) of the JSON API had a bug where streaming multiple keys could silently ignore some of the given keys. This feature was not used by the @daml/*
client libraries so you were only affected if you subscribed to the websocket endpoint directly.--application-id
command-line option on the JSON API is now hidden and deprecated. The JSON API never used it as it uses Application ID specified in the JWT.off
method of the @daml/*
client libraries’ event streams returned by streamQuery
and streamFetchByKey
now correctly remove the given listener.maxInboundMessageSize
option in LedgerClientConfiguration
was fixed. It previously only set the maximum size for the metadata. maxInboundMessageSize
now does the correct thing, and a new option maxInboundMetadataSize
was added to set the maximum metadata size. These names match the Netty channel builder.RejectedExecutionException
errors in your logs if this has affected you. This is now fixed, but we encourage all users of the LedgerClient
to call the close
method explicitly to ensure it is closed at an appropriate time in your application lifecycle.withTimeProvider
was removed from CommandClient
in the Scala bindings. This method has done nothing since the new ledger time model was introduced in 1.0.0. See issue #6985.
SubmissionValidator
, LedgerStateAccess
, and LedgerStateOperations
methods. This is a source-breaking change. Instead of providing an execution context implicitly to your ledger implementation, you are encouraged to construct the relevant contexts for different operations explicitly. Please refer to the open-source implementations as a reference.
We are continuing to work on performance of the Daml integration components and improving production readiness of Daml Ledgers, but there are exciting features and improvements in the pipeline for the next few releases as well.