Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make submission ID optional [KVL-1107] #11011

Merged
merged 4 commits into from Oct 26, 2021
Merged

Conversation

hubert-da
Copy link
Collaborator

@hubert-da hubert-da commented Sep 23, 2021

Also:

  • Stop generating the submission ID in the GrpcCommandSubmissionService.
  • Propagate submission IDs in the in-memory sandbox classic.
  • Simplify CommandTracker

CHANGELOG_BEGIN
CHANGELOG_END

Pull Request Checklist

  • Read and understand the contribution guidelines
  • Include appropriate tests
  • Set a descriptive title and thorough description
  • Add a reference to the issue this PR will solve, if appropriate
  • Include changelog additions in one or more commit message bodies between the CHANGELOG_BEGIN and CHANGELOG_END tags
  • Normal production system change, include purpose of change in description

NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with /AzurePipelines run to
trigger the build.

@hubert-da hubert-da changed the title Make submission ID optional and generate it in CommandTracker if empty [KVL-1107] Make submission ID optional and generate it in CommandTracker if empty [KVL-1107] - WIP Sep 23, 2021
@hubert-da hubert-da force-pushed the hubert-da/optional-submission-id branch from 93f8661 to c663219 Compare September 23, 2021 15:54
@hubert-da hubert-da changed the title Make submission ID optional and generate it in CommandTracker if empty [KVL-1107] - WIP Make submission ID optional and stop generating it in GrpcCommandSubmissionService [KVL-1107] - WIP Sep 23, 2021

import scala.annotation.nowarn

object CommandUpdaterFlow {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extracted from CommandClient.

@hubert-da hubert-da changed the title Make submission ID optional and stop generating it in GrpcCommandSubmissionService [KVL-1107] - WIP Make submission ID optional and stop generating it in GrpcCommandSubmissionService [KVL-1107] Sep 28, 2021
@hubert-da hubert-da marked this pull request as ready for review September 28, 2021 15:29
@hubert-da hubert-da requested review from meiersi-da and a team as code owners September 28, 2021 15:29
Copy link
Contributor

@andreaslochbihler-da andreaslochbihler-da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CommandTracker tries to make sure that there is ever only a single submission in flight for a given change ID. I don't think that this can work, for the following reasons:

  1. With replicated participants like in a VMBC setup, the same change ID may be sent to multiple participants and those participants each see just a single submission, but they get the completion events for both submissions. That should be taken care of by the CommandService of each participant picking a unique submission ID and checking in the completion that the submission ID is the expected one.
  2. Commands may be sent concurrently via the CommandService and the CommandSubmissionService, and submission IDs are optional for Ledger API submissions. So if the CommandSubmissionService no longer assigns a submission ID, we may actually get back a completion without a submission ID from the submission to the CommandSubmissionService that is also processed by the CommandService. With the current logic of treating an empty submission ID in a completion as "matches all in-flight submissions", this re-introduces the very confusion that the submission IDs were supposed to eliminate. For example, if the submission via the CommandSubmissionService completes first with a rejection, then the CommandService will report a rejection even though the still-in-flight submission may end up being accepted.

To avoid the confusion, I'd suggest to introduce two modes to the CommandTracker. For legacy ledgers that do not propagate the submission ID, we keep the current behaviour of "empty submission ID matches all in-flight submissions", and for the upgraded ledgers it ignores completions without a submission ID (as it has ensured that the submission ID is set on all commands that it is tracking).

@hubert-da
Copy link
Collaborator Author

hubert-da commented Sep 29, 2021

@andreaslochbihler-da I'm a bit confused about the comment, as this PR reflects what we discussed is the right thing to do.

So if the CommandSubmissionService no longer assigns a submission ID, we may actually get back a completion without a submission ID from the submission to the CommandSubmissionService that is also processed by the CommandService. With the current logic of treating an empty submission ID in a completion as "matches all in-flight submissions"

This command won't be present in the tracked commands, so it will try to "match all in-flight submissions" with the same command id. Do I understand correctly that due to point 1. this also breaks? It doesn't seem ok that the same application submits the same commands with both services.

@andreaslochbihler-da
Copy link
Contributor

Do I understand correctly that due to point 1. this also breaks?

In my scenario, all submissions have the same change ID, the same command Id, same application ID and same set of actAs. So yes, this breaks, but independently of point 1.

@miklos-da
Copy link
Contributor

The CommandTracker tries to make sure that there is ever only a single submission in flight for a given change ID. I don't think that this can work, for the following reasons:

  1. With replicated participants like in a VMBC setup, the same change ID may be sent to multiple participants and those participants each see just a single submission, but they get the completion events for both submissions. That should be taken care of by the CommandService of each participant picking a unique submission ID and checking in the completion that the submission ID is the expected one.
  2. Commands may be sent concurrently via the CommandService and the CommandSubmissionService, and submission IDs are optional for Ledger API submissions. So if the CommandSubmissionService no longer assigns a submission ID, we may actually get back a completion without a submission ID from the submission to the CommandSubmissionService that is also processed by the CommandService. With the current logic of treating an empty submission ID in a completion as "matches all in-flight submissions", this re-introduces the very confusion that the submission IDs were supposed to eliminate. For example, if the submission via the CommandSubmissionService completes first with a rejection, then the CommandService will report a rejection even though the still-in-flight submission may end up being accepted.

To avoid the confusion, I'd suggest to introduce two modes to the CommandTracker. For legacy ledgers that do not propagate the submission ID, we keep the current behaviour of "empty submission ID matches all in-flight submissions", and for the upgraded ledgers it ignores completions without a submission ID (as it has ensured that the submission ID is set on all commands that it is tracking).

@andreaslochbihler-da What stops us from implementing only the latter, i.e., assuming that we always populate the submission ID?

@andreaslochbihler-da
Copy link
Contributor

What stops us from implementing only the latter, i.e., assuming that we always populate the submission ID?

It's just separations of concerns, i.e., clear responsibilities in our architecture. The command submission service and everything below don't need the submission ID, so why should they bother populating it?

@miklos-da
Copy link
Contributor

What stops us from implementing only the latter, i.e., assuming that we always populate the submission ID?

It's just separations of concerns, i.e., clear responsibilities in our architecture. The command submission service and everything below don't need the submission ID, so why should they bother populating it?

Agreed. Assuming we'll shortly implement generating the submission ID (if missing) for the JSON-API, removing generation of a submission ID from the command submission service and ignoring completions without a submission ID should be fine, right?

@andreaslochbihler-da
Copy link
Contributor

I'm not sure I understand what the JSON API has to do with this. My point is: The CommandTracker implements functionality of tracking commands. It's used in the CommandService, in the CommandClient, in Canton, and possibly in the JSON API (I don't know about the latter). Submission IDs are meant to track commands. So as long as someone uses the CommandTracker with an old ledger that doesn't pass through the submission ID, we'll have a conflict of interest around the CommandTracker and where it's used:

  • Preserve the old behaviour on old ledgers (completion with empty submission ID completes any tracking of the affected command ID)
  • Support the submission IDs on new ledgers (ignore completions with empty submission ID)

So it's not about "when will this be in the JSON API", but about "when will the last user of the CommandTracker have moved off a ledger that doesn't propagate submission IDs". I don't know when that will happen, but given the longlivety of sandbox-classic, my hunch is that this will take a while.

@miklos-da
Copy link
Contributor

I'm not sure I understand what the JSON API has to do with this. My point is: The CommandTracker implements functionality of tracking commands. It's used in the CommandService, in the CommandClient, in Canton, and possibly in the JSON API (I don't know about the latter). Submission IDs are meant to track commands. So as long as someone uses the CommandTracker with an old ledger that doesn't pass through the submission ID, we'll have a conflict of interest around the CommandTracker and where it's used:

  • Preserve the old behaviour on old ledgers (completion with empty submission ID completes any tracking of the affected command ID)
  • Support the submission IDs on new ledgers (ignore completions with empty submission ID)

So it's not about "when will this be in the JSON API", but about "when will the last user of the CommandTracker have moved off a ledger that doesn't propagate submission IDs". I don't know when that will happen, but given the longlivety of sandbox-classic, my hunch is that this will take a while.

Wouldn't it be a good tradeoff then to implement propagation of submission IDs for sandbox-classic so that we don't have to support two modes (completion has/doesn't have submission ID)? @SamirTalwar-DA Have you looked into implementing submission ID propagation for sandbox-classic earlier?

@ghost
Copy link

ghost commented Sep 30, 2021

I haven't, but I think it's a good idea to just get that done.

@hubert-da
Copy link
Collaborator Author

hubert-da commented Sep 30, 2021

Sorry for making this PR rather huge. The scope was unknown beforehand. I also thought it will be easier to discuss if everything is in one place. Please let me know if I should think about splitting it.

@miklos-da @SamirTalwar-DA @andreaslochbihler-da, WDYT about the latest changes? I'm not entirely happy about them, just don't have a better idea.

@hubert-da hubert-da changed the title Make submission ID optional and stop generating it in GrpcCommandSubmissionService [KVL-1107] Make submission ID optional [KVL-1107] Sep 30, 2021
@andreaslochbihler-da
Copy link
Contributor

WDYT about the latest changes?

I can't really comment on whether your choice of tying the submission ID propagation mode to whether the append-only schema is enabled will work. I have too little insight into what combinations of ledgers and ledger API servers are actually used. But if that's the right heuristics, then I think this looks fine.

@ghost
Copy link

ghost commented Sep 30, 2021

Staring at this again, I don't think I'm a fan of making such a visible change. CommandClientConfiguration is supported API and I find it somewhat unreasonable to expect a user of our Java API to know whether their ledger supports submission ID propagation.

I would very much prefer if we could just make all ledgers work the same way.

@hubert-da hubert-da marked this pull request as draft October 5, 2021 14:14
@hubert-da hubert-da force-pushed the hubert-da/optional-submission-id branch 4 times, most recently from b80d5f0 to d140783 Compare October 15, 2021 07:10
@hubert-da hubert-da marked this pull request as ready for review October 15, 2021 14:06
@hubert-da hubert-da force-pushed the hubert-da/optional-submission-id branch from d140783 to 39edeec Compare October 18, 2021 16:05
@hubert-da
Copy link
Collaborator Author

Depends on: #11211

@hubert-da hubert-da marked this pull request as draft October 18, 2021 16:05
@hubert-da hubert-da force-pushed the hubert-da/optional-submission-id branch from 39edeec to 5106b16 Compare October 21, 2021 16:39
@hubert-da hubert-da marked this pull request as ready for review October 21, 2021 17:32
@hubert-da hubert-da requested review from a team and removed request for a team October 21, 2021 17:33
val trackingDataForSubmissionId =
trackedCommandKeys.flatMap(pendingCommands.remove(_).toList)

if (trackingDataForSubmissionId.size > 1) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain why you changed this behavior?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the error message that has been removed, I could change this, as the mutating schema has been removed, so we no longer have Completions without the submission ID.

CHANGELOG_BEGIN
CHANGELOG_END
CHANGELOG_BEGIN
CHANGELOG_END
@hubert-da hubert-da force-pushed the hubert-da/optional-submission-id branch from 5106b16 to 2aeb3ee Compare October 26, 2021 10:48
@hubert-da hubert-da requested a review from a user October 26, 2021 11:10
currentLedgerTime = () => Instant.EPOCH,
currentUtcTime = () => Instant.EPOCH,
maxDeduplicationTime = () => Some(Duration.ZERO),
generateSubmissionId = () => Ref.SubmissionId.assertFromString(aSubmissionId),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use a generator here that pulls values from a list or an incrementing counter, so we can be sure that the code is working correctly?

Something like:

```suggestion
        generateSubmissionId = {
          val counter = new AtomicInteger
          () => Ref.SubmissionId.assertFromString(s"submission ID ${counter.incrementAndGet()}")
        },

CHANGELOG_BEGIN
CHANGELOG_END
@hubert-da hubert-da enabled auto-merge (squash) October 26, 2021 12:19
CHANGELOG_BEGIN
CHANGELOG_END
@hubert-da hubert-da merged commit 8212c0b into main Oct 26, 2021
@hubert-da hubert-da deleted the hubert-da/optional-submission-id branch October 26, 2021 14:39
azure-pipelines bot pushed a commit that referenced this pull request Oct 27, 2021
This PR has been created by a script, which is not very smart
and does not have all the context. Please do double-check that
the version prefix is correct before merging.

@akshayshirahatti-da is in charge of this release.

Commit log:
```
e474b2d [JSON-API] Websockets fix for matchedQueries (#11361)
4a34b68 KV: port V2 errors to self-service errors framework [KVL-1143] (#11326)
811a6d3 Fixed AuthorizationInterceptorSpec again (#11418)
c8006b8 ScenarioRunner: enrich incomplete transactions (#11384)
d9c7031 ACS testing - payload support [DPP-661] (#11308)
d87d3d4 deal with deadlocks while fetching contracts in json-api Oracle (#11391)
8212c0b Make submission ID optional [KVL-1107] (#11011)
3587eb8 Use Timestamp instead of Instant (#11356)
ea5f09e sandbox: Deprecate the `--eager-package-loading` flag. (#11404)
9f882f2 remove search index on json fields that harm insert and pruning performance (#11041)
70b90f4 optimize max event_sequential_id query for oracle  (#11297)
b1fed31 Fix missing script results (#11395)
03db0aa Auto run/check security evidence generation in ./fmt.sh (#11407)
c928f0e [Short] Typo (#11400)
ba6c2be Add missing TransactionId to com.daml.error.ErrorResource (#11396)
a2a1571 Generate security evidence by documenting security testcases (#11306)
8d17882 Allocate parties sequentially in script export tests (#11389)
1309c2f DPP-587 Use Timestamp instead of Instant (#11183)
82f9873 Rotate release rotation (#11394)
b14077a Fix AuthorizationInterceptorSpec flake (#11387)
7090f2d update NOTICES file (#11367)
ad42dfa Update gRPC to the latest (1.41.0) and Protobuf (#11380)
54c400a Update wording in Deploying to a generic Daml ledger (#11327)
4461ed1 Fix log output (#11374)
613aac3 Add support for non-star-kinded type synonyms in data-dependencies (#11293)
f89ecc6 interfaces: add an experimental `toTypeRep` builtin. (#11378)
5654d5c fix es ingest for missing files (#11375)
03cfd12 Configurable assertions in Ledger API test tool by feature descriptors (#11328)
96b7b58 [DPP-648][Self-service error codes] Adopt ApiPartyManagementService (#11338)
9e94ae0 LF: move repl exception-auth test from dev to stable (#11369)
5365d68 LF: Remove PartialTransaction out from ScenarioRunner/IdeLedgerClient (#11368)
79037c8 [DPP-646][Self-service error codes] Adopt ApiPackageManagementService (#11314)
0ee59f5 Command submission in the ledger-api-bench-tool. (#11296)
8d5cab5 LF: Simplify seeds generation in scenario runnner (#11353)
9e5b788 Speedup daml repl integration tests (#11335)
3bc0db3 fix contract_tpid_fkey-related race condition (#11330)
ab8a863 [docs] Add Daml Driver for VMBC to the commercial integrations section (#11360)
c95db72 Fix Bazel cache download retry (#11238)
e8d0ccb [DPP-611][Self-service error codes] Adapt ApiCommandService (#11325)
a89079b [DPP-647][Self-service error codes] Adopt ApiParticipantPruningService (#11324)
cc8ec28 [Self-service error codes] Adapt GrpcHealthService (#11354)
c60c94b [DPP-645][Self-service error codes] Adapt ApiConfigManagementService (#11312)
e6da1f7 Add step in ghc-lib guide for getting submodules to work (#11351)
f3057ea Increase timeout for non-repudation tests on Postgres (#11340)
176f470 interface: adding interfaces to the TS codegen (#11280)
355352f DPP-650 Remove the mutating schema (#11211)
443b64d [DPP-621][Self-service error codes] Adopt error codes in ApiVersionService (#11302)
ed9dbed interfaces: Add fixed choice collision check in typechecker (Haskell) (#11337)
c37ecd1 [Short] Pass correct loggingContext to withValidatedPackageId (#11307)
0d305cf [Short] Move field before logging statement (ApiTimeService) (#11313)
73c94b5 Increase timeout for non-repudation test (#11281)
88c607b [Self-service error codes] Adapt ApiTransactionService [DPP-613] (#11094)
07ad3e0 Suport multi-party readAs in triggers (#11299)
76eb165 Interface fixed choices: ghc parser (#11275)
da27a1e [DPP-619][Self-service error codes] Adopt error codes in ApiVersionService (#11303)
5f5af30 [DPP-628][Self-service error codes] Adapt error codes in ApiTimeService (#11295)
f9e67ad [Self-service error codes] Adapt error responses in ledger-api-auth [DPP-617] (#11223)
7282965 Fix component status for triggers (#11311)
17776f3 Factor out npm install step of create-daml-app tests (#11294)
3a8b685 [Short] Fix docs for Dispatcher#startingAt (#11304)
f315a90 release 1.18.0-snapshot.20211019.8113.0.8ff347d8 (#11300)
8a3abce [DPP-618][Self-service error codes] Adapt error codes in ApiPackageService (#11284)
50ea92f Use ApiTypes.Party instead of String in the trigger runner (#11298)
2267429 [DPP-656] Assert on self-service error code details in ErrorFactoriesSpec (#11289)
c06faf2 LF: remove imperative environment from Speedy compiler (#11285)
d3dad75 [DPP-592] Generate docs for self-service error codes. (#11129)
```
Changelog:
```
[JSON-API] fixes a bug related to the matchedQueries value returned for websocket multiqueries,
this only happens for patterns where the multiqueries contain a mixture of queries with and without
offsets.
- [Integration Kit] - ledger-api-bench-tool can generate test contracts with configurable payload size.
- [Integration Kit] - Added multi-template support for command submission in the ledger-api-bench-tool
- [Sandbox] The ``--eager-package-loading`` flag has been deprecated. It
  hasn't actually done anything for many releases; packages are always
  loaded eagerly. This does not affect Daml on SQL, which does support
  lazy package loading.

- [Daml Studio] Fix a bug where script results in Daml Studio
  sometimes do not show up.

- [Integration Kit] - The ledger-api-bench-tool is now capable of generating test contracts for testing purposes.
- [JSON API] Fixed a rare error that manifested as
  ‘violates foreign key constraint "contract_tpid_fkey"
   Detail: Key (tpid)=(...) is not present in table’
  when attempting to run queries and goes away on JSON API restart.
  See `issue #11330 <https://github.com/digital-asset/daml/pull/11330>`__.
- [Participant] All participants now use the new append-only schema. Existing databases will
  automatically upgrade to the new schema the first time a participant/ledger is started.

- [Daml Triggers] Triggers now support readAs parties. They can be
  specified via `--ledger-readas a,b,c`. As part of this change
  ``testRule`` gained an extra argument to specify the `readAs`
  parties. If you previously used

  ```
  testRule trigger party acsBuilder commandsInFlight s
  ```

  you now need to use

  ```
  testRule trigger party [] acsBuilder commandsInFlight s
  ```

```

CHANGELOG_BEGIN
CHANGELOG_END
akshayshirahatti-da pushed a commit that referenced this pull request Oct 27, 2021
This PR has been created by a script, which is not very smart
and does not have all the context. Please do double-check that
the version prefix is correct before merging.

@akshayshirahatti-da is in charge of this release.

Commit log:
```
e474b2d [JSON-API] Websockets fix for matchedQueries (#11361)
4a34b68 KV: port V2 errors to self-service errors framework [KVL-1143] (#11326)
811a6d3 Fixed AuthorizationInterceptorSpec again (#11418)
c8006b8 ScenarioRunner: enrich incomplete transactions (#11384)
d9c7031 ACS testing - payload support [DPP-661] (#11308)
d87d3d4 deal with deadlocks while fetching contracts in json-api Oracle (#11391)
8212c0b Make submission ID optional [KVL-1107] (#11011)
3587eb8 Use Timestamp instead of Instant (#11356)
ea5f09e sandbox: Deprecate the `--eager-package-loading` flag. (#11404)
9f882f2 remove search index on json fields that harm insert and pruning performance (#11041)
70b90f4 optimize max event_sequential_id query for oracle  (#11297)
b1fed31 Fix missing script results (#11395)
03db0aa Auto run/check security evidence generation in ./fmt.sh (#11407)
c928f0e [Short] Typo (#11400)
ba6c2be Add missing TransactionId to com.daml.error.ErrorResource (#11396)
a2a1571 Generate security evidence by documenting security testcases (#11306)
8d17882 Allocate parties sequentially in script export tests (#11389)
1309c2f DPP-587 Use Timestamp instead of Instant (#11183)
82f9873 Rotate release rotation (#11394)
b14077a Fix AuthorizationInterceptorSpec flake (#11387)
7090f2d update NOTICES file (#11367)
ad42dfa Update gRPC to the latest (1.41.0) and Protobuf (#11380)
54c400a Update wording in Deploying to a generic Daml ledger (#11327)
4461ed1 Fix log output (#11374)
613aac3 Add support for non-star-kinded type synonyms in data-dependencies (#11293)
f89ecc6 interfaces: add an experimental `toTypeRep` builtin. (#11378)
5654d5c fix es ingest for missing files (#11375)
03cfd12 Configurable assertions in Ledger API test tool by feature descriptors (#11328)
96b7b58 [DPP-648][Self-service error codes] Adopt ApiPartyManagementService (#11338)
9e94ae0 LF: move repl exception-auth test from dev to stable (#11369)
5365d68 LF: Remove PartialTransaction out from ScenarioRunner/IdeLedgerClient (#11368)
79037c8 [DPP-646][Self-service error codes] Adopt ApiPackageManagementService (#11314)
0ee59f5 Command submission in the ledger-api-bench-tool. (#11296)
8d5cab5 LF: Simplify seeds generation in scenario runnner (#11353)
9e5b788 Speedup daml repl integration tests (#11335)
3bc0db3 fix contract_tpid_fkey-related race condition (#11330)
ab8a863 [docs] Add Daml Driver for VMBC to the commercial integrations section (#11360)
c95db72 Fix Bazel cache download retry (#11238)
e8d0ccb [DPP-611][Self-service error codes] Adapt ApiCommandService (#11325)
a89079b [DPP-647][Self-service error codes] Adopt ApiParticipantPruningService (#11324)
cc8ec28 [Self-service error codes] Adapt GrpcHealthService (#11354)
c60c94b [DPP-645][Self-service error codes] Adapt ApiConfigManagementService (#11312)
e6da1f7 Add step in ghc-lib guide for getting submodules to work (#11351)
f3057ea Increase timeout for non-repudation tests on Postgres (#11340)
176f470 interface: adding interfaces to the TS codegen (#11280)
355352f DPP-650 Remove the mutating schema (#11211)
443b64d [DPP-621][Self-service error codes] Adopt error codes in ApiVersionService (#11302)
ed9dbed interfaces: Add fixed choice collision check in typechecker (Haskell) (#11337)
c37ecd1 [Short] Pass correct loggingContext to withValidatedPackageId (#11307)
0d305cf [Short] Move field before logging statement (ApiTimeService) (#11313)
73c94b5 Increase timeout for non-repudation test (#11281)
88c607b [Self-service error codes] Adapt ApiTransactionService [DPP-613] (#11094)
07ad3e0 Suport multi-party readAs in triggers (#11299)
76eb165 Interface fixed choices: ghc parser (#11275)
da27a1e [DPP-619][Self-service error codes] Adopt error codes in ApiVersionService (#11303)
5f5af30 [DPP-628][Self-service error codes] Adapt error codes in ApiTimeService (#11295)
f9e67ad [Self-service error codes] Adapt error responses in ledger-api-auth [DPP-617] (#11223)
7282965 Fix component status for triggers (#11311)
17776f3 Factor out npm install step of create-daml-app tests (#11294)
3a8b685 [Short] Fix docs for Dispatcher#startingAt (#11304)
f315a90 release 1.18.0-snapshot.20211019.8113.0.8ff347d8 (#11300)
8a3abce [DPP-618][Self-service error codes] Adapt error codes in ApiPackageService (#11284)
50ea92f Use ApiTypes.Party instead of String in the trigger runner (#11298)
2267429 [DPP-656] Assert on self-service error code details in ErrorFactoriesSpec (#11289)
c06faf2 LF: remove imperative environment from Speedy compiler (#11285)
d3dad75 [DPP-592] Generate docs for self-service error codes. (#11129)
```
Changelog:
```
[JSON-API] fixes a bug related to the matchedQueries value returned for websocket multiqueries,
this only happens for patterns where the multiqueries contain a mixture of queries with and without
offsets.
- [Integration Kit] - ledger-api-bench-tool can generate test contracts with configurable payload size.
- [Integration Kit] - Added multi-template support for command submission in the ledger-api-bench-tool
- [Sandbox] The ``--eager-package-loading`` flag has been deprecated. It
  hasn't actually done anything for many releases; packages are always
  loaded eagerly. This does not affect Daml on SQL, which does support
  lazy package loading.

- [Daml Studio] Fix a bug where script results in Daml Studio
  sometimes do not show up.

- [Integration Kit] - The ledger-api-bench-tool is now capable of generating test contracts for testing purposes.
- [JSON API] Fixed a rare error that manifested as
  ‘violates foreign key constraint "contract_tpid_fkey"
   Detail: Key (tpid)=(...) is not present in table’
  when attempting to run queries and goes away on JSON API restart.
  See `issue #11330 <https://github.com/digital-asset/daml/pull/11330>`__.
- [Participant] All participants now use the new append-only schema. Existing databases will
  automatically upgrade to the new schema the first time a participant/ledger is started.

- [Daml Triggers] Triggers now support readAs parties. They can be
  specified via `--ledger-readas a,b,c`. As part of this change
  ``testRule`` gained an extra argument to specify the `readAs`
  parties. If you previously used

  ```
  testRule trigger party acsBuilder commandsInFlight s
  ```

  you now need to use

  ```
  testRule trigger party [] acsBuilder commandsInFlight s
  ```

```

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants