Commit Graph

250 Commits

Author SHA1 Message Date
Moritz Kiefer
d5de7d2177
Release 0.13.32 (#3276) 2019-10-29 10:25:00 -04:00
Gerolf Seitz
fe7e5615b8
Improve performance of stakeholder retrieval from SQL (#3207)
Instead of loading and deserializing the transaction, we store the
stakeholders in tables contract_signatories and contract_observers.

To avoid having to do an extra roundtrip for fetching the stakeholders,
we aggregate the parties at query time into a % separated string (% is
not a valid character for parties), which we then split again in the
application.

Fixes #2330.
2019-10-28 14:16:21 +01:00
Moritz Kiefer
319d43ac26
Clear package db before reinitializing it (#3241)
fixes #3240
2019-10-21 14:04:10 -04:00
Andreas Herrmann
b0bd8328ea
Detect high level trigger (#3239)
* capture high-level module in converter

* Factor out trigger discovery

* Support running high-level triggers directly

* Don't convert to low-level trigger in Retry

* ./fmt.sh

* Update CopyTrigger, docs, and changelog
2019-10-21 14:22:08 +02:00
Gerolf Seitz
aa30fedfde
Release 0.13.31 (#3229)
* Release 0.13.31

* Update docs/source/support/release-notes.rst

Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2019-10-18 16:37:06 +02:00
Stefano Baghino
9571e29c7e
Allow Navigator to use authenticated Ledger API (#3138)
* Make Navigator authenticate with the participant

* Solve shadowed import warning

* Fix tests to work with new methods

* Optimize imports

* More imports optimizations

* Ensure plainText channel is used unless explicitly stated

* Work around a lack of APPDATA on CI

* Add docs

* Update release notes

* Update navigator/frontend/src/ui-core/src/session/UI.tsx

Co-Authored-By: Robert Autenrieth <31539813+rautenrieth-da@users.noreply.github.com>

* Address https://github.com/digital-asset/daml/pull/3138#discussion_r336403903

* Address https://github.com/digital-asset/daml/pull/3138#discussion_r336382140

* Address https://github.com/digital-asset/daml/pull/3138#discussion_r336383076

* Address https://github.com/digital-asset/daml/pull/3138#discussion_r336389886

* Address https://github.com/digital-asset/daml/pull/3138#discussion_r336391680
2019-10-18 15:39:42 +02:00
Martin Huschenbett
dcf1ab9e5a Shrink the docker image for the SDK by 57% (#3224)
* Shrink the docker image for the SDK by 57%

Wiping out the `/tmp` dir after installing the SDK does wonders.

@associahedron I wonder if we should do this in the assistant?

* Update release notes
2019-10-18 12:45:09 +00:00
Gerolf Seitz
8026297b96
Added Sandbox CLI parameter --max-ttl-seconds (#3223)
This CLI parameter can be used to modify the maximum allowed TTL used by
commands.
2019-10-18 14:14:59 +02:00
Moritz Kiefer
6d3ae219d1 Improve logging and debugging of DAML triggers (#3210)
- We now display `trace` messages so they can be used for debugging.
- I’ve removed the log message from the low-level API since it is
  confusing as it is not exposed via the high-level API and somewhat
  redundant since you can use `trace` for debugging. If there is a
  demand for proper logging support we might want to add it back at
  some point.
- We now display errors from speedy properly. This is mainly important
  for calls to `error` since we previously lost the error message.
- Logging messages go through a proper logging library now and the
  internal debugging stuff is only displayed at debug level so not by default.
- We log failed completions at warning level to ease debugging.
2019-10-17 10:21:56 +00:00
Remy
416bfcfa8e
daml-lf: fix maven coordinates of daml_lf_archive_reader (#3209) 2019-10-17 10:50:56 +02:00
Gerolf Seitz
a5921e0274 Properly fill eventId for active contracts (#3126)
* Properly fill eventId for active contracts

This gets rid of the last remaining bit that assumes
contractId==eventId.

Fixes #65.
Contributes to #2068.

* Do not conflate eventId and contractId in the daml-lf interpreter

* Do not treat contractId as eventId in Ledger.scala

* Remember the transaction that divulged a contract.

* In this scope we can treat divulged contracts the same as disclosed ones

* revert a few more syntactical changes to make the overall diff smaller

* retain the same behavior on the scenario service api

* fix unreleased after rebase
2019-10-16 17:02:04 +00:00
Leonid Shlyapnikov
2a89ce8bb2 JSON API parties endpoint + Sandbox party management fix (#3193)
* Parties endpoint

`PartyManagementClient#listKnownParties` returns an empty List. Why?

* Fix for sandbox parties management (#3177) + JSON API `/parties` endpoint

* release notes

* updating release notes
2019-10-16 15:02:27 +00:00
Stefano Baghino
83e305b667
Port LedgerConfigurationServiceIT (#3188)
* Port LedgerConfigurationServiceIT

* Remove unused imports

* Fix compilation error

* Port SemanticLedgerTestsIT

* Expect failures for negative cases

* Add meaningful parentheses

* Do not require the ledger configuration test commands to succeed

* Remove unused command tracking

* Address https://github.com/digital-asset/daml/pull/3188#issuecomment-542616799

* Update unreleased.rst
2019-10-16 13:15:37 +02:00
Remy
2bc6b8d4f5
Release 0.13.30 (#3194)
* Release 0.13.30

* Address Martin's comments

* Address Mortiz's comments
2019-10-16 10:54:18 +02:00
Remy
a3518d671e daml-lf proto: archive proto for daml-lf 1.6 (#3142)
* daml-lf proto: archive proto for daml-lf 1.6

* try to fix archive ProtoTest for windows

* more windows fix for  archive ProtoTest
2019-10-15 18:35:20 +00:00
Leonid Shlyapnikov
447c85c23b CLI option to specify JSON API interface (#3191) 2019-10-15 17:56:44 +00:00
Moritz Kiefer
dbddead461
Add a first draft of documentation for DAML triggers (#3181)
* Add a first draft of documentation for DAML triggers

The API will still change in a bunch of ways but I’d rather get some
docs in place now and update them as we change things than not have
any docs at all.

* Fix path to daml.yaml

* s/bot/trigger/

* fix source code markers

* Fix tests

* Update docs/source/triggers/index.rst

Co-Authored-By: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
2019-10-15 16:50:43 +02:00
Moritz Kiefer
b568827563
Add createAndExercise to the standard library (#3182) 2019-10-15 15:03:25 +02:00
Gerolf Seitz
e0cfb84681
Filter the contracts for the ACS already in the database. (#3180)
This avoids unnecessarily loading contracts from the database
that would anyway get discarded later on.
2019-10-15 11:39:45 +02:00
Remy
e45b585307 daml-lf: repackage daml-lf archive proto (daml_lf -> daml_lf_dev) (#3169) 2019-10-15 09:36:11 +00:00
Remy
d64df4b5f7 daml-lf: clean achive bazel build (#3175)
* clean the mess in daml-lf achive bazel build

* add release note

* Address Moritz's comments

* more release notes
2019-10-15 08:36:46 +00:00
Leonid Shlyapnikov
65482324b3 Fixing release notes (#3173) 2019-10-14 15:52:46 +00:00
Leonid Shlyapnikov
41fd64abb4 HTTP JSON API automatic package reload (#3090)
* Package reload scheduler

* Cleanup

* Cleanup

* addressing code review comments, removing todo

* Actually has to be like this, reduced version caches `templateIdMap`

we don't want it cached.

* Load only new package IDs instead of reloading the entire store
2019-10-14 15:08:21 +00:00
Moritz Kiefer
25f33c2928
Add a daml user to docker image and fix PATH (#3160)
Previously, we were installing the SDK as root which is probably not a
good idea. This PR adds a new `daml` user and fixes PATH (`$HOME` and
`~` both don’t work in this context).
2019-10-11 13:03:26 +02:00
Gerolf Seitz
e310cbe143 Fix automatic retry mechanism in scala bindings. (#3061)
* Fix automatic retry mechanism in scala bindings.

This fix only affects the usage of
com.digitalasset.ledger.client.binding.LedgerClientBinding#retryingConfirmedCommands

The retry mechanism didn't distinguish between submission failures and
final completion failures. Retrying completion failures with the same
commandId doesn't make sense, as the deduplication mechanism will kick
in.
The new mechanism now only retries commands with an updated LET and MRT
in case the server responds with a RESOURCE_EXHAUSTED status code (i.e.
backpressure).

Fixes #3057.

* Add UNAVAILABLE as retryable error code

* fix unreleased.rst
2019-10-11 08:17:33 +00:00
Leonid Shlyapnikov
06a4d56025
Scala codegen StackOverflowError fix (#3159)
* introducing map and bimap

not relying on default implementations provided by Traverse and Bitraverse

* lazy collect

* updating release doc

* cleanup

* daml-lf/interface: add foldMap overrides

* implementing `bifoldMap` explicitly for `DefDataType` and `DataType`

* replacing `toStream` with `to[ImmArraySeq]`, updating release notes
2019-10-10 17:15:08 -04:00
Stephen Compall
a125860a9d
extractor: replace bespoke LF value encoder with lf-value-json (#3121)
* hide unreferenced circe encoders

* derive an extractor-compatible lf-value-json codec

* replace circe bespoke LedgerValue enc with lf-value-json-based enc

* mixed up the encoder's string settings (boolean blindness)

* match tests to new labelless record encoding

* match tests to new Optional format, no Some/None tag

* match tests to new Map format, no Map tag

* make other extractor encoders coherent with lf-value-json formats

* remove unused circe encoders

* stray unused variable

* release note

* fix #3087's release note formatting; move SQL Extractor note down

* move SQL Extractor note down
2019-10-10 08:18:50 -04:00
Moritz Kiefer
f18c393866 Fix location of interface files in created dars (#3137)
fixes #3135
2019-10-09 08:39:50 +00:00
Moritz Kiefer
7f58c5a0c8
Add DA.Action.State (#3133) 2019-10-08 18:04:48 +02:00
Oliver Seeliger
52302e2a1f
Ledger api index server starts only after indexer initializes db #2974 (#3087) 2019-10-08 10:57:50 +02:00
Richard Kapolnai
4c280a5f1b Add helper to Java Bindings to prepare transformer for Bot.wire. (#3098)
* Add helper to Java Bindings to prepare transformator for Bot.wire. Fixes #3097

* Java bindings: rename to contractTransformer

Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* Rename to transformer

Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* Keep error info for invalid class

Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* Add generic info to declaration

* Add test for contract tranformer

* Add license header

* Improve contractTransformer by storing reflection results

* Rename folder scala to java

* Add maven coordinates tag

* rename bazel goal back to bindings-java-tests

* integrate contract transformation test with codegen

* manual merge on unreleased.rst

* add daml model for integration testing
2019-10-07 17:38:26 +02:00
Moritz Kiefer
aef44abe4f
Release 0.13.29 (#3111) 2019-10-04 16:39:46 +02:00
Moritz Kiefer
a0984b606a Release 0.13.28 (#3109) 2019-10-04 10:03:09 +00:00
Oliver Seeliger
7dd482861b
Ledger api server fixes to persist divulged, otherwise unknown contracts #2946 (#3101) 2019-10-04 11:25:50 +02:00
Moritz Kiefer
a25c2e9de3
Avoid normalizing include dirs (#3103)
* Avoid normalizing include dirs

Fixes #3099

See https://github.com/digital-asset/ghcide/pull/152 for the
corresponding PR in ghcide

* bump to proper ghcide rev

* bump haskell-lsp rev
2019-10-04 10:41:44 +02:00
Oliver Seeliger
cd915b64d7
Ledger api server indexer closes akka system on shutdown #2624 (#3089) 2019-10-03 18:57:14 +02:00
Oliver Seeliger
c9658c7813
Multi participant node named logging (#2647) (#3080)
* Upgrade scala-logging and slf4j

* Named logging for multi-participant tests (#2647)
2019-10-03 18:20:57 +02:00
Moritz Kiefer
2f79ea3221 Bump ghcide (#3083)
* Bump ghcide

* Fix ghcide test output
2019-10-02 13:08:07 +00:00
Martin Huschenbett
4623467c40
Update docs for type synonyms generated by generic template instances (#3071) 2019-09-30 14:47:55 +02:00
Andreas Herrmann
98bb580aa2 Bundle packages with SDK releases (#3056)
* Enable SDK daml-lib package dependencies

* integration-test: SDK daml-libs dependency

* trigger --> daml-trigger

Rename the trigger library package to match other builtin packages.

* Bundle daml-trigger.dar in SDK release tarball

* Describe SDK bundled packages in changelog

* Push case match inside expand

Addressing review comment
8208277747 (r329428240)
2019-09-30 09:15:11 +00:00
Leonid Shlyapnikov
3efe846a3a Renaming "active" -> "created" (#3064)
* Renaming "active" -> "created"

* Renaming "active" -> "created"
2019-09-27 19:07:24 +00:00
Rohan Jacob-Rao
32e3099ddf Template instance type synonym polish (#3054)
* Release note

* Desugaring is hard to type

* Upgrade hlint version to new ghc lib

* Use template instance type synonym in some tests

* Rm space
2019-09-27 18:07:39 +00:00
Anup Kalburgi
3686162c02
Adding visual -web command (#3009)
adding the visual-web command to damlc
2019-09-27 10:26:20 -04:00
Stefano Baghino
2955c49828
Remove contract keys tests from semantic suite, make contract keys tests multi-node aware (#3058) 2019-09-27 13:51:51 +02:00
Stefano Baghino
717bd38ec0
Read the TTL from the configuration service (#3052)
* Read the TTL from the configuration service

* Address https://github.com/digital-asset/daml/pull/3052#discussion_r328698432

* Fix docs
2019-09-27 12:02:47 +02:00
Leonid Shlyapnikov
1fa170366d
Return archived events from /command/exercise (#3036)
* Adding `domain.ArchivedContract`

* Adding `domain.Contract`

* Returning archived and active contracts from `/command/exercise`

Improving integration tests, asserting values in the response JSON

* Updating documentation

* Do not populate workflowId if it is not provided

set it to empty string (default), it is optional in the Ledger API
2019-09-26 16:06:18 -04:00
Gary Verhaegen
cf21ad2e81
document signature verification (#3050) 2019-09-26 18:16:58 +01:00
Martin Huschenbett
2df59be8b5 Fix issue with template instance constraint rewriting (#3010)
The compiler rewrites constraints like `Template (Foo t) => ...` into
`FooInstance t => ...`. Unfortunately, this rewriting does not yet kick in
when the constraint contains superfluous parentheses as in
`(Template (Foo t)) => ...`.

This PR fixes the problem.

Fixes #2994.
2019-09-26 15:24:21 +00:00
Stefano Baghino
cde3797eb2
Finish porting TransactionServiceIT (#3043)
* Finish porting TransactionServiceIT

* Go easy on H2

* Address https://github.com/digital-asset/daml/pull/3043#discussion_r328547578
2019-09-26 14:20:02 +02:00
Leonid Shlyapnikov
5f9a48c534
Flattening results of the /contracts/search (#2987)
* Flattening results of the `/contracts/search`,

returning a `ActiveContract` instead of `GetActiveContractsResponse`

* Fixing the test,

it is an empty array instead of empty GetActiveContractResponse object

* Updating examples

* Updating release notes

* Update unreleased.rst

Accepting suggested changes

Co-Authored-By: Stephen Compall <stephen.compall@daml.com>

* Resolving master merge conflicts
2019-09-25 10:14:22 -04:00
Robert Autenrieth
9583c1f470 Improve ledger sql backend performance (#2998)
* Remove extra key lookup

... when removing contracts

* Only look up contract LET

* Add ADT for let lookups

* Add release notes

Fixes #2888
2019-09-25 12:46:13 +00:00
Moritz Kiefer
dade80afe1 Add a --target flag to the IDE (#3019)
It is really annoying to not be able to load code that requires 1.dev
in the IDE.
2019-09-25 11:45:14 +00:00
Gary Verhaegen
5eb76eef91
release 0.13.27 (#3015) 2019-09-25 10:27:39 +01:00
Rohan Jacob-Rao
4d641dbb66 Fix a bug in template resugaring (#2942)
Under very specific circumstances, as presented in `TemplateSuperClassD`, the
template resugaring would fail and the compiler crash. This PR fixes the
problem.

It also adds test case `TemplateSuperClassF` for similar very specific
circumstances under which template resugaring would fail.
2019-09-24 21:38:13 +00:00
Moritz Kiefer
8ad74da20b
Support passing additional options to sandbox/navigator/json-api in daml start (#3002)
This should make `daml start` a bit more useful since you don’t have
to switch to starting all processes separately once you start
deviating from the defaults, e.g., I found myself wanting to specify a
custom ledger id during the hackathon. This is part 1 of ##2993.
2019-09-24 18:39:16 +02:00
Gary Verhaegen
cc66d054a8
release 0.13.26 (#2996) 2019-09-24 14:01:18 +01:00
Gary Verhaegen
4576aed986
sign releases (#2968) 2019-09-24 12:02:29 +01:00
Stephen Compall
22a5b17ea0 json-api: "table scan"-style query, literal equality and record subsets (#2826)
* ADT for json-api's LF value query predicates

* expand predicates into primitive cases

* expand more cases for the predicate reader

* instantiating type references

* record case

* get super-reductionist with ValuePredicate so we can tease out the proper model by operations

* just put the literal predicates in the ADT

* more primitive predicates

* properly build RecordSubset predicates

* tests for ValuePredicate LF value predicate functions

- false cases fail because outer layer still stubbed

* outer RecordSubset always used

* tests for comparing literal predicate and ApiCodecCompressed parsing

* map querying

* Adding ListMatch

* removing List test cases covered by LF-JSON encoding tests

* Optional support; precompile ListMatch elements

* use go instead of toFunPredicate

- deals with potential subst introduction as we make VP more abstract

* test cases for optional queries

* Adding VariantMatch

* Fixing comments

* some precompiling and fusion

* Adding value predicate to contracts/search endpoint, WIP

* Adding value predicate to contracts/search endpoint, WIP

* add filtering to ContractsService#filterSearch

* Adding contracts/search result filtering based on the constructed predicates

* cleanup

* make error throwing in ValuePredicate a little nicer

* scalafmt

* cleanup

* follow JSON format rules for numeric queries

* test that apiValueToLfValue . lfValueToApiValue = arr id

* API value -> LF value discards scale; account for that in ValuePredicate

- fixes queries that match numerics

* document query

* release note

* test for contracts/search with query

* more tests for contracts/search with query

* More tests and cleanup

* more cleanup

* better test

* Adding disclaimer

* records, not documents

* better error message in the fromCon case
2019-09-23 16:08:24 -04:00
Moritz Kiefer
bf3f0063d2
Get rid of ./build.sh scripts for damlc migrate (#2984)
Now that we have the build-options fields that makes for a much nicer
interface.
2019-09-23 19:08:30 +02:00
Moritz Kiefer
2ab06da199 Use a consistant include dir for cwd (#2978)
* Use a consistant include dir for cwd

See https://github.com/digital-asset/ghcide/pull/114 for the actual
fix.
This PR just bumps ghcide and adds a regression test. I’ll change the
revision before merging, I just want to test CI for now.

fixes #2929

* Switch to proper ghcide revision

* writeIfacesAndHie no longer exists

* Add changelog entry

* Maybe I should try to compile code before committing but I don’t want to

* Fix ghcide exe
2019-09-23 14:33:06 +00:00
Stefano Baghino
aad98b4c9e
More transaction service tests ported to the new test tool (#2961)
* Remove dead code

* Port around 30 more tests, delete dead code

* Remove template comment

* Update unreleased.rst

* Address https://github.com/digital-asset/daml/pull/2961#discussion_r327000163

* Address https://github.com/digital-asset/daml/pull/2961#discussion_r326999412

* Address https://github.com/digital-asset/daml/pull/2961#discussion_r326998734

* Address https://github.com/digital-asset/daml/pull/2961#discussion_r326998278

* Address https://github.com/digital-asset/daml/pull/2961#discussion_r326998888

* Address https://github.com/digital-asset/daml/pull/2961#discussion_r326997789
2019-09-23 15:33:32 +02:00
Moritz Kiefer
2de32b7419
Include all daml files in dar if source points to a file (#2970)
Previously, we only included the source file itself but not its
dependencies which didn’t make much sense.

This fixes #2960
2019-09-23 11:14:35 +02:00
Jussi Mäki
26c5a64589
release 0.13.25 (#2952) 2019-09-18 14:34:05 +02:00
Gerolf Seitz
b70e289303 ActiveContractsService stream ow always returns at least 1 element (#2799)
This removes the need for clients to handle the special case where the
stream might be empty.
Now the clients can always assume that they receive at least one
response element in the stream.
2019-09-18 11:16:56 +00:00
Jussi Mäki
11f1735613 Fix contract key uniqueness check in kvutils (#2933)
* Fix contract key uniqueness check in kvutils

Archival of a contract with a key and recreation within the
same transaction is now allowed in kvutils.

* Add assertions to check that new contract has been created with same key
2019-09-17 18:21:41 +02:00
Remy
220a03c9e8 Daml-LF: make MUL_NUMERIC and DIV_NUMERIC multi-scale (#2921)
* daml-lf: Make MUL_NUMERIC and DIV_NUMERIC multi-scale

* update release notes

* compiler: fix with type change
2019-09-17 14:32:49 +00:00
Gerolf Seitz
f32f1b975e
Filter the contracts for the ACS already in the database. (#2931)
This avoids unnecessarily loading contracts from the database
that would anyway get discarded later on.
2019-09-17 15:30:45 +02:00
Jost Berthold
277bfcbb70 HOTFIX damldoc: suppress instance docs when --data-only (#2927) 2019-09-17 11:55:51 +00:00
Remy
dc9429be1d Daml-LF: Add CAST_NUMERIC and SHIFT_NUMERIC (#2919)
* daml-lf: add CAST_NUMERIC and SHIFT_NUMERIC internally

* daml-lf: add CAST_NUMERIC and SHIFT_NUMERIC to archive proto

* daml-lf: update spec with CAST_NUMERIC and SHIFT_NUMERIC

* update release notes

* fix spec

* Address comments from Fran and Gerolf

* fix unrel
2019-09-17 08:52:54 +00:00
Leonid Shlyapnikov
b2b711c67b release-0-13-24 (#2922) 2019-09-16 15:19:10 -04:00
Rohan Jacob-Rao
c7eb05be6a Hlint update + release note (#2923)
* Update hlint version corresponding to ghc-lib update

* Add missing release note for corresponding compiler fix
2019-09-16 17:31:44 +00:00
Stefano Baghino
e37e3ec314
SemanticTests synchronize/wait across participants, specify error codes (#2911) 2019-09-16 15:18:42 +02:00
Stefano Baghino
c1d3c54f65
Port transaction service tests (#2900)
* Delete dead code

* Add test case for contract identifier retrieval when filtering by template

* Factor out retry strategies, make transaction tests multi-node-aware, add one test case

* Address https://github.com/digital-asset/daml/pull/2900#discussion_r324541271

* Address https://github.com/digital-asset/daml/pull/2900#discussion_r324543869

* Address https://github.com/digital-asset/daml/pull/2900#discussion_r324543999

* Address https://github.com/digital-asset/daml/pull/2900#discussion_r324544107

* Address https://github.com/digital-asset/daml/pull/2900#discussion_r324544193

* Address https://github.com/digital-asset/daml/pull/2900#discussion_r324545838

* Address https://github.com/digital-asset/daml/pull/2900#discussion_r324545682

* Address https://github.com/digital-asset/daml/pull/2900#discussion_r324545947

* Address https://github.com/digital-asset/daml/pull/2900#discussion_r324546075

* Wrap eventual success around exercise exclusively
2019-09-16 14:26:58 +02:00
Oliver Seeliger
16f58a8583
Upgrade H2 Database to 1.4.199 (#2889)
For statbility of merge statement
2019-09-13 12:54:37 +02:00
Leonid Shlyapnikov
4a9fb1ccff
DAML assistant codegen command (#2800)
* DAML assistant codegen command, codegen config reader and docs
2019-09-12 14:23:49 -04:00
Stefano Baghino
47d8432670
Panic on interface reader error (#2890) 2019-09-12 15:15:21 +02:00
Moritz Kiefer
a58cf857d4 Release 0.13.23 (#2875)
Given how many people want the HTTP JSON API, let’s make a release
that contains the integration with the assistant.
2019-09-11 08:55:25 +00:00
Gary Verhaegen
5234236639
add build-options to daml.yaml (#2772) 2019-09-10 18:16:33 +02:00
Martin Huschenbett
0fdf85442f
Improve UX of generic templates over Ledger API (#2779)
* Improve UX of generic templates over Ledger API

Currently, if you write
```
template Template t => Proposal t with
    receiver: Party
    asset: t
  where ...
template Iou with ...
template instance ProposalIou = Proposal Iou
```
you'll get the following DAML-LF types:
```
record Proposal t = { receiver : Party, asset : t }
record Iou = ...
record ProposalIou = { unpack : Proposal Iou }
```
The definition of `ProposalIou` is not particularly user friendly when used
over the Ledger API.

This PR changes the definition of `ProposalIou` to
```
record ProposalIou = { receiver : Party, asset : Iou }
```
Basically, the definition of `Proposal` is copied and `t` is instantiated
with `Iou`. This should make a much nicer UX.

* Update documentation

* Add test

* Fix docs examples

* Fix release notes
2019-09-10 14:38:25 +02:00
Stephen Compall
603e0a169f
json-api: in search input, rename templateIds to %templates (#2825)
* use %template instead of templateIds for /contracts/search

* release note

* doc %template

* s/$/s$/
2019-09-09 13:45:02 -04:00
Leonid Shlyapnikov
d237040822 DAML Assistant json-api logback configuration (#2797)
* filter out exception stack traces logged at debug

* Adding logback.xml for DAML Assistant release

* Fixing readme

* Fixing readme

* Use the config file in the assistant
2019-09-09 11:13:50 +02:00
Moritz Kiefer
2e29d3c0d9
Integrate the HTTP JSON API with the assistant (#2792) 2019-09-06 15:48:15 +02:00
associahedron
3c78e6110f Move (/) to a Divisible class and drop the Fractional Int instance. (#2728)
* Move (/) into a separate typeclass.

* Update release notes.

* Wording change

* rst syntax!!!

* tweak release notes.

* Remove recip on Int test.

* deduplication of release notes.

* Fix release notes?
2019-09-06 11:51:51 +00:00
Stefano Baghino
dc1eb2b151
Make semantic tests multi-node aware (#2770) 2019-09-05 15:38:51 +02:00
Stefano Baghino
4bfabe80fd
First multi-node test (#2737)
* WIP

* Ensure identifier uniqueness across endpoints

* Use Greek alphabet letters for node naming to better tell them apart

* Allow reference server to specify extra participants

* Restore all semantic tests

* Update changelog

* Have exponential backoff retries when creating the endpoint test context
2019-09-05 09:37:51 +02:00
Rohan Jacob-Rao
e364375ce6
Initiate release (#2745) 2019-09-04 15:39:46 -04:00
Stefano Baghino
785e41eb2c
Enable multi-node conformance testing (#2735) 2019-09-03 15:57:23 +02:00
Gerolf Seitz
4dbbdaaf52
Use (submitter, command_id, application_id) for command deduplication (#2724) 2019-09-03 10:09:01 +02:00
Gerolf Seitz
ecb506e803
SQL diagnostics (#2662)
* Use proper names for the DB connection pools.

* Add some trace logging for DB operations.

This does not capture timing of individual statements but
rather the time for "units of work".
For example "lookup contract" doesn't mean only loading
a single row from the contracts table, but also 2 additional
queries for looking up witnesses and divulgences.

This is not a problem, because this is trace level logging
that helps us debug problems and shouldn't be made sense of by
users at this stage.

* Make description a by-name parameter.

This avoids building up the string if trace logging
is not enabled (i.e. most of the time).
2019-08-30 13:41:44 +02:00
Gerolf Seitz
0e80f75ff4
Make sure ActiveContractService sends out a consistent snapshot (#2708)
* Make sure ActiveContractService sends out a consistent snapshot

instead of looking up the latest ledger end, we can only take the latest known ledgerEnd in the scope of SqlLedger.
If we don't do that, we can miss contracts from a partially inserted batch insert of ledger entries
scenario:
1. batch insert transactions A and B at offsets 5 and 6 respectively; A is a huge transaction, B is a small transaction
2. B is inserted earlier than A and the ledger_end column in the parameters table is updated
3. A GetActiveContractsRequest comes in and we look at the latest ledger_end offset in the database. We will see 6 (from transaction B).
4. If we finish streaming the active contracts up to offset 6 before transaction A is properly inserted into the DB, the client will not see the contracts from transaction A
The fix to that is to use the latest known head to the dispatcher, which is updated AFTER a batch has been inserted completely.

This PR also factors out the basic readonly functionality that is
duplicated between SqlLedger and ReadOnlySqlLedger into a class
BaseLedger.

* copyright header
2019-08-30 10:56:30 +02:00
Remy
20649cf78e ledger-api: rename decimal field to numeric in value Proto (#2688)
* add Numeric.java

* ledger-api: rename `decimal` field to `numeric` in value protobuf

* Address Gerolf's comment

* ledger-api: add missing renammings

* ledger-api: relax syntax of numbers that can be sent as numerics

* extractor:  fix

* leger-api: change format of number though ledger api

* daml-lf: fix numeric regexp

* ledger: fix tests
2019-08-29 22:51:33 +00:00
Robin Krom
d4919ad319 fixed messed up release notes (#2700) 2019-08-29 12:37:34 +00:00
Robin Krom
7fca591df0
replace main file with a pointer to the source root (#2687)
* language: compile everything in the source directory

This removes the need to specify a 'main'. Instead we 'source' in
daml.yaml should point to the source root directory.
2019-08-29 13:42:33 +02:00
Martin Huschenbett
c3f394e94f
Release DAML SDK 0.13.21 (#2693) 2019-08-29 10:56:44 +02:00
Oliver Seeliger
834a06a397
Ledger API Server H2 Database support (#2425)
* Ledger API Server H2 Database support (#2528)

* Disable parallel batch ledger append due to lack of H2DB isolation
2019-08-28 14:14:21 +02:00
Martin Huschenbett
016b73b3de Enable MonoLocalBinds and FlexibleContexts by default in DAML (#2678)
Both language extension are needed to improve the UX of generic templates.
Without them templates a la
```
template Template (A t) => B t with
```
would produce an error that we need `FlexibleContexts` for the
`Template (A t)` context and a warning suggesting to simplify it to
`AInstance t`. The latter would expose an implementation detail we prefer
to hide.
2019-08-28 10:21:54 +00:00
Gary Verhaegen
126ac64bbf
daml-sdk-head also installs HEAD jars (#2652) 2019-08-27 18:08:52 +02:00
Stefano Baghino
d79e03d42c
Ensure uniqueness of decoding and encoding methods (#2651)
Fixes #2367
2019-08-23 17:31:37 +02:00
Gerolf Seitz
139afa4e59
Properly set connection pool properties (#2637) 2019-08-23 10:24:56 +02:00
Moritz Kiefer
dda583c659 Release 0.13.20 (#2633) 2019-08-22 14:07:33 +00:00