Commit Graph

1038 Commits

Author SHA1 Message Date
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
Miklos
8e04b2add9
[kvutils] Do not expose fingerprints to Committers (#6737) 2020-07-15 14:59:44 +02:00
Miklos
761787ce4b
[kvutils] Pre-executing submission validator (#6711)
* 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>
2020-07-15 08:55:19 +00:00
Leonid Shlyapnikov
918bae2ed4
Fix for event_offset to event_sequential_id conversion (#6712)
* adding a test case for the offset order returning expected transactions,

moving the exiting test case under flat transactions behavior group

* Fixing event_offset to event_sequential_id conversion

handling the conversion on an empty ledger,
adding a bit more logging,
skipping DB query on an empty range

CHANGELOG_BEGIN
CHANGELOG_END

* addressing code review comments

simplifying the query
returning SQL that forces the event_offset index usage

* addressing code review comments

simplifying the query
returning SQL that forces the event_offset index usage

* simplifying it a bit more
2020-07-14 21:11:51 +02:00
Gary Verhaegen
8176fb0c8d
fix the the typo (#6723)
```
s/the the /the /
```

CHANGELOG_BEGIN
CHANGELOG_END
2020-07-14 16:55:33 +00:00
Remy
121a6a7d77
DAMLLF: clean up Transaction definitions (#6714)
* LF: move NodeId from value to transaction

* LF: remove some `private` keywords in Transaction

CHANGELOG_BEGIN
CHANGELOG_END
2020-07-14 14:42:58 +02:00
fabiotudone-da
3f2938ecf6
Add KVUtils pre-execution round-trip test (#6671)
* Round-trip pre-execution tests for all committers

* Address review comments

* Address review comments
2020-07-14 09:29:07 +00:00
Gerolf Seitz
4e987135a8
Sandbox, LedgerAPI Server: Allow specifying a metric prefix. (#6690)
[Sandbox][Ledger Integration Kit]: Metrics can now be exported to graphite with a prefix using the format ``--metrics-reporter=graphite://host:port/prefix``.

CHANGELOG_BEGIN
CHANGELOG_END
2020-07-13 12:48:40 +02:00
Miklos
1edc02a4f7
Populate deduplicateUntil in DamlOutOfTimeBoundsLogEntry by Committers (#6672)
* 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>
2020-07-10 17:50:02 +00:00
Miklos
f60ec5c2ed
[kvutils] Handle offsets in case of multiple updates from the same log entry (#6677) 2020-07-10 19:11:32 +02:00
Miklos
2e836dc6b3
Enable pre-executing submissions (#6592) 2020-07-10 19:03:20 +02:00
Moritz Kiefer
7d466aa6a3
Fix fine-grained exclusions in ledger-api-test-tool (#6682)
* Fix fine-grained exclusions in ledger-api-test-tool

31995ee000 accidentally changed
`allTestCaseNames` to be a list of test suite names instead of a list
of test case names. That breaks fine-grained exclusions that we use in
our compatibility tests. I’ve also added a very basic test that both
the coarse-grained and fine-grained syntax is supported.

changelog_begin
changelog_end

* Update ledger/ledger-api-test-tool/BUILD.bazel

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

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2020-07-10 12:33:15 +02:00
Stefano Baghino
31995ee000
Ledger API Test Tool: deprecate unneeded tests and options (#6651)
* Ledger API Test Tool: deprecate unneeded tests and options

Furthermore, now all active tests are now run be default without needing
to specify --all-tests. The scheduler makes sure to run non-isolated
tests last (and sequentially).

Fixes #3747
Fixes #6518

A bit of historical context: tests in the Ledger API Test Tool used to
be the sandbox integration tests. As part of the Ledger API Test Tool
project, those tests have been ported one-to-one, with little review of
those same tests.

Examining the tests that cause #3747, it became evident that those tests
were originally put in place to verify that an isolated sandbox spun up
for a single test could withstand a number of commands slightly lower
than what at the time was the hard-coded back-pressure threshold. Hence,
implementing back-pressure on the Ledger API Test Tool would have
basically negated the usefulness of those tests. Furthermore, those
tests can be easily passed by simply raising the back-pressure
threshold. As such, they do not convey any meaningful information for
the DAML ledger implementor. This means we are retiring those tests. The
tests will be nominally kept in for a deprecation period to not break
existing build scripts, but running them explicitly will simply show
them as skipped. The documentation has been updated with the information
necessary to users to deal with retired tests.

Since all tests are now run by default --all-tests is being deprecated.
--load-scale-factor is also deprecated as it was used only by
TransactionScaleIT.

changelog_begin
[Ledger API Test Tool] The LotsOfPartiesIT and TransactionScaleIT test
suite have been deemed not providing relevant signal to DAML ledger
implementers and have been retired. The tests will be nominally kept in
but will be skipped while they are in a deprecation period. You are
advised to remove explicit references to those tests before they are
fully removed.
[Ledger API Test Tool] All tests are now run by default. The --all-tests
option is now ineffective and deprecated. You are advised to remove its
usages from your build scripts. Non-isolated tests that could affect the
global state of the ledger and interfere with other tests are now
automatically scheduled by the test tool to run sequentially at the end
of the run.
[Ledger API Test Tool] The --load-scale-factor option is now unused and
deprecated. You are advised to remove its usages from your build
scripts.
changelog_end

* Add test for deprecated CLI options

* Address https://github.com/digital-asset/daml/pull/6651#discussion_r452100158

* Address https://github.com/digital-asset/daml/pull/6651#discussion_r452126405

* Address https://github.com/digital-asset/daml/pull/6651#discussion_r452143811

* Address test failures
2020-07-09 14:01:32 +00:00
Miklos
4b94c27600
Generate out-of-time-bounds rejection log entries (#6630) 2020-07-09 14:28:44 +02:00
Samir Talwar
b67e0eff76
sandbox: Accept a new time model when none is set. (#6646)
* sandbox: Move helpers in EmptyLedgerIT to a companion object.

* sandbox: Accept a new time model when none is set.

CHANGELOG_BEGIN
- [Ledger API Server + (Sandbox / Ledger Integration Kit)]
  Accept a new time model if none is set. Previously, it would
  erroneously be rejected because the generation number submitted to
  was incorrectly set to `2` rather than `1`.
  This would not affect most users of Sandbox or other kvutils-based
  ledgers, as if a configuration is set automatically on startup when
  creating a new ledger. It only affects users who explicitly override
  the initial ledger configuration submit delay to something longer than
  a few milliseconds.
CHANGELOG_END

* sandbox: Ensure that completions can be streamed from the beginning.

* sandbox: In EmptyLedgerIT, use the submission service.

* sandbox: Split EmptyLedgerIT into two.

* sandbox: In CompletionServiceWithEmptyLedgerIT, assume CI will be slow.

In other words, don't create a completion stream and expect a submission
to show up in a reasonable amount of time.
2020-07-08 13:27:02 +00:00
fabiotudone-da
9a135fa6f2
Revert unneeded kvutils format version bump (#6644)
* Revert unneeded kvutils format version bump

CHANGELOG_BEGIN
CHANGELOG_END

* Re-add change comment as part of the current (5) version.
2020-07-08 12:28:25 +02:00
Remy
e09755ca08
Replay transaction (#6464)
CHANGELOG_BEGIN
CHANGELOG_END
2020-07-08 10:21:48 +02:00
fabiotudone-da
474e92c13c
Track min and max record time in CommitContext when pre-executing (#6591) 2020-07-08 09:53:44 +02:00
Leonid Shlyapnikov
65087d9b9b
Stream pagination based on generated event sequence number (#6372)
* row_id changes

* fixing inserts

* replacing offset with row_id in the flat transaction stream queries

* fixing flat transaction query, updating H2 migration script

* fixing formatting

* ACS query pagination relies on row_id instead of ledger offset

* give a name to the index that we have to drop

* give a name to the index

* Fixing events range query it can return SQL nulls on empty DB.

* remove the debug println

* remove outdated comment

* removing unused orderByColumns constant

* getting rid of new `Source.flatMapConcat` calls that were added as part of this PR.

CHANGELOG_BEGIN

1. ACS, Flat Transaction and Transaction Tree stream pagination based on event_sequential_id instead of event_offset.
2. Events ordering based on the order of insertion: order by event_sequential_id instead of order by (event_offset, transaction_id, node_index).

CHANGELOG_END

* reverting changes to V13 H2 migration script,

figuring out the name of the index that has to be dropped

* Addressing code review comments:

- replacing scalaz Option.cata with stdlib Option.fold
- moving implicit val def into import

* Addressing code review comments:

- extracting re-usable stream query functions

* forcing postgres to use index when looking up lower and upper bound row ids

* fixing the query when it is run on an empty ledger

* resolving rebase conflicts

* Update ledger/sandbox/src/main/scala/com/digitalasset/platform/store/dao/events/EventsRange.scala

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* fetching a single row, fetchSize should NOT matter

* Adding integration test to reproduce invalid order of archived, created events

The test fails, which is expected.

* Fixing the order of archived, created events triggered by exercise

* Addressing code review comments and cleaning up

* Renaming row_id to event_sequential_id

* Investigating flaky tests

* Fixing formatting

* Revert HOTFIX-flaky-client-server changes

`bazel test --runs_per_test=50 //ledger/participant-state/kvutils:reference-ledger-dump` passed on this branch.

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2020-07-07 19:53:18 -04:00
Ognjen Maric
5a803c37d4
Return the ledger beginning as the ledger end on an empty ledger (#6638)
* Return the ledger beginning as the ledger end on an empty ledger

Previously, the services would return `Offset.beforeBegin` to the
clients, and the other services deem this offset to be invalid.

CHANGELOG_BEGIN
CHANGELOG_END

* Apply suggestions from code review

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

* Import DurationInt

* Kill unused import

* Use ApiOffset for the external ledger begin

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2020-07-07 17:12:03 +00:00
Stephen Compall
4cd419623a
replace traverseU and sequenceU with traverse and sequence (#6594)
* 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
2020-07-07 15:01:58 +00:00
Miklos
1ffb28cde9
Renamed some default variables (#6627)
* BatchedSubmissionValidatorParameters.default => reasonableDefault

* Config.default() => createDefault()

* ExtraConfig.default => reasonableDefault
CHANGELOG_BEGIN
CHANGELOG_END
2020-07-06 16:52:47 +00:00
Samir Talwar
28873913d9
Bazel: Upgrade Buildifier. (#6625)
Buildifier now comes with a handy attachment to catch single `\`
characters inside strings and replace them with `\\` if the escape
sequence is invalid. Skylark/Python will do this at runtime anyway; this
just makes it clearer what the actual behavior is.

I needed to change `\` characters at the end of lines to `\\` manually
in order to stop Buildifier from simply concatenating the lines
together. Everything else was automatic.

CHANGELOG_BEGIN
CHANGELOG_END
2020-07-06 16:07:47 +00:00
Samir Talwar
304f8d4201
kvutils/integrity-check: Clean up code around printing. (#6619)
* 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)
```
2020-07-06 15:23:17 +00:00
Samir Talwar
f1a00f40bf
kvutils/integrity-check: Rewrite without Await. (#6614)
* 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.
2020-07-06 10:59:11 +00:00
Remy
dbd0215dd0
DAML-LF: cleanup TransactionBuilder (#6610)
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
2020-07-06 11:25:36 +02:00
Miklos
c789b65bd8
Do not expose log entry ID to committers (#6603)
* 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
2020-07-06 08:30:55 +00:00
Stefano Baghino
e1568e2b9d
Add test for divulgence with keys (#6607)
* Add test for divulgence with keys

changelog_begin
changelog_end

* Add unit test for redundant divulgence

changelog_begin
changelog_end

* Revert "Don't store archived divulged contracts (#6139)"

This reverts commit 28251ba296.

* Fix tests

* Address https://github.com/digital-asset/daml/pull/6607#discussion_r449799885

* Address https://github.com/digital-asset/daml/pull/6607#discussion_r449800030
2020-07-04 20:14:22 +00:00
Miklos
52fc0635f1
Handle out-of-time-bounds log entry (#6568) 2020-07-03 15:27:27 +02:00
Robert Autenrieth
3e55fda66b
Privatize ledger-api-auth classes (#6599)
CHANGELOG_BEGIN
CHANGELOG_END
2020-07-03 15:06:18 +02:00
fabiotudone-da
43f99f45fc
Add support for fingerprints in CommitContext (#6567) 2020-07-03 10:57:49 +02:00
Martin Huschenbett
873e0163cd
Drop the global from globalImplicitDisclosure and globalDivulgence (#6588)
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
2020-07-03 08:43:31 +02:00
Remy
1480168604
Speedy: make thing a bit more private (#6579)
CHANGELOG_BEGIN
CHANGELOG_END
2020-07-02 18:19:03 +02:00
Stephen Compall
86148c398b
make @silent annotations narrower (#6570)
* check that all @silent annotations are used

CHANGELOG_BEGIN
CHANGELOG_END

* make all @silent annotations very specific about what they're silencing
2020-07-01 20:53:22 +00:00
Miklos
5302c57593
Make record time optional for committers (#6538) 2020-07-01 19:20:07 +02:00
fabiotudone-da
bf36f32fca
CommitContext records accessed input keys (#6561)
* `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
2020-07-01 16:57:37 +00:00
Miklos
ccfb0ac94e
Make interpretation cost available for LedgerWriter/WriteService (#6515)
* 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>
2020-06-30 16:45:12 +00:00
Miklos
f01a8e66dc
Remove record time from DAML state values (#6526) 2020-06-30 17:53:08 +02:00
Samir Talwar
7f7eaa35e7
Use Distroless for the Java Docker base image. (#6537)
* Use Distroless for the Java Docker base image.

We switched away from Distroless because it was causing issues with
`docker pull` when you had Docker configured to use `gcloud` for
authentication, but weren't actually authenticated.

Adding `docker-credential-gcloud` to dev-env should hopefully fix this,
meaning we can switch back to a base image that is better-maintained.

CHANGELOG_BEGIN
CHANGELOG_END

* Bump rules_docker to v0.14.3.

This fixes an issue when running `bazel sync`:

```
ERROR: java.io.IOException: Error downloading [http://central.maven.org/maven2/javax/servlet/javax.servlet-api/3.0.1/javax.servlet-api-3.0.1.jar] to [...]/external/javax_servlet_api/javax.servlet-api-3.0.1.jar: Unknown host: central.maven.org
```
2020-06-30 12:01:43 +00:00
Robert Autenrieth
d3a69b31cd
Improve test output (#6499)
* Make deduplication test more reliable

CHANGELOG_BEGIN
CHANGELOG_END

* Address review comment
2020-06-30 08:58:32 +00:00
Oliver Seeliger
768f135cd6
Multinode ledgers reflect whether party is non-local - take 2 (#6533)
* Multinode ledgers reflect whether party is non-local (#6382)

* Multinode ledgers reflect whether party is non-local

Closes #2026

The new `PartyManagement` test `PMListKnowPartiesIsLocal` checks whether any known non-local
party is either not known or marked with `PartyDetails.isLocal == false`. This check is not
run for single-participant ledger setups. The test also verifies that `PartyDetails.displayName`
is preserved.

CHANGELOG_BEGIN
- [Ledger Api] The Package Management Service's `ListKnownParties` response's `PartyDetails` now
  properly reflects where a party is non-local on distributed, multi-participant ledgers that
  expose parties to remote participants.
CHANGELOG_END

* Review feedback from Stefano and sql fix from Ratko

* Simplify #6382 (#6413)

* Simplify https://github.com/digital-asset/daml/pull/6382

changelog_begin
changelog_end

* Test fixes switching alpha/beta and alice/bob

* getParties don't seem to become available

when run against statically created parties until a transaction is run:

when testing

bazel test //ledger/sandbox:next-conformance-test-wall-clock-time-postgresql

Adding transaction to make the test framework happy

Co-authored-by: Oliver Seeliger <oliver.seeliger@digitalasset.com>

* More review feedback

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* Accommodate implicitly created, local parties

* Merge fix

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2020-06-30 07:22:47 +00:00
Martin Huschenbett
659e77172f
Support --profile-dir and --stack-traces in sandbox next (#6531)
So far, these two flags only worked in sandbox classic because I wasn't
aware the code path consuming the options is not shared between both
implementation. Now, sandbox next is on par with sandbox classic.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-30 09:10:39 +02:00
Samir Talwar
2404d18b5d
kvutils: When creating the reference ledger dump, do it less eagerly. (#6525)
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
2020-06-29 15:02:08 +00:00
Stefano Baghino
748d17bbe0
Bump Flyway version to 6.5 (#6520)
* Bump Flyway version to 6.5

Prevents incurring into https://github.com/flyway/flyway/issues/2759 (which was apparently solved in 6.4.0)

changelog_begin
changelog_end

* Comply with changed method signature
2020-06-29 14:07:21 +00:00
Martin Huschenbett
83d7b962d6
sandbox: Add a command line flag to disable DAML stack traces (#6512)
* sandbox: Add a command line flag to disable DAML stack traces

The sandbox now accepts a `--stack-traces no` flag which will turn off
the location tracking in DAML Engine required to produce stack traces
for failing DAML code.

Benchmarks suggest that DAML Engine spends about 10% of its time with
tracking locations. Thus, this flag will give us roughly a 1.1x
speedup when stack traces are not needed.

This flag is still hidden because we would like to validate its
usefulness before we commit to supporting it.

CHANGELOG_BEGIN
CHANGELOG_END

* Make it more obvious where we're overriding methods

CHANGELOG_BEGIN
CHANGELOG_END

* Improve help text
2020-06-29 13:47:26 +00:00
Samir Talwar
8b972fb1d6
sandbox: Inject the dispatcher into the BaseLedger. (#6497)
* sandbox: Create proper `ResourceOwner` implementations.

This allows us to use the resource acquisition execution context, rather
than using DirectExecutionContext.

CHANGELOG_BEGIN
CHANGELOG_END

* sandbox: Simplify the construction of SqlLedger.

* sandbox: Inject the dispatcher into the BaseLedger.

* sandbox: Make sure the SqlLedger objects are closed.

Tiny regression. No one noticed. It's OK.

* sandbox: Simplify ReadOnlySqlLedger.

Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* sandbox: Pull out functions to make SqlLedger.Owner easier to read.

Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* ledger-api-common: Factor out wrapping Dispatcher in a ResourceOwner.

* sandbox: Move the PersistenceQueue into a ResourceOwner.

* ledger-api-common: Add a comma.

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2020-06-29 13:24:07 +00:00
Stefano Baghino
36a9042594
Remove localDisclosures from BlindingInfo entirely (#6509)
* 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>
2020-06-26 14:50:49 +00:00
Remy
46b68bd92a
ledger test tool: refactor conformance test dars (#6506)
* ledger test tool: refactor conformance test dars

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-26 13:39:00 +02:00
Remy
6d27825acb
Engine: introduce config to control value/transaction output version (#6428)
* Engine: introduce configuration to control value/transaction output version

This advances the state of #5164

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-26 13:38:38 +02:00
Stephen Compall
a51d0db8ff
set scalac -Xsource:2.13 -Ypartial-unification globally (#6469)
* 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
2020-06-24 16:51:24 -04:00