hie-core v1.1.1 Release Notes
Release Date: 2020-05-13 // almost 4 years ago-
Summary
- ๐ New package management endpoints on the JSON API
- ๐ Better TLS Support for the JSON API
- Action required if you start the JSON API using daml json-api
and do not run it behind a reverse proxy.
- Action required if you start the JSON API using daml json-api
What's New
๐ New Package Management Endpoints on the JSON API
Background
๐ฆ The Ledger API's package management service allows uploading,
๐ฆ downloading and listing of DAML packages available on a DAML Ledger. For
situations where connecting to the Ledger API is not possible or is
inconvenient, these services are now available through the JSON API as
well.Specific Changes
The JSON API has three new endpoints
- ๐ฆ
GET /v1/packages
-- returns all package IDs - ๐ฆ
GET /v1/packages/<package ID>
-- downloads a given DALF package - ๐ฆ
POST /v1/packages
-- uploads a DAR file to the ledger
Impact and Migration
This is a purely additive change. Users who connect to gRPC from their
๐ฆ applications for the sole purpose of managing DAML packages may switch
over to the new endpoints to eliminate dependencies on gRPC or Ledger
API language bindings.๐ Better TLS Support for the JSON API
Background
In addition to the numerous new TLS options introduced in SDK 1.0.0, the
JSON API can now also connect to the Ledger API via TLS. To protect
against insecure connections which may leak access tokens, it also adds
โ a warning if not run behind a reverse proxy that terminates TLS
๐ connections. This warning will become an error in a future release.Specific Changes
- ๐ป The JSON API accepts new command line parameters
--pem
,--crt
,
๐ง--cacrt
, and--tls
, which configure it to connect to the Ledger
API using TLS. - 0๏ธโฃ By default, the JSON API now checks that connections are made
through a reverse-proxy providing HTTPS, ensuring that JWT tokens
don't leak. To disable this check, such as for development, pass
--allow-insecure-tokens
. A failed check currently results in a
โ warning.
Impact and Migration
daml start
automatically sets this flag so there is no migration
needed. If you are starting the JSON API manually, we advise you to add
the flag--allow-insecure-tokens
for development environments, and to
โ run the JSON API behind a TLS-enabled reverse proxy in production.Minor Improvements
- Faster Sandbox reset via the ResetService.
- 0๏ธโฃ
daml trigger
anddaml script
now default to wall clock time if
neither--wall-clock-time
or--static-time
is passed. - daml script now has an
--output-file
option that can be used to
specify a file the result of the script should be written to.
Similar to--input-file
the result will be output in the DAML-LF
JSON encoding. - You can now disable implicit party allocation of the Sandbox by
passing the flag--implicit-party-allocation=false
. This makes it
โ easier to test as you would against another ledger which does not
๐ support this feature. - The
daml ledger
commands no longer require the Bearer prefix in
the access token file. This matches the behavior of DAML Script and
other SDK tools. - โ Added
--max-commands-in-flight
to Sandbox CLI configs. This limits
the maximum number of unconfirmed commands in flight in
CommandService.
๐ Improvements to Early Access Features
daml damlc visual
now works properly in projects consisting of
๐ฆ multiple packages.- ๐ Fix a bug where
exerciseByKey
was not properly recognized by daml
damlc visual. - ๐ DAML REPL now produces better error messages on calls to
error
and
abort
.
๐ Bug Fixes
- ๐ Fix a bug where scenarios with names containing special characters
resulted in a crash in the scenario service. - ๐ฒ The Sandbox properly respects the
--log-level
CLI parameter - The sandbox now properly delays command submissions using
๐minLedgerTimeAbs
orminLedgerTimeRel
. See issue
#5480. - Migrating from Sandbox 0.13.55 to Sandbox Classic 1.0.0 could have
introduced contracts falsely reported as active when in fact they
๐ are not. Migrating to Sandbox Classic 1.1.0 will fix the issue. See
issue #5659.
๐ Changes to Ledger Integration Kit
These changes only affect ledger integrators and operators that consume
the metrics emitted by the DAML Integration Kit. We have introduced new
metrics and adjusted the naming of existing metrics to be consolidated.
If you have built a dashboard for a ledger built using the integration
kit, then you will need to adapt that dashboard. The changes are as
follows.We have introduced these new metrics:
- a timing metric for the commit at
daml.kvutils.writer.commit
. - a metric for command validation upon submission,
daml.commands.validation
. daml.commands.submissions
is a new timer that measures all
submissions.daml.commands.valid_submissions
is a new meter that counts valid
(unique, interpretable)
submissions.- โก๏ธ
daml.kvutils.reader.parse_updates
is a new timer that measures the
โก๏ธ translation time of ledger log entries when serving state updates to
the indexer. daml.kvutils.reader.open_envelope
is a new timer that measures the
๐ฒ deserialization time of ledger log entries when serving state
โก๏ธ updates to the indexer.- ๐ฒ
daml.ledger.log.append
is a new timer that measures the time for
๐ฒ writing new log entries. daml.ledger.state.read
is a new timer that measures reading from
the ledger state.daml.ledger.state.write
is a new timer that measures writing to
the ledger state.- We have renamed these metrics:
daml.lapi.command_submission_service.failed_command_interpretations
has been renamed to
daml.commands.failed_command_interpretations
.daml.lapi.command_submission_service.deduplicated_commands
has
been renamed todaml.commands.deduplicated_commands
.daml.lapi.command_submission_service.delayed_submissions
has
been renamed todaml.commands.delayed_submissions
.daml.lapi.command_submission_service.submitted_transactions
has been renamed todaml.services.write.submit_transaction
.
- The metrics registry should now be passed using the new
com.daml.metrics.Metrics
type, which wraps/replaces
com.codahale.metrics.MetricsRegistry
. - ๐ง
maxDeduplicationTime
configuration (the maximum time window during
๐ which commands can be deduplicated) has moved from
๐งSubmissionConfiguration
to theConfiguration
class. - Engine is now mandatory in several participant api server related
constructors to avoid running multiple interpretation engines.