Commit Graph

357 Commits

Author SHA1 Message Date
Samir Talwar
fe7d56f099
kvutils/tools: Split the tools by directory. (#7306)
* kvutils/tools: Split the integrity checkers by package.

The two versions of the integrity checker are intertwined when they
really don't rely on each other at all. This splits them into two
separate packages to make the distinction clear.

CHANGELOG_BEGIN
CHANGELOG_END

* kvutils/tools: Split the integrity checkers by directory.

This splits the integrity checkers further into separate directories, to
make it clear they do not interact at all.

* kvutils/tools: Rename "integrity-check" to "integrity-check-v1".

* ledger-on-memory: Recommend ledger exports (v3), not ledger dumps (v1).

* kvutils/tools: Split the benchmarks from integrity-check-v2.
2020-09-02 12:45:56 +00:00
Samir Talwar
0c99f637a0
[KVL-254] kvutils: Export to protobuf, not a custom serialization format. (#7265)
* kvutils: Implement a basic protocol buffer-based export.

* kvutils: Add a header to the protobuf-based export.

So if we decide to go for a v4, it's easier to figure this stuff out.

* kvutils: Use our own header format for export.

The idea is to be somewhat forward-compatible, so relying on protobuf
to always be the format of the future seems a little odd. We may switch.

* kvutils: Construct the importer up-front during integrity checks.

* kvutils: Move the various importers and exporters to versioned packages.

* kvutils: Move the export version to the package object.

* kvutils: Create helpers to construct importers and exporters from paths.

* kvutils: Process either v2 or v3 exports with the integrity checker.

* kvutils: Sort the write set during export.

* kvutils: Switch to v3 of the export.

The integrity checker will work with either version.

CHANGELOG_BEGIN
- [Integration Kit] kvutils-based ledgers will now export the ledger
  using a new serialization format based on Protocol Buffers, which we
  are referring to as "v3". Existing "v2" exports can still be read and
  verified using the integrity checker, which can read both old and new
  versions.
CHANGELOG_END

* kvutils: Aggregate export data in a sorted map.

We need to sort it anyway; might as well do it on input.

* kvutils: Improve a test string.

* kvutils: Use the v3 importer in the replay test.

* kvutils: Remove v2 of the export format.

We're pretty sure no one is using it.
2020-09-02 07:41:25 +00:00
Samir Talwar
aaf70c4add
kvutils: Increase the streaming updates timeout in integration tests. (#7278)
* ledger-on-(memory + sql): Include logback as a test dependency.

Otherwise logs don't show up when we get failures, which makes debugging
a lot harder.

* kvutils: On unit test timeout, show a useful error.

* kvutils: Increase the streaming updates timeout in integration tests.

This is timing out every now and again on CI, and I can reproduce it
easily by running the tests in parallel.

CHANGELOG_BEGIN
CHANGELOG_END
2020-08-31 14:40:35 +00:00
Samir Talwar
8dde430499
kvutils: Buffer (im/ex)port streams, and simplify reading a fixed-length ByteString. (#7263)
* kvutils: Buffer (im/ex)porter streams.

CHANGELOG_BEGIN
CHANGELOG_END

* kvutils: Use `ByteStreams.limit` instead of copying byte arrays.
2020-08-28 13:39:55 +00:00
Samir Talwar
445af973cd
kvutils: Generalize the interfaces and tests for the ledger export. (#7258)
* kvutils: Factor out a base class for ledger exporter implementations.

CHANGELOG_BEGIN
CHANGELOG_END

* kvutils: Use piped streams in LedgerDataExporterSpecBase.

* kvutils: Rename "FileBased…" to "SerializationBasedLedgerDataExporter".

* kvutils: Wrap Deserialization in a class for polymorphism purposes.

* kvutils: Pull out submission info variables in the ledger export test.

* kvutils: Inline (De)Serialization into the exporter.

* kvutils: Replace usage of Deserialization with LedgerDataImporter.

* kvutils: Don't synchronize on making an InMemorySubmissionAggregator.

* kvutils: Pass a SubmissionInfo to LedgerDataExporter.

* kvutils: Reflow a long string to make it readable.
2020-08-28 11:39:02 +00:00
Samir Talwar
78d77e77a4
kvutils: Bump integrity check test sizes back to medium. (#7257)
They might take a while when run on CI.

CHANGELOG_BEGIN
CHANGELOG_END
2020-08-28 09:40:19 +00:00
Samir Talwar
82d90a023c
kvutils: Make the RawToDamlLedgerStateReaderAdapter constructor visible. (#7230)
Consumers of kvutils may need to use this, and they shouldn't have to
jump through hoops.

CHANGELOG_BEGIN
CHANGELOG_END
2020-08-27 07:54:12 +00:00
Samir Talwar
19a7eadc57
kvutils: Use classes in the integrity checker code. (#7238)
* kvutils: Factor out ledger dump timers into a class.

* kvutils: Use `Paths` in the integrity checkers.

Strings give me the heebie-jeebies.

CHANGELOG_BEGIN
CHANGELOG_END
2020-08-26 09:08:26 +00:00
Samir Talwar
b707bc825d
kvutils: Simpler constructors for common caching classes. (#7231)
* kvutils: Use `CachingDamlLedgerStateReader.apply`.

* kvutils: Simplify the constructor of CachingCommitStrategy.

CHANGELOG_BEGIN
CHANGELOG_END
2020-08-26 07:34:01 +00:00
Samir Talwar
aafb4a27f9
kvutils: Simplify exporting by pushing the mutations outwards. (#7215)
* kvutils: Add `override` annotations for the exporters.

* kvutils: Test the ledger export (v2).

* kvutils: Mark integrity tests as small.

* kvutils: Add assertions to the FileBasedLedgerDataExporter.

Just confirming my understanding of how this works. Verified with the
Ledger API Test Tool and some proprietary code.

* kvutils: Move the definition of `CorrelationId` to the package file.

* kvutils: Pass a submission write set through the batch pipeline.

This allows for less mutability all over the place.

CHANGELOG_BEGIN
CHANGELOG_END

* kvutils: Move export finishing into its own type.

* kvutils: Move some nested types upwards.

* kvutils: Split Deserialization from Serialization.

* kvutils: Extract out common behavior in (De)Serialization.

* kvutils: Don't use a singleton for LedgerDataExporter.

Instead, construct it once.

* kvutils: Make sure we close the export file when we're done.

* kvutils: Simplify `Debug` in the same manner as `LedgerDataExport`.

* kvutils: Fix a test name.

Co-authored-by: fabiotudone-da <fabio.tudone@digitalasset.com>

* kvutils: Remove backticks around "export".

* kvutils: Move the test `BatchedSubmissionValidator#apply` into the test.

Co-authored-by: fabiotudone-da <fabio.tudone@digitalasset.com>
2020-08-25 17:52:59 +00:00
Stefano Baghino
b33bfda7fa
[KVL-222] Add participant id to index metadata dump (#7224)
* [KVL-222] Add participant id to index metadata dump

changelog_begin
changelog_end

* Test SqlLedger participant id initialization

* Test JdbcIndexer participant id initialization

* Make RecoveringIndexerSpec final and remove unused trait
2020-08-25 17:02:02 +02:00
Samir Talwar
c08de213f9
kvutils: Fix flaky runs of BatchingQueueSpec. (#7223)
* kvutils: Use `eventually` in BatchingQueueSpec to fix a flaky test.

We cannot assume that the queue will shut down faster than we can check
its state.

* kvutils: Increase timeouts in BatchingQueueSpec to fix flakiness.

50 milliseconds is pretty fast when tests are running in parallel.

CHANGELOG_BEGIN
CHANGELOG_END
2020-08-25 14:21:38 +00:00
Stefano Baghino
57a47347da
Add run mode to kvutils to dump index metadata and exit (#7213)
* Add run mode to kvutils to dump index metadata and exit

changelog_begin
changelog_end

* Address https://github.com/digital-asset/daml/pull/7213#discussion_r475843480

* Address https://github.com/digital-asset/daml/pull/7213#discussion_r475847418
2020-08-25 10:09:05 +02:00
Samir Talwar
6b2fd4bfaa
participant-state: Run tests in parallel. (#7214)
* kvutils: Run tests in parallel.

* participant-state: Run tests in parallel, and fix the paths.

CHANGELOG_BEGIN
CHANGELOG_END
2020-08-25 07:44:44 +00:00
Stefano Baghino
ac86a9c5a3
Refactor SQLLedger initialization routine (#7200)
* Refactor SQLLedger initialization routine

Small refactoring to make initialization a bit more readable. Performed
while moving forward with the addition of the participant identifier to
the parameters table (so a few minor details have leaked into this PR).

changelog_begin
changelog_end

* Fix compilation errors

* Address https://github.com/digital-asset/daml/pull/7200#discussion_r474630880

* Fix test, lower test logging noise
2020-08-21 15:29:49 +02:00
Samir Talwar
5d1ef35b09
kvutils: Move execution contexts to the submission methods. (#7071)
* kvutils: Move execution contexts to the submission methods.

Previously, the execution contexts were provided at the constructor
level, which meant the submission validator and associated components
would use the resource acquisition execution context. This context is
intended purely for resource acquisition; if we need an execution
context for processing data, we have much more control when we
explicitly create one.

Implementors will still need to avoid passing an execution context
implicitly into the constructors of their own components, instead
favoring an explicit one that is to be used during `commit` or reading
events.

CHANGELOG_BEGIN
- [Integration Kit] kvutils now expects execution contexts to be passed
  in to the various ``SubmissionValidator``, ``LedgerStateAccess``, and
  ``LedgerStateOperations`` methods. This is a source-breaking change.

  Instead of providing an execution context implicitly to your ledger
  implementation, you are encouraged to construct the relevant contexts
  for different operations explicitly. Please refer to the open-source
  implementations as a reference.
CHANGELOG_END

* ledger-on-memory: Don't use the acquisition context for commits.

Instead, use the materializer execution context; it may not be the best
choice but at least it's appropriate.

* kvutils: Standardize method parameter formatting.

* kvutils: Provide old state  APIs as `LedgerStateAccess.v1_4`.
2020-08-18 11:50:33 +00:00
Samir Talwar
bed52a0db5
kvutils/tools: If there's an error in reading a submission, crash. (#7129)
Right now the error is logged, but the program stalls, because the
exception is outside any `Future`, and so the cleanup never happens.

CHANGELOG_BEGIN
CHANGELOG_END
2020-08-13 16:53:55 +00:00
Samir Talwar
27f76c4386
Use Future.unit instead of Future.successful(()). (#7080)
And in one instance, `Resource.unit`.

I just think it's easier to read. Too many parentheses make Samir a dull
boy.

CHANGELOG_BEGIN
CHANGELOG_END
2020-08-11 09:18:50 +00:00
Miklos
d99a50a035
Use case class for grouping components needed for replay (#7049)
* Use case class for grouping components needed for replay for a given commit strategy.
CHANGELOG_BEGIN
CHANGELOG_END

* Update ledger/participant-state/kvutils/tools/src/main/scala/com/daml/ledger/participant/state/kvutils/tools/export/CommitStrategySupport.scala

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>

* Reformatted.

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2020-08-11 09:11:46 +00:00
Samir Talwar
2d53b01598
ledger-on-sql: Provide a dedicated committer execution context. (#7063)
* ledger-on-sql: When failing to acquire a connection, specify where.

* kvutils: Pass the execution context through the ValidatingCommitter.

The SubmissionValidator shouldn't be getting it through the constructor,
but this will do for now.

* kvutils: Remove the executionContext from BatchingLedgerStateOperations.

* ledger-on-sql: Inject the committer.

* ledger-on-sql: Construct a single-threaded executor for the committer.

CHANGELOG_BEGIN
CHANGELOG_END

* ledger-on-sql: Trailing commas are the best kind of commas.

Co-authored-by: fabiotudone-da <fabio.tudone@digitalasset.com>

Co-authored-by: fabiotudone-da <fabio.tudone@digitalasset.com>
2020-08-10 09:03:15 +00:00
Stephen Compall
96624a7677
use -Ywarn-unused for all Scala code (#6907)
* add -Ywarn-unused to all scalac options

* remove some unused arguments

* remove some unused definitions

* remove some unused variable names

* suppress some unused variable names

* changeExtension doesn't use baseName

* no changelog

CHANGELOG_BEGIN
CHANGELOG_END

* work around no plugins in scenario interpreter perf tests

* remove many more unused things

* remove more unused things, restore some used things

* remove more unused things, restore a couple signature mistakes

* missed import

* unused argument

* remove more unused loggingContexts

* some unused code in triggers

* some unused code in sandbox and kvutils

* some unused code in repl-service and daml-script

* some unused code in bindings-rxjava tests

* some unused code in triggers runner

* more comments on silent usages

- suggested by @cocreature; thanks

* fix missing reference in TestCommands

* more unused in triggers

* more unused in sandbox

* more unused in daml-script

* more unused in ledger-client tests

* more unused in triggers

* more unused in kvutils

* more unused in daml-script

* more unused in sandbox

* remove unused in ledger-api-test-tool

* suppress final special case for codegen unused warnings

.../com/daml/sample/mymain/ContractIdNT.scala:24: warning: parameter value ev 0 in method ContractIdNT Value is never used
      implicit def `ContractIdNT Value`[a_a1dk](implicit `ev 0`: ` lfdomainapi`.Value[a_a1dk]): ` lfdomainapi`.Value[_root_.com.daml.sample.MyMain.ContractIdNT[a_a1dk]] = {
                                                         ^
.../com/daml/sample/mymain/ContractIdNT.scala:41: warning: parameter value eva_a1dk in method ContractIdNT LfEncodable is never used
      implicit def `ContractIdNT LfEncodable`[a_a1dk](implicit eva_a1dk: ` lfdomainapi`.encoding.LfEncodable[a_a1dk]): ` lfdomainapi`.encoding.LfEncodable[_root_.com.daml.sample.MyMain.ContractIdNT[a_a1dk]] = {
                                                               ^

* one more unused in daml-script

* special scaladoc rules may need silencer, too

* unused in compatibility/sandbox-migration

* more commas, a different way to `find`

- suggested by @remyhaemmerle-da; thanks
2020-08-07 13:16:09 -04:00
Stephen Compall
aa22c3a1cc
remove unused definitions, params, args from kvutils Scala code (#6992)
* remove unused definitions, params, args from kvutils Scala code

CHANGELOG_BEGIN
CHANGELOG_END

* label desired default for enclose compression argument, should it come into use

- suggested by @fabiotudone-da; thanks

* type-alias a couple of ProcessSubmission's args to label what they are

- suggested by @fabiotudone-da; thanks

* reformat after fixing merge

* more unused in kvutils

* define enclose's "default" compression as a constant

- suggested by @miklos-da; thanks
  https://github.com/digital-asset/daml/pull/6992#discussion_r466489923
2020-08-06 16:02:35 +00:00
Miklos
0a5df2349a
Use stable engine config when integrity checking. (#7048)
CHANGELOG_BEGIN
CHANGELOG_END
2020-08-06 15:38:30 +00:00
Miklos
5a831249d2
Allow overriding comparison of write-sets by CommitStrategySupport implementation (#7006)
* Allow CommitStrategySupport implementation to override comparison of write-sets.
CHANGELOG_BEGIN
CHANGELOG_END

* Update ledger/participant-state/kvutils/tools/src/main/scala/com/daml/ledger/participant/state/kvutils/tools/CommitStrategySupport.scala

Co-authored-by: fabiotudone-da <fabio.tudone@digitalasset.com>

* Moved generating explanation into helper function.

* Added tests for explanation logic and fixed the logic.

* Test key comparison as well.

* Merged master.

* Removed unnecessary dependencies.

* Reformatted.

* Reformatted.

Co-authored-by: fabiotudone-da <fabio.tudone@digitalasset.com>
2020-08-06 13:10:56 +00:00
Miklos
688d9ad30e
Fixed serialization of record time in ledger exports. (#7025)
CHANGELOG_BEGIN
CHANGELOG_END
2020-08-05 17:25:58 +00:00
Miklos
f5161255a9
Added NeverCacheUpdatePolicy. (#7027)
CHANGELOG_BEGIN
CHANGELOG_END
2020-08-05 17:25:42 +00:00
Miklos
9aede28f77
Publish artifacts required for integrity checking tools (#7024)
* Create scala library for integrity checking tools.
CHANGELOG_BEGIN
CHANGELOG_END

* Moved integrity checking drivers into separate package.

* First define the scala library then the rest.

* Added missing header.

* Moved all export related code to under package kvutils.tools.export.

* Added missing header.

* Make all binaries depend on the library and not need sources.
2020-08-05 17:08:29 +00:00
fabiotudone-da
84bbca1a6d
Pre-execution support for DAML on memory KV (#6793)
* Move in-mem writer's `ledgerStateAccess.inTransaction` down to committer

* Move `BatchedSubmissionValidator` and spec into `batch` subpackage

* Add `StateAccessingValidatingCommitter` and inherit it in batching one

* Document `StateAccessingValidatingCommitter`

* Generalize the committer for `InMemoryLedgerReaderWriter`

* `envelope` -> `submissionEnvelope` in validating committers

* Add `PreExecutingValidatingCommitter` and sub-components

* Add retry in case of conflict in `PreExecutingValidatingCommitter`

CHANGELOG_BEGIN
CHANGELOG_END

* Fix compilation error

* Hook pre-execution in `daml-on-memory-kv`

* Add fake time updates provider

* Fix `BatchedValidatingCommitterSpec`

* Don't use batched writer with pre-execution

* Fix conflict detection

* Fix out-of-time-bounds detection

* Prefix/unprefix serialized log entry IDs in pre-execution write sets

* Fix: produce an out-of-bounds rejection log entry in transaction rejected cases too

* Fix `SubmissionResult` return in case of repeated pre-exec conflict

* Fidelity level 1: sequential pre-execution

* Documentation for pre-execution support in DAML-on-Memory KV

* Add ledger-on-memory conformance test with pre-execution enabled

* Revert "Fix: produce an out-of-bounds rejection log entry in transaction rejected cases too"

This reverts commit 4df7e26b

* Fix test

* Improve naming and documentation

* Address review comments

* Fix test

* Fix wrong implementation used for `ParticipantStateIntegrationSpecBase` tests

* Address review comments

* Address review comments

* Address minor review comments
2020-08-05 08:00:27 +00:00
Remy
ae7e92a6c4
LF: adapt TransactionBuilder to the new version inference (#6854)
This PR changes TransactionBuilder according the new version inference
algorithm implemented in #6756

CHANGELOG_BEGIN
CHANGELOG_END
2020-08-03 19:05:30 +02:00
Stefano Baghino
e972872128
Properly use LoggingContext in Participant Server (#6924)
* Properly use LoggingContext in Participant Server

Fixes #6837

Spreads usage of LoggingContext and ContextualizedLogger throughout the participant server.

changelog_begin
[Sandbox/Integration Kit] We have enriched the contextual information
exposed by the Ledger API server. You should note richer logging information,
which can be read either via unstructured or structured logging frameworks.
A paragraph on how to configure structured logging has been added to the docs.
For more on the issue, see https://github.com/digital-asset/daml/issues/6837.
changelog_end

* Make everything compile

* Leave only actual commands on trace level on submission

* Shorter log messages on submission

* Don't add values down the call stack

* Document good practices regarding the logging context

* Add context to write service implementations

* Add logging context to tests

* Document logging for DAML on SQL

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463503013

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463508117

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463515665

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463513157

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463516359

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463516895

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463518813

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463520210

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463521501

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463521593

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463525453

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463525560

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463525672

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463525742

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463526837

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463527054

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463527523

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463527814

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463527958

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463527900

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463527997

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463528050

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463542877

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463543051

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463543614

* Address https://github.com/digital-asset/daml/pull/6924#discussion_r463543692
2020-07-31 12:40:13 +00:00
Miklos
224ab3621c
Ledger writer supporting pre-execution and normal flow (#6904)
* Added ledger writer that chooses between instances based on estimate interpretation cost.
CHANGELOG_BEGIN
CHANGELOG_END

* Code tidying.

* Delegate to pre-executing writer in case thershold is set to 0.

* Added ability to change metrics.

* Added metrics.

* Code tidying.

* Update ledger/participant-state/kvutils/src/main/scala/com/daml/ledger/participant/state/kvutils/api/InterpretationCostBasedLedgerWriterChooser.scala

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2020-07-29 08:48:30 +00:00
Stephen Compall
fd07a26510
check for scaladoc comments that are not actually used (#6802)
* add -Xlint:doc-detached

- reverts 1feae964e3 from #6798

* attach several scaladocs where they'll actually be included

* no changelog

* attach several more scaladocs where they'll actually be included

* no changelog

CHANGELOG_BEGIN
CHANGELOG_END
2020-07-28 20:32:30 +00:00
Miklos
899fedcc2e
Added time update log entry type. (#6886)
CHANGELOG_BEGIN
CHANGELOG_END
2020-07-28 10:49:47 +02:00
Robert Autenrieth
c4c27beb5a
Fix time model error message (#6813)
* Fix time model error message

CHANGELOG_BEGIN
CHANGELOG_END

* Restore ledger time based error message

* Add test for the error message

* Fix the error message

now for real?
2020-07-27 06:26:04 +00:00
Samir Talwar
98de16606d
daml-on-sql: An elegant Main class, for a more civilized age. (#6829)
* daml-on-sql: Pull out a new `Main` object that wraps sandbox-classic.

CHANGELOG_BEGIN
CHANGELOG_END

* daml-on-sql: Fail if a JDBC URL is not provided or not for PostgreSQL.

* sandbox-classic: Rename the conformance test H2 database.

* daml-on-sql + sandbox-classic: Report configuration errors cleanly.

This means letting `ProgramResource` catch the errors, log, and exit.

* daml-on-sql: Change the name logged on startup.

* daml-on-sql: Change the default participant ID.

* sandbox-common: Give the ledger name its own tagged string type.

* sandbox-classic: Generate random ledger IDs using the ledger name.

* daml-on-sql: Remove the banner, replacing it with a blank line.

* daml-on-sql: Enable strong seeding by default.

And weak seeding in the conformance tests.

* sandbox-classic: Move the ledger name to a separate parameter.

It's not really configurable.

* sandbox-classic: Move LedgerName from sandbox-common.

* daml-on-sql: Remove "-participant" from the participant ID.

* daml-on-sql: Use `Name` where possible.

* daml-on-sql: Make the ledger ID mandatory.

* Revert "sandbox-classic: Move LedgerName from sandbox-common."

This reverts commit 0dad1584a7.

* daml-on-sql: Print "DAML-on-SQL" in the CLI help, not "Sandbox".

* daml-on-sql + sandbox + sandbox-classic: Split out custom CLI parsing. (#6846)

* participant-state: Simplify naming the seeding modes.
2020-07-24 18:54:19 +00:00
Miklos
3991286b82
Fix populating out-of-time-bounds log entry for pre-execution (#6852)
* Populate out-of-time-bounds entry when we set min/max record time.

* Populate out-of-time-bounds entry when we set max record time for ConfigCommitter.

* Code tidying.

* Do not throw in case no min/max record time has been specified and there's no out-of-time-bounds log entry.
CHANGELOG_BEGIN
CHANGELOG_END

* Code tidying.

* Add ledger-on-memory conformance test with pre-execution enabled

* Revert "Add ledger-on-memory conformance test with pre-execution enabled"

This reverts commit d2c4364a

* Apply suggestions from code review

Co-authored-by: fabiotudone-da <fabio.tudone@digitalasset.com>

Co-authored-by: Fabio Tudone <fabio.tudone@digitalasset.com>
2020-07-24 11:07:53 +00:00
Remy
ce3c3c89a4
LF: redesign engine configuration (#6763)
This PR redesigns the engine Configuration as described in #5164. 

CHANGELOG_BEGIN
CHANGELOG_END
2020-07-22 12:17:07 +02:00
Remy
a629959c09
LF: Move GlobalKey and GlobalKeyWithMaintainers outside Node (#6795)
CHANGELOG_BEGIN
CHANGELOG_END
2020-07-21 09:08:36 +02:00
Robert Autenrieth
a03a1ecc0b
Add basic participant integration API scaladoc (#6790)
* Add basic scaladoc

for participant integration API

CHANGELOG_BEGIN
CHANGELOG_END
2020-07-20 21:31:32 +02:00
Remy
5f4dd39b5d
Engine: add maintainers to contract key call back (#6781)
CHANGELOG_BEGIN
[Engine] - Change the callback for contract key from `GlobalKey => Option[ContractId]` to  `GlobalKeyWithMaintainers => Option[ContractId]`
CHANGELOG_END
2020-07-20 17:42:06 +02:00
Robert Autenrieth
2159de08ef
Remove index transformation (#6789)
The index is not part of the public API,
and we want to always enable metrics.

CHANGELOG_BEGIN
CHANGELOG_END
2020-07-20 09:20:59 +02:00
Robert Autenrieth
1074736316
Add time model documentation (#6705)
* Update existing docs, removing references to old time model
* Add detailed time model docs
* Rename ledger effective time to ledger time

CHANGELOG_BEGIN
CHANGELOG_END
2020-07-17 17:54:26 +02:00
Robert Autenrieth
7ce9748066
Split sandbox code into separate packages (#6695)
* Move public code into daml-integration-api

CHANGELOG_BEGIN
[DAML Integration Kit]: Removed sandbox specific code from the API intended to be used by ledger integrations. Use the maven coordinates ``com.daml:participant-integration-api:VERSION`` instead of ``com.daml:ledger-api-server`` or ``com.daml:sandbox``.
CHANGELOG_END
2020-07-17 17:06:06 +02:00
fabiotudone-da
ebf312873c
Add CachingDamlLedgerStateReaderWithFingerprints factory method (#6769)
CHANGELOG_BEGIN
CHANGELOG_END
2020-07-17 16:07:54 +02:00
Gerolf Seitz
35b50992f0
Allow running StandaloneApiServer in read-only mode. (#6721)
Also fixes #5635, removing usage of `ReadService` from the `StandaloneApiServer`.

The configuration stream of the Ledger API LedgerConfigurationService is now properly backed by the configuration entries instead of just serving the initial configuration.

CHANGELOG_BEGIN
[DAML Integration Kit]: ``StandaloneApiServer`` can now be run in a read-only mode.
  - The type of the constructor parameter ``writeService`` of ``StandaloneApiServer`` changed to ``Option[WriteService]``. Passing ``None`` will not start any of the admin services, the command service, and the command submission service.
  - The constructor parameter ``readService`` of ``StandaloneApiServer`` has been removed.
  - A new constructor parameter ``ledgerId`` has been added to ``StandaloneApiServer``. It is used to verify that that ``StandaloneApiServer`` is run against an index storage for the same ledgerId. Initialization is aborted if this is not the case.
[DAML Integration Kit]: The ``LedgerConfigurationService`` now properly streams configuration changes.
CHANGELOG_END
2020-07-17 09:57:00 +02:00
Remy
8d74754450
kv tools: fix typos in kvutils tools README (#6758)
CHANGELOG_BEGIN
CHANGELOG_END
2020-07-16 16:59:34 +02:00
Remy
15da222939
DAML-LF: move some type definitions out of Transaction object (#6739)
SubmittedTransaction and CommittedTransaction are moved from com.daml.lf.transaction.Transaction to
com.daml.lf.transaction

This helps intelliJ type inference.

CHANGELOG_BEGIN
CHANGELOG_END
2020-07-16 09:13:30 +02:00
Moritz Kiefer
91302d0f4a
Fix merge conflict in KVUtils test adapter (#6748)
NodeId from the Transaction object got deprecated.

changelog_begin
changelog_end
2020-07-15 19:30:01 +00:00
Remy
471863570a
Replay benchmark: adapt dar to ledger export (#6661)
Try to match transactions from the ledger export to a different non original dar.
This is useful to benchmark a different compilation of the same original daml source.

CHANGELOG_BEGIN
CHANGELOG_END
2020-07-15 21:10:35 +02:00
Miklos
f7bbfc2a1b
[kvutils] Added initial set of metrics for pre-execution (#6738)
* Added metrics for decoding and total time of pre-execution.
CHANGELOG_BEGIN
CHANGELOG_END

* Code tidying.

* Added timer for tracking time spent with generating write sets.
2020-07-15 14:27:14 +00:00