hie-core v1.1.1 Release Notes

Release Date: 2020-05-13 // over 1 year 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.

    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 and  daml 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 or minLedgerTimeRel. 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 to daml.commands.deduplicated_commands.
      • daml.lapi.command_submission_service.delayed_submissions has
        been renamed to daml.commands.delayed_submissions.
      • daml.lapi.command_submission_service.submitted_transactions
        has been renamed to daml.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 the Configuration class.
    • Engine is now mandatory in several  participant api server related
      constructors to avoid running multiple interpretation engines.