Commit Graph

229 Commits

Author SHA1 Message Date
pbatko-da
37c645333f
Use an error code when AkkaGrpc services get closed (#13175)
changelog_begin
Ledger API Specification: Streaming endpoints will use error code 'SERVER_IS_SHUTTING_DOWN' when the server
is being shut down, whereas before an exception without an error code was used.
Grpc status code in use remains 'UNAVAILABLE'.
changelog_end
2022-03-08 12:48:22 +01:00
Simon Meier
7d0fadc3ca
user management: document limits (#13040)
* user management: document limits

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Pawel Batko <pawel.batko@digitalasset.com>
2022-02-23 14:55:05 +01:00
mziolekda
f645641acf
Bump ledger api version to 2.0 (#12956)
CHANGELOG_BEGIN
Ledger API version 2.0
CHANGELOG_END
2022-02-16 11:55:49 +01:00
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