Commit Graph

353 Commits

Author SHA1 Message Date
Stefano Baghino
5fbc9a20aa
Remove duplicate DAR reader (#3267)
Fixes #452
2019-10-28 17:02:47 -04:00
Stefano Baghino
d803768405
Remove duplicates of TestExecutionSequencerFactory (#3264)
Fixes #9
2019-10-28 15:56:33 -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
Andreas Herrmann
2bd1db490a
Replace bazel-deps by rules_jvm_external (#3253)
* Update bazel-common to fix javadoc issues

Specifically, to fix the following error

```
ERROR: /home/aj/tweag.io/da/da-bazel-1.1/ledger-api/rs-grpc-bridge/BUILD.bazel:7:1: in javadoc_library rule //ledger-api/rs-grpc-bridge:rs-grpc-bridge_javadoc:
Traceback (most recent call last):
        File "/home/aj/tweag.io/da/da-bazel-1.1/ledger-api/rs-grpc-bridge/BUILD.bazel", line 7
                javadoc_library(name = 'rs-grpc-bridge_javadoc')
        File "/home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/com_github_google_bazel_common/tools/javadoc/javadoc.bzl", line 27, in _javadoc_library
                dep.java.transitive_deps
object of type 'JavaSkylarkApiProvider' has no field 'transitive_deps'
```

* Define Maven deps using rules_jvm_external

* Pin artifacts

* Remove bazel-deps generated targets

* Remove bazel-deps

* Switch to rules_jvm_external targets

* update bazel documentation

* pom_file: There are no more bazel-deps targets

* BAZEL-JVM.md `maven_install` typo
2019-10-28 13:53:14 +01:00
Remy
f3b98ca31d DAML LF: limit allocations for trivial constants (#3212)
* speedy: limit allocation of trivial SValue constants

* daml-lf: limit allocation of constants for Value, Exp, Type

* weaken numeric equality in ledger service test
2019-10-18 15:00:49 +00: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
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
Robert Autenrieth
d320f93702
Add integration test for ledger API authorization (#3187)
Fixes #3023
2019-10-17 12:09:35 +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
Robert Autenrieth
07b75e0008
Command submission let test (#3153)
* Add CommandSubmissionLet test

* Remove old test

* Fix broken test

* Address review comments
2019-10-15 13:25:38 +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
Remy
fc1a000090 daml-lf: rename daml_lf_archive_scala target to daml_lf_archive_reader (#3168)
* daml-lf: rename daml_lf_archive_scala target to daml_lf_archive_reader

* fix release
2019-10-14 14:53:50 +00:00
Remy
217405e883 daml-lf: Move archive protofile to a more usual place. (#3166)
* move daml-lf archive protobug to a more usual place

* formatting

* fix kvutils proto

* fix csharp namespace
2019-10-14 13:22:22 +00:00
Robert Autenrieth
9a1b10ef82
Add a mock AuthService (#3125)
A simple AuthService implementation useful for tests
2019-10-08 12:46:43 +02:00
Gerolf Seitz
5592092cc7
Remove DAML-on-X IndexServer and Reference Server (#3108)
It is not needed anymore and can therefore be deleted.
2019-10-08 11:47:21 +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
Robert Autenrieth
284a6d8197
Introduce ledger API authorization (#3051)
... by introducing an AuthService and checking authorization claims in all ledger API services
2019-10-07 22:29:46 +02:00
Jussi Mäki
09e93a6cdc
Fix handling of transient contract keys in kvutils (#3110)
* Add failing test case for transient contract keys

* Add kvutils tests for transient contracts and keys

* Fix handling of transient contracts and keys in kvutils
2019-10-04 14:00:54 +02:00
Oliver Seeliger
7dd482861b
Ledger api server fixes to persist divulged, otherwise unknown contracts #2946 (#3101) 2019-10-04 11:25:50 +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
Jussi Mäki
0c72eeaf32
kvutils metrics (#3065)
* Add initial metrics to kvutils

* Improve metrics. Use InsertOrdMap by default in kvutils.

* Add VarGauge
2019-10-03 14:34:12 +02: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
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
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
Robert Autenrieth
afabb584c8
Move PackageServiceIT to the ledger api test tool 2019-09-24 15:17:18 +02:00
Remy
337c5ff215 Engine: drop value versioning in commands (#2995)
* daml-lf: remove value Version from commands

* ledger-api: fix ledger api

* ledger: fix tests

* leger: drop dead code

* Address Gerolf's comment
2019-09-24 12:38:56 +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
Remy
d540f7aab0 Daml-LF: change Numeric max scale from 38 to 37 (#2969)
* daml-lf: numeric maxScale change from 38 to 37

* daml-lf: update spec

* udpate protobuf comments
2019-09-23 12:39:28 +00:00
Remy
a46f1c041a Daml-LF: make Numeric scale type safe (#2958)
* daml-lf: make numeric scale type safe

* navigator: fix scale

* ledger: fix scale in tests

* Update daml-lf/data/src/main/scala/com/digitalasset/daml/lf/data/NumericModule.scala

Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com>

* Update ApiCodecCompressedSpec.scala

* Update ApiCodecCompressedSpec.scala
2019-09-18 19:33:52 +00:00
Stefano Baghino
8faca7ec1a
Delete old //ledger/CONTRIBUTING.md (#2956) 2019-09-18 14:54:26 +02:00
Gerolf Seitz
52efe9ccf9 Use the SQL-backend to testing the postgres-backend (#2954) 2019-09-18 12:28:02 +00: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
Gerolf Seitz
96642d9b19
Port TransactionServiceLargeCommandIT. (#2944)
Fixes #2861.
2019-09-18 13:05:46 +02:00
mziolekda
bf9ae046ba
ignore ledger updates that contain commands rejected due to de-duplication (#2939) 2019-09-18 12:21:30 +02:00
Robert Autenrieth
b97ef28de1
Rename BlindingInfo fields (#2883) 2019-09-18 00:28:53 +02: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
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
mziolekda
7c4cc96371
Use separate thread to preload dars in KVBC committer (#2924)
* use separate thread to preload dars in KVBC committer

* fix formatting
2019-09-17 14:48:36 +02:00
Gerolf Seitz
00f4ac133f
Port WronglyTypedContractIdIT to new TestTool. (#2907)
Fixes #2862.
2019-09-16 16:11:30 +02:00
Jussi Mäki
ae6f0fd631
Revert "Do not consider archives that are already loaded in engine (#2898)" (#2910)
This reverts commit 6ed6e0e990.
2019-09-16 15:26:21 +02: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
Gerolf Seitz
ad1b885494
Properly adhere to DbType#supportsParallelWrites in SqlLedger (#2902)
Since we still have issues with parallel writes when using H2,
we should properly only use a single DB connection and executor thread
for that.

Because we didn't do that before for Sandbox, tests like PackageManagement
appeared to be flaky due to racy inserts in H2.
2019-09-16 11:29:07 +02:00
Jussi Mäki
6ed6e0e990 Do not consider archives that are already loaded in engine (#2898) 2019-09-13 15:44:18 +00:00