hie-core v1.3.0 Release Notes
Release Date: 2020-07-16 // almost 4 years ago-
Summary
- The Websocket query and fetch APIs are now stable.
- ๐ The JSON API Server is now released as a standalone JAR file to
๐ GitHub Releases. - DAML Script and REPL now work in Static Time mode and can query
parties. - DAML Studio exposes more details on how contracts were disclosed.
- The Trigger Service, a solution to host and manage DAML Triggers is
now available in Early Access.
Known Issues
The DAML Studio VSCode extension is affected by a known and recently
๐ fixed bug in recent VSCode versions:
microsoft/vscode#89038For some users this may lead to the Scenario View in VSCode not
โฌ๏ธ rendering correctly. If you are affected by this issue upgrading to
VSCode 1.47 should resolve it.What's New
Websocket API is stable
Background
The JSON API Server exposes several Websocket endpoints which allow
clients to maintain a live view of contract data without polling. These
endpoints have been available since before SDK 1.0 in early access, and
are now considered stable.Specific Changes
- The API specification for the
/v1/stream/query
and
/v1/stream/fetch
endpoints are finalized and fully implemented.
Impact and Migration
The final version of these endpoints is backwards compatible with SDK
1.0 in the sense that clients of these endpoints from SDK 1.0 work with
SDK 1.3. Thus no action needs to be taken.Standalone JSON API Server
Background
The JSON API Server is a component intended to be run in production
environments to supplement the lower level Ledger API with an
easy-to-use queryable ledger state consumable by any HTTP 1.1 client,
๐ป including web browsers. Despite this intended use case, the JSON API
Server was only distributed as part of the SDK, which meant that the
DAML SDK had to be installed on production servers in order to run the
JSON API Server. Providing a stand-alone JAR distribution gives
๐ application operators a much leaner deployment option.Specific Changes
- A stand-alone JAR distribution of the JSON API Server is available
at
๐ https://github.com/digital-asset/daml/releases/download/v1.3.0/http-json-1.3.0.jar
Impact and Migration
This is purely additive to the distribution via the SDK so no action is
โ needed. However, if you do run the JSON API Server in a test or
production environment, this gives you a leaner and more portable way of
doing so.More functionality in DAML Script and REPL
Background
โ DAML Script and REPL had some limitations in key test and production use
cases. Firstly, neither exposed the Time Service, which made them hard
to use in static time mode. Secondly, they only exposed functions to
allocate parties, not to query existing parties, which required existing
parties to be passed in via a file, or to be obtained using unsafe
functions likepartyFromText
. By exposing the relevant functions of
the Ledger API in DAML Script and REPL, Ledger Time can now be queried
and set in Static Time mode, and existing parties can be queried.In addition, it is now possible to use DAML Script and REPL with
multiple JWTs, which in particular, means they can be used with multiple
parties on DABL.Specific Changes
- DAML Script and REPL's
getTime
now correctly handles time changes
in static time mode and returns the current time by querying the
0๏ธโฃ time service rather than defaulting to the Unix epoch. This only
works in static time mode and via gRPC. In wallclock mode,getTime
continues to return the system time in UTC. When run against the
JSON API in static time mode, it continues returning Unix epoch. - โ Add
setTime
to DAML Script and REPL which sets the ledger time via
the Ledger API time service. This only works in static time mode and
via gRPC. - โ Add
listKnownParties
andlistKnownPartiesOn
to query the
corresponding ListKnownParties endpoint in the Party Management
service. - The time mode for DAML REPL can now be specified using
the--static-time
and--wall-clock-time
flags. - You can now use DAML Script with multiple auth tokens. This is
particularly useful if you are working with the JSON API where you
can only have one party per token or with an IAM that only provides
single-party tokens. The tokens are specified in the participant
๐ง configuration passed via--participant-config
in a new
access_token
field. The existing--access-token-file
flag is
๐ still supported if you want to use the same token for all
connections. Take a look at the
๐ documentation
for more details.
Impact and Migration
This functionality is purely additive so no action needs to be taken.
More Privacy Information in DAML Studio
Background
DAML Studio's Scenario view allows developers to explore the
transactions resulting from their DAML models in real time. One of the
main uses of doing so is to verify that privacy is preserved as
expected. Until now, the available views only gave information on who
๐ got to see a contract and through which transaction. SDK 1.3 adds
information on the mechanism through which a party learned about a
contract. This saves the developer the work of inferring this from the
detailed transaction view.Specific Changes
- When displaying scenario results in table view in DAML Studio,
there's now a new checkbox "Show Detailed Disclosure" which shows
indications why a party knows about the existence of a contract:S
means the party is a signatory.O
means the party is an observer.W
means the party has witnessed the creation of the contract.D
means the party has learned about the contract via
divulgence.
Impact and Migration
This functionality is purely additive so no action needs to be taken.
Early Access Trigger Service
Background
DAML Triggers give developers the ability to write automation of DAML
๐ applications in the style of database triggers using the DAML language
itself, aiding code reuse and allowing contract definitions and basic
๐ฆ automation to be packaged and shipped together. These triggers need to
be managed at runtime, which until now required developers to manage
๐ individual JVM processes, raising the bar to actually deploying DAML
Triggers in production. The Trigger Service provides a way to manage
DAML Triggers via a simple REST API.The Trigger Service is currently in Alpha, meaning API changes are still
๐ likely, and it notably doesn't support authentication yet.Specific Changes
- โ Added the
daml trigger-service
command to the SDK to start the
Trigger Service. More information in the
๐ documentation.
Impact and Migration
This functionality is purely additive so no action needs to be taken. If
you are already evaluating Triggers for your application, we highly
recommend trying out the Trigger Service as it should ease their use
considerably. We welcome your feedback.Minor Improvements
- The Java Binding's
Bot.wire
andBot.wireSimple
now return a
Disposable
, which can be used to shut down the flows. You are
encouraged to call.dispose()
before terminating the client. - โ Added a CLI option for specifying the initial skew parameter for the
time model. You can control the allowed difference between the
Ledger Effective Time and the Record time using the
--max-ledger-time-skew
flag. - When run with persistence, the Sandbox used to crash if the database
wasn't running during startup. It now instead waits for the database
to start up. - โ Additional CLI options to configure the write pipeline in Sandbox,
๐ allowing operators to determine at what point back pressure is
๐ applied. Seedaml sandbox --help
for details. - ๐ Initialize the loading indicators in @daml/react of
useQuery
,
useFetchByKey
and their streaming variants withtrue
. This
โ removes a glitch where the loading indicator wasfalse
for a very
brief moment when components using these hooks were mounted although
no data had been loaded yet. Code using these hooks does not need to
be adapted in response to this change. - The create-daml-app example can now be run against a HTTP JSON API
port specified in the environment variable
REACT_APP_HTTP_JSON_PORT
- ๐ Improved error messages on unsuccessful key lookups.
๐ Bug and Security Fixes
- โ
damlc test --project-root
now works with relative paths as well. - ๐ฆ The Package Management Service's
ListKnownParties
response's
PartyDetails
now properly reflects where a party is non-local on
distributed, multi-participant ledgers that expose parties to remote
participants. - The application identifier in a command submission request is now
๐ checked against the authorization token. See
#4409. - In scenarios, fetches and exercises of contract keys associated with
contracts not visible to the submitter are now handled properly
instead of showing a low-level error. - โก๏ธ Some libraries in the DAML Studio VS Code Extension were updated to
๐ fix security issues. DAML Studio now requires VSCode 1.39 or newer. - ๐ Fix an issue in DAML Script where the
port
was ignored for
non-empty paths in the url when running DAML Script over the JSON
API. - ๐ Fix an issue in the Ledger API indexer that could have caused a
crash in the presence of divulged contracts. Exclusively affects
DAML ledger implementations where distributed participants each only
๐ see a portion of the ledger. The sandbox is not affected. See
#6607.
Ledger Integration Kit
- โ
The Ledger API Test Tool
--exclude
and--include
flags now match
โ the full test name as a prefix, rather than just suite names. Test
โ name is built by combining the suite name with a test identifier, so
this change should be fully backwards compatible. Run with
โ--list-all
to list all tests (as opposed to just the test suites
with--list
). - ๐ LfValueTranslation.Cache now requires separate configuration of
๐lfValueTranslationEventCache
andlfValueTranslationContractCache
- โฌ๏ธ Upgrade auth0 jwks-rsa version to 0.11.0
- KVUtils does not commit output keys whose value is identical to
input anymore - The Ledger API Server + Sandbox now accepts a new time model if none
is set. Previously, it would erroneously be rejected because the
generation number submitted to was incorrectly set to2
rather
than1
. This would not affect most users of Sandbox or other
๐ง kvutils-based ledgers, as if a configuration is set automatically on
startup when creating a new ledger. This affects users who
๐ง explicitly override the initial ledger configuration submit delay to
something longer than a few milliseconds. - โ Add 8 new timer metrics to track database performance when storing
transactions. The overall time is measured by
daml.index.db.store_ledger_entry
.- Timer
daml.index.db.store_ledger_entry.prepare_batches
:
measures the time for preparing batch insert/delete statements - Timer
daml.index.db.store_ledger_entry.events_batch
: measures
the time for inserting events - Timer
daml.index.db.store_ledger_entry.delete_contract_witnesses_batch
:
measures the time for deleting contract witnesses - Timer
daml.index.db.store_ledger_entry.delete_contracts_batch
:
measures the time for deleting contracts - Timer
daml.index.db.store_ledger_entry.insert_contracts_batch
:
measures the time for inserting contracts - Timer
daml.index.db.store_ledger_entry.insert_contract_witnesses_batch
:
measures the time for inserting contract witnesses - Timer
daml.index.db.store_ledger_entry.insert_completion
:
measures the time for inserting the completion - Timer
daml.index.db.store_ledger_entry.update_ledger_end
:
โก๏ธ measures the time for updating the ledger end
- Timer
- โ Added 4 new timer metrics to track DAML execution performance The
overall time is measured bydaml.execution.total
- Timer
daml.execution.lookup_active_contract_per_execution
:
measures the accumulated time spent for looking up active
contracts per execution - Histogram
daml.execution.lookup_active_contract_count_per_execution
:
measures the number of active contract lookups per execution - Timer
daml.execution.lookup_contract_key_per_execution
:
measures the accumulated time spent for looking up contract keys
per execution - Histogram
daml.execution.lookup_contract_key_count_per_execution
:
measures the number of contract key lookups per execution
- Timer