Commit Graph

276 Commits

Author SHA1 Message Date
nicu-da
55fef9cf6a
[ledger-api] - Rename max deduplication time to max deduplication duration [KVL-1311] (#12939)
changelog_begin
ledger-api - rename ledger configuration max_deduplication_time to max_deduplication_duration
changelog_end
2022-02-15 21:14:26 +01:00
Simon Maxen
e56676e871
Minimal change needed to support is_final proto update (#12917)
changelog_begin
changelog_end

Breaks-Protobuf: true
2022-02-14 16:45:09 +00:00
pbatko-da
550ed7ca51
[User management] Document errors and required/optional fiels in user management proto definition. (#12873)
changelog_begin
changelog_end
2022-02-11 15:08:37 +01:00
mziolekda
42ff83d456
Remove daml on sql artifacts and docs (#12870)
* stop publishing daml on sql aka Daml Driver for PotgreSQL

CHANGELOG_BEGIN
Stop publishing Daml Driver for PostgreSQL
CHANGELOG_END
2022-02-10 18:01:18 +00:00
Kamil Bozek
77401d452c
Remove the possibility to turn on legacy error codes [DPP-773] (#12721)
* Remove the possibility to turn on legacy error codes

CHANGELOG_BEGIN
- Switching to the legacy error codes is not possible.
CHANGELOG_END

* Revert breaking experimental features proto definitions

* Deprecate legacy error codes in proto definitions

* Proper todo naming

* Adjust compatibility tests

* Fix unintentional paste
2022-02-10 10:09:02 +01:00
pbatko-da
f2b7902c68
[User management] Add CreateUserResponse and GetUserResponse gRPC response wrappers [DPP-854] (#12682)
changelog_begin
Ledger API Specification: CreateUser and GetUser endpoints of UserManagementService now return the CreateUserResponse or GetUserResponse messages, whereas previously they were returning the User message).
changelog_end
2022-02-08 12:29:57 +01:00
Moritz Kiefer
01d827b7c4
Enable java_conversions in scalapb (#12784)
* Enable java_conversions in scalapb

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2022-02-07 14:57:57 +00:00
pbatko-da
732c3bbc03
[User management] Change from uint32 to int32 for max_rights_per_user in UserManagementFeature (#12732)
changelog_begin
changelog_end

Breaks-protobuf: true
2022-02-04 12:46:16 +01:00
pbatko-da
6926e9adb4
Deprecate user identity service [DPP-862] (#12694)
changelog_begin
Ledger API Specification: Ledger Identity service is now deprecated.
changelog_end
2022-02-04 10:32:09 +01:00
pbatko-da
7137b46543
[User management] Use pagination for listing users [DPP-840] (#12610)
CHANGELOG_BEGIN
Ledger API Specification: UserManagementService.ListUsers is now using pagination
CHANGELOG_END
2022-02-03 20:32:50 +01:00
tudor-da
c34f042aa5
Remove deduplication feature descriptor SYNC_ONLY (#12719)
* Remove deduplication feature descriptor SYNC_ONLY
* Not used since participant-side command deduplication

changelog_begin
changelog_end

* Removed SYNC_ONLY

Breaks-Protobuf: true

* Addressed review comments
Breaks-Protobuf: true
2022-02-03 17:06:28 +00:00
Moisés Ackerman
e4764cc426
Upgrade to GHC 9.0.2 (#12300)
changelog_begin
changelog_end

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2022-02-01 11:27:11 +01:00
pbatko-da
214951e9c1
Fix log string interpolation in AkkaExecutionSequencer (#12647)
CHANGELOG_BEGIN
CHANGELOG_END
2022-01-28 16:45:04 +01:00
pbatko-da
4ec336dd6a
[User management] Enforce 1k user rights limit [DPP-833] (#12558)
CHANGELOG_BEGIN
Ledger API Specification: Maximum number of user rights per user is now limited to 1000 and is added to UserManagementFeature in VersionService. getLedgerApiVersion endpoint.
CHANGELOG_END
2022-01-27 22:12:34 +01:00
Stefano Baghino
aec3390904
Replace silencer plugin with built-in warning configuration (#12543)
Since Scala 2.13.2, Scala introduced built-in support to
manage warnings in a more granular fashion, thus making
the silencer plugin we are currently using no longer
strictly useful. Removing compiler plugins also removes
friction from migrating to Scala 3 in the future. As a
cherry on top, the built-in warning configuration also
allows to check whether a `@nowarn` actually does
anything, allowing us to proactively remove unused
warnings should the need arise.

[Here][1] is s a blog post by the Scala team about it.

Warnings have been either solved or preserved if useful,
trying to minimize the scope (keeping it at the single
expression scope if possible). In particular, all
remaining usages of the Scala Collection API compatibility
module have been removed.

Using the silencer plugin also apparently hid a few
remaining usages of compatibility libraries that were used
as part of the transition from Scala 2.12 to Scala 2.13
that are no longer needed. Removing those warnings
highlighted those.

changelog_begin
changelog_end

[1]: https://www.scala-lang.org/2021/01/12/configuring-and-suppressing-warnings.html
2022-01-24 15:01:35 +00:00
Simon Maxen
cbb4986e89
Add Empty GRPC Metering Report Service [DPP-856] (#12515)
* With mock metering service

* Reformat

changelog_begin
changelog_end

* Include nanos in generation time

* Update with review comments

* Update service count
2022-01-21 16:39:16 +00:00
Simon Meier
89d95e6d6c
user management: allow ':' in user ids (#12531)
Fixes #12520

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-21 15:39:42 +00:00
Moritz Kiefer
b843117501
Drop feature flag for v0 cid support (#12522)
I’ve kept it on the same test infrastructure that we used before that
can test both ways since it seems nicer to keep this consistent with v1.

changelog_begin
changelog_end

Breaks-protobuf: true
2022-01-21 12:54:08 +00:00
Andreas Lochbihler
20cda0181a
specify that deduplication offsets are exclusive (#12488)
CHANGELOG_BEGIN
CHANGELOG_END
2022-01-21 09:52:33 +01:00
Simon Meier
0f8e40c92d
user management: add reference docs (#12398)
CHANGELOG_BEGIN
CHANGELOG_END
2022-01-20 10:32:28 +00:00
Samir Talwar
f03fa6a5f1
ledger-api-test-tool: Govern ContractIdIT test runs through a feature. (#12454)
* ledger-api-test-tool: Rename "ParticipantFeature" to "Features".

* ledger-api-test-tool: Govern ContractIdIT test runs through a feature.

Rather than making it optional, we can expose a feature that instructs
whether we support certain kinds of contract IDs.

This accidentally works for Canton too as it defaults to "false" for
both options, which holds for Canton.

CHANGELOG_BEGIN
- [Ledger API Test Tool] The "ContractIdIT" test is now run by default,
  using ledger feature flags to determine which test cases are run. You
  will need to configure the ``StandaloneApiService`` accordingly.
CHANGELOG_END

* ledger-api: Add some documentation to `ContractIdFeatures`.

* compatibility: Update for ContractIdIT.

run-full-compat: true

* ledger-api: Clarify the contract ID features and remove v0 support.

We also remove the tests for v0 contract IDs from ContractIdIT.

* ledger-api-test-tool: Re-introduce tests for v0 contract IDs.

* ledger-api-test-tool: Case class with named parameters in ContractIdIT.

* ledger-api: All ledgers must support suffixed contract IDs.

* compatibilty: Add a start for ContractIdIT.

We can't exclude a test until it exists.

run-full-compat: true
2022-01-19 22:40:12 +01:00
mziolekda
82534f9155
Remove the reset service from the ledger api and the documentation [DPP-804] (#12472)
* Remove reset service from grpc and documentation [DPP-804]

CHANGELOG_BEGIN
Remove reset service from the ledger api protocol and the documentation
CHANGELOG_END

* remove reset service from two left-over places

* remove reset service from the protobuf structure test
2022-01-19 14:46:50 +01:00
pbatko-da
1f1e8bfe2e
[DPP-829] Make ledger-id field optional in requests (#12243)
CHANGELOG_BEGIN
The field "ledger_id" in all request to Participant API is now optional (was required).
CHANGELOG_END
2022-01-19 11:28:33 +01:00
nicu-da
249ba2259b
Be explicit in the usage of feature descriptors (#12356)
Co-authored-by: Simon Meier <meiersi-da@users.noreply.github.com>
2022-01-12 05:31:57 -08:00
nicu-da
8bc5804520
Add feature descriptor for the support for max deduplication duration [KVL-1218] (#12355)
Co-authored-by: Hubert Slojewski <hubert.slojewski@digitalasset.com>
2022-01-12 10:00:55 +00:00
nicu-da
a7c51efa7a
version-service - Move command deduplication feature descriptors into the experimental features [kvl-1218] (#12318)
Co-authored-by: fabiotudone-da <fabio.tudone@digitalasset.com>
Co-authored-by: Simon Meier <simon@digitalasset.com>
2022-01-11 14:26:19 +00:00
mziolekda
fafb86b389
Add static time feature flag and test tool coverage [DPP-849] (#12336)
* Add static time feature flag and test tool coverage

CHANGELOG_BEGIN
CHANGELOG_END

* incorporate the review feedback
2022-01-11 12:21:05 +00:00
Simon Maxen
3a08380b44
Add report metering protobuf definition [DPP-815] (#12303)
* Add report metering protobuf definition

changelog_begin
Added experimental GRPC endpoint for the reporting of metering 
changelog_end

* Update with review comments

* add changes from joint review by Simon and Simon :D

* Update with review comments

* Update with review comments

Co-authored-by: Simon Meier <simon@digitalasset.com>
2022-01-10 14:05:17 +00:00
Simon Meier
6dd0eb774e
ledger api server: support auth0 usernames (#12308)
* ledger api: support Auth0 user names in user management

See the `IdString.UserId` and `IdString.ApplicationId` comments wrt the
character classes being introduced.

Many thanks to @cocreature for helping with deciding on the exact
restrictions of user-ids.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-10 12:58:43 +00:00
Gary Verhaegen
d2e2c21684
update copyright headers (#12240)
New year, new copyright, new expected unknown issues with various files
that won't be covered by the script and/or will be but shouldn't change.

I'll do the details on Jan 1, but would appreciate this being
preapproved so I can actually get it merged by then.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-03 16:36:51 +00:00
nicu-da
9102b0919a
[ledger-api-test-tool] - add participant deduplication feature descriptor [kvl-1218] (#12213) 2021-12-21 15:56:41 +00:00
nicu-da
53d55784a4
[ledger-api] - Add command deduplication features as a feature descriptor [KVL-1218] (#12181)
changelog_begin
changelog_end
2021-12-20 04:33:58 -08:00
Stefano Baghino
42adfdc857
Get rid of deprecated components (#12167)
* Get rid of deprecated components

Removes:
- mentions of the Node.js bindings
- mentions of the Scala bindings
- usage of the Scala codegen as an SDK tool
- Java bindings "reactive components"

changelog_begin
The Node.js bindings are no longer supported as part of the Daml SDK
The Scala bindings are no longer supported as part of the Daml SDK
The Java bindings reactive components are no longer supported as part of the Daml SDK
The `daml codegen` command has dropped support for Scala
changelog_end

* Fix typo noticed by @cocreature

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Address https://github.com/digital-asset/daml/pull/12167#issuecomment-995714093

* Remove quickstart-scala from the SDK tarballs

* Fix failing codegen test

* Address https://github.com/digital-asset/daml/pull/12167#pullrequestreview-833991243

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-12-16 16:55:19 +00:00
Simon Meier
8c1173c8f1
User management application id defaulting (#12100)
user management: add defaulting for the application_id field of requests

CHANGELOG_BEGIN
- [Ledger API]: as a convenience when using JWT authentication, a
  request's application_id field can be left empty to ask the server to
  set the field to the id of the authenticated user or the application-id
  in the custom token. There are three services that currently specify
  application_id's in the request: CommandService,
  CommandSubmissionService, and CommandCompletionService.
CHANGELOG_END
2021-12-14 17:57:09 +00:00
Simon Meier
6c7e33cafe
Add Ledger API feature descriptor for user management. (#12095)
* Add Ledger API feature descriptor for user management.

Includes:
- enabling the UserManagementServiceIT tests by default; and skipping them for ledgers that do not support user management. The correct working of this is tested by the cross-version compatibility checks between the ledger-api-test-tool
- some refactoring wrt the parsing and representation of features the the ledger-api-test tool.

CHANGELOG_BEGIN
- [Ledger API]: introduce a feature descriptor for whether the ledger supports user management
CHANGELOG_END
2021-12-14 11:00:29 +01:00
Andreas Lochbihler
9a931854b2
add docs for command dedup (#11928)
CHANGELOG_BEGIN
Documentation on the new command deduplication mechanism
CHANGELOG_END
2021-12-14 09:36:32 +01:00
Simon Meier
f223528bfb
Implement PoC of user management for Ledger API server (fix #12014) (#12063)
CHANGELOG_BEGIN
- [User Management]: add support for managing participant node users and authenticating
  requests as these users using standard JWT tokens.
CHANGELOG_END

Co-authored-by: Marton Nagy <marton.nagy@digitalasset.com>
Co-authored-by: Adriaan Moors <90182053+adriaanm-da@users.noreply.github.com>
2021-12-13 17:58:30 +01:00
nicu-da
e1a2da0771
[ledger-api] - Add deduplication_offset as a valid deduplication period for commands [KVL-1172] (#12041)
changelog_begin
[ledger-api] - Add `deduplication_offset` as a valid type for the command deduplication period
changelog_end
2021-12-13 12:26:09 +00:00
Samir Talwar
9f8e640b1a
Use ExecutionContext.parasitic instead of DirectExecutionContext. (#11783)
* concurrent: Replace `DirectExecutionContextInternal` with `parasitic`.

* concurrent: Rename `DirectExecutionContext` `parasitic`.

* Use `ExecutionContext.parasitic` instead of `DirectExecutionContext`.

We no longer need the latter.

CHANGELOG_BEGIN
CHANGELOG_END

* Fix formatting.
2021-12-10 16:25:46 +01:00
pbatko-da
5119829a64
[DPP-765] Intercept unhandled (non-self-service) exceptions from Participant API endpoints (#11965)
CHANGELOG_BEGIN
CHANGELOG_END
2021-12-08 09:58:44 +01:00
Simon Meier
c19e3f5c46
Add additional rights and clarifications to user management API (#11908)
* user management: document optional primary party

CHANGELOG_BEGIN
CHANGELOG_END

Breaks-protobuf: true
2021-12-02 16:39:31 +01:00
Moritz Kiefer
0e776769ee
Update protobuf docs template to handle oneOf (#11887)
Builds upon #1180 to render the oneof fields a bit nicer.

Note that we also need to kill newlines in the descriptions. That’s
not an issue in the plugin but in how rst renders tables.

fixes #11761

changelog_begin
changelog_end
2021-11-30 13:22:57 +01:00
Andreas Herrmann
66b407467f
Update protobuf docs plugin (#11880)
* Try to upgrade protobuf docs plugin

changelog_begin
changelog_end

* Fix extension number 65020 is already registered

Building `//ledger-api/grpc-definitions:ledger-api-docs` [failed
with](https://github.com/digital-asset/daml/issues/11761#issuecomment-978947565)
```
panic: proto: extension number 65020 is already registered on message google.protobuf.FieldOptions
```

Go dependencies are now pulled in via Gazelle. By default Gazelle will
generate new proto rules for any `.proto` files encountered in third
party Go dependencies. However, many of these already have pregenerated
`.pb.go` files generate with the appropriate configuration.

The problem can be avoided by configuring Gazelle to not generate new
proto rules, but instead use pre-existing `.pb.go` files.

For reference the field number is set in
[go-proto-validators](32a686adf8/validator.proto (L19))
which is an indirect dependency through protoc-gen-doc.

In this case we need to update protoc-gen-validate to v0.6.2 to include
4f41f10dde
which fixes unknown label errors.

* ./fmt

* Expose gRPC status.proto for Haskell bindings

* Update Gazelle to support embedsrcs on Windows

`protoc-gen-doc` relies on `go:embed` file embedding
2dde01902b/resources.go (L8).
Gazelle supports `embedsrcs`, however, it did not generate the attribute
correctly on Windows due to the different directory separator. This is
fixed in https://github.com/bazelbuild/bazel-gazelle/pull/1101.

* Add gazelle to compatibility workspace

It's loaded into `@daml`'s top-level `BUILD` file and ends up being a
dependency of the compatibility workspace as well.

* shift go_googleapis import

* Delete dead code

protobuf is imported transitively.

* Document how to add Go dependencies

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-11-25 20:51:24 +00:00
Simon Meier
026b92a8b1
Add gRPC definitions for participant user management service (#11818)
* Introduce definitions for experimental user management service.

Only gRPC definitions are added. No new service is exposed by the Ledger
API server.

CHANGELOG_BEGIN

- [Ledger API] Introduce gRPC definitions for experimental user
  managament service to manage users and their rights for interacting
  with the Ledger API served by a participant node.

CHANGELOG_END
2021-11-25 12:26:47 +01:00
tudor-da
c4b6a17da1
[Self-service error codes] Update existing error code references [DPP-593] (#11798)
* Updated Ledger API services protobuf definitions

CHANGELOG_BEGIN
CHANGELOG_END

* Adapted Building Applications / Ledger API / gRPC section

* Moved Error Codes under Building Applications / Ledger API / gRPC

* Small rewording Error codes page

* Updated outdated LedgerAPI / gRPC page

* Apply suggestions from code review

Co-authored-by: pbatko-da <pawel.batko@digitalasset.com>

* Moved Error Codes under Building Applications / Ledger API / gRPC

* Updated outdated LedgerAPI / gRPC page

* Addressed review comments

* Addressed review comments

* Remove unnecessary link to error-codes

* `Ledger API` changed to `Common Ledger API change`

Co-authored-by: pbatko-da <pawel.batko@digitalasset.com>
2021-11-22 18:39:25 +00:00
nicu-da
8f458d8d2a
[ledger-api] Include the completion offset in the command_service.proto responses [KVL-1171] (#11658)
CHANGELOG_BEGIN
[ledger-api] - Include the completion offset in the responses from the command_service.proto
CHANGELOG_END
2021-11-18 04:37:26 -08:00
Miklos
4106222ab8
Fix docs regarding deduplication periods [KVL-1194] (#11738)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-18 11:45:01 +01:00
Hubert Slojewski
8212c0b2a5
Make submission ID optional [KVL-1107] (#11011)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-26 14:39:56 +00:00
Hubert Slojewski
ad42dfa915
Update gRPC to the latest (1.41.0) and Protobuf (#11380)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-25 17:26:55 +00:00
tudor-da
03cfd1237c
Configurable assertions in Ledger API test tool by feature descriptors (#11328)
* ApiVersionService propagates self-service error codes flag.
* ParticipantTestContext is enriched with feature descriptors
* ContractIdIT adapted with assertions for self-service error codes

CHANGELOG_BEGIN
CHANGELOG_END
2021-10-25 14:13:44 +02:00
Marton Nagy
308f938512
Dpp 494 unit testing ha coordinator (#10862)
* Unit testing: HA Coordinator

* Preparation: switch to fix-thread-pool in AkkaBeforeAndAfterAll to have more stable test runtimes

CHANGELOG_BEGIN
CHANGELOG_END

* Preparation: switch to timer from akka-pattern  and Scheduler in waiting-futures, for higher precision timing

CHANGELOG_BEGIN
CHANGELOG_END

* Preparation: prevent race in PollingChecker (corner-case uncovered via sustained testing)

CHANGELOG_BEGIN
CHANGELOG_END

* Preparation - HaCoordinator refactorings: switch from DataSource to connection factory functions to clean dependencies, fixing some typos

CHANGELOG_BEGIN
CHANGELOG_END

* Add test infrastructure for locking

CHANGELOG_BEGIN
CHANGELOG_END

* Reuse StorageBackendTestsDBLock to test TestDBLockStorageBackend

CHANGELOG_BEGIN
CHANGELOG_END

* Add unit test suite for HaCoordinator

CHANGELOG_BEGIN
CHANGELOG_END

* Fix random generation to respect scala 2.12

CHANGELOG_BEGIN
CHANGELOG_END

* Adds test cases for graceful-shutdown during initialization

CHANGELOG_BEGIN
CHANGELOG_END

* Minor changes based on review

CHANGELOG_BEGIN
CHANGELOG_END

* Some comment rewording based on review

CHANGELOG_BEGIN
CHANGELOG_END
2021-09-16 17:08:45 +02:00
Gerolf Seitz
8a391189a6
Rename Completion.deduplication_time to deduplication_duration [KVL-1057] (#10900)
* Rename Completion.deduplication_time to deduplication_duration

CHANGELOG_BEGIN
CHANGELOG_END

* Breaking protobuf change: regenerate `buf` image

Breaking-Proto: true

* Re-compute sha256s of migrations

* Fix expected error message

Co-authored-by: Fabio Tudone <fabio.tudone@digitalasset.com>
2021-09-16 10:41:45 +00:00
Hubert Slojewski
b50bb8e437
Populate definite_answer in ApiException [KVL-1004] (#10832)
CHANGELOG_BEGIN
CHANGELOG_END
2021-09-13 16:28:39 +00:00
Miklos
7c47aca968
Improvements to wording in ledger-api protobuf docs (#10851)
CHANGELOG_BEGIN
CHANGELOG_END
2021-09-13 07:44:55 +00:00
Miklos
cff0358db0
ledger-api: Remove unimplemented fields [KVL-1094] (#10822)
CHANGELOG_BEGIN
CHANGELOG_END
2021-09-10 19:26:51 +02:00
Miklos
07b72d0f3e
Update Ledger API's proto documentation [KVL-1094] (#10815)
CHANGELOG_BEGIN
CHANGELOG_END
2021-09-09 19:10:32 +02:00
Miklos
2e39d7b647
Deprecate Commands.deduplication_time field [KVL-1096] (#10802)
CHANGELOG_BEGIN
- [Ledger API Specification] `Commands.deduplication_time` field has been deprecated, please use `Commands.deduplication_duration` instead.
CHANGELOG_END
2021-09-09 11:30:17 +02:00
tudor-da
deb8a8b740
[Divulgence pruning] Daml SDK docs update [DPP-536] (#10764)
* [Divulgence pruning] Minor update to participant_pruning_service.proto divulgence docs

CHANGELOG_BEGIN
[Ledger API Specification] Participant pruning of all divulged contracts is fully implemented: Participant operators can choose to prune all immediately and retroactively divulged contracts, by setting the newly-added prune_all_divulged_contracts flag in the ParticipantPruningService/Prune request.
CHANGELOG_END

* Enrich `Daml Participant Pruning` in the `Operating Daml` docs section

* Apply suggestions from code review

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>
2021-09-08 07:58:55 +00:00
nicu-da
eabb19d7f7
[ledger-api] Add deduplication_duration to deduplication period [kvl-1047] (#10676)
* Add `deduplication_duration` to `deduplication_period` and deprecate `deduplication_time`

CHANGELOG_BEGIN
ledger-api - add `deduplication_duration` as a future replacement for `deduplication_time` in the command proto definition
CHANGELOG_END

* Add tests for deduplication period validation
2021-08-26 09:33:01 +00:00
Andreas Herrmann
0b7980d6eb
Update rules_haskell (#10674)
* update rules_haskell

changelog_begin
changelog_end

* Build proto3-suite lib and exe in same repo

changelog_begin
changelog_end

* drop unneeded stack_snapshot packages

* Use packages.bzl consistently

* Sort stack_snapshot attribute values

* Remove unused constant

* drop unneeded stack_snapshot packages in compat

changelog_begin
changelog_end

* Sort stack_snapshot attribute values in compat

* Remove redundant dicts.add in compat

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-08-26 10:41:58 +02:00
nicu-da
7cc698948c
Add multiple ways of specifying deduplication [KVL-1047] (#10601)
CHANGELOG_BEGIN
ledger-api - Command deduplication period can now be specified by setting `deduplication_offset` instead of `deduplication_time` (only valid for v2 WriteService). This change is backwards compatible.
CHANGELOG_END

* Propagate the enriched deduplicationPeriod instead of deduplication duration

* Update the Haskell bindings for the new deduplication period

* Calculate the deduplicateUntil using the new deduplication period for backward compat

* Use consistent naming for deduplication_period

* Cleanup command timeout extraction from deduplication period

* Add the required deduplication_offset to deduplication instead of deduplication_start

* Update haskell bindings to support deduplication_offset

* Add support for deduplication_offset in the ledger-api

* Remove the timestamp-based deduplication from our models to simplify upgrade for users

* Add optional conformance test for offset based deduplication

* Remove buf rule for FIELD_SAME_ONEOF as our change is backwards compatible

* Disable FIELD_SAME_ONEOF buf check for commands file

* Apply suggestions from code review

Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>

* Update comment for deduplication period

Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2021-08-25 05:58:03 -07:00
fabiotudone-da
e99254fd3e
Augment completion.proto with deduplication-related info [KVL-1057] (#10619)
* Augment completion.proto with deduplication-related info

CHANGELOG_BEGIN
CHANGELOG_END

* Explicitly specify fields not yet filled in when building Completion

* Time-based deduplication periods are measured in record time of completions

* Add deduplication_offset as a deduplication_period option

* Don't skip proto field numbers

* CompletionFromTransaction: use default Completion constructor

* submission_rank: reserve proto field for future use

* Add comment about reserved proto field
2021-08-24 12:55:03 +02:00
tudor-da
29c546c949
[Divulgence pruning] Added prune_all_divulged_contracts to PruneRequest [DPP-534] (#10635)
* Added `prune_all_divulged_contracts` to ParticipantPruningService.Prune
* KeyValueParticipantStateWriter.prune returns UNIMPLEMENTED if called with `pruneAllDivulgedContracts` set

CHANGELOG_BEGIN
CHANGELOG_END

* Addressed review comments

* Apply suggestions from code review

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>
2021-08-23 20:52:27 +00:00
Samir Talwar
4b8b67a1b5
Upgrade Scalatest to v3.2.9. (#10576)
* Upgrade Scalatest to v3.2.9.

Because of some coupling we also have to upgrade Scalaz to the latest
v7.2 point release, v7.2.33.

The Scalatest changes are quite involved because the JAR has been broken
up into several smaller JARs. Because Bazel expects us to specify all
dependencies and doesn't allow transitive dependencies to be used
directly, this means that we need to specify the explicit Scalatest
components that we use.

As you can imagine, this results in quite a big set of changes. They
are, however, constrained to dependency management; all the code remains
the same.

CHANGELOG_BEGIN
CHANGELOG_END

* http-json-oracle: Fix a Scalatest dependency.

* ledger-api-client: Fix a Scalatest dependency.
2021-08-12 23:19:35 +00:00
nicu-da
35641b7f62
Add submission id to the GRPC api [KVL-999] (#10467)
* Add optional submission id to commands.proto

This allows to propagate a submission id. If no id is submitted (the submission id is empty) then we generate a new submission id

CHANGELOG_BEGIN
Add optional submission_id to the commands.proto.
CHANGELOG_END

* Update haskell bindings to include the submission id

* Code review - rename submission id extractor

* Code review - update comment and remove braces from if block

* Fix braces
2021-08-06 08:54:54 +02:00
Miklos
0eba812109
Remove trace_context field from Ledger API [KVL-1021] (#10256)
CHANGELOG_BEGIN
* [Integration Kit] Removed trace_context field from Ledger API and its bindings as we now have trace context propagation support via gRPC metadata. If you are constructing or consuming Ledger API requests or responses directly, you may need to update your code.
CHANGELOG_END
2021-07-15 19:06:25 +02:00
Miklos
643a2de006
v2 participant state API draft [KVL-998] (#10210)
CHANGELOG_BEGIN
CHANGELOG_END
2021-07-12 18:11:52 +02:00
Remy
62aabcc478
Ledger API: bump version for LF 1.14 (#10175)
* Ledger API: bump version for LF 1.14

CHANGELOG_BEGIN

* Ledger API: bump version for LF1.14

CHANGELOG_END

* Update docs/source/support/compatibility.rst

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Update docs/source/support/compatibility.rst

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-07-05 13:54:25 +00:00
Stephen Compall
f5e5062470
ensure that signatories and observers are disjoint in ledger-api CreatedEvents (#10123)
* document that signatories shouldn't appear in observers in ledger-api

CHANGELOG_BEGIN
CHANGELOG_END

* add disjoint signatories/observers checks to ACS and transaction ledger-api tests

* scala 2.12 compatibility

* "never" replaces "should not"

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-06-28 20:28:31 +00:00
Remy
679ce3b7d3
LF: Release LF 1.13 (#9705)
CHANGELOG_BEGIN

- LF: make LF 1.13 stable
   Add support for BigNumeric

- Ledger API: Bump Ledger API version for LF 1.12

CHANGELOG_END
2021-05-18 17:30:34 +02:00
Stephen Compall
ca9e89b3da
check whether collection.compat is unused when compiling for Scala 2.12 (#9604)
* check whether collection.compat is unused when compiling for Scala 2.12

- Instead of always suppressing warnings for collection.compat._,
  we should only do it for Scala 2.13

- We can also reduce boilerplate by automatically adding this
  option when both silencer_plugin and collection-compat are
  present

CHANGELOG_BEGIN
CHANGELOG_END

* remove unused import

* remove another unused import

* remove even more unused imports

* missed compat dependency

* more missed compat dependencies

* missed compat dependency

* use scala_deps in scaladoc_jar

- #8423 inlined the major version expansion, but this seems to
  have been prior to proper support by scaladoc_jar

* restore custom handling of participant-integration-api

- fixing scaladoc_jar isn't worth it for a single case, as with
  deps vs scala_deps
2021-05-11 21:54:14 +00:00
Moritz Kiefer
de80a6dc60
Drop ValueBuiltinException (#9576)
As discussed, we don’t want to expose this via serializable values at
least for now (and it’s not exposed on the ledger API anyway) so this
PR drops the type.

changelog_begin
changelog_end
2021-05-05 12:32:58 +02:00
Samir Talwar
e1af564bcc
Switch from @silent to @nowarn. (#9498)
* Switch from `@silent` to `@nowarn`.

This annotation is native to Scala 2.12.13+ and 2.13.2+. It replaces
most usages of `@silent`.

I had to get creative about a couple of use cases that didn't work.
Specifically:

  1.  Suppressing deprecation warnings works, but Scala 2.12 erroneously
      complains that the `@nowarn` is unnecessary.  I had to suppress
      this warning too with `-Ywarn-unused:-nowarn`.
  2.  I can't seem to suppress the warning, "The outer reference in this
      type test cannot be checked at run time." Instead, I have
      refactored the code to remove the warning.

We still need to use the silencer plugin to suppress some warnings about
unused imports (because of compatibility between Scala 2.12 and 2.13),
but this means we no longer need the library, and therefore it is not a
transitive dependency that downstream consumers need to worry about.

CHANGELOG_BEGIN
CHANGELOG_END

* Add some comments around `@nowarn` support.

* language-support/scala: Fix a warning suppression.

* Revert to the default warnings.

Compatibility was complaining.
2021-04-26 19:46:14 +00:00
Hubert Slojewski
cb422e2f67
KVL-810 Report the correct gRPC error code on failures due to concurrent transactions (#9218)
* Fix gRPC status codes for inconsistency rejections and DamlLf errors
Also, add unit tests and exclude failing compatibility and conformance tests

CHANGELOG_BEGIN

- [Integration Kit] Fix gRPC status codes for inconsistency rejections and DamlLf errors (ContractNotFound, ReplayMismatch) by changing them from INVALID_ARGUMENT to ABORTED

CHANGELOG_END
2021-03-26 15:26:33 +01:00
Hubert Slojewski
51f495e758
KVL-203 Share participant state integration test harness (#9143)
* Expose libraries for integration testing purposes

The motivation of these changes is to eliminate manual work and reduce duplication between the SDK and oem-integration-kit repos by reusing the same test fixture for integration testing participant state implementations. Also, the DARs required for running these tests won't need to be manually updated.

CHANGELOG_BEGIN
CHANGELOG_END

* Fix a concurrency issue in integration tests

* Fix Bazel error

* Fix conflict resolution

* Move inline daml-lf to separate dar files

* Add a comment

* Add a missing artifact

* Extract method

* Remove maven tags

* Add a macro for Scala libraries with dar resources

* Improve the macro

* Add missing artifact

* Simplify the tests

* Format signature

* Fix the maven tag

* Add missing copyright headers

* Format bazel files

* Make //ledger/test-common lf version dependent (to avoid jar hell)

* Move da_scala_dar_resources_library to a separate bzl file

* Add missing artifacts

Co-authored-by: Hubert Slojewski <hubert.slojewski@tesco.com>
2021-03-19 16:29:02 +01:00
nickchapman-da
9b2158508b
Add new variant to Value.scala for builtin-exceptions. (#9084)
* Add new variant to Value.scala for builtin-exceptions.

final case class ValueBuiltinException[+Cid](tag: String, value: Value[Cid]) extends Value[Cid]

And push through the code consequences.
Most places fixed up.
A couple more things to do in this PR (marked NICK)
A couple of things which can be left for later (marked 8020)

fix build

fix another scala match

changelog_begin
changelog_end

* fix any match

* add marker of code which needs attending to in the PR

* extend ledger-api value.proto & fix LfEngineToApi

* undo/comment-out the change to value.proto

* add tests in HashSpec for BuiltinException

* code but dont yet enable value-gen for builtin exceptions

* address comments which suggest we crash in various places

* support BuiltinException in scenario_service.proto

* one more TODO 8020 tag
2021-03-16 13:15:33 +00:00
Moritz Kiefer
576d0cb758
Bump Ledger API version for LF 1.12 (#8972)
changelog_begin
changelog_end
2021-03-01 12:42:33 +00:00
Moritz Kiefer
4aded7151c
Update compatibility docs for Ledger API version 1.9 (#8828)
Also adds a comment to make sure we don’t forget it in the
future. Note for reviewers: Our code already only looks at the first
line, so the comment in the second line does not break anything.

changelog_begin
changelog_end
2021-02-12 10:45:11 +00:00
Stefano Baghino
ecf5f9b9c4
Enforce Java formatting style with google-java-format (#8686)
* Amend fmt.sh to check Java formatting with javafmt

changelog_begin
changelog_end

* Address https://github.com/digital-asset/daml/pull/8686#issuecomment-769740615

* Apply new formatting style to main code

* Apply new code style to docs code
2021-01-29 16:50:18 +00:00
Moritz Kiefer
5d91a25306
Disable deriving-defaults per file (#8684)
Disabling it per target works nicely for compilation but it gets
annoying in ghci since the warnings are still triggered. We could
disable it everywhere but I think the warning is generally useful. I
tried patching proto3-suite to use DerivingStrategies but that doesn’t
work because haskell-src is dead and doesn’t support it. So for now
adding it to the per-file list seems like the best option.

changelog_begin
changelog_end
2021-01-29 11:01:55 +00:00
Moritz Kiefer
c89e00342d
Clean broken entries from the Bazel cache (#8668)
* Clean broken entries from the Bazel cache

This is hopefully a somewhat reasonable workaround for the "output not
created" errors that keep annoying us.

For now, this is just part of the hourly cronjob but we could move it
somewhere else if desired.

changelog_begin
changelog_end

* Fix GCS credentials

changelog_begin
changelog_end
2021-01-28 17:57:09 +00:00
Stefano Baghino
793fd8fdfc
Correctly document and report malformed party names when allocating (#8642)
* Correctly document and report malformed party names when allocating

changelog_begin
[Ledger API] Documented the hard-coded limit of 255 characters for Daml-LF party names.
[Ledger API] Malformed party names are now correctly reported back with an INVALID_ARGUMENT error
changelog_end

* Make sure that what is given is a suggestion

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

* Use Future.successful where possible

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

* Address https://github.com/digital-asset/daml/pull/8642#discussion_r565116571

* Address https://github.com/digital-asset/daml/pull/8642#discussion_r565122362

* Keep fields private where possible

* Whitelist new tests on compatibility suite

* Don't run the new tests on Canton

Co-authored-by: Robert Autenrieth <31539813+rautenrieth-da@users.noreply.github.com>
2021-01-27 18:50:19 +00:00
Richard Kapolnai
03a1fd960e
change comment of listknownparties: known instead of hosted (#8632)
* change comment of listknownparties: known instead of hosted

* CHANGELOG_BEGIN
CHANGELOG_END
2021-01-26 14:30:35 +00:00
Moritz Kiefer
e0c5abd647
Switch to GHC 8.10.3 (#8394)
* Switch to GHC 8.10.3

changelog_begin
changelog_end

* Update bazel-haskell-deps.bzl

Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>

* Comment on rules_haskell patch

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
2021-01-25 11:53:53 +00:00
Remy
53ab426119
LF: Release LF 1.11 (#8562)
CHANGELOG_BEGIN

- [Daml-LF] Release LF 1.11
  - add suport for Generic Map
  - add support for choice observer
  - add generic comparison
  - add convert of contract ID to string (available only in off-ledger mode)
  - reduce size of dar using type interning

CHANGELOG_END
2021-01-21 14:27:37 +01:00
Gerolf Seitz
9d120f5121
Bump Ledger API version to 1.8.0 (#8455)
CHANGELOG_BEGIN
[Ledger API] With the introduction of multi-party submissions, the
Ledger API is now at version 1.8.0
CHANGELOG_END
2021-01-11 16:02:01 +00:00
Moritz Kiefer
1abde753c9
Build and test //ledger-api/... against Scala 2.13 (#8452)
changelog_begin
changelog_end
2021-01-11 16:53:54 +01:00
Moritz Kiefer
22ce940954
Upgrade scalafmt and enable trailing commas (#8437)
This PR updates scalafmt and enables trailingCommas =
multiple. Unfortunately, scalafmt broke the version field which means
we cannot fully preserve the rest of the config. I’ve made some
attempts to stay reasonably close to the original config but couldn’t
find an exact equivalent in a lot of cases. I don’t feel strongly
about any of the settings so happy to change them to something else.

As announced, this will be merged on Saturday to avoid too many conflicts.

changelog_begin
changelog_end
2021-01-09 11:37:37 +01:00
Bernhard Elsner
cda93db944
Daml case and logo (#8433)
* Replace many occurrences of DAML with Daml

* Update docs logo

* A few more CLI occurrences

CHANGELOG_BEGIN
- Change DAML capitalization and docs logo
CHANGELOG_END

* Fix some over-eager replacements

* A few mor occurrences in md files

* Address comments in *.proto files

* Change case in comments and strings in .ts files

* Revert changes to frozen proto files

* Also revert LF 1.11

* Update get-daml.sh

* Update windows installer

* Include .py files

* Include comments in .daml files

* More instances in the assistant CLI

* some more help texts
2021-01-08 12:50:15 +00:00
Gary Verhaegen
a925f0174c
update copyright notices for 2021 (#8257)
* update copyright notices for 2021

To be merged on 2021-01-01.

CHANGELOG_BEGIN
CHANGELOG_END

* patch-bazel-windows & da-ghc-lib
2021-01-01 19:49:51 +01:00
Moritz Kiefer
a8776b0ba1
Fix documentation for InclusiveFilters (#8322)
As discussed in
https://discuss.daml.com/t/registeredtemplates-behaves-as-allindar/1789/5?u=cocreature
the current behavior doesn’t match the docs. There doesn’t seem a good
usecase to change the existing behavior so adapting the docs seems
more sensible.

changelog_begin
changelog_end
2020-12-17 08:33:35 +01:00
Moritz Kiefer
1b32044a74
Build //libs-scala/... on 2.13 (#8282)
* Build //libs-scala/... on 2.13

One test is unfortunately disabled at the moment since I utterly
failed to figure out why I get a ClassNotFoundException on 2.13.

changelog_begin
changelog_end

* Copyright headers

changelog_begin
changelog_end

* I can’t bazel today

changelog_begin
changelog_end

* Apply suggestions from code review

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>

* Update libs-scala/resources/src/main/2.13/com/daml/resources/UnitCanBuildFrom.scala

Co-authored-by: Stephen Compall <stephen.compall@daml.com>

* No split on view

changelog_begin
changelog_end

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2020-12-14 17:36:53 +00:00
Moritz Kiefer
76b6fd86fb
Upgrade Scala dependencies for 2.13 compatibility (#8268)
* Upgrade Scala dependencies for 2.13 compatibility

This upgrades a bunch of Scala libraries to versions that have 2.13
support. There are two libraries that are still missing:

- diffson, this has a new version but with significant breaking
  changes and it is only used in Naigator console which I hope to kill
  before I have to worry about this.

- ai.x:diff, this is used in the ledger API test tool. The library is
  abondened but there are a few alternatives.

changelog_begin
changelog_end

* Fix pureconfig

changelog_begin
changelog_end

* Fix Navigator

changelog_begin
changelog_end
2020-12-14 09:59:00 +01:00
Ognjen Maric
b535c33e4d
Document the tx service behavior for filters and transient contracts (#8016)
Document the tx service behavior for filters and transient contracts

CHANGELOG_BEGIN
CHANGELOG_END
2020-12-09 14:48:39 +01:00
Moritz Kiefer
7e05dc7932
Upgrade rules-scala and scalatest (#8187)
This is necessary to at least attempt an upgrade to 2.13 and
generally, I want to keep our rulesets up2date. rules-scala forces the
version of scalatest so we have to bump that at the same time.

This requires changes to basically all Scala test suites since the
import structure has changed and a bunch of things (primarily
scalacheck support) got split out.

Apologies for the giant PR, I don’t see a way to keep it smaller.

changelog_begin
changelog_end
2020-12-08 06:59:23 +01:00
Robert Autenrieth
56f5cf107b
Prepare the ledger API for multi-party submissions [KVL-710] (#8125)
* Add multi-party submissions to the ledger API

CHANGELOG_BEGIN
* [Ledger API] Command submission requests now contain new optional
  fields used for multi-party submissions. Such submissions currently
  return UNIMPLEMENTED errors, they will be enabled in the future.
CHANGELOG_END

* Adapt Haskell bindings

* Handle the new ledger API fields

* Fix SubmitAndWaitDummyCommand

* Remove unused methods

* Redesign multi-party auth tests

* Remove direct access of request party

* Apply review comments

* Improve protobuf comments

* Multi-party tracker map

* Fix validation logic

* Consistent metric naming
2020-12-07 16:17:05 +01:00
Stefano Baghino
d3899368ff
Document offset inclusivity and exclusivity in Protobuf (#8145)
* Document offset inclusivity and exclusivity in Protobuf

As brought up in https://discuss.daml.com/t/using-offsets/1731, the
inclusivity and exclusivity of start and end offsets as exposed by
the Ledger API is not well documented.

This commit clearly states which offset is inclusive and which is
exclusive on all relevant endpoints (command completion and
transaction services).

changelog_begin
changelog_end

* Address https://github.com/digital-asset/daml/pull/8145#pullrequestreview-543758867
2020-12-03 16:00:50 +01:00
Samir Talwar
93acf1e6cd
Bazel: Reduce visibility of Protobuf JARs and accoutrements. (#8121)
* Bazel: Reduce the visibility of some Protobuf targets.

* Bazel: Make Protobuf JAR visibility parameterizable.

Default to private, and explicitly make it public where it's needed.

CHANGELOG_BEGIN
CHANGELOG_END
2020-12-01 14:00:44 +00:00
Stefano Baghino
bc0f6ab35e
[DPP-84] Employ parallel unnesting instead of batching on PostgreSQL (#8042)
* [DPP-84] Employ parallel unnesting instead of batching on PostgreSQL

changelog_begin
[Integration Kit] When using a PostgreSQL-based index, leveraging native
parallel unnesting allows to more efficiently index new transactions.
changelog_end

* Address review https://github.com/digital-asset/daml/pull/8042#pullrequestreview-541759596
2020-12-01 12:06:36 +00:00
Samir Talwar
4d1cf41adf
Bazel: Simplify the implementation of proto_gen. (#8120)
CHANGELOG_BEGIN
CHANGELOG_END
2020-12-01 10:36:10 +00:00