* 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>
* 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
* 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>
CHANGELOG_BEGIN
[Engine] - Change the callback for contract key from `GlobalKey => Option[ContractId]` to `GlobalKeyWithMaintainers => Option[ContractId]`
CHANGELOG_END
* 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
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
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
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
* 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.
* Removed engine constrcutor parameter.
* Basic abstractions for pre-executing submission validator.
* Fix build.
* Shared byteToLogEntryId with BatchedSubmissionValidator.
* Added some more metrics.
* Removed involved participants from PreExecutionResult.
CHANGELOG_BEGIN
CHANGELOG_END
* Reformatted/added headers.
* Fix build.
* Code tidying.
* Moved PreExecutionOutput into a separate file.
* Moved type definition into companion object.
* Added some tests for PreExecutingSubmissionValidator.
* Update ledger/participant-state/kvutils/src/main/scala/com/daml/ledger/validator/preexecution/LedgerStateReaderWithFingerprints.scala
Co-authored-by: Simon Meier <meiersi-da@users.noreply.github.com>
* Removed left-in code.
* Added some assertions for .zip operations.
* Test result for unexpected message.
* Test setting min/max record time.
* Reuse code for generating a key-value pair for log entries.
* Tests for CachingDamlLedgerStateReaderWithFingerprints.
* Store empty values as well with their fingerprints.
* Moved weight function into companion object.
* Test that the results come back in right order.
* Code tidying.
* Basic test case for LogAppenderPreExecutingCommitStrategy. Added missing headers.
* Code tidying.
* Fix build.
* Fix build.
* Revert "Store empty values as well with their fingerprints."
This reverts commit ca68ea967f.
# Conflicts:
# ledger/participant-state/kvutils/src/test/suite/scala/com/daml/ledger/validator/caching/CachingDamlLedgerStateReaderWithFingerprintsSpec.scala
* Added some docs.
* Added test case for ensuring that we don't cache None values.
* Fix build.
Co-authored-by: Simon Meier <meiersi-da@users.noreply.github.com>
* Removed unused code.
* Basic interface draft for producing pre-execution results.
* Share code for running all steps for a committer.
* Code tidying.
* Removed type parameter Submission from Committer.
* Simplify creation and using of committers.
* ExecuteSubmission => SubmissionExecutor
* Code tidying.
* Code tidying.
CHANGELOG_BEGIN
CHANGELOG_END
* Update ledger/participant-state/kvutils/src/main/scala/com/daml/ledger/participant/state/kvutils/committer/Committer.scala
Co-authored-by: Andreas Lochbihler <36634420+andreaslochbihler-da@users.noreply.github.com>
* Fixed build.
* Basic test cases for dryRun.
* Set to-be-notified participants to be everyone.
* Some tests for runSteps.
* Fixing merge.
* Organized imports.
* Added separate timer for pre-execution.
* Set min/max record time from context.
* preexecution => preExecution
* Code tidying.
* Code tidying.
* Set out-of-time-bounds log entry from context.
* Code tidying.
* Code tidying.
* Keep track of deduplication time window for transactions.
* Set deduplicateUntil in the generated log entry.
* Made min/max record time optional in pre-execution result.
Co-authored-by: Andreas Lochbihler <36634420+andreaslochbihler-da@users.noreply.github.com>
* replace traverseU and sequenceU with traverse and sequence
- with -Ypartial-unification on, the extra Unapply typeclass lookup is
unnecessary
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* limit imports; we only need *> and void
* kvutils/integrity-check: Always reset the output color.
Contrary to popular belief, terminal colors are hard. Resetting to
"white" isn't good enough; you don't know which color the user's
terminal should be set to. We need to print `AnsiColor.RESET` to ensure
the terminal is properly reset.
This changes the way we print so we _always_ set the color and then
reset it in one operation, making it impossible to accidentally leave
the terminal using a specific color. It also fixes the above bug as a
side effect.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils/integrity-check: Print the total outside `go`.
* kvutils/integrity-check: Push the error outwards.
I'd rather avoid calling `sys.exit` inside a loop if I can.
* kvutils/integrity-check: Implicits for colors.
Before:
```scala
Print.green("Hello!")
```
After:
```scala
println("Hello!".green)
```
* kvutils/integrity-check: When there's an exception, crash.
The integrity checker would previously hang around for a long time in
the event of an exception. This makes sure all threads are shut down
immediately.
* kvutils/integrity-check: Increase the timeout per submission.
Larger submissions time out on my machine.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils/integrity-check: Rewrite without `Await`.
* kvutils/integrity-check: Close the file after running.
small clean up in the testing library TransactionBuilder, bsaically add a Submitted and a Committed version for empty transaction constant and build method.
plus a bit of cleaning in tests using TransactionBuilder
CHANGELOG_BEGIN
CHANGELOG_END
* Removed archived_by_entry from CommitContext and DamlContractState.
* Removed references to getEntryId from test code.
* Do not pass log entry ID to committers.
* Log entry ID is no longer required for computing submission outputs.
* Log entry ID is no longer required for computing submission outputs.
* Code tidying.
CHANGELOG_BEGIN
CHANGELOG_END
Since we have only absolute contract ids, there is no more distinction
between local and global disclosure/divulgence. Let's please remove the
`global` prefix since it causes confusion (at least for me it did).
CHANGELOG_BEGIN
CHANGELOG_END
* `CommitContext` records accessed input keys
CHANGELOG_BEGIN
CHANGELOG_END
* Simplify state and tests for `accessedInputKeys`.
* Add note about stable VS deterministic iteration order
* Add test about not recording input keys that are not accessed.
* Use regular a regular set for accessed keys as nor iteration stability nor determinism are needed
* Measure time of interpretation and store it in CommandExecutionResult.
* Added parameters for passing in interpretation time for WriteService and LedgerWriter.
* Code tidying.
* Added CommitMetadata parameter to LedgerWriter.
* Thread through interpretation time. Aggregate interpretation times for a batch.
* Take max of interpretation times.
* Calculate interpretation time in nanos.
* Moved CommitMetadata into separate file.
CHANGELOG_BEGIN
CHANGELOG_END
* Apply suggestions from code review
Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
* Delegate deprecated methods to method with new signature.
* Code tidying.
* Suppress deprecation warnings.
* Made interpretation cost optional in CommitMetadata.
* Test that we populate interpretation time.
* Code tidying.
* Apply suggestions from code review
Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
* Code tidying.
* Some more tests. Do not return interpretation cost for a batch if it only contains non-transaction submissions.
* Reformatted.
* Reformatted.
* Named arbitrary interpretation cost.
* Reverted changes for BatchingLedgerWriter.
* Always drop commit metadata for batches and don't report interpretation cost.
* More specific expectations.
* Include authorization check and blinding in interpretation time.
Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
Our build is intermittently failing on CI on the target,
`//ledger/participant-state/kvutils:reference-ledger-dump`.
Creating the reference ledger dump exercises ledger-on-memory with the
Ledger API Test Tool as a side effect. The real goal is to run any kind
of kvutils ledger and generate a load of data. With that in mind, the
idea is to be somewhat stable, not fast.
This decreases the number of concurrent tests running at once to
generate the reference dump from the number of CPUs (presumably 8 on CI,
though I'm not sure) to 4.
It does not change the number of concurrent tests when running
`//ledger/ledger-on-memory/conformance-test`. This will still default to
the number of CPUs.
CHANGELOG_BEGIN
CHANGELOG_END
* Address https://github.com/digital-asset/daml/pull/6507#discussion_r446113575
* drop blindinginfo.proto
changelog_begin
changelog_end
* drop BlindingCoder
* Remove blindinginfo Protobuf definition JAR
changelog_begin
[DAML-LF] The blindinginfo Protobuf definition JAR, which was previously unused, has been pulled from the artifacts released on Maven
changelog_end
Co-authored-by: Remy Haemmerle <Remy.Haemmerle@daml.com>
* add -Xsource:2.13, -Ypartial-unification to common_scalacopts
* add now-referenced scalaz-core where needed
* work around bad type signatures in scalatest Aggregating, Containing
* unused Any suppression
* work around bad partial-unification wrought by type alias
* remove unused Conversions import
- not required in 4f68cfc480 either, so unsure how it's survived this long
* work around Future.traverse; remove unused show import
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* remove unused bounds
* remove -Ypartial-unification and -Xsource:2.13 where they were explicitly passed
* longer comment on what the options do
- suggested by @stefanobaghino-da; thanks
* forget Future.traverse, just use scalaz, it knows how to do this