Commit Graph

154 Commits

Author SHA1 Message Date
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
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
Simon Maxen
1d40c55177
Add metering report http endpoint [DPP-855] (#13147)
* Added metering report http endpoint

changelog_begin
Added metering report http endpoint
changelog_end

* Update with review comments
2022-03-09 14:59:08 +00: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
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
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
tudor-da
14a0459f0a
SandboxNextFixture replaced by SOX-based SandboxFixture (#12654)
* SandboxNextFixture replaced by Sandbox-on-X based SandboxFixture

changelog_begin
changelog_end

* Some fixed tests

* No direct dependencies on //ledger/sandbox:sandbox and //ledger/sandbox:sandbox-scala-tests-lib

* Fix after rebase

* Rename SandboxFixture and add a missing dep

* Generate valid party names if hint is empty

* Smaller maxInboundMessageSize

* Added test for empty display name

* SandboxServer is a ResourceOwner
* Uses execution context passed as an input for resource management
* Fixes flaky FlywayMigrations issue with null Thread.currentThread.currentClassLoader
* SandboxServer simplification returns Port instead of ApiServer

* Dedicated PMAllocateWithoutDisplayName for non-Canton ledgers
* Created since Canton does not return empty display names
2022-02-07 09:25:22 +01:00
Adriaan Moors
e3bae961cc
VersionClient supports getApiFeatures (#12724)
* VersionClient supports getApiFeatures

This exposes the `features` part of the version service's
`GetLedgerApiVersionResponse` protobuf.

Map the protobuf to user-friendly subclasses of `Feature`,
defined in `c.d.ledger.api.domain`.

VersionClient does not expose experimental features, as they
are meant for internal testing only.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Simon Meier <meiersi-da@users.noreply.github.com>

Co-authored-by: Simon Meier <meiersi-da@users.noreply.github.com>
2022-02-04 16:02:36 +00: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
Brian Healey
e70237a673
upgrade scalapb/netty/grpc/protobuf in proven combination (#12628)
* upgrade scalapb/netty/grpc/protobuf in proven combination

CHANGELOG_BEGIN
Upgrade scalapb, netty, grpc, protobuf and guava versions
CHANGELOG_END

* bazel reformat

* match grpc version in deps.bzl

* upgrade akka

* keep grpc version to 1.43 that is used in latest nixpkgs-unstable

* rebase and regen

* update SHA for scalapb tarball

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2022-02-03 08:38:38 -05:00
Adriaan Moors
810554bee5
Use Seq instead of Vector in user mgmt apis (#12725)
For consistency with other APIs in this area.
Note that some pre-existing APIs use `List` instead of `Seq`,
but at least those use the same underlying implementation.

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-03 13:52:53 +01:00
tudor-da
bb5722cd1b
Move sandbox-classic test lib and IT tests to Sandbox-on-x (#12641)
* Moved SandboxFixture and IT tests to Sandbox-on-X

changelog_begin
changelog_end

* Addressed review comments
2022-01-31 12:49:46 +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
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
Stefano Baghino
4af48bbccc
Split channel configuration from LedgerClientConfiguration (#12433)
* Split channel configuration from LedgerClientConfiguration

Fixes #12391

The channel configuration now has to be provided separately from the
configuration specific to the ledger client. In this way we avoid
situations where the builder is provided with some configuration
that gets overridden.

changelog_begin
[Scala bindings] The channel configuration has been split from the
LedgerClientConfiguration class. Provide the gRPC channel specific
configuration separately or use a builder. The channel configuration
no longer overrides the builder.
changelog_end

* Fix compilation issues in //ledger-service/...
2022-01-18 10:03:33 +00:00
Simon Meier
82bdfa5222
ledger-api-auth: remove SupportedJWTPayload (#12343)
* ledger-api-auth: make AuthServiceJWTPayload parse both user and custom daml access tokens

changelog_begin
changelog_end
2022-01-13 16:12:13 +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
Victor Peter Rouven Müller
c5de61ae9e
[JSON-API] Also accept user tokens as auth source (#12075)
* WIP

* Remove the dummy implementation and replace it with an actual working implementation

* Make it compile!

* Add working tests for the user management support in the json api

CHANGELOG_BEGIN

- [JSON-API] Added basic support for the new user management feature of the ledger such that user tokens are now accepted instead of the legacy tokens

CHANGELOG_END

* Simplify the create iou test case and adjust the test case name to be correct

* Add additional test that covers that the overwrite of actAs&readAs still works via the meta object

* Make it work with unauthenticated ledgers too

* Fix compile error & wrong behaviour & add test coverage for non auth ledgers

* Clean up the diff

* Address 66312e9940 (r770782884)

* Address 66312e9940 (r770750653)

* Addressing 66312e9940 (r770751958)

* Address 66312e9940 (r770736671)

* Address 66312e9940 (r770734395) and 66312e9940 (r770783237)

Co-authored-by: Stefano Baghino <stefano.baghino@digitalasset.com>
2021-12-18 12:54:12 +00: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
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
Moritz Kiefer
0d1abde160
Expose UserManagementClient via LedgerClient (#12064)
changelog_begin
changelog_end
2021-12-08 19:44:21 +00:00
Moritz Kiefer
89a4a3b095
Drop UserId domain datatype (#12044)
changelog_begin
changelog_end
2021-12-08 11:24:55 +00:00
Simon Meier
ef4ae931d1
Add Ledger API scala client for user management (#12000)
scala bindings: add client for user management API

CHANGELOG_BEGIN
- [Scala bindings] add methods to call the user management API
CHANGELOG_END
2021-12-07 13:36:05 +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
tudor-da
8e31e8e6a8
[Self-service error codes] Enabled by default [DPP-691] (#11685)
* [Self-service error codes] Enabled by default
* Flag changed to `use-pre-1.18-error-codes` (disabled by default)

CHANGELOG_BEGIN
[Ledger API Specification] The Ledger API returns enriched error codes (see https://docs.daml.com/error-codes/self-service/index.html)
For backwards-compatibility, a new API flag `--use-pre-1.18-error-codes` is introduced for preserving the legacy behavior for
clients that want to migrate incrementally to the changed gRPC status code responses and error details format.
CHANGELOG_END

* Adapted HttpServiceIntegrationTest

* Renamed `Feature Flag` to `Configuration` in docs

* Fix Daml Script tests

changelog_begin
changelog_end

* Fix Repl functests

changelog_begin
changelog_end

* Fix haskell binding tests

changelog_begin
changelog_end

* Fix CommandClientIT test

* Fixed Sandbox and CommandServiceBackpressureIT tests
 Please enter the commit message for your changes. Lines starting

* Adapt //compiler/damlc/tests:repl-functests again

* Fix more tests and address Miklos' comments
* Flag name changed to `grpc-status-codes-compatibility-mode`

* Remove useless flags sandbox-classic

* Sandbox-classic tests fix for ContractKeysIT and ExceptionsIT
* Created 2 deprecated test suites that have the more generic assertions as returned
by the deprecated in-memory backend

* More fixes for CommandServiceIT
* Fixes compilation issue with the deprecated exceptionsIT class for Sandbox-classic in-memory

* Compatibility mode for old test tools

* Change flag name to `use-pre-1.18-error-codes`

* Apply suggestions from code review

Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
2021-11-22 12:26:48 +00:00
nicu-da
2d9ee2078f
[ledger-api-client] - Do not account for deduplication_time as timeout [KVL-1172] (#11791)
changelog_begin
ledger-api-client - The default command tracking timeout is no longer influenced by the deprecated deduplication_time as a deduplication period. Previously if no timeout was being set in the command and deduplication_time was set as the deduplication period then the command tracking timeout was the minimum between the deduplication_time and max tracking timeout.
changelog_end
2021-11-19 18:23:27 +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
tudor-da
b0a1bf79df
More missing error codes (#11749)
* Missing error codes in Sandbox classic

CHANGELOG_BEGIN
CHANGELOG_END

* Covering more errors above the persistence layer

* Fix wrong contextualizedErrorLoggers

* Compilation fixes
2021-11-18 10:00:43 +00:00
Moritz Kiefer
3366413dd4
Delete empty scala test library (#11747)
changelog_begin
changelog_end
2021-11-18 10:22:35 +01:00
tudor-da
fbc436d70a
[DPP-739][Self-service error codes] Adapt QueueBackedTracker error codes (#11719)
* [Self-service error codes] Adapt QueueBasedTracker

CHANGELOG_BEGIN
CHANGELOG_END

* Added changed error codes to migration guide

* Fixed ErrorFactoriesSpec

* Update ledger/error/src/main/scala/com/daml/error/definitions/LedgerApiErrors.scala

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

Co-authored-by: Pawel Batko <pawel.batko@digitalasset.com>
Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>
2021-11-16 22:21:29 +00:00
Hubert Slojewski
69471d6135
ledger-api-client: Fix a log message related to an empty submission ID (#11695)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-15 13:57:19 +00:00
Hubert Slojewski
8212c0b2a5
Make submission ID optional [KVL-1107] (#11011)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-26 14:39:56 +00:00
nicu-da
e79a30aa80
For the client binding propagate the full original completion [KVL-1112] (#10879)
* For the client binding propagate the full original completion.

Because more fields are added to the completion it gets more difficult to deconstruct it into our own models while keeping the same external API. Because of this, we are propagating the full completion as well

CHANGELOG_BEGIN
java-client-bindings - the original full completion is included in the `CompletionResponse` when available
CHANGELOG_END
2021-09-24 13:47:41 +00:00
Samir Talwar
7740b60836
participant-integration-api: Improve the CommandConfiguration docs. (#10978)
Explaining the limits in more detail.

There were some discrepancies between the documentation and the code; in
particular, if there are too many commands in flight, new ones will just
be held in the queue.

CHANGELOG_BEGIN
CHANGELOG_END
2021-09-22 15:48:25 +02:00
Hubert Slojewski
a33176265a
Clarify CommandTracker [KVL-1104] (#10943)
CHANGELOG_BEGIN
CHANGELOG_END
2021-09-20 17:25:26 +00:00
Hubert Slojewski
0ba54a4bf9
Add a missing test case to the CommandTrackerFlowTest (#10939)
CHANGELOG_BEGIN
CHANGELOG_END
2021-09-20 14:25:42 +02:00
Hubert Slojewski
fc2c87d950
ledger-api-client: Generate a submission id if it's empty in the CommandClient [KVL-1104] (#10926)
* Throw an exception if the submission id is empty in `CommandTracker`

CHANGELOG_BEGIN
CHANGELOG_END

* Generate a submission ID in the `CommandClient` if it's empty

CHANGELOG_BEGIN
CHANGELOG_END
2021-09-20 10:00:57 +02:00
Hubert Slojewski
b5648c0e3d
Make CommandTracker distinguish submissions of the same command using submissionId [KVL-1104] (#10868)
CHANGELOG_BEGIN
CHANGELOG_END
2021-09-15 14:15:10 +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
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
Hubert Slojewski
d750666f8e
Do not drop details when converting between gRPC Status classes [KVL-1084] (#10745)
CHANGELOG_BEGIN
CHANGELOG_END
2021-09-06 12:22:15 +02:00
Moritz Kiefer
50fecfb9ef
Wrap missing label names in quotes (#10749)
* Wrap missing label names in quotes

See
https://discuss.daml.com/t/why-might-i-be-getting-missing-record-label-identity-from-the-ledger-api-when-submitting-a-command/3059/5
this has caused some confusion for users since it’s not obvious that
it is the label name if you have a very generic label name like
`identity`.

I have no strong feelings on whether this should be single or double
quotes so happy to change it.

changelog_begin
changelog_end
2021-09-03 13:52:55 +00:00
Victor Peter Rouven Müller
5595d55c79
[JSON-API] Use the token from incoming requests to update the package list (#10602)
* Use the token from incoming requests to update the package list

changelog_begin
changelog_end

* Lazily initialize the ledger client

* Fix ee integration tests

* Fix package reloading behaviour by using a semaphore to check for ongoing updates

* Refactor out the semaphore code into a concurrency utility class

* Use correct locking for the updateTask so every thread always uses an up to date task

* Remove unused imports in utils.Concurrent & remove packages from the tests

* Hide & mark the token file cli option deprecated because we dont need it anymore and only keep it so client deployment code doesn't break

* Fix scala 2.12 build by adding more type annotations

* Update ledger-service/http-json-cli/src/main/scala/com/daml/http/OptionParser.scala

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

* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/PackageService.scala

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

* Readd pgkManagementClient after it was removed accidentally (but now it's lazy)

* Remove concurrent object & use atomic boolean instead of a mutex because it makes more sense

* Replace semaphore with countdownlatch

* Refactor the caching into a separate class

* Use Instant instead of LocalDateTime

* Remove that ** of bad synchonization and do stupid simple synchronization because it JUST WORKS, besides adapt when we want to reload

* Remove await in tests because it can result in buggy tests

* remove unused code in WebSocketService.scala

* Unhide the access-token-file option as per request of Stefano

* Less implicit jwts per request of Stefano

* Try making some code more readable as by request of Akshay

* Use more shark because it expresses better than flatMaps if I don't need the arg

* Move defs in predicate in WebsocketService.scala around

* Try to minimize diff further in WebsocketService.scala

* Fix build and minimize diff in WebSocketService.scala further

* Minimize diff of function getTransactionSourceForParty in WebSocketService.scala

* Share the ec in WebSocketService.scala to minimize the diff

* Minimize in function predicate in WebSocketService.scala

* Further minimize in function predicate in WebSocketService.scala

* Change some case classes to be normal classes but with apply method

* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/PackageService.scala

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

* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/Endpoints.scala

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

* Get rid of implicit jwt tokens, the world is already confusing and full of implicits enough

* Improve readability

* Integrate the new LedgerClient which does not depend on a leder id

* Fix tests

* Apply suggestions from code review

thanks to @S11001001

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

* Apply further review comments

* Remove outcommented code

* Deprecate access token file option in the description too

changelog_begin

- [JSON API] The cli option `--access-token-file` is now deprecated. It
    is not needed anymore and you can safely remove it. Reason is that
    the operations which prior required a token at startup are now done
    on demand using the token of the incoming request.

changelog_end

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2021-09-03 10:12:01 +00:00
pbatko-da
16df8a5e35
[Short] Remove unused code (#10719)
CHANGELOG_BEGIN
CHANGELOG_END
2021-09-02 10:08:54 +02:00
Victor Peter Rouven Müller
7fd590694e
Add LedgerClientWithoutLedgerId next to the LedgerClient (#10681)
* Add the LedgerClientWithoutLedgerId class

* Minimize diff

changelog_begin
changelog_end

* Minimize diff further

* Add missing license header & reformat

* Update language-support/scala/bindings-akka/src/main/scala/com/digitalasset/ledger/client/binding/LedgerClientBinding.scala

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

* Update ledger/ledger-api-client/src/main/scala/com/digitalasset/ledger/client/LedgerClient.scala

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

* Add changelog

changelog_begin

- [Ledger Client Scala Bindings] A new variant of the LedgerClient class
    was added called `LedgerClientWithoutLedgerId`. This class does not
    need a ledger id at initialization. It was added to allow skipping
    any checks at initialization for use cases where either the
    ledger id is not known at initalization or no valid token can be fed
    at initialization for checking the ledger id. Furthermore for each
    classes `ActiveContractSetClient`, `CommandClient`, `PackageClient`,
    `TransactionClient`, `VersionClient` now exists a variant which
    doesn't depend on a ledger id at initialization and instead requires
    one for every function as parameter. Moreover the existing classes
    are extending these classes with overriding the methods and setting
    the default of the parameter with the given ledger id from
    initialization. The class `LedgerClientWithoutLedgerId` already
    makes usage of these variants e.g. `PackageClientWithoutLedgerId`.

changelog_end

* More changelog

changelog_begin

- [Ledger Client Scala Bindings] The function `transactionSource` of the
    class `LedgerClientBinding` now optionally accepts a token which is
    passed on to the unterlying call.

changelog_end

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2021-08-31 14:11:52 +01:00
Samir Talwar
89855054b5
participant-integration-api: Use deadlines, not deduplication times, for expiring trackers. [KVL-1009] (#10704)
* participant-integration-api: On submit and wait, capture a deadline.

We need this deadline to make sure we terminate the stream.

* ledger-api-client: Use the specified expiry time for tracking.

Not the command deduplication time.

CHANGELOG_BEGIN
- [Ledger API Server] The command deduplication time is no longer used
  for determining the period of time to track the command before giving
  up. Instead, the gRPC deadline is used. If no deadline is provided
  (or if the deadline exceeds the command tracker retention period), the
   tracker retention period is used instead.
CHANGELOG_END

* ledger-api-client: Keep supporting the `deduplication_time` timeout.

* ledger-api-client: Improve comments in CommandTrackerFlow and its tests.

Co-Authored-By: Miklos <57664299+miklos-da@users.noreply.github.com>
2021-08-30 19:22:43 +00:00
Samir Talwar
a41b1349df
Use the tracker retention period as the maximum expiry time. [KVL-1009] (#10700)
* ledger-api-client: Rename `maxDeduplicationTime` to `maximumExpiryTime`.

* ledger-api-client: Add tests for command tracker timeouts.

* ledger-api-client: Cap the deduplication period at the expiry time.

* participant-integration-api: Make `trackerRetentionPeriod` a JDuration.

* ledger-api-client: Don't use `JDuration` if we can avoid it.

* participant-integration-api: Add a test for command service timeout.

* Use the tracker retention period as the maximum expiry time.

CHANGELOG_BEGIN
- [Ledger API Server] The command service now uses the tracker retention
  period (typically specified with the ``--tracker-retention-period``
  command-line argument) as the maximum time to wait for a command to
  arrive on the completion stream. After this time, the command will
  time out, though it may still complete in the future. Previously, the
  deduplication period was used, but it was likely the tracker would be
  terminated before that anyway.

  The default tracker retention period is 5 minutes, unless otherwise
  specified.
CHANGELOG_END

* participant-integration-api: Add a test for TrackerMap parameters.

* participant-integration-api: Use `maximumCommandTimeout`.

Instead of `maximumExpiryTime`.

* ledger-api-client: Shorten timeouts in CommandTrackerFlowTest.
2021-08-30 13:21:14 +00:00