b77cf2c56b
* Add participant-state and participant-state-index APIs and reference implementations This adds the (still WIP) interfaces and the in-memory reference implementations of participant-state and participant-state-index. See issue #137. * Pass ledgerId through to getLedgerEnd method This is needed in the daml-on-x implementation of the transaction service. * Add api-server-damlonx and the reference server This is the initial version of the ledger-api server built on top of the participant state APIs. While functionally complete (modulo test services), it has only yet been tested with the semantic tester. The server and the participant state APIs are still under active development. See issue #137. * Apply scalafmt and copyright headers to new damlonx code * ledger/damlonx: Fix build errors after merge from master * ledger/participant-state: separate out the reference impl * ledger/participant-state-index: separate out reference impl * ledger/damlonx: Refactoring - Refactor participant-state into multiple modules - Introduce structured offset and update id types (vector of ints) - Properly parse ledger feature flags * ledger: Disable failing semantic test. Decrease grouping duration. * scalafmt, fix after merge * Add missing copyright headers * ledger/damlonx: Add Simon's comments * ledger/damlonx: Remove UpdateId, use Offset in both state and state-index. * ledger/damlonx: scalafmt * damlonxserver: review participant-state interface Includes adding issue links for postponed fixes. * daml-on-x-server: review reference implementation Fixme's added to https://github.com/digital-asset/daml/pull/348 and extra issues creaed in https://github.com/digital-asset/daml/milestone/4 * ledger/damlonx: Use SimpleString * ledgre/damlonx: Backtrack on SimpleString change See issue #398 * daml-on-x-server: drop unused 'index.impl.reference.package.scala' * daml-on-x-server: add note on potential transient contracts bug * ledger/participant-state*: post-merge fixes |
||
---|---|---|
.. | ||
src | ||
BUILD.bazel | ||
README.md |
Overview
This document is to help internal engineers work with the Sandbox and the new ledger API. Note: If you encounter bugs. Please report issues you find in the #team-ledger-api channel.
DAML Sandbox
To build a snapshot version of the sandbox use sbt packageAll
in the ledger root.
Find sandbox/target/universal/sandbox-<version>-SNAPSHOT.tgz
and unpack it to a fitting place.
Sandbox application can be run from command line with the following command:
java -jar sandbox-<version>-SNAPSHOT.jar [options] <archive>
Command line arguments
-p, --port <value> Sandbox service port. Defaults to 6865.
-a, --address <value> Sandbox service host. Defaults to binding on all addresses.
--dalf Parse provided archives as DAML-LF Archives instead of DARs.
--static-time Use static time, configured with TimeService through gRPC.
-w, --wall-clock-time Use wall clock time (UTC). When not provided, static time is used.
-o, --sim-time-offset <value>
Use simulated time with the given duration (ISO-8601 with optional `-` prefix) as offset relative to UTC. For example, supplying `-PT6M` will result in the server time lagging behind UTC by 6 minutes. When not provided, static time is used.
--no-parity Disables Ledger Server parity mode. Features which are not supported by the Platform become available.
--scenario <value> If set, the sandbox will execute the given scenario on startup and store all the contracts created by it.
--daml-lf-archive-recursion-limit <value>
Set the recursion limit when decoding DAML-LF archives (.dalf files). Default is 1000
<archive>... Daml archives to load. Only DAML-LF v1 Archives are currently supported.
--pem <value> TLS: The pem file to be used as the private key
--crt <value> TLS: The crt file to be used as the cert chain. Required if any other TLS parameters are set.
--cacrt <value> TLS: The crt file to be used as the the trusted root CA.
--help Print the usage text
Compatibility
Sandbox uses models compiled in to the DAR format.
The dar files are the archives containing compiled DAML code. We highly recommend generating the dar files using the new DAML packaging, as described in https://engineering.da-int.net/docs/da-all-docs/packages/daml-project/. This will ensure that you're generating the .dar files correctly. The linked page also gives a good overview of what the dar files are, along with other key concepts.
Note that the new Ledger API only supports DAML 1.0 or above codebases compiled to DAML-LF v1. Again, using the DAML packaging as suggested above will ensure that you are generating dar files that the Sandbox can consume.
Ledger API
The new Ledger API uses gRPC. You can find the full documentation of all the services involved rendered at http://ci.da-int.net/job/ledger-api/job/build/job/master/lastSuccessfulBuild/artifact/ledger-api/grpc-definitions/target/docs/index.html (save the file locally to get the styling to work). If you just want to create / exercise contracts, I suggest you start by looking at command_service.proto
, which exposes a synchronous API to the DAML ledger.