Commit Graph

870 Commits

Author SHA1 Message Date
Samir Talwar
c1e1ee4d4b
Sandbox: Split LedgerApiServer up a little. (#5758)
* sandbox: Split up LedgerApiServer.

CHANGELOG_BEGIN
CHANGELOG_END

* sandbox: Extract out API service construction from LedgerApiServer.

* sandbox: Pull out a case class for GrpcServerOwner event loop params.

* sandbox: Split ownership of `ApiServices` from the object.
2020-04-28 15:44:31 +00:00
Miklos
d6c5a2532d
Add counting future metrics (#5743)
* Added counting metrics.

* Code tidying.
CHANGELOG_BEGIN
CHANGELOG_END

* Rename based on review suggestion.
2020-04-28 13:58:15 +00:00
mziolekda
bbd21605f5
add readme that details the usage of integrity check tool (#5685)
* add readme that details the usage of integrity check tool

* Apply suggestions from code review

Addressing review comments

Co-Authored-By: Samir Talwar <samir.talwar@digitalasset.com>

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2020-04-28 09:18:35 +02:00
Gerolf Seitz
690092e066
Sandbox: Properly respect --log-level parameter (#5717)
In #5419 we set specific loggers to WARN or ERROR so that we avoid noisy
logging by default.  However, if the user specifies the --log-level CLI
param, not only the root logger, but also other loggers set in logback.xml
should log at that level.

CHANGELOG_BEGIN
[Sandbox] Properly respect the --log-level CLI parameter
CHANGELOG_END
2020-04-27 08:24:21 +02:00
Robert Autenrieth
49c6a20f0a
Remove duplicate ledger time field (#5698)
The duplicated information was not always in sync.

Fixes #5662

CHANGELOG_BEGIN
- [Sandbox] Fix an issue where the sandbox would sometimes reject transactions
  with a "INVALID_ARGUMENT: Disputed" error if either of
  ``min_ledger_time_rel`` or ``min_ledger_time_abs`` was set in the
  submission request.
CHANGELOG_END
2020-04-24 10:02:26 +02:00
Stefano Baghino
bed58c7e12
Avoid instantiating new implicit conversions for every query (#5706)
* Avoid instantiating new implicit conversion for every query

changelog_begin
changelog_end

* Make HashToStatement an object as well

* Address https://github.com/digital-asset/daml/pull/5706#discussion_r413896788
2020-04-23 16:55:58 +00:00
Remy
15354c3256
DAML-LF: remove submitter is in maintainer check (#5611)
CHANGELOG_BEGIN
CHANGELOG_END
2020-04-23 16:10:39 +02:00
Stefano Baghino
06d4451e8b
Fix hashing of keys in the new contract store (#5681)
* Fix hashing of keys in the new contract store

Use GlobalKey.hash instead of KeyHasher.hashKey

Fixes #5680

changelog_begin
changelog_end

* Fix order of fields in migration

* Fix migration naming

* Rename file according to class

* Fix hash of active contracts, not consumed ones
2020-04-23 14:24:37 +02:00
Stefano Baghino
c66d89dab8
Fix flakiness of GroupContinuous test (#5696)
Fixes #5690

changelog_begin
changelog_end
2020-04-23 11:37:15 +00:00
Samir Talwar
77af35f44e
ledger-on-sql: Name the RangeSource parameters more explicitly. (#5679)
CHANGELOG_BEGIN
CHANGELOG_END
2020-04-23 09:10:16 +00:00
Gerolf Seitz
48fd1e47a0
kvutils: fix validation of false negative key lookups (#5608)
* Make the contract keys test fail if the transaction is not rejected by the committer

- First, this removes the assert statement in the DAML model, so that the
  transaction validation doesn't fail with a transaction abort.
- Second, the gRPC error message should contain Disputed. `InvalidLookup`
  should only be used in Sandbox Classic, but due to code sharing, the
  validation that triggers this error is also run for Sadbonx.

* Fix the key lookup in kvutils

The current way of transaction validation and key lookup does not work
in the following scenario:
- the transaction coming from the participant has a negative key lookup
- the contract key state is loaded, which points to a contract that has
  been created by another transaction since the command interpretation
  on the participant
- the contract state for the contractId inside the contract key state
  has not been loaded, therefore the visibility and activeness check in
  `ProcessTransactionSubmission.lookupKey` returns `None`, even though
  there is in fact a contract with such a key.

To mitigate this issue, the `lookupKey` function must not check
activeness or visibility. If the submitter is not allowed to load the
contract via a key lookup, the authorization check should catch that.
Any other situation that is inconsistent should result in a rejection of
the transaction.

A small side effect of this change is that the `lookupContract` function
might try to load a contract that wasn't loaded from the kv state
earlier. This only happens because we first rebuild the entire
transaction before we compare it to the original transaction.
Previously we threw an exception in this case, but this results in a rather
ugly abort of the reinterpretation of the transaction. Therefore the
`lookupContract` function just returns `None`. Eventually the
transaction will be rejected during validation of the nodes, because
the `LookupByKey` nodes will be different.
This would not happen if we reinterpreted the transaction lazily and
compared the nodes as soon as they are produced with the corresponding
node of the original transaction.

CHANGELOG_BEGIN
[kvutils] Fixed the validation of key lookups.
See issue `#5562 <https://github.com/digital-asset/daml/issues/5562>`__.
[Participant Server, Ledger API Test Tool] Use rejection reasons of the participant-state API instead of sandbox specific ones.
CHANGELOG_END

* Validate causal monotonicity of used contract keys

When using LookupByKey, the return contract isn't necessarily fetched or used
any other way. This means that we need an extra pass over all contract keys to
ensure that causal monotonicity is respected. To be able to do this,
there is now a new field `DamlContractKeyState.active_at`, which is set to the
same value `DamlTransactionEntry.ledger_effective_time`.
An additional check in `ProcessTransactionSubmission` uses this field to verify
causal monotonicity.
2020-04-23 09:44:39 +02:00
fabiotudone-da
94e7330628
Let BenchmarkReporter create a file if it doesn't exist (#5657)
CHANGELOG_BEGIN
[TestTool] Let `--perf-tests-report` attempt to create the file if it doesn't exist
CHANGELOG_END
2020-04-22 09:28:03 +02:00
Stefano Baghino
70a8e8103c
Make sure failed LET lookups don't throw on the DB threads (#5655)
This could lead to slow rollbacks that could cascade on errors that
pile up and keep precious DB threads busy for longer than needed.

changelog_begin
changelog_end
2020-04-22 09:05:09 +02:00
Robert Autenrieth
1128833ab5
Write a config on startup (#5591)
* Write a config on startup

CHANGELOG_BEGIN
CHANGELOG_END

* Rename things

* Make the initial ledger config configurable

* Demote log level for unsupported config writes

* Update ledger/sandbox/src/main/scala/com/digitalasset/platform/apiserver/services/admin/ApiConfigManagementService.scala

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

* Update ledger/sandbox/src/main/scala/com/digitalasset/platform/configuration/LedgerConfiguration.scala

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

* Move code around

* Delay config submissions on kvutils ledgers

Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
2020-04-21 20:35:42 +00:00
Remy
0353408c01
Ledger: Add nodeSeeds and byKeyNodes to participant state (#5602)
CHANGELOG_BEGIN
CHANGELOG_END
2020-04-21 19:00:50 +02:00
fabiotudone-da
5210b99531
Remove unused performance test DAML sources (#5652)
CHANGELOG_BEGIN
CHANGELOG_END
2020-04-21 17:13:30 +02:00
Stefano Baghino
6f04870e2d
Ensure the contract store deals correctly with divulged transient contracts (#5647)
Fixes #5646

Empty changelog because the bug did not make it into a release.

changelog_begin
changelog_end
2020-04-21 15:02:45 +00:00
Stefano Baghino
bb0e8038cc
Create single-party specialized queries to access events (#5626)
* Create single-party specialized queries to access events

Closes #5620

changelog_begin
changelog_end

* Ensure ordering of events when performing a lookup
2020-04-20 14:10:34 +00:00
Stefano Baghino
ec4c86d856
Clean up events table (#5622)
- removes unused `is_root` column, closes #5618
- merges `template_package_id` and `template_name` in `template_id`, closes #5619

changelog_begin
[Ledger API] clean up of the participant index, improved performance when requesting transactions by template
changelog_end
2020-04-20 11:39:03 +02:00
Stefano Baghino
f81efb3d9d
Add new participant schema contracts table (#5541)
* Add new participant schema contracts table

- full implementation (both read and write path)
- fixes #5514

changelog_begin
[Ledger API Server] Fixed a bug that prevented validating transactions
containing reference to contracts that did not originate on the local
participant. See `issue #5514 <https://github.com/digital-asset/daml/issues/5514>`_.
changelog_end

* Format fixes and addressing comments

- address https://github.com/digital-asset/daml/pull/5541#discussion_r408806775
- address https://github.com/digital-asset/daml/pull/5541#discussion_r408806964
- address https://github.com/digital-asset/daml/pull/5541#discussion_r408812745

* Address https://github.com/digital-asset/daml/pull/5541#discussion_r408815185

* Address https://github.com/digital-asset/daml/pull/5541#discussion_r408813067

* Fix mistake in comment

* Apply suggestions from code review

Co-Authored-By: Gerolf Seitz <gerolf.seitz@daml.com>

* Fix compilation error

* Add data migration

Tested by https://github.com/stefanobaghino-da/test-5541-data-migration

* Address https://github.com/digital-asset/daml/pull/5541#discussion_r409386378

* Address https://github.com/digital-asset/daml/pull/5541#discussion_r409385174

* Address https://github.com/digital-asset/daml/pull/5541#discussion_r409367606

* Simplify migration

* Address review

- address https://github.com/digital-asset/daml/pull/5541#discussion_r410344423
- address https://github.com/digital-asset/daml/pull/5541#discussion_r410339914

* Update ledger/sandbox/src/main/resources/db/migration/postgres/V26_0__Contracts_new_schema.sql

Co-Authored-By: Gerolf Seitz <gerolf.seitz@daml.com>

* Fix migration for privacy-aware ledgers

* Remove leftover query

* Fix migration hashes

Co-authored-by: Gerolf Seitz <gerolf.seitz@daml.com>
2020-04-17 20:07:20 +00:00
Samir Talwar
7d094fac2b
kvutils: Don't report ledger metrics by default. (#5604)
Instead, opt-in explicitly in _ledger-on-memory_ and _ledger-on-sql_.

Wrapping the operations can confuse other users of `LedgerStateAccess`.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-17 14:16:02 +00:00
Remy
a178e3e3e9
DAML-LF: remove seed from node, move it to transaction meta data. (#5570)
* DAML-LF: remove seed from node, move it to transaction meta data.

+ redesign seeding to validate partial transaction.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-17 11:02:11 +02:00
Samir Talwar
21ee16623e
sandbox: Revert execution metric paths. (#5588)
Some customers rely on these.

CHANGELOG_BEGIN
- [Ledger API Server] Moved the ``daml.commands.execution`` back to
  ``daml.execution``.
CHANGELOG_END
2020-04-16 18:30:29 +00:00
Samir Talwar
e854191586
kvutils: Add a timing metric for the commit. (#5589)
CHANGELOG_BEGIN
- [Ledger Integration Kit] Added a timing metric for the commit at
  ``daml.kvutils.writer.commit``.
CHANGELOG_END
2020-04-16 18:30:09 +00:00
Samir Talwar
6a1b8a337f
ledger-api-common: Add a metric for command validation upon submission. (#5585)
* ledger-api-common: Add a metric for command submission validation.

CHANGELOG_BEGIN
- [Ledger API Server] Add a metric for command validation upon
  submission, ``daml.commands.validation``.
CHANGELOG_END

* ledger-api-common: Move the submissions metric from sandbox.
2020-04-16 16:46:16 +00:00
Samir Talwar
02eadf68c8
sandbox: Moar command submission metrics. (#5583)
* sandbox: Add a test for MetricsInterceptor for non-streaming endpoints.

* sandbox: Simplify MetricsInterceptor by overriding `ServerCall`.

* sandbox: Time all submissions, not just through the submission service.

* sandbox: Don't bother timing transaction submissions twice.

They're already timed by TimedWriteService.

* sandbox: Move command submission metrics to "daml.commands".

CHANGELOG_BEGIN
- [Ledger API Server] A number of command submission metrics have moved,
  and we have added a couple.
  - ``daml.commands.submissions`` is a new timer that measures all
    submissions.
  - ``daml.commands.valid_submissions`` is a new meter that counts
    valid (unique, interpretable) submissions.
  - ``daml.lapi.command_submission_service.failed_command_interpretations``
    has been moved to ``daml.commands.failed_command_interpretations``.
  - ``daml.lapi.command_submission_service.deduplicated_commands`` has
    been moved to ``daml.commands.deduplicated_commands``.
  - ``daml.lapi.command_submission_service.delayed_submissions`` has
    been moved to ``daml.commands.delayed_submissions``.
  - ``daml.lapi.command_submission_service.submitted_transactions`` has
    been moved to ``daml.services.write.submit_transaction``.
  - All ``daml.execution.*`` metrics have moved to
    ``daml.commands.execution``.
CHANGELOG_END

* metrics: Update the dashboard to include the new command metrics.
2020-04-16 15:20:39 +00:00
Remy
9704a39bae
Engine: refactor PartialTransaction context (#5578)
* Engine: refactor PartialTransaction context

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-16 14:39:12 +02:00
Robert Autenrieth
fe29cfbbb9
Delay submissions of transactions with future time (#5556)
* Add time provider type to ledger API server

Static time sometimes needs special treatment

* Delay submissions of transactions with future time

Fixes #5480.

CHANGELOG_BEGIN
- [Sandbox] The sandbox now properly delays command submissions using
   minLedgerTimeAbs or minLedgerTimeRel. See
  `issue #5480 <https://github.com/digital-asset/daml/issues/5480>`_.
CHANGELOG_END
2020-04-16 13:20:11 +02:00
Samir Talwar
9186f5ccb6
kvutils | ledger-on-(memory|sql): Read metrics. (#5576)
* ledger-on-memory: Add metrics to the operations.

* ledger-on-memory: Speed up reads by using views.

* kvutils: Time event processing.

* ledger-on-(memory|sql): Make classes private and final where possible.

* kvutils: Factor out a TimedLedgerStateOperations class.

CHANGELOG_BEGIN
- [Ledger Integration Kit] Report timing metrics for ledger state
  operations.
CHANGELOG_END

* ledger-on-sql: Record log read metrics.

* ledger-on-sql: Record database transaction timing metrics.

CHANGELOG_BEGIN
- [Sandbox] Record ledger database timing metrics under "daml.ledger".
CHANGELOG_END

* ledger-on-sql: Time queries.

* metrics: Add graphs for read events and DAML-on-SQL.

* ledger-on-memory: Simplify the tuple swap in reading the log.

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

Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
2020-04-16 11:11:06 +00:00
Samir Talwar
5c1c7fe30a
metrics: Collect with Graphite and visualize with Grafana. (#5549)
* Add compose config for grafana/graphite combo

* Add rudimentary readme with instructions

* Add Samir's dashboard

* metrics: Move `metrics/grafana` to `ledger/metrics/collection`.

CHANGELOG_BEGIN
CHANGELOG_END

* metrics/collection: Rename samirs-dashboard to ledger-submissions.

* metrics/collection: Save Graphite data between restarts.

* metrics/collection: Add copyright headers.

Co-authored-by: Vladislav Gangan <vladislav.gangan@digitalasset.com>
2020-04-15 12:28:57 +00:00
Samir Talwar
11606e327e
sandbox: Provide an option to disable implicit party allocation. (#5559)
* sandbox: Construct PartyConfiguration later.

* sandbox: Provide an option to disable implicit party allocation.

CHANGELOG_BEGIN
- [Sandbox] You can now disable implicit party allocation by passing the
  flag, ``--implicit-party-allocation=false``. This makes it easier to
  test as you would against another ledger which does not support this
  feature.
CHANGELOG_END
2020-04-15 11:12:15 +00:00
Samir Talwar
bdb476fff0
ledger/metrics: Move metric helpers to their own Bazel package. (#5542)
* ledger/metrics: Move metric helpers to their own Bazel package.

CHANGELOG_BEGIN
CHANGELOG_END

* sandbox: Use ledger/metrics.

* metrics: Rename `Metrics` to `Timed` and drop the `timed` prefix.

Importing methods is harder than importing objects.

* metrics: Publish to Maven Central.
2020-04-14 12:32:03 +00:00
Gerolf Seitz
000bb046db
Sadbonx: Add migration that backfills the participant_events table (#5528)
We started serving the LedgerAPI from the new schema in #5104, #5305, #5346,
and #5397.

We must therefore also add a migration that moves the data from
ledger_entries to the new tables.

To keep the migration relatively stable with respect to refactoring the
code, I copied a bunch of files to
`db.migration.postgres.v25_backfill_participant_events`.

As a bonus, I added a line to logback.xml so that we get the usual
sandbox output on startup.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-11 09:07:48 +00:00
Stefano Baghino
19b3d1a02b
Revert participant_contracts write path (#5535)
changelog_begin
changelog_end
2020-04-11 10:00:27 +02:00
Stefano Baghino
21037bfd39
participant_contracts write path (#5522)
* participant_contracts write path

Writes contracts alongside events for interpretation and validation.

changelog_begin
changelog_end

* Fix self-referencing foreign key

* Address https://github.com/digital-asset/daml/pull/5522#discussion_r406289145

* Compute divulgence only if necessary

* Do not attempt at persisting witnesses for transient contracts

* Drop new tables when resetting
2020-04-09 19:33:46 +00:00
Samir Talwar
f84abc01a2
sandbox: Time command execution. (#5521)
* sandbox: Time command execution.

* sandbox: Tiny cleanups in StoreBackedCommandExecutor.

* sandbox: Add metrics for fetching within execution.

CHANGELOG_BEGIN
- [Ledger API Server] Add metrics under "daml.execution" to measure
  command execution time, and fetching within command execution.
CHANGELOG_END

* sandbox: Revert the ApiSubmissionService metric prefix.

It can be private again.

* sandbox: Record a mark on a meter on command execution retries.
2020-04-09 16:41:55 +00:00
Stefano Baghino
2d82451c99
Refactor witnesses table class (#5516)
- removes unnecessary reference to offsets
- pushes event identifier translation out to enable code re-use
- event identifier translation is inline in other iterations, no significant perf degradation
- this will allow to share code between event and contract witness table objects

changelog_begin
changelog_end
2020-04-09 13:02:48 +00:00
Samir Talwar
bb362ce67f
sandbox: Remove ErrorCause.Sequencer. (#5515)
* sandbox: Remove `ErrorCause.Sequencer`.

It doesn't seem to be constructed anywhere.

Feel free to close this if it's used outside the repository.

CHANGELOG_BEGIN
CHANGELOG_END

* sandbox: Don't deconstruct when we can check types in a pattern match.
2020-04-09 11:47:13 +00:00
Samir Talwar
64ae70614a
sandbox: Refactor command execution. (#5513)
* sandbox: Move command execution into its own package.

* sandbox: Make LedgerTimeHelper into a CommandExecutor implementation.

CHANGELOG_BEGIN
CHANGELOG_END

* sandbox: Rename CommandExecutorImpl to StoreBackedCommandExecutor.

And pass it objects, not functions.

* sandbox: Reorder result cases in StoreBackedCommandExecutor.

* sandbox: Inject the LedgerTimeAwareCommandExecutor.
2020-04-09 10:47:00 +00:00
Stefano Baghino
2f4cb38b30
Inline disclosure computation (#5511)
* Inline disclosure computation

It's used only in one place and the blinding info needs to also be used
to compute divulgence for contracts.

changelog_begin
changelog_end

* Address https://github.com/digital-asset/daml/pull/5511#pullrequestreview-390596850
2020-04-09 09:54:25 +00:00
Samir Talwar
84b0ea28f2
sandbox: Reset the time service when resetting in Static Time mode. (#5510)
* sandbox: Pull out the default time provider type into a constant.

* sandbox: Name ResetService tests consistently.

* sandbox: Reset the time service when resetting in Static Time mode.

The test, unfortunately, is ``@Ignore`d due to flakiness in CI, so won't
actually be run. However, I _hope_ we're going to remove that
annotation eventually, and it allowed me to test-drive the fix on my
machine, so it's still helpful.

CHANGELOG_BEGIN
- [Sandbox] Fix a regression in the ResetService which did not reset the
  TimeService in static time mode.
CHANGELOG_END
2020-04-09 09:25:35 +00:00
Samir Talwar
1735082e91
sandbox: Re-enable "no seeding mode" for the StandaloneApiServer. (#5509)
Turns out not every participant can support seeding (yet).

CHANGELOG_BEGIN
- [Ledger API Server] Re-introduce an option to disable seeding. This
  does not affect Sandbox.
CHANGELOG_END
2020-04-09 09:05:45 +00:00
Samir Talwar
87d38d8ca6
kvutils: Don't measure submission interpretation twice. (#5496)
This is already measured in the `run` method above.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-09 07:27:50 +00:00
Samir Talwar
5f412a497a
kvutils/integrity-checker: Report the time taken for each submission. (#5498)
CHANGELOG_BEGIN
CHANGELOG_END
2020-04-09 07:27:46 +00:00
Gerolf Seitz
97433743a1
Set the Bearer prefix in bindings. (#5484)
* Set the `Bearer ` prefix in bindings.
* Make the `Bearer ` prefix in the authorization header mandatory.
* Bearer prefix can be removed from the token file.

CHANGELOG_BEGIN
[Extractor]: The ``Bearer `` prefix can be removed from the token file.
It is added automatically.
[Navigator]: The ``Bearer `` prefix can be removed from the token file.
It is added automatically.
[DAML Script] The ``Bearer `` prefix can be removed from the token file. It
is added automatically.
[DAML Repl] The ``Bearer `` prefix can be removed from the token file. It is
added automatically.
[Scala Bindings] The ``Bearer `` prefix can be removed from the token. It is
added automatically.
[Java Bindings] The ``Bearer `` prefix can be removed from the token. It is
added automatically.
[DAML Integration Kit] ``AuthService`` implementations MUST read the
``Authorization`` header and the value of the header MUST start with
``Bearer ``.
CHANGELOG_END
2020-04-08 13:07:28 +02:00
fabiotudone-da
1bb1517c08
[TestTool] Provide performance tests for all performance envelopes (#5473)
* Produce performance tests for all envelopes

CHANGELOG_BEGIN
[TestTool] Provide performance tests for all performance envelopes
CHANGELOG_END

* Follow Scala's recommended pattern for enum-like hierarchies
2020-04-08 09:59:29 +02:00
Gerolf Seitz
a9755cb852
Avoid using setBinaryStream to not confuse H2 (#5474)
There have been reports of sporadic occurrences of
`java.lang.RuntimeException: Lob not found: 49/-2`
when running the participant server with H2.

It seems like using `setBinaryStream` triggers H2 to go through the BLOB
machinery. Since this issue is not easily reproducible, it seems like an
altogether better solution to switch to using `setBytes`. Offsets aren't
that large anyway, so going directly for byte array should be fine.
Better than a broken query anway.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-07 21:07:09 +02:00
Samir Talwar
5326db3bd9
kvutils/tools: Register more JVM metrics in the integrity checker. (#5463)
We now use the same metrics as a running ledger server.

CHANGELOG_BEGIN
CHANGELOG_END
2020-04-07 13:02:27 +00:00
fabiotudone-da
945057b0a0
Fix Performance.dar not found during extraction (introduced #5377) (#5466)
* Fix `Performance.dar` not found during extraction (introduced #5377)

CHANGELOG_BEGIN
CHANGELOG_END

* Update comment about synchronizing .dar artifacts

Co-Authored-By: Samir Talwar <samir.talwar@digitalasset.com>

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2020-04-07 14:30:38 +02:00
Robert Autenrieth
4f5460f7e3
Dont deduplicate rejected transactions (#5393)
* Add failing test

The test can produce false negatives,
but locally it fails 10 out of 10 times.

* Stop deduplicating commands after rejections

Fixes #5338.

CHANGELOG_BEGIN
CHANGELOG_END

* Only deduplicate successful transactions

* Use pass instead of pure unit

* Handle exceptions
2020-04-07 12:45:19 +02:00