Commit Graph

347 Commits

Author SHA1 Message Date
Matthias Schmalz
865b882fdf
Documented why conversion methods are public (#14155)
CHANGELOG_BEGIN
CHANGELOG_END
2022-06-14 08:35:52 +02:00
Matthias Schmalz
639f8be207
Make methods for deserializing GRPC-commands public (#14144)
Its helpful in Canton tests, if we can reuse the existing code that converts GRPC-commands to API commands.

CHANGELOG_BEGIN
CHANGELOG_END
2022-06-13 09:51:25 +02:00
Sergey Kisel
168f943ff0
Revise the config to use a hierarchical structure [DPP-1029] (#13629)
* Revise the config to use a hierarchical structure [DPP-1029]

CHANGELOG_BEGIN
CHANGELOG_END
2022-05-30 18:02:53 +02:00
Remy
6f6a3052a1
Repurpose templateId in ExerciseCommand and add interfaceId in ExerciseEvent (#13660)
part of #13653

CHANGELOG_BEGIN
CHANGELOG_END
2022-05-16 15:30:07 +00:00
Marton Nagy
5d8ebd7a08
Switch to asynchronous teardown at Dispatcher (#13631)
Previously a fire and forget release process
was implemented, which in corner cases could
result in exceptions, as API stream was still running after DbDispatcher was released.

This PR changes to waiting for all the streams to finish as releasing Dispatcher (with a timeout of 5 seconds).

CHANGELOG_BEGIN
CHANGELOG_END
2022-05-05 21:15:58 +02:00
Marton Nagy
0ea140f51e
Fix random exercise node's childEventId order [DPP-1018] (#13740)
Fixes Index DB insertion order for childEventId.
Adds backwards compatibility treatment: recovering childEventId
order from the order of events at API stream rendering.
Extends TransactionServiceVisibilityIT with the ordering criterion.
Fixes compatibility tests with exclusion.
Adds documentation to event.proto.

CHANGELOG_BEGIN
Fixing Ledger API Bug: Exercise nodes in transaction trees
have child_event_ids out of order.
CHANGELOG_END
2022-05-03 16:02:25 +02:00
Nicu Reut
a792de39a5
Update scalafmt to 3.5.1. (#13584)
CHANGELOG_BEGIN
CHANGELOG_END
2022-04-28 09:57:04 +00:00
Matthias Schmalz
c21a135d4f
Changed log level of PARTICIPANT_BACKPRESSURE to INFO. (#13555)
(Otherwise, an excessive rate of incoming commands will flood the log file with backpressure warnings.)

CHANGELOG_BEGIN
CHANGELOG_END
2022-04-12 09:49:55 +02:00
Remy
f7d1901a5c
LF: split Command into ApiCommand and ReplayCommand (#13323)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-21 14:07:41 +01:00
pbatko-da
c6a0275f6e
[Error codes] Fill in missing contexts that were lost where reflection based context population was removed [DPP-606] (#13264)
And rename error arguments that haven't been in camel case yet.

changelog_begin
changelog_end
2022-03-16 15:07:24 +01:00
pbatko-da
3f0ded9274
Remove ErrorFactories [DPP-606] (#13285)
changelog_begin
changelog_end
2022-03-16 14:00:30 +01:00
Sergey Kisel
a4f4300502
Naming and logging improvements [DPP-956] (#13270)
* Naming and logging improvements [DPP-956]

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-15 09:40:39 +01:00
pbatko-da
ee6a5f9e0e
Handle misc error codes todos. [DPP-606] (#13248)
changelog_begin
changelog_end
2022-03-14 17:16:31 +01:00
pbatko-da
92e3e9e2df
Add unit tests for ErrorCode [DPP-799] (#13236)
changelog_begin
changelog_end
2022-03-14 12:38:23 +01:00
pbatko-da
a8c0984d9b
[User management] Make use of UM error group in the docs (#13260)
changelog_begin
changelog_end
2022-03-14 12:09:48 +01:00
pbatko-da
fbb3ba55c2
Simplify implementations of BaseError trait [DPP-606] (#13185)
1. Remove `BaseError.Impl`, `LoggingTransactionErrorImpl` and `LoggingPackageServiceError` 
and instead provide more direct `DamlError` and `DamlErrorWithDefiniteAnswer`.


2. Remove custom implementation of `TransactionError.rpcStatus` and instead provide simpler one in `DamlErr.r.rpcStatus` (which works by first calling `code.asGrpcStatus` and then converting the result to `com.google.rpc.status.Status`).

3. Remove `GrpcStatus.toProto` and instead use `DamlError.rpcStatus`.

4. Use `asGrpcStatus` and `asGrpcError`  instead of `asGrpcStatusFromContext` and `asGrpcErrorFromContext` where possible.


changelog_begin
changelog_end
2022-03-10 12:12:14 +01:00
Sergey Kisel
9a27edd656
Improve MessageDigest and Mac instance creation to solve lock contention [DPP-956] (#13221)
* Improve MessageDigest and Mac instance creation to solve lock contention problem [DPP-956]

changelog_begin
Scalability bottleneck in regard to hashing has been fixed in multiple places.
changelog_end
2022-03-09 22:15:32 +01:00
pbatko-da
877713edd3
Move validation error helpers out of ErrorFactories [DPP-606] (#13180)
changelog_begin
changelog_end
2022-03-08 17:15:26 +01:00
pbatko-da
c7c211e4df
Remove most of ErrorFactories [DPP-606] (#13146)
changelog_begin
changelog_end
2022-03-07 16:15:21 +01:00
pbatko-da
15aa300fba
Use DamlContextualizedErrorLogger.forTesting (#13137)
changelog_begin
changelog_end
2022-03-04 12:24:08 +01:00
pbatko-da
af27f5d926
Make ErrorFactories into an object in preparation for its removal. [DPP-606] (#13143)
changelog_begin
changelog_end
2022-03-04 09:35:38 +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
Kamil Bozek
dfd38186fe
Remove pre-1.18 error codes [DPP-773] (#12841)
* Remove legacy error codes

CHANGELOG_BEGIN
CHANGELOG_END

* Remove ValidatorFixture

* Removed redundant helper function

* Remove redundant object

* Rebased.

run-full-compat: true

* Rebased.

run-full-compat: true
2022-02-15 15:28:36 +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
Victor Peter Rouven Müller
aa45f48798
Upgrade to Scala 2.13.8 (#12506)
* Upgrade to Scala 2.13.8

changelog_begin
changelog_end

* Update hash for scala in nixpkgs

* update more hashes for scala upgrade

* Fix most warnings etc.

* Fix remaining errors etc.

* Fix formatting

* Resolve last errors hopefully

* Fix ledger api common build file

* Combine imports & revert accidental change that broke the CI run

* Rename exporting vals to scriptExport & minimize diff

* Remove more wrong changes

* moved warning around
2022-02-03 09:05:31 +00:00
nicu-da
c1afabe653
[participant-state] Add earliest_offset metadata to pruned data error [kvl-1270] (#12546) 2022-01-31 16:54:24 +00:00
pbatko-da
c72c27c967
[User management] Terminate ongoing streams when user state has changed [DPP-830] (#12437)
CHANGELOG_BEGIN
Ledger API Specification: When using user management based authorization streams will now get aborted on authenticated user's rights change.
CHANGELOG_END
2022-01-28 16:44:39 +01:00
tudor-da
3e16e5ec98
Handle ledger bridge Queue errors (#12510)
changelog_begin
changelog_end
2022-01-26 18:48:00 +00: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
Hubert Slojewski
cdde8df9fd
ledger-api-test-tool: Add assertions and a test case for successful completions when converting deduplication durations to offsets [KVL-1220] (#12462)
CHANGELOG_BEGIN
CHANGELOG_END
2022-01-21 13:44:24 +01:00
Moritz Kiefer
688f1e1e0b
Drop v0 contract ids (#12464)
* Drop v0 contract ids

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2022-01-20 15:28:27 +00:00
pbatko-da
f7e2faf5aa
[User management] Addressing outstanding code review comments from https://github.com/digital-asset/daml/pull/12344# (#12479)
CHANGELOG_BEGIN
CHANGELOG_END
2022-01-19 15:23:59 +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
mziolekda
954bc5e0d4
Remove the reset service from sandbox-classic and sandbox [DPP-804] (#12448)
* Remove the reset service from sandbox-classic and sandbox

CHANGELOG_BEGIN
Reset service has been removed from the sandbox-classic, sandbox and daml-on-sql
CHANGELOG_END

* format it
2022-01-19 09:18:14 +01:00
pbatko-da
4fe6e53b9d
[User management] Persistence with caching (#12344)
Adding
 - `PersistentUserManagementStore` and `CachedUserManagementStore`,
 - `UserManagementStorageBackendTemplate` and sql migrations,
 - CLI flags: `--user-management-max-cache-size` and `--user-management-cache-expiry`;
 And wiring `PersistentUserManagementStore` where before we had `InMemoryUserManagementStore`.
2022-01-18 15:59:22 +01:00
nicu-da
5a7b2bae12
ledger-api - Rename error method to invalidDeduplicationPeriod [KVL-1222] (#12424) 2022-01-17 11:54:32 +00:00
Simon Meier
62b61c0d51
ledger api auth: polish error messages (#12350)
* ledger api auth: polish error messages

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-11 18:16:59 +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
Samir Talwar
3b8a9e4432
Revert "devenv: Just require Nix v2.4 or newer." (#12299)
This reverts commit ed442fa8ae.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-06 18:02:21 +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
e182fc5026
[ledger-api] - Move deduplication duration validation into the KV WriteService (#12151)
changelog_begin
ledger-api - Remove validation for duration deduplication periods, which was validating that the deduplication duration is smaller than the max deduplication duration. This is now up to the ledger to enforce.
changelog_end
2021-12-20 05:33:46 -08: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
f330ace261
[DPP-765] Follow-up to generic gRPC error handler (#12056)
CHANGELOG_BEGIN
CHANGELOG_END
2021-12-10 10:12:14 +01:00
pbatko-da
0613a712c9
[DPP-767] Add assertion for logged messages in ErrorFactoriesSpec (#11973)
CHANGELOG_BEGIN
CHANGELOG_END
2021-12-08 09:54:49 +01:00
Stefano Baghino
00d3326ebe
Remove source code specific to Scala 2.12 (#12003)
Looks like it has been removed from the build files but not from the source tree.

changelog_begin
changelog_end
2021-12-07 10:08:19 +00:00
nicu-da
28e62820ef
[ledger-api] - Rename the error metadata key for invalid deduplication duration (#11966)
changelog_begin
[ledger-api] - rename metadata key max_deduplication_duration to longest_duration for error concerning invalid deduplication durations
changelog_end
2021-12-05 23:55:47 -08:00
nicu-da
61334cff77
kvutils - Add Writer which can handle deduplication periods as offsets [KVL-1172] (#11900)
changelog_begin
changelog_end
2021-11-29 10:28:07 -08:00
mziolekda
056fc52706
Log while processing base64 encoded server key [DPP-761] (#11835)
* Log while processing base64 encoded server key

CHANGELOG_BEGIN
CHANGELOG_END

* address review comments

* demote logs from error to debug

* format
2021-11-25 18:02:35 +00:00