Commit Graph

2909 Commits

Author SHA1 Message Date
Simon Maxen
e1f831a248
Add limited JCS implementation [DPP-1176] (#14626)
* Add limited JCS implementation

changelog_begin
changelog_end
2022-08-08 18:09:40 +01:00
tudor-da
e6f3ec034e
[LLP] Allow downstream back-pressuring Indexer (#14567)
* [LLP] Allow Indexer to be back-pressured
 * Introduce buffer after Indexer
 * Remove Indexer conflation

changelog_begin
changelog_end

* Batch in tailer to predefined limit

* Reformatted and updated tests
2022-08-08 13:14:11 +00:00
pbatko-da
49890a0838
Disable flaky benchtool test (#14646)
changelog_begin
changelog_end
2022-08-08 12:50:07 +00:00
Marton Nagy
be0f09199f
Small refactoring in ParallelIndexerSubscription [DPP-1166] (#14642)
stringInterningView pulled up to class parameters.

CHANGELOG_BEGIN
CHANGELOG_END
2022-08-08 13:30:12 +02:00
Sergey Kisel
78b92b0fcb
Package metadata view service to expose package information [DPP-1152] (#14616)
* Package metadata view service to expose package information [DPP-1152]

CHANGELOG_BEGIN
CHANGELOG_END
2022-08-08 08:27:13 +02:00
Moritz Kiefer
70d7482349
Support exercise without actor in Scala codegen (#14627)
* Support exercise without actor in Scala codegen

changelog_begin
changelog_end
2022-08-05 07:26:38 +00:00
azure-pipelines[bot]
6a38d32412
bump canton to 20220803 (#14613)
* bump canton to 20220803

CHANGELOG_BEGIN
CHANGELOG_END

* adjust bootstrap script to changes in Canton console commands

* use canonical dot syntax

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
Co-authored-by: Andreas Lochbihler <andreas.lochbihler@digitalasset.com>
2022-08-04 16:05:08 +02:00
Marton Nagy
565def9be2
Small refactoring in TransactionLogUpdatesConversions for DRY (#14614)
CHANGELOG_BEGIN
CHANGELOG_END
2022-08-04 13:48:14 +02:00
dylant-da
8e8e0dabdf
Convert viewtype and view methods to LF (#14456)
* Add DA_Internal_Interface to convertTypeDef exclusion check

* Move desugared types/values for interface views into DA.Internal.Desugar

* Convert viewtype and view method declarations

* Typecheck view types and view declarations

* Add unit viewtypes to InterfaceChoiceCollision tests

* Add unit viewtypes to more compiler/damlc tests

* Modify empty interfaces/implements to have viewtypes/views

* Add unit viewtypes to remaining Interface tests

* Test for error thrown when viewtype not specified

* Fix daml-lf/ interface tests to use new syntax / unit views

* Add placeholder view of type Unit to TestInterfaces

CHANGELOG_BEGIN
CHANGELOG_END

* Fix typescript interface tests with unit viewtype

* Add unit viewtype to Java & Scala codegen

* Add unit viewtype to triggers tests interface

* Add unit viewtypes to ledger/test-common

* Add unit viewtypes to ledger-service/http-json

* Fix some damlc tests

* Use viewtype syntax in InterfaceViewNonSerializable test

* Remove HasInferfaceView instances in convertBind

* Add unit view to QualifiedInterface.daml test

* Generate HasInterfaceView instances in DataDependencies

* Add unit viewtypes and views to compiler/damlc/tests

* Document reconstruction of HasInterfaceView

* Move desugared types/values for interface views into DA.Internal.Desugar

* Add desugarable function view w/ EViewInterface desugaring

* Remove templateName and viewtype from generated EViewInterface

* Update desugared-daml

* Proof of concept: use _view -> EViewInterface prim via HasInterfaceView

* Move view, HasInterfaceView to DA.Internal.Interface

* Update desugared-daml tests

* Stop removing and re-generating HasInterfaceView instances

* Do not generate docs for generated "_view_" methods

* Report errors with interface TypeConNames prettily

* Fix InterfaceViewNotSpecified @ERROR to reflect new error text

* Don't import magic `view` method from Prelude to avoid name clash

* Update shake interface goto definition test locations

* Temp disable view spec tests, will re-implement views in speedy

* Add unit viewtype to Java code snippet docs

* Update Interface syntax docs for views

* Add unit viewtype to Transferrable.daml

* Add back "empty" interface implementation to interfaces.rst

* Re-enable view tests by having _view methods on InterfaceViews.daml file

* Remove deprecated commented-out view desugaring code
2022-08-03 16:23:38 +01:00
tudor-da
f18be60112
[LLP] Update participant metrics [DPP-1132] (#14599)
* [LLP] Have per stream slice metrics

changelog_begin
changelog_end

* Removed unused Daml metrics

* Track Index ledger end sequential id
2022-08-03 16:35:52 +02:00
tudor-da
7cc08c20d0
[LLP] Two stage resetting DispatcherState [DPP-1137] (#14573)
* [LLP] Two stage resetting DispatcherState

changelog_begin
changelog_end

* Address review comments
2022-08-03 14:24:59 +00:00
tudor-da
e1fe7ee94b
[LLP] Use a dedicated thread-pool for in-memory fan-out (#14590)
changelog_begin
changelog_end
2022-08-02 15:52:47 +00:00
Simon Maxen
c7b3708b15
Populate metering report json [DPP-1107] (#14568)
* Populate metering report json
2022-08-01 12:44:33 +01:00
Sergey Kisel
b2deea9417
Expensive computation before Future is created candidates [DPP-950] (#14508)
* Expensive computation before Future is created candidates

CHANGELOG_BEGIN
CHANGELOG_END
2022-08-01 10:21:40 +02:00
Sergey Kisel
0f381db269
Additional conformance test to assert verbose flag is taken into account (#14557)
* Additional conformance test to assert verbose flag is taken into account

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-28 12:09:08 +02:00
tudor-da
fc521a738d
Re-enable TXTransientNotObservableNoSubmitters in Canton conformance tests (#14542)
changelog_begin
changelog_end
2022-07-28 08:42:30 +00:00
tudor-da
a1b87f1ec3
[LLP] Wrap TimedReadService in LedgerApiServer (#14558)
changelog_begin
changelog_end
2022-07-28 08:34:16 +00:00
Sergey Kisel
c82c844c00
Expose gRPC error in case of shutdown of the dispatcher [DPP-852] (#14494)
CHANGELOG_BEGIN
CHANGELOG_END
2022-07-27 15:46:49 +02:00
Sergey Kisel
17fba251c9
Support HOCON key-value overrides for legacy cli config (#14495)
* Support HOCON value parsing for legacy cli config

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>
2022-07-26 13:58:38 +00:00
tudor-da
af0c86609e
Temporarily disable TXTransientNotObservableNoSubmitters since it is flaky in Canton (#14531)
changelog_begin
changelog_end
2022-07-26 13:15:08 +00:00
tudor-da
942a4d025a
[LLP] Implement support for point-wise transaction lookups from in-memory fan-out [DPP-1045] (#14500)
* [LLP] Implement support for point-wise transaction lookups from in-memory fan-out

changelog_begin
changelog_end

* Renamed EventsBuffer to InMemoryFanoutBuffer

* Refactoring

* Add missing interfaceId passing to TransactionTree/ExercisedEvent

* Added BufferedTransactionByIdReaderSpec

* Update missing docs

* Addressed Simon's review comments
2022-07-26 05:30:58 +00:00
tudor-da
6a56f1b47c
Change fanout to fan-out in conformance test naming (#14517) 2022-07-25 13:30:28 +00:00
atriantafyllos-da
447151915a
Aligns IMFO w/ persistence's handling of transient transctions [DPP-1077] (#14447)
CHANGELOG_BEGIN
CHANGELOG_END
2022-07-25 13:58:07 +02:00
tudor-da
ac2b8a9601
Complete conformance tests for Sandbox-on-X (#14514)
changelog_begin
changelog_end
2022-07-25 13:13:04 +02:00
Sergey Kisel
c1b6af1357
Document all options in the HOCON config bundle [DPP-1121] (#14400)
* Document all options in the HOCON config bundle [DPP-1121]

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Tudor Voicu <tudor.voicu@digitalasset.com>
Co-authored-by: Marton Nagy <marton.nagy@digitalasset.com>
Co-authored-by: Simon Maxen <56595114+simonmaxen-da@users.noreply.github.com>
2022-07-25 08:48:23 +00:00
tudor-da
9744c4ed02
[LLP] In memory fanout completions [DPP-1044] (#14422)
* Rename TransactionLogUpdate.Transaction to TransactionLogUpdate.TransactionAccepted

changelog_begin
changelog_end

* Implement command completions serving from in memory fanout

changelog_begin
changelog_end

* Refactor to use only one BufferedReader

* Renaming and docs

* Fix compilation issues

* Address review comments
2022-07-22 08:02:41 +02:00
Remy
1cbc21e719
[LF] Cleanup Relation data structure (#14471)
CHANGELOG_BEGIN
CHANGELOG_END
2022-07-21 13:03:29 +02:00
Sergey Kisel
f871d8140c
Close the stream (#14473)
CHANGELOG_BEGIN
CHANGELOG_END
2022-07-21 10:37:28 +02:00
tudor-da
e023fcfc8c
Removes TransactionLogUpdate events Vector populated requirement (#14475)
changelog_begin
changelog_end
2022-07-19 20:27:35 +02:00
Sergey Kisel
b72dcc0b93
Handle decoding and validating dar file in a separate thread [DPP-948] (#14454)
CHANGELOG_BEGIN
CHANGELOG_END
2022-07-19 10:02:21 +02:00
Sergey Kisel
c8400d820a
Read API version during service initialization rather than during first request [DPP-948] (#14455)
CHANGELOG_BEGIN
CHANGELOG_END
2022-07-19 09:45:52 +02:00
Marton Nagy
35789c1acb
Cleanup dead code in TransactionConversion (#14451)
CHANGELOG_BEGIN
CHANGELOG_END
2022-07-18 14:24:40 +02:00
tudor-da
59b606b32b
[LLP] In-memory fan-out buffer size 0 allowed [DPP-1125] (#14334)
* This PR allows using 0-sized in-memory fan-out buffers and other test adjustments
* Allow 0-sized buffer
* Adapt Sandbox-on-X conformance tests

changelog_begin
changelog_end

* Simplified implementation
2022-07-18 08:55:45 +02:00
Sergey Kisel
cdca6e3d6b
Resolve TODO around Scala 2.13 compatibility (#14418)
* Resolve TODO around Scala 2.13 compatibility

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-15 09:45:50 +02:00
Sergey Kisel
2e18276b1a
Unify TlsConfiguration between SDK and canton [DPP-1113] (#14349)
* Unify TlsConfiguration between SDK and canton [DPP-1113]

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-14 16:58:59 +02:00
tudor-da
5f702bbf7d
[LLP] Indexer - Ledger API bypass [DPP-1043] (#14319)
* Moves ParticipantConfig and dependants to `participant-integration-api`

changelog_begin
changelog_end

* Implement Indexer - Ledger API bypass

* Adjust configuration parameters
* Remove run-mode
* Create inMemoryStateUpdaterParallelism

* Rename components

* IndexServiceOwner is not private[platform]

* Address review comments

* Rebase
2022-07-13 15:52:33 +02:00
atriantafyllos-da
8cce2c0394
DPP-1047 Added leeway options for JWT-based authorization. (#14375)
* DPP-1047 Added leeway options for JWT-based authorization.

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-13 14:57:54 +02:00
tudor-da
9d5115da0b
[Explicit disclosure] Introduces Protobuf changes for supporting explicit disclosure payloads [DPP-1093] (#14336)
* Introduces Protobuf changes for supporting explicit disclosure payloads

changelog_begin
changelog_end

* Update ledger-api/grpc-definitions/com/daml/ledger/api/v1/event.proto

Co-authored-by: Robert Autenrieth <31539813+rautenrieth-da@users.noreply.github.com>

* Enrich metadata description according to Marcin's suggestion

Co-authored-by: Robert Autenrieth <31539813+rautenrieth-da@users.noreply.github.com>
2022-07-12 07:58:49 +00:00
tudor-da
88784d6c3c
[Explicit disclosure] Update Read- and WriteService interfaces for explicit disclosure [DPP-1094] (#14341)
* Update Read- and WriteService with explicit disclosure payloads

changelog_begin
changelog_end

* Addressed review comments
2022-07-12 08:30:33 +02:00
Marton Nagy
c6b6b7abaa
Fix HA Coordination retry [DPP-1115] (#14363)
* Adds retryGuard to retry mechanism
* Only allow retrying in lock-busy condition

[CHANGELOG_BEGIN]
Fixes issue: network problems can prevent non-leader indexer to be elected as leader.
[CHANGELOG_END]
2022-07-07 14:29:03 +02:00
Marton Nagy
235426519f
Add network timeout to Participant HA JDBC calls [DPP-1101] (#14357)
* Adds explicit network timeout to main lock acquisition calls.
* Adds mainLockCheckerJdbcNetworkTimeoutMillis configuration with default

[CHANGELOG_BEGIN]
Fixes issue: network problems can cause indexer to stop working until restarting the application.
[CHANGELOG_END]
2022-07-07 13:03:55 +02:00
Sergey Kisel
5b792e91df
Provide a non-zero exit code in case of misconfiguration. (#14364)
CHANGELOG_BEGIN
CHANGELOG_END
2022-07-06 14:32:23 +00:00
mziolekda
1c4010a30a
Document indexer ingestion metrics (#14362)
CHANGELOG_BEGIN
CHANGELOG_END
2022-07-06 13:56:46 +00:00
pbatko-da
c23e505e67
[Benchtool] Add total stream runtime criterium in milliseconds [DPP-1080] (#14250)
Sample config:
```
streams:
  - type: transactions
    name: stream-1
    ...
    objectives:
       max_stream_duration: 56
```

changelog_begin
changelog_end
2022-07-06 09:14:30 +02:00
Sergey Kisel
f465179ccf
Print configuration which is used on SoX startup [DPP-1075] (#14347)
CHANGELOG_BEGIN
CHANGELOG_END
2022-07-05 15:19:42 +00:00
Sergey Kisel
e151090cf3
Introduction of HOCON configuration for SoX [DPP-1033] (#14029)
* Introduction of HOCON configuration

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-05 15:35:16 +02:00
pbatko-da
69625d0a70
[ETQ-Testing] Extend Benchtool to define huge party filters - contract observers only [DPP-1079] (#14244)
Populating IndexDB with a set of parties:
```
submission:
  ...
  observers_party_set:
    party_name_prefix: MyParty
    count: 99
    visibility: 0.35
```
where the parties created will be Party-0, Party-1, .., Party-98
and each will have a 35% chance of being an observer on a Foo1/Foo2/Foo3 contract.

NOTE: This PR is not adding party-set support for divulgee parties (i.e. non-stakeholder informees) since a large number of such parties might cause an exponential explosion in the number of created helper "Divulger" contracts. It's also not clear if support for divulgee party-sets will be needed after all.


Using party set in a stream filter:
```
streams:
  - type: transaction-trees
     name: foo
     filters: 
      - party: Obs-1
        templates: [Foo1, Foo2, Foo3]
     filter_by_party_set:
       party_name_prefix: MyParty
       templates: [ ]
     ...
```


changelog_begin
changelog_end
2022-07-05 15:34:37 +02:00
Simon Maxen
0c679cf584
Rate limit refactor [DPP-1001] (#14311)
Refactor rate limiting

changelog_begin
changelog_end
2022-07-05 11:59:52 +01:00
Remy
abd47e972b
[Speedy] Do not crash when encountering an inconsistent contract key (#14276)
but rather return a proper interpretation error.

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-05 10:28:38 +00:00
Sergey Kisel
f9521f27eb
Accept new form of JWT tokens [DPP-1102] (#14323)
* Accept new form of jwt tokens [DPP-1102]

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-04 17:41:08 +02:00
Simon Maxen
5db3cc4bd5
Rate limit streams [DPP-1001] (#14166)
Add support for stream based rate limiting

changelog_begin
changelog_end
2022-07-04 14:28:46 +01:00
Robin Krom
36b39aca7b
Move disclosed contract logic to speedy (#14288)
* Move disclosed contract logic to speedy

This moves the disclosed contract logic from the engine to speedy.

Fixes #14090.

* back to versioned contract instances

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-01 08:40:10 +00:00
tudor-da
5169e7d4dc
[LLP] Implement ParticipantInMemoryState and updater [DPP-1043] (#14151)
* Implement ParticipantInMemoryState and updater

changelog_begin
changelog_end

* Addressed Marton's review comments

* Addressed last two comments
2022-06-30 09:58:23 +00:00
pbatko-da
7cd677e367
[ETQ-Testing] Prepare Benchtool for extending it to support huge party filters [DPP-1079] (#14246)
This a preparation before the adding support for huge party filters.

Some of the changes:
1. Scan for existing parties even if when there is not submission step configured so that we can enrich stream configs fully.
NOTE: ConfigEnricher will now never fail on missing party.
2. Extract party selection for contract creation to a separate class.
3. Expose `commandGenerationParallelism` and a couple of randomness providers to allow for reproducible party allotment to contracts - useful in tests.
4. Extract `benchtoolFixture` to reduce boilerplate in IT tests


changelog_begin
changelog_end
2022-06-24 09:33:05 +00:00
Simon Maxen
6a1e3afb71
Switch rate limiting to using self service error codes [DPP-1000] (#14216)
* Switch rate limiting to using self service error codes

changelog_begin
Rate limiting updated to use self service error codes.
changelog_end
2022-06-21 16:49:22 +01:00
Sergey Kisel
4cc98fe715
Fix compilation problem after PR merge (#14237)
CHANGELOG_BEGIN
CHANGELOG_END
2022-06-21 11:36:40 +00:00
Sergey Kisel
6a80a1a82f
Removal of sandbox-classic module and binary (#14201)
* Removal of sandbox-classic module and binary

CHANGELOG_BEGIN
CHANGELOG_END
2022-06-21 11:09:51 +02:00
pbatko-da
aa8ad32304
[Benchtool] Package Benchtool related Daml modules separately from other modules [DPP-1089] (#14231)
Recent changes in //ledger/test-common in Daml modules changed the fully qualified names of templates used by Benchtool, even though they hadn't been changed directly.

This made it impossible to filter by template name in a recently created LR IndexDB snapshot.

To avoid spurious changes in fully qualified template names (from Benchtool perspective) we are now packaging Benchtool related Daml modules separately from other modules

changelog_begin
changelog_end
2022-06-21 10:38:15 +02:00
pbatko-da
c575d598ff
[ETQ-TESTING] Fix slow flat transactions stream [DPP-1090] (#14187)
changelog_begin
changelog_end
2022-06-21 09:15:08 +02:00
pbatko-da
13d7389aa7
[Benchtool] Allow for setting a timeout for every stream [DPP-1088] (#14226)
changelog_begin
changelog_end
2022-06-20 15:37:43 +02:00
Remy
5b139bea60
add regression test for #14171 in conformance test (#14212)
CHANGELOG_BEGIN
CHANGELOG_END
2022-06-20 07:41:50 +00:00
azure-pipelines[bot]
253b0b186c
bump canton to 20220617 (#14218)
* bump canton to 20220617

CHANGELOG_BEGIN
CHANGELOG_END

* activate conformance test for regression test for exceptions

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
Co-authored-by: Remy Haemmerle <Remy.Haemmerle@daml.com>
2022-06-19 23:10:22 +00:00
Remy
2ddd744a91
[Engine] fix and test #14175 (#14206)
follow up of #14175

this is part of #14171

CHANGELOG_BEGIN
CHANEGELOG_END
2022-06-16 22:45:50 +02:00
nickchapman-da
44a14d06c9
Regression test for rollback create bug (#14197)
* Regression test for issue 14148

changelog_begin
changelog_end

* update compatability
2022-06-16 14:58:19 +00:00
Remy
2d5094160e
[Engine] clean key uniqueness mode (#14194)
This is a follow up of #14175 and #14176.  

Basically
-  we kill the `On` mode which is not used anymore.
- we factorize the visibility check.
- we rename `LocalContractNotVisible` into `ContractNotVisible`

CHANGELOG_BEGIN
CHANGELOG_END
2022-06-16 12:04:45 +00:00
Moisés Ackerman
78cc57b243
Add failing daml-test-file (#14176)
fix #14171

CHANGELOG_BEGIN

* [Bugfix] fix failing by-key ops after roll-backed archive and create
  See https://github.com/digital-asset/daml/issues/14171

CHANGELOG_END
2022-06-15 20:00:04 +00:00
Sergey Kisel
f05acf217f
Expose createDataSourceProperties so defaults can be overriden in the downstream code. (#14184)
CHANGELOG_BEGIN
CHANGELOG_END
2022-06-15 09:14:25 +00:00
Simon Maxen
4d4c5ebb36
Rate limit when heap usage exceeds limit [DPP-997] (#14109)
* Rate limit when heap usage exceeds limit

changelog_begin
changelog_end
2022-06-15 09:00:10 +01:00
mziolekda
9c5c72a2fd
Update metrics documentation [DPP-1078] (#14174)
Correct metrics documentation shipped with the sdk
* Remove references to obsolete metrics for participant-side de-duplication
* Correct the names of the connection pool metrics
* Add a mention about internal service metrics
* Correct the name for the string interning metric
* Remove obsolete sandbox server role

CHANGELOG_BEGIN
Correct the name for the string interning metric from daml_index_db_loadStringInterningEntries to daml_index_db_load_string_interning_entries
CHANGELOG_END
2022-06-14 18:46:56 +02:00
Stefano Baghino
676095ada6
Fix typo in strong seeding initialization logging (#14172)
changelog_begin
changelog_end
2022-06-14 08:05:02 +00:00
Matthias Schmalz
865b882fdf
Documented why conversion methods are public (#14155)
CHANGELOG_BEGIN
CHANGELOG_END
2022-06-14 08:35:52 +02:00
Moritz Kiefer
d233bfa4b4
Add missing activeness check when reading from globalKeyInputs (#14080)
* Add missing activeness check when reading from globalKeyInputs

changelog_begin

- Engine. Fix lookup by key. See issue Lookup archived contracts may succeed when combined with rollback exceptions #14107 for more details.

changelog_end
2022-06-13 19:27:08 +00: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
a6d6b7c324
Remove AuthServiceConfig from StandaloneApiServer (#14133)
CHANGELOG_BEGIN
CHANGELOG_END
2022-06-09 19:39:04 +02:00
Sergey Kisel
433be2cb35
Fixing regression in perf tests introduced by sandbox-classic removal (#14124)
CHANGELOG_BEGIN
CHANGELOG_END
2022-06-09 19:30:50 +02:00
Simon Maxen
855457a656
Allow bench test parties to be looked up or created [DPP-1001] (#14139)
* Allow bench test parties to be looked up or created

changelog_begin
changelog_end
2022-06-09 13:55:28 +01:00
Nicu Reut
944cc3142a
Remove package restriction for min/max time methods [kvl-1430] (#14131) 2022-06-08 16:22:24 +00:00
tudor-da
fc47a8995c
[LLP] Implement the possibility to have a shared StringInterningView [DPP-1042] (#14062)
* Allow the possibility to have a shared StringInterningView

changelog_begin
changelog_end

* Solve TODO in RecoveringIndexerIntegrationSpec

* Addressed Marton's review comments

* Added thread-safety mentionsin string interning interfaces
2022-06-08 16:13:31 +02:00
Stephen Compall
4075389f92
remove inherited choices from Scala codegen, test interface/template IDs (#14113)
* inherited choices are gone, convert to interface
* use toInterface for conformance tests on interfaces

CHANGELOG_BEGIN
- [Scala codegen] Interface choices can no longer be invoked directly on
  template IDs, or via ``createAnd`` or ``key`` directly.  Instead, use
  ``toInterface[Ifn]`` before calling the relevant ``exercise*`` method.

  The resulting ledger commands now contain the correct interface ID
  rather than template ID for looking up the choice, but see #13993 for
  a caveat regarding create-and-exercise and exercise-by-key.
CHANGELOG_END
2022-06-08 08:37:56 -04:00
Sergey Kisel
1d8f195438
Sandbox Classic Removal in Tests (#13934)
CHANGELOG_BEGING
CHANGELOG_END
2022-06-07 19:54:52 +00:00
tudor-da
ce98be8627
Extract ContractStateCaches from MutableCacheBackedContractStore (#14058)
changelog_begin
changelog_end
2022-06-06 16:12:40 +00:00
Marton Nagy
a939f7d76e
Refactoring: cleanup appendonly leftovers (#14096)
* Renames appendonlydao test directory
* Inlines JdbcAppendOnlyTransactionInsertion

changelog_begin
changelog_end
2022-06-05 00:07:54 +02:00
Marton Nagy
ec4f9850ba
ACS ID fetching enhancements [DPP-1058] (#14027)
* Adds exponential ID page retrieval to aid low stream initialization
* Adds Working-Memory concept to calculate parameters to aid guaranteed memory footprint
* Switches to dynamic BatchN batching instead of static grouping to aid stream initialization

changelog_begin
changelog_end
2022-06-04 14:42:28 +00:00
Andreas Lochbihler
4cfffec87a
Extract a contract state machine for transaction interpretation and validation (#14044)
CHANGELOG_BEGIN
CHANGELOG_END
2022-06-02 09:39:37 +00:00
Marton Nagy
f5a2539d6f
Add globalKeyMapping to WriteService [DPP-1067] (#14026)
The field globalKeyMapping is recently added to
lf.transaction.Transaction.Metadata, and which is
computed by the Engine.
This field might be needed for processing by WriteService
implementors.
This PR adds this to the WriteService.

changelog_begin
Global contract key mapping is added to WriteService.
changelog_end
2022-06-01 10:08:18 +02:00
tudor-da
3c5a52b895
[LLP] Move ledger-api-transactions-buffer-max-size to Config from ParticipantConfig (#14009)
* Move `ledger-api-transactions-buffer-max-size` to Config from ParticipantConfig

changelog_begin
changelog_end

* Update ledger/ledger-runner-common/src/main/scala/com/daml/ledger/runner/common/CliConfig.scala

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

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>
2022-06-01 05:51:55 +00:00
Simon Maxen
4095f6bf49
Limit service API DB threadpool [DPP-998] (#14017)
Limit service API DB threadpool

changelog_begin
changelog_end
2022-05-31 14:00:02 +01:00
tudor-da
4b296fb5cc
Address Sergey's comment on BatchinParallelIngestionPipeSpec (#14023)
changelog_begin
changelog_end
2022-05-31 08:28:04 +00:00
tudor-da
2cb4fba2a2
Fix BatchingParallelIngestionPipeSpec flaky test (#14022)
changelog_begin
changelog_end
2022-05-31 07:09:39 +00: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
Nicu Reut
2e1cc5c61b
[KV] - Replace RESOURCE_EXHAUSTED KV error with RESOURCE_OVERLOADED [kvl-1290] (#14014) 2022-05-30 14:37:17 +00:00
pbatko-da
c52b3bad79
Benchtool: Generate consuming events with non-stakeholder informees [DPP-1049] (#13988)
Non-stakeholder informees for consuming events are obtained by exercising a consuming choice on Foo1, Foo2 or Foo3 contract as a sub-action of divulgers newly introducedDivulgeConsumingExercise choice.

changelog_begin
changelog_end
2022-05-30 12:30:49 +01:00
tudor-da
0cda5d5c5a
Fix Sandbox-on-X error messages for inconsistent/duplicate key conflicts (#14008)
changelog_begin
changelog_end
2022-05-30 10:24:40 +02:00
pbatko-da
0de400680b
Benchtool: cancel streams when enough number of items has been seen [DPP-1051] (#13985)
Implementing it for all stream benchmarks:
 - transactions flat
 - transactions trees
 - active contracts
 - completions

changelog_begin
changelog_end
2022-05-27 15:28:11 +00:00
tudor-da
506af6c6eb
Introduce instrumented .buffered decorator for Akka Sources and Flows (#13997)
changelog_begin
changelog_end
2022-05-27 13:59:12 +00:00
pbatko-da
d463365492
Benchtool: Fix flaky test [DPP-1056] (#13998)
changelog_begin
changelog_end
2022-05-27 10:03:23 +00:00
Simon Maxen
40db23925d
Bump max api services queue size to 10,000 (#13996)
changelog_begin
changelog_end
2022-05-27 10:01:08 +00:00
pbatko-da
ef43df4849
Benchtool: Make non-consuming events visible to observer parties [DPP-1056] (#13987)
By making contract observers choice observer on the non-consuming choice (on Foo1, Foo2 and Foo3 contracts)


changelog_begin
changelog_end
2022-05-26 19:45:16 +02:00
tudor-da
b8c19d4c6a
[LLP] Akka optimizations [DPP-1040] (#13880)
* Akka optimizations for read pipeline
* Run computations on dedicated threadpools instead of the Akka dispatcher

changelog_begin
changelog_end

* Address Martino's comments

* Addressed Marton's review comments
2022-05-26 17:33:02 +00:00
Simon Maxen
374c294150
Allow the bench tool to either submitAndWait or submit [DPP-1062] (#13986)
* Make bench tool submission waiting optional [DPP-999]

changelog_begin
changelog_end
2022-05-26 13:31:50 +01:00
Remy
12a488f6a4
LF: Expose the keys requested during interpretation (#13983)
CHANGELOG_BEGIN
CHANGELOG_END
2022-05-25 19:03:35 +02:00
Simon Maxen
18e9473196
Rate limit [DPP-999] (#13956)
* RateLimitingInterceptor integrated into GrpcServer

changelog_begin
changelog_end
2022-05-25 17:13:49 +01:00
tudor-da
81f7e309db
Ledger API stream buffers moved in IndexServiceImpl (#13972)
changelog_begin
changelog_end
2022-05-25 11:24:09 +02:00
Remy
d3264236ba
Interface: drop collision check between inherited choice name (#13939)
CHANGELOG_BEGIN
CHANGELOG_END
2022-05-24 17:53:18 +02:00
tudor-da
b0ec3fed5a
LedgerApiBenchTool returns status code 1 on config error (#13958)
changelog_begin
changelog_end
2022-05-24 09:07:38 +02:00
mziolekda
79e861d578
Add submissionId to logs where it has been missing [DPP-1052] (#13937)
* Add submissionId to logs where it has been missing

CHANGELOG_BEGIN
CHANGELOG_END
2022-05-24 08:33:34 +02:00
tudor-da
ee9891b4b0
[LLP] Memory safe buffered ledger api streams [DPP-1020] (#13852)
* [TO BE REMOVED] OOM memory test for BufferedTransactionsReader

* [LLP] Memory-safe BufferedTransactionsReader

changelog_begin
changelog_end

* Addressed Simon's review comments

* Non-recusive stream construction

* Remove redundant in-stream buffers

* Addressed Marton's review comments

* Last round of addressing Marton's comments

* Remove MemoryBoundedBufferedTransactionsReaderSpec
2022-05-23 19:06:54 +00:00
Robin Krom
29f79fc756
disclosures: support in engine (#13896)
* disclosures: support in engine

This adds support for contract disclosures in the engine.

Fixes #13863.

CHANGELOG_BEGIN
CHANGELOG_END

* move VersionedContractInstance to Value

* normalization/typechecking

* Update daml-lf/engine/src/main/scala/com/digitalasset/daml/lf/engine/Error.scala

Co-authored-by: Remy <remy.haemmerle@daml.com>

* Update daml-lf/engine/src/main/scala/com/digitalasset/daml/lf/engine/preprocessing/CommandPreprocessor.scala

Co-authored-by: Remy <remy.haemmerle@daml.com>

* Update daml-lf/engine/src/main/scala/com/digitalasset/daml/lf/engine/preprocessing/CommandPreprocessor.scala

Co-authored-by: Remy <remy.haemmerle@daml.com>

* remove processImmArray

* throw exception in foldl

* check for duplicate contract keys in disclosures

* added issue for removal of empty disclosure assertion

* format

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Remy <remy.haemmerle@daml.com>
2022-05-23 16:13:46 +02:00
Marton Nagy
fb9f10547e
ACS ID fetching rewrite [DPP-986] (#13745)
Simplifies ID fetching logic
Removes dead code / tests
Cleans up factories (Materializer not needed anymore)
Simplifies ConcurrencyLimiter interface
Adds/cleans up unit tests

CHANGELOG_BEGIN
CHANGELOG_END
2022-05-23 09:29:36 +02:00
mziolekda
385504fd7d
Add ledger api test tool cases for expensive daml maps and lists [DPP-955] (#13821)
* add tests for large maps and lists

* add many iterations on exercise

* format

* clean up

CHANGELOG_BEGIN
CHANGELOG_END

* fix broken build

* Incorporate review comments
2022-05-19 17:13:28 +00:00
pbatko-da
931979ad14
Benchtool: Add weighted application ids and randomized extra submitters [DPP-979] (#13885)
New config sections aim at populating data for completion stream benchmarks.

Sample:
'''
submission:
    type: foo
    num_extra_submitters: 6
    application_ids:
       - id: App-1
         weight: 90
       - id: App-2
         weight: 10
'''

changelog_begin
changelog_end
2022-05-19 16:32:09 +02:00
pbatko-da
0e2c6fc60b
Benchtool: Count number of events rather than number of transactions also in exposed metrics [DPP-1048] (#13932)
changelog_begin
changelog_end
2022-05-19 16:29:37 +02:00
pbatko-da
a4426b0bc4
Benchtool: Count number of events rather than number of transactions [DPP-1048] (#13913)
changelog_begin
changelog_end
2022-05-19 08:04:26 +00:00
Remy
0c07e426c1
Interface: conformance test of Interface (#13884)
part of #13653

CHANGELOG_BEGIN
CHANGELOG_END
2022-05-18 12:58:45 +00:00
pbatko-da
2ab5233a52
Benchtool: changes before adding weighted application ids and extra submitters [DPP-979] (#13886)
changelog_begin
changelog_end
2022-05-17 17:53:21 +02:00
pbatko-da
e1b7d120b4
Benchtool: Move observers to a test-lib target [DPP-979] (#13892)
changelog_begin
changelog_end
2022-05-17 14:40:31 +02:00
pbatko-da
e9091279c0
Benchtool: Improve assertion for non-stakeholder informees test [DPP-978] (#13894)
changelog_begin
changelog_end
2022-05-17 14:38:17 +02:00
Marton Nagy
fee168ca6e
Removes exclusion of canton conformance-test [DPP-1018] (#13888)
CHANGELOG_BEGIN
CHANGELOG_END
2022-05-17 09:47:55 +02:00
Marton Nagy
de6da71083
Minor readability fix: makes timeout related code more obvious (#13813)
CHANGELOG_BEGIN
CHANGELOG_END
2022-05-17 01:25:58 +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
pbatko-da
aad0e05533
Benchtool: Improve payload size handling [DPP-1028] (#13838)
Previous approach was generating random bytes
and encoding them into UTF-8 strings.
This turned out to be problematic as not every
random byte sequence is valid in the UTF-8 charset, and
`java.lang.String#String(byte[], java.lang.String)` constructor's
documentation states that in such cases its behavior
is unspecified.

In practice the size of the byte array obtained from decoding the
generated string was almost twice the size of the orginal byte array.

Current approach limits the generated bytes to valid ASCII characters,
each of which takes exactly one byte in UTF-8 encoding.

changelog_begin
changelog_end
2022-05-16 15:27:33 +02:00
pbatko-da
724a0c1b1a
Benchtool: Non-stakeholder informees generation [DPP-978] (#13808)
We obtain non-empty non-stakeholder informees by performing an immediate divulgence of instances of Foo1, Foo2 or Foo3 templates through instances of a helper Divulger template.
The divulgence is controlled by 1) configuring the number of all divulgees to generated and 2) probabilistically picking a non-empty subset from all divulgees for each contract (similar to how observers are picked for each contract with certain probabilities). If the divulgees for a contract are non-empty a Foo1, Foo2 or Foo3 contract is created via a helper choice on a Divulger contract. Otherwise a standard create Foo1, Foo2 or Foo3 command is issued.

Each Divulger contract can divulge any number of Foo1, Foo2 or Foo3 contracts but it's limited to divulging to a fixed set of divulgees. In other words, there is a separate Divulger contract for each non-empty subset of all divulgees.
We expect the set of all divulgees to be very small in practice similar to how only a small number observers (currently at most 3) is currently configured for existing benchmarks. Thus, the set of all subsets is also small.
To be conservative, we allow the number of divulgees to be at most 5.

changelog_begin
changelog_end
2022-05-16 15:27:03 +02:00
pbatko-da
751e0f78a6
Benchtool: Separate command generation and submission. Also other clean-ups [DPP-978] (#13833)
This is setting ground for generating contracts with non-empty non-stakeholder informees in #13808

changelog_begin
changelog_end
2022-05-12 11:40:59 +02:00
Sergey Kisel
37b958beb1
Removal of sandbox-common-ce as redundant (#13824)
* Removal of `sandbox-common-ce` as redundant

CHANGELOG_BEGIN
CHANGELOG_END
2022-05-10 13:59:52 +02:00
Nicu Reut
d886dd1a1a
Ensure we account for time model all success/failure in the conformance tests. (#13836)
- Wait for confirmation for all submissions when setting time model
- Do not ignore authorization errors, this is done so that we are consistent across tests (exclusions should be used if required)

changelog_begin
changelog_end
2022-05-10 09:19:00 +00:00
Nicu Reut
be275bb5ec
Upload dars sequentially for every participant defined [kvl-1369] (#13834) 2022-05-10 08:18:51 +00:00
tudor-da
2614646a35
[LLP] Mutable contract state cache uses Offset as cache_index (#13733)
changelog_begin
changelog_end
2022-05-09 11:23:34 +02:00
tudor-da
2115fbf55b
[LLP] Indexer latency optimizations [DPP-1014] (#13667)
* [LLP] Indexer latency optimizations

changelog_begin
changelog_end

* Addressed Robert's review comments

* Addressed Marton's review comments
2022-05-07 07:01:25 +02: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
Sergey Kisel
50c0f233e8
Address review concerns on security test evidence. (#13794)
* Address review concerns on security test evidence.

CHANGELOG_BEGIN
CHANGELOG_END
2022-05-05 14:12:05 +00:00
Nicu Reut
229a8d973a
conformance-tests: Account for min/max skew twice and scale duration for command dedup test [kvl-1426] (#13785) 2022-05-05 14:42:28 +02:00
tudor-da
ab6af91ff2
Fix slow lookupMaximumLedgerTime (#13761)
changelog_begin
changelog_end
2022-05-04 15:24:32 +02:00
Simon Maxen
38434547d1
Post mortem fixup of bench tool submission [DPP-1017] (#13786)
* Post mortem fixup of bench tool submission

changelog_begin
changelog_end

* Update with review comments
2022-05-04 12:58:33 +01:00
Robert Autenrieth
1b9e990511
DPP-925 Move package object (#13741)
* Move package object

changelog_begin
changelog_end

* More consistently use aliases
2022-05-03 21:53:21 +02:00
Simon Maxen
da0c458b8a
Add support for fibonacci contracts. (#13738)
changelog_begin
changelog_end
2022-05-03 16:16:56 +01: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
Robert Autenrieth
6bb59e6a0f
DPP-923 cleanup conversions (#13742)
* Clean up Conversions

changelog_begin
changelog_end

* Remove dead code
2022-05-03 15:26:29 +02:00
Simon Maxen
4df52d5c23
DPP-1087 - Make benchtool submitter extendable (#13721)
* Prefix command generator with Foo

* Extract CommandGenerator

* Update with review comments

changelog_begin
changelog_end

* Temporary name change
2022-05-03 13:27:25 +01:00
Robert Autenrieth
f2879f7bac
Move EventsTable.Entry (#13753)
changelog_begin
changelog_end
2022-05-03 14:20:56 +02:00
Robert Autenrieth
e691ffd6fc
Rename migration folders (#13752)
changelog_begin
changelog_end
2022-05-03 14:20:34 +02:00
Nicu Reut
a5b002eb32
ledger-api-test-tool - Adapt for concurrent conflicts [kvl-1369] (#13719) 2022-05-03 10:21:23 +00:00
tudor-da
83e6ad2696
Fix flaky RecoveringIndexerIntegrationSpec (#13777)
changelog_begin
changelog_end
2022-05-03 08:39:49 +00:00
Hubert Slojewski
281de9ac2e
Publish daml-lf encoder, parser and error-test-lib [KVL-1424] (#13730) 2022-04-29 13:59:19 +02:00
Robert Autenrieth
31015b68fc
DPP-748 Remove Java migrations (#13731)
* Remove Java migrations

changelog_begin
changelog_end

* Add test
2022-04-29 12:19:23 +02:00
Robert Autenrieth
d75cacf0ef
Rename store backend template files (#13714)
... if they are not template files

changelog_begin
changelog_end
2022-04-28 16:10:19 +02:00
Robert Autenrieth
3e898e04d5
DPP-926 Move SimpleSqlAsVectorOf (#13711)
* Move SimpleSqlAsVectorOf

changelog_begin
changelog_end

* Restrict visibility
2022-04-28 13:26:43 +02:00
Nicu Reut
a792de39a5
Update scalafmt to 3.5.1. (#13584)
CHANGELOG_BEGIN
CHANGELOG_END
2022-04-28 09:57:04 +00:00
Robert Autenrieth
2f625dff2c
Merge append-only tests (#13713)
changelog_begin
changelog_end
2022-04-28 10:16:00 +02:00
Nicu Reut
c2b44b0764
Remove override for definitive answer from KVError [kvl-1369] (#13728) 2022-04-28 07:55:34 +00:00
Robert Autenrieth
f0303b698e
Rename appendonlydao to dao (#13715)
* Rename appendonlydao to dao

changelog_begin
changelog_end

* fmt
2022-04-27 22:12:40 +02:00
Nicu Reut
04f991a340
[kvutils] - Add errors for post execution conflicts and out of time bounds [KVL-1369] (#13710) 2022-04-27 15:07:23 +00:00
Hubert Slojewski
61be3a5e39
Move kvutils out of the SDK [KVL-1245] (#13704) 2022-04-27 15:21:28 +02:00
pbatko-da
6d6c46596a
[ETQ] Add an integration test for Benchtool's command submission [DPP-972] (#13533)
changelog_begin
changelog_end
2022-04-26 19:19:33 +02:00
Hubert Slojewski
35b68962e8
Remove remaining kvutils dependencies [KVL-1245] (#13695)
CHANGELOG_BEGIN
CHANGELOG_END
2022-04-26 13:42:18 +02:00
Hubert Slojewski
d700fc9e76
Move kvutils test dar file lib to participant-state [KVL-1245] (#13696)
CHANGELOG_BEGIN
CHANGELOG_END
2022-04-26 13:42:04 +02:00
Robert Autenrieth
a88ae129b5
Use small buffers for tests (#13659)
* Use small buffers for tests

changelog_begin
changelog_end

* Update ledger/sandbox-on-x/BUILD.bazel

Co-authored-by: tudor-da <tudor.voicu@digitalasset.com>

Co-authored-by: tudor-da <tudor.voicu@digitalasset.com>
2022-04-26 11:27:59 +02:00
Hubert Slojewski
0e9326f857
Publish daml-lf/snapshot proto [KVL-1245] (#13679)
* Publish daml-lf/snapshot proto [KVL-1245]

CHANGELOG_BEGIN
CHANGELOG_END

* fix snapshot_proto bazel target

Co-authored-by: Remy Haemmerle <Remy.Haemmerle@daml.com>
2022-04-26 07:59:12 +02:00
pbatko-da
d66045a169
[ETQ] Extend Benchtool to submit consuming and nonconsuming exercises [DPP-972] (#13492)
changelog_begin
changelog_end
2022-04-25 09:45:02 +02:00
pbatko-da
74b6e69f2f
Fix performance regression flat and tree transaction streams on Postgres (#13623)
Before Postgres ended up using sequential scans.
With added "order by" clauses Postgres uses index scans.

changelog_begin
changelog_end
2022-04-22 11:24:38 +02:00
Remy
3be994c4e8
LF: introduce interfaceId field in Exercise node (#13643)
.. to track where the choice is defined.

part of #13653

CHANGELOG_BEGIN
CHANGELOG_END
2022-04-21 13:19:25 +00:00
Marton Nagy
94b3a5890e
Fix ACS id retrieval parallelism [DPP-986] (#13550)
This PR fixes an issue with the ACS ID page retrieval: if there is one
of the id page DB fetching is slow, all the rest of the ID fetching
lanes getting fetched, due to continuous demand.
We implemented a treatment to cap the increased number of ID pages
accumulated in memory, by failing the stream.

Switching to mapAsync in pullWorkerSource naturally will
stop demand, in case a single query takes too long.
This also removes the need for the queue size limitting treatment.

* Switches to mapAsync in pullWorkerSource
* Fixes unit test
* Removes queue limiting feature (as it is not necessary anymore)

CHANGELOG_BEGIN
CHANGELOG_END
2022-04-20 15:20:19 +00:00
Nicu Reut
a37dd63675
Remove committer support for non pre-execution [kvl-734] (#13598)
CHANGELOG_BEGIN
[kvutils] - Pre-execution is the only supported execution mode
CHANGELOG_END
2022-04-20 09:52:53 +00:00
Nicu Reut
23feb9c513
Remove ledger-on-memory [kvl-1365] (#13599)
CHANGELOG_BEGIN
[kvutils] - remove ledger-on-memory
CHANGELOG_END
2022-04-20 10:55:51 +02:00
Hubert Slojewski
16a97e8715
Move KVErrors to participant-state-kv-errors [KVL-1371] (#13604)
CHANGELOG_BEGIN
CHANGELOG_END
2022-04-19 15:22:31 +02:00
Sergey Kisel
a6b3d5f581
Cleanup around configuration (#13597)
* Cleanup around configuration

CHANGELOG_BEGIN
CHANGELOG_END

* Removal of unused configuration parameters. Merge cohesive params.

* Removal of ParticipantIndexerConfig as redundant transformation layer.

* Extracting engine config values

* Separation of IndexConfiguration
2022-04-19 13:19:11 +02:00
Nicu Reut
988b609051
Ensure out of time bounds entries are set for all rejections [KVL-1412] (#13595) 2022-04-18 12:04:49 +02:00
Hubert Slojewski
6b3e7969cf
ledger-api-tests: Add hints to eventually [KVL-1407] (#13607)
CHANGELOG_BEGIN
CHANGELOG_END
2022-04-15 14:19:57 +02:00
Sergey Kisel
1e5ff74a3b
Readability cleanup. (#13581)
* Readability cleanup.
2022-04-15 11:32:09 +02:00
Sergey Kisel
2b4b2f2d3e
Add ledger-service/jwt to test evidence generator. (#13579)
* Add ledger-service/jwt to test evidence generator.

CHANGELOG_BEGIN
CHANGELOG_END
2022-04-14 17:39:36 +02:00
Nicu Reut
2ad6d2985f
[kvutils] Remove unused batched submission validation [KVL-1372][KVL-734] (#13589) 2022-04-14 15:56:26 +02:00
Nicu Reut
c8f4a84eed
[kvutils] Remove the kv integrity checker [kvl-1365] (#13585) 2022-04-14 10:39:29 +02:00
Nicu Reut
dadf66a233
Remove ledger-on-memory dependecy from recovering indexer integration tests [KVL-1365] (#13582) 2022-04-14 10:38:44 +02:00
Robin Krom
fcd3b6622b
ifaces:support exercising by required interface (#13554)
* ifaces:support exercising by required interface

This adds support to exercise an interface choice on a contract ID,
where the interface is required by one of the implemented interfaces of
the contract template.

Fixes #13434.

CHANGELOG_BEGIN
CHANGELOG_END

* some improvements based on review

* added a test plus a bugfix

* Update daml-lf/interpreter/src/main/scala/com/digitalasset/daml/lf/speedy/PhaseOne.scala

Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>

* 2 more interface tests for the command preprocessor

Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
2022-04-12 18:15:29 +00:00
Robert Autenrieth
b9db7c37a5
Use event partitions directly (#13032)
* Use event partitions directly

changelog_begin
changelog_end

* it's more complicated

* fix query

* don't use divulgence to look up events

* fix query

* Remove commented out code

* Fix query

* fmt

* Actually remove the events view

at least on Postgres

* Remove view from Oracle

* Remove view from H2

* Fix hash

* fix boolean constants for oracle
2022-04-12 13:00:43 +02: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
Sergey Kisel
7dd678c920
Publish security test evidence to assembly repo (#13544)
Publish security test evidence to assembly repo

CHANGELOG_BEGIN
CHANGELOG_END
2022-04-12 08:46:20 +02:00
Sergey Kisel
c7e5c83684
Simplify test evidence generator [DPP-996] (#13553)
CHANGELOG_BEGIN
CHANGELOG_END
2022-04-11 19:24:28 +02:00
Robert Autenrieth
7eccdfab52
DPP-687 fix removing partially written data (#13462)
* Add new test

This test currently fails on Oracle

changelog_begin
changelog_end

* Fix deleting partial data

... if the indexer crashes before writing the first ledger end
2022-04-09 01:30:39 +02:00
nicu-da
fe9cf94ed2
Add timeouts to all the participant test context methods [kvl-1320] (#13517) 2022-04-07 09:31:03 -07:00
Remy
4e51194041
LF: Drop byInterface field from Transaction Nodes (#13520)
part of #13491

CHANGELOG_BEGIN
CHANGELOG_END
2022-04-07 11:06:17 +02:00
Sergey Kisel
748510999a
Annotate more Ledger API tests with authorisation test evidence. (#13445)
* Annotate more Ledger API tests with authorisation test evidence.

CHANGELOG_BEGIN
CHANGELOG_END
2022-04-06 13:24:28 +00:00
nicu-da
f94cec2764
Extract the participant test context interface [KVL-1320] (#13476) 2022-04-06 04:58:24 -07:00
pbatko-da
0b1124a83e
Use ErrorDetails.matches in BenchTool (#13494)
changelog_begin
changelog_end
2022-04-05 15:09:38 +02:00
Soren Bleikertz
e1a13babed
Added CSV export of test evidence (#13483)
changelog_begin
changelog_end
2022-04-05 14:02:12 +02:00
Hubert Slojewski
a8547c8bab
Make multi-participant conformance tests work with distributed committers/event logs [KVL-1335] (#13467)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-31 14:24:06 +02:00
davidrichards-da
ef55141788
Added clarity around security risk errors (#13407)
* Adding section to error codes page and updating descriptions

CHANGELOG_BEGIN
CHANGELOG_END
Added a section in the error codes page and improved description to errors

* Removing the multi-line descriptions

* Changing the added sentence

swapping 'due to security reasons' 'for security reasons'

* Updated formatting

Ran the fmt.sh script to give me the correct formatting.

* Updating the generated error codes

CHANGELOG_BEGIN
CHANGELOG_END
Updating the generated error codes
2022-03-30 15:50:00 +01:00
Moritz Kiefer
fbf97d1432
Change Canton synchronization to use the healthcheck endpoint (#13463)
changelog_begin
changelog_end
2022-03-30 16:31:13 +02:00
Sergey Kisel
f2a8220121
Fixing sandbox-on-x test targets. (#13451)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-30 08:45:45 +02:00
Sergey Kisel
d329db0ee7
Transaction Privacy test evidence [DPP-966] (#13395)
* Transaction Privacy test evidence [DPP-966]

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-24 15:45:23 +00:00
Hubert Slojewski
92bf78e2b6
Change misleading messages (#13388)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-24 13:19:38 +01:00
Robert Autenrieth
f4363b3c41
DPP-906 Move conditional evaluations from SQL to JVM (#13212)
* Factor out offset comparison

... and move special treatment for offset begin to JVM code

changelog_begin
changelog_end

* wip
2022-03-24 11:23:17 +01:00
Sergey Kisel
e4cac30c92
Test evidence support for Ledger API tests [DPP-965] (#13387)
* Test evidence support for Ledger API tests [DPP-965]

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-24 11:17:59 +01:00
Sergey Kisel
55ca1af7e3
PublicServiceCallAuthTests security test evidence [DPP-961] (#13363)
changelog_begin
changelog_end
2022-03-23 17:37:19 +01:00
Sergey Kisel
1543dd2bb4
Generator for test evidence using ScalaTest framework [DPP-962] (#13345)
* Generator for test evidence using ScalaTest framework [DPP-962]

changelog_begin
changelog_end
2022-03-22 15:50:54 +01:00
tudor-da
ed585780f0
Fix mutable state cache updates synchronization (#13325)
* Implemented race conditions test for mutable contract state cache upload

changelog_begin
[Ledger API] A race condition bug is fixed in the Ledger API mutable contract state cache.
The bug allowed the cache to become corrupted with stale references when the Ledger API
was subjected to concurrent submissions racing to update/fetch the same contract key.
The stale references were causing the Ledger API to erroneously reject submissions in
certain corner-cases.
changelog_end

* Pull cache indexes to StateCache
* Passes the test

* Fixing StateCacheSpec and MutabelCacheBackedContractStoreSpec
* Added invalidate test to ConcurrentCacheCachingSpecBase

* Address Marton's review comments

* Do not log a warn on negative contract lookups

* Update cache outside the source restart
2022-03-22 13:09:25 +01:00
tudor-da
49e950dc59
Validated package uploads on SandboxServer startup (#13340)
* Validated package uploads on SandboxServer startup

changelog_begin
changelog_end

* Addressed Martino's review comments
2022-03-21 21:39:51 +01:00
Remy
f7d1901a5c
LF: split Command into ApiCommand and ReplayCommand (#13323)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-21 14:07:41 +01:00
Remy
6c2dc2d508
Move Replay from KV to LF land (#13243)
* Move Replay from KV to LF land

+ base it on submission entries instead of ledger export

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-21 13:03:10 +01:00
pbatko-da
35c5812703
[Error codes] Update docstring for com.daml.ledger.participant.state.v2.PruningResult.NotPruned [DPP-861] (#13305)
changelog_begin
changelog_end
2022-03-16 15:07:42 +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
pbatko-da
b63fdc7031
[Error codes] Increase visibility of formatContextAsString (#13304)
changelog_begin
changelog_end
2022-03-16 13:26:57 +01:00
pbatko-da
e0965709fe
[Error codes] Remove .asGrpcStatusFromContext and .asGrpcErrorFromContext from BaseError trait [DPP-606] (#13262)
changelog_begin
changelog_end
2022-03-16 09:30:07 +01:00
pbatko-da
c7266dd60c
Remove ErrorCauseExport + some file renames [DPP-606] (#13259)
changelog_begin
changelog_end
2022-03-15 12:51:32 +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
tudor-da
b081a469dd
Enrich LoggingContext Commands extractor with submission id (#13280)
changelog_begin
changelog_end
2022-03-14 18:37:31 +00: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
e69343dfb3
[Error codes] Reorganize error groups file structure for better readability and easier modification. [DPP-606] (#13263)
changelog_begin
changelog_end
2022-03-14 15:13:26 +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
a27fa0c95a
[Error codes] Move and test logging value string serializer [DPP-606] (#13261)
changelog_begin
changelog_end
2022-03-14 12:09:10 +01:00
Kamil Bozek
ab6e085f6e
Move ExecutionContext to the CommandExecutor implementing classes [DPP-945] (#13153)
* Move ExecutionContext to the CommandExecutor implementing classes from method arguments

CHANGELOG_BEGIN
CHANGELOG_END

* Added information about the CPU-intensive computations executed by an ExecutionContext
2022-03-11 18:45:10 +01:00
pbatko-da
f210ee933c
Add missing context in PackageServiceError (#13258)
changelog_begin
changelog_end
2022-03-11 13:20:59 +01:00
pbatko-da
b663a1c1ec
WriteParticipantPruningService propagates rich error codes on prune failure [DPP-861] (#13238)
changelog_begin
changelog_end
2022-03-10 14:48:28 +01:00
pbatko-da
d891a9a9c2
[Error codes] Use scala.deprecated instead of a custom annotation [DPP-776] (#13163)
changelog_begin
changelog_end
2022-03-10 14:10:52 +01:00
pbatko-da
2ac30b21f5
Remove conformance mode from com.daml.error.definitions.RejectionGenerators (#13218)
changelog_begin
changelog_end
2022-03-10 12:15:32 +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
pbatko-da
df2cb4a1fd
[Error codes doc] Put generated source files of error inventories under version control [DPP-606][DPP-777] (#13181)
And add a check (a unit test) that the generated files are up-to-date with what can be generated.
If the check fails then one will need to run `./docs/scripts/gen-error-docs-src.sh` and commit the changes.

changelog_begin
changelog_end
2022-03-10 12:06:58 +01:00
Sergey Kisel
6da2469425
Cleanup the use of eventually in the tests [DPP-475] (#13156)
* Re-enable some sandbox tests on MacOS

changelog_begin
changelog_end

* Remove the use of eventually where it is not applicable

changelog_begin
changelog_end

* formatting

changelog_begin
changelog_end

* Revert "formatting"

This reverts commit d2f4bfce1b.

* Revert "Remove the use of eventually where it is not applicable"

This reverts commit 74f0ec5517.

run-full-compat: true

* evantually removal

run-full-compat: true

* Revert "Re-enable some sandbox tests on MacOS"

This reverts commit 5a1544953b.

* Adding comments

changelog_begin
changelog_end

* Update ledger/ledger-api-tests/infrastructure/src/main/scala/com/daml/ledger/api/testtool/infrastructure/Allocation.scala

Co-authored-by: Robert Autenrieth <31539813+rautenrieth-da@users.noreply.github.com>

* remove blank lines

changelog_begin
changelog_end

Co-authored-by: Robert Autenrieth <31539813+rautenrieth-da@users.noreply.github.com>
2022-03-10 10:05:38 +01:00
Remy
8abf0bae96
Generate SubmissionEntry from KV export (#13209)
We split kv replay as follow:

- [LF] we introduce a simple protobuf to store submission entry (which
  roughly correspond to TRANSACTION_ENTRY and PACKAGE_UPLOAD_ENTRY KV
  submission)

- [KV] we create a tool to extract form a ledger export a sequence of
  submission entry

- [LF] we move the replay tool from KV to LF, and base it on
  submission entries instead of ledger export

The objectify of this split is double:

- on the one side it will simplify maintenance, as it will make API
  between KV and LF more clear (depends only on a protobuf definition)

- on the other side, it will made the use of the tool handy, as it
  will make possible to benchmark the engine without direct dependency
  between KV and LF.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-10 08:47:04 +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
Simon Maxen
cad7928220
Metering cleanup [DPP-937] (#13210)
* Make no-op metering logging debug

* Address statistic defaulting TODOs

* TODO replaced with ticket

* Switch to using assertLedgerMeteringEnd when ledgering end must be populated

* Note in docs that ledger metering is not affected by participant pruning

* Address review comments leftover from DPP-819

* Switch to using cSQL for options and offsets

changelog_begin
changelog_end
2022-03-09 19:06:04 +00: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
Sergey Kisel
512d869ecf
Make indexer benchmark independent of kvutils [DPP-946] (#13144)
*  Make indexer benchmark independent of kvutils [DPP-946]  (#13144)

changelog_begin
changelog_end
2022-03-09 13:24:25 +01:00
pbatko-da
98fbaae668
[Error codes] Stop using reflective 'BaseError.extractContext' to extract error's context (#13199)
changelog_begin
changelog_end
2022-03-09 10:52:11 +01:00
Marton Nagy
f939299960
Add additional metric tracking cumulated Engine execution per interpretation (#13188)
changelog_begin
changelog_end
2022-03-09 07:24:38 +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
Gary Verhaegen
dfa648f585
hunt down DAML better (#13195)
Process:

- `git ls-files -z | xargs -0 -n 100 sed -i --follow-symlinks 's/DAML/Daml/g'`
- `git add -p`
- `git restore -p`
- Check there is no unstaged change left.

To review:

- Check for false positives by carefully reviewing the diff in this PR.
- Check for false negatives with `git grep DAML`.
- Quicker check for fals positives:

```
git grep DAML | grep -v migration | grep -v DAML_
```

Fixes #13190

Note: This is the "second half" of #13191, which failed to cover all the
remaining DAMLs because of:

```
$ git ls-files | grep "'"
compiler/damlc/tests/daml-test-files/MangledScenario'.daml
```

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-08 17:04:58 +01:00
pbatko-da
1c4b767295
Pattern match on each log level when logging errors (#13182)
changelog_begin
changelog_end
2022-03-08 15:01:10 +01:00
pbatko-da
bfe6320238
Reclassify TODO note regarding 'pruneUpToString <= ledgerEnd.value' check (#13183)
changelog_begin
changelog_end
2022-03-08 15:00:27 +01:00
pbatko-da
37c645333f
Use an error code when AkkaGrpc services get closed (#13175)
changelog_begin
Ledger API Specification: Streaming endpoints will use error code 'SERVER_IS_SHUTTING_DOWN' when the server
is being shut down, whereas before an exception without an error code was used.
Grpc status code in use remains 'UNAVAILABLE'.
changelog_end
2022-03-08 12:48:22 +01:00
Simon Maxen
ecb5c1b7d4
Rename SqlExecutor to DbDispatcher (#13184)
changelog_begin
changelog_end

report health
2022-03-08 09:00:14 +00:00
Sergey Kisel
235254998f
Fix debug logging in ApiTransactionService (#13174)
* Fix debug logging in `ApiTransactionService`

changelog_begin
changelog_end

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2022-03-07 18:29:33 +01:00
pbatko-da
c7c211e4df
Remove most of ErrorFactories [DPP-606] (#13146)
changelog_begin
changelog_end
2022-03-07 16:15:21 +01:00
tudor-da
1f1e50514b
Latency test implementation in LedgerApiBenchTool [DPP-947] (#13150)
* Latency test implementation in LedgerApiBenchTool

changelog_begin
changelog_end

* Addressed review comments
2022-03-04 18:53:10 +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
pbatko-da
e6db32719b
[User management] Rename --max-users-page-size flag to conform to established pattern [DPP-944] (#13130)
changelog_begin
changelog_end
2022-03-03 23:09:20 +01:00
pbatko-da
56306eb387
[User management] More race condition tests. Simplifications in the backend. (#13140)
changelog_begin
changelog_end
2022-03-03 22:48:11 +01:00
Kamil Bozek
825bf08846
Fix executor future scheduling [DPP-945] (#13138)
* Run Engine execution in a provided ExecutionContext

CHANGELOG_BEGIN
CHANGELOG_END

* Remove the workaround
2022-03-03 17:06:45 +01:00
pbatko-da
a84c2cd68f
Add tests and use ErrorDetails.matches (#13139)
changelog_begin
changelog_end
2022-03-03 09:33:37 +01:00
Hubert Slojewski
9881e7c64f
Remove ledger-on-sql [KVL-1350] (#13124) 2022-03-02 17:05:12 +01:00
Robert Autenrieth
7fc1cd2441
DPP-931 Resolve testing uncertainties (#13109)
* Address todos

changelog_begin
changelog_end

* Fix test

* Reverse bad change
2022-03-02 13:00:42 +01:00
tudor-da
681b584292
Move unit tests to corresponding implementation package (#13117)
changelog_begin
changelog_end
2022-03-02 05:21:16 +01:00
tudor-da
ea48173350
Switch daml-lf/engine and leger-api-tests/tool not depend on kvutils (#13107)
changelog_begin
changelog_end
2022-03-01 15:41:12 +01:00
tudor-da
6da1cde1b3
Simplify IndexService hierarchy [DPP-932] (#13043)
* Squash LedgerBackedIndexService, SpannedIndexService and MeteredReadOnlyLedger
into ReadOnlyLedgerImpl

changelog_begin
changelog_end

* Rename ReadOnlyLedgerImpl to IndexServiceImpl

* Metrics cleanup
* Remove redundant metered layer stemming from MeteredReadOnlyLedger

* Simplified getLedgerId

* Addressed Marton's review comments
2022-03-01 14:30:30 +01:00
Stephen Compall
7c1cf567ad
use user token for trigger service sandbox test fixture (#13077)
In SandboxFixture when mixing in the auth middleware fixture, set
up the ledger client with a user token instead of a claims token
when not running in the claims-token-specific auth tests.

Fixes #12831.

* note about inClaims

* prevent Product, Serializable warts with AuthServiceJWTPayload

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-25 14:08:44 -05:00
pbatko-da
d5bfefbc00
[User management] Use collate "C" for Postgres and add test for collation for all backends. [DPP-908] (#13084)
In Oracle it should pass as our tests use an image that has NLS_LANG='American' which implies NLS_SORT='BINARY'

changelog_begin
changelog_end
2022-02-25 18:12:35 +01:00
Simon Maxen
f67e9d4d49
Perform transaction metering aggregation inside DB (#13083)
changelog_begin
changelog_end
2022-02-25 13:37:38 +00:00
Robert Autenrieth
d5a4aea3a7
Fix broken test logback (#13063)
changelog_begin
changelog_end
2022-02-24 10:28:56 +01:00