* Fix gRPC status codes for inconsistency rejections and DamlLf errors
Also, add unit tests and exclude failing compatibility and conformance tests
CHANGELOG_BEGIN
- [Integration Kit] Fix gRPC status codes for inconsistency rejections and DamlLf errors (ContractNotFound, ReplayMismatch) by changing them from INVALID_ARGUMENT to ABORTED
CHANGELOG_END
I tried fixing it properly without a resolution but that requires an
upgrade to webpack 5 which runs into issues since the modernizr loader
we use does not support webpack 5 and at that point I gave up. I did
test navigator manually with this change.
changelog_begin
changelog_end
* Early draft of the race condition ITs
* Archival vs Successful lookup by key test
* More descriptive failure messages
* Unsuccessful lookup vs non-transient creation test
* Double-archival test
* Fixed a test case name
* Archival vs Creation order test
* Reduced number of test templates
* Improved race test template naming
* Helper object with transaction and template utils
* Simplified transaction util
* Fixed wrong choice name
* Removed redundant println
* Formatted code changes
* Minor change
* CHANGELOG_BEGIN
- Integration Kit - added a test suite for race condition to the ledger-api-test-tool
CHANGELOG_END
* Removed unnecessary sorting of transactions
* Added explanatory comments to test cases
* Mechanism for running ledger-api-test-tool test cases multiple times
* Running each race condition test case 5 times
* Fixed WWArchiveVsNonTransientCreate test case
* Fixed flakiness of RWArchiveVsNonConsumingChoice
* Disabled RaceConditionIT in Canton tests
* Formatted code changes
* Moved RaceConditionIT to conformance tests with unique contract keys mode on for Canton
* Nicer delay mechanism
* Improved WWArchiveVsNonTransientCreate to take contention into account
* Fixed RWTransientCreateVsNonTransientCreate conditions for Canton
* Increased the delay before reading the transaction trees stream to 1 second
* Fixed incorrect conformance tests definition for RaceConditionIT
* Running race condition tests sequentially to avoid timeouts
* Simplified race condition test case definition
* Return sum of durations for repeating test cases in the ledger-api-test-tool
* Reverted previous change with computing sum of durations
* Exclude RaceConditionIT from sandbox-on-x conformance tests
* Print the number of a test run only for cases when the number of repetitions is > 1
* Fixed RWArchiveVsFetch scenario
* Add a profiler for engine replays
This is the sibling of the benchmark infrastructure for ledger
replays.
changelog_begin
changelog_end
* Add a basic test for the profiler
changelog_begin
changelog_end
* gnahhhhhhhhhh I’m tired
changelog_begin
changelog_end
@robin-da is taking care of 1.12.0-snapshot.20210323.6567.0.90c5ce70 (#9221), so they get pushed back to the end of the line.
Please do not merge this before #9221.
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
* Implement match-handling for `NodeRollback` in _structural cases_
where what the code has to do is in some sense _obvious_.
changelog_begin
changelog_end
* do cases in daml-lf/interpreter
* do cases in daml-lf/engine
* fix spello in comment
* drop Rollback nodes when normalizing for KV
* reinstate one 8020 todo
* more 8020 TODOs
Content:
-adds ReadWriteServiceBridge
-adds BridgeLedgerFactory with extra configuration
-conformance test suits
Limitations:
-no conflict checking, just replaying all submissions
-no bootstrapping from indexer persistence
-no multiple/subsequent subscription support
-conformance tests, which rely on correctness features were excluded
-ClosedWorldIT: test should fail referencing unallocated party
-CommandDeduplicationIT:CDStopOnCompletionFailure: creates error conditions based on racing key updates (rest is green)
-ContractKeysIT:CKFetchOrLookup, CKNoFetchUndisclosed: these are failing due to lack of validation/conflict checking in the bridge
-SemanticConcurrentDoubleSpend:SemanticConcurrentDoubleSpend: this is failing due to lack of validation/conflict checking in the bridge
CHANGELOG_BEGIN
[Sandbox] Proof-of-concept implementation of Sandbox-on-X
CHANGELOG_END
* Fix alias for test suite
Unfortunately aliases don’t work directly for tests but test_suite
with a single test does.
changelog_begin
changelog_end
* Include tags in alias
changelog_begin
changelog_end
* Add Ord instances for Any(Template|Choice|ContractKey)
This is useful to use them as map keys. We have a large application
that currently does a linear search over a potentially very large set
of contracts which can be replaced with a map lookup with this.
changelog_begin
changelog_end
* Match builtin equality for Any(Template|Choice|ContractKey)
changelog_begin
changelog_end
* Use primitives directly
changelog_begin
changelog_end
This provides variants of `dedup*` and `sort*` which rely on Daml-LF’s
builtin ordering (using Map internally). I don’t have microbenchmarks
but even in macrobenchmarks this is a measurable improvement which
isn’t particularly surprising.
changelog_begin
- [Daml Stdlib] Add `DA.List.Builtinorder` module. This module provides
variants of `sort*` and `dedup*` which rely on Daml-LF’s builtin
ordering and are significantly more efficient in some cases.
changelog_end
This PR has been created by a script, which is not very smart
and does not have all the context. Please do double-check that
the version prefix is correct before merging.
@robin-da is in charge of this release.
Commit log:
```
90c5ce703a Optimize mapOptional and add more efficient findOptional (#9214)
1e0c67c306 LF: Add RoundingMode and BigNumeric in Haskell Ast (#9215)
e492603808 More manual list fusion in stdlib (#9217)
90aa84193f tuesday notif: newlines (#9213)
51c5eac66e LF: Add BigNumeric to archive proto (#9210)
615f4e4bae Support passing sandbox port via --sandbox-option --port (#9208)
349e0a0bef LF: fix package name in LF 1.12 proto snapshot (#9211)
b7aedb477b Remove contract arguments from localContracts (#9207)
c1cf2756a8 add rollback node to transactions (#9178)
2551b2d615 LF: Add BigNumeric and Rounding to Scala AST (#9205)
be4dbd971d update compat versions for 1.11.1 (#9172)
0f9ab428ee kvutils: Remove ledger dump functionality (#9204)
f89aa294e5 damlc pkg: use cache for already present packages (#9193)
7a41ee6ce0 Cache contract fetches in speedy (#9192)
644561fe23 Bump jinja2 from 2.11.2 to 2.11.3 in /docs/scripts (#9198)
bf76e3c84a update NOTICES file (#9201)
4d90d02740 LF: drop useless field arity in Ast Builtin (#9194)
a93f89b6f8 Factor out an Oracle test fixture (#9191)
51f495e758 KVL-203 Share participant state integration test harness (#9143)
440eead6c4 Make LedgerDao a pure interface (#9186)
617e6f58e8 update NOTICES file (#9190)
587a9c95d0 Recognize (some) exerciseByKey commands in Daml script dumps (#9185)
ad94c47605 ci/docker: sync with hub (#9184)
081623b493 fix: bad package id validation (#9183)
f0c8b1240d Integrate non-repudiation into HTTP JSON API (#9180)
dbd8806848 Distinguish all four types of submits (#9179)
8c64f120da pkgid data deps (#9153)
d5ca22815d Recognize simple createAndExercise commands (#9154)
6c9679f511 Add documentation for the Daml Profiler (#9174)
a6da995ecb use representational variance for generated Scala classes (#8879)
47e0a223e7 rotate release duty after 1.12.0-snapshot.20210316.6523.0.b382fc45 (#9161)
1ea00976f0 skip compat tests on release (#9169)
c26c349c8b Generate exception instances from syntax. (#9140)
9d175ce547 Document profiling internals (#9168)
5e97c573e0 Add a test for create and exercise events in the profiler (#9151)
75f7688cae Expose unhandled exception values and types (#9158)
e4d5799907 weekly release (#9167)
370f290d3d Handle createAndExecuteCmd (#9150)
af0cb30828 Release SDK 1.11.1 (#9162)
```
Changelog:
```
- [Daml Assistant] The sandbox port can now also be configured via
`--sandbox-option=--port=12345` instead of `--sandbox-port`. Other
tools like Navigator, the JSON API and Daml Script will pick up the
modified port automatically.
- [JSON API] The JAR for the HTTP JSON API is no longer published on
Maven, use the fat JAR as indicated in the documentation.
- [Daml Profiler] Daml Connect EE now includes a profiler which can be
used to profile Daml execution time.
- [Scala Codegen] Type parameters used in GenMap keys are now supported.
See `issue #8879 <https://github.com/digital-asset/daml/pull/8879>`__.
```
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
* Daml.Script fromTree, created(N), exercised(N)
Implements more readable transaction tree accessors. E.g.
```
let contract_1_0 = fromTree tree $
exercised @Module.Template "Choice" $
created @Module.Template
```
instead of
```
let contract_1_0 = createdCid @Module.Template [0, 0]
```
changelog_begin
changelog_end
* Use fromTree in daml script dump
changelog_begin
changelog_end
* Update tests
* Remove now unused createdCid
* Avoid zip of layer selectors and events
Addresses https://github.com/digital-asset/daml/pull/9216#discussion_r600243370
The zip approach would be misaligned if an event has `Kind.Empty`. This
circumvents the issue by only iterating over non-empty events.
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
Haven’t tracked down when they broke. They used to work at some point
but atm they are very broken and don’t test anything.
This PR fixes the bash mess to parse the files correctly and fixes two
minor issues that creeped in by virtue of the doctests being broken.
changelog_begin
changelog_end
In #9169, I changed the compat jobs to not run on releases.
Unfortunately I forgot to update the `collect_build_data` job to know
about that. Hopefully after this has been merged we'll be able to rerun
\#9221.
CHANGELOG_BEGIN
CHANGELOG_END
* Optimize mapOptional and add more efficient findOptional
Given that we don’t have list fusion catOptionals . map f is clearly
less efficient than this version.
I also added findOptional which can be pretty handy in certain cases.
changelog_begin
changelog_end
* more foldr
changelog_begin
changelog_end
* fix tests
changelog_begin
changelog_end
Both of these seem sufficiently common that it seems worth optimizing
them.
I realize I’m switching somewhat randomly between foldr and
hand-written recursion. Either should be better than traversing the
list twice but I think it’s a clear sign that we need some benchmarks
to establish the benefits or downsides of one over the other properly.
changelog_begin
changelog_end
--sandbox-port has caused confusion several times and cannot be
specified in daml.yaml which is a bit annoying. There isn’t really any
good reason not to support --sandbox-option --port since we can pick
up the port via the port file either way.
This change is fully backwards compatible.
changelog_begin
- [Daml Assistant] The sandbox port can now also be configured via
`--sandbox-option=--port=12345` instead of `--sandbox-port`. Other
tools like Navigator, the JSON API and Daml Script will pick up the
modified port automatically.
changelog_end
We already store them in cachedContracts, no reason to store them
twice. This should also be slightly more efficient since we only do
one lookup in cachedContracts in the common case and only look at
localContracts if there’s a wrongly typed contract. I doubt it’s
measurable but at least it’s not worse.
changelog_begin
changelog_end
* New transaction node: NodeRollback. Fixup every match with a crash + TODO.
changelog_begin
changelog_end
* remove 3 methods from NodeRollback which are not needed to fulfill its interface
* add override to remaining 4 methods implemented in body of NodeRollback
* remove unrequired 2nd type parameter (Cid) from NodeRollback
* add missing 8020 marker
* damlc pkg: use cache for already present packages
This only downloads packages from a remote ledger, if the package is not
already present in the dependency db as a normal dependency.
CHANGELOG_BEGIN
CHANGELOG_END
* Cache contract fetches in speedy
This PR adds a cache to speedy to cache contract fetches and
information only derived from the contract argument, namely,
signatories, observers and keys.
The cache is engine-internal so on the first fetch of a global
contract in a transaction, we recompute that information.
This does not change observable semantics:
Ledgers must be consistent within a transaction so caching is safe. We
still recompute signatories, observers & keys the first time so if
they fail, we still blow u.
We also never compute more than before. While `SBUFetch` itself did
not compute that information, it was immediately folowed by either
`SBUBeginExercise` or `SBUInsertFetchNode` which compute that
information.
We also keep the optimization that we do not have to compute key and
maintainers on by-key operations
On the collect authority benchmark, this is around a ~1.48x
improvement which is pretty decent.
changelog_begin
changelog_end
* Remove dead code
changelog_begin
changelog_end
* Less stupid error handling
changelog_begin
changelog_end
* Add a test for wrongly typed contract ids
changelog_begin
changelog_end
* Check type of cached contracts
changelog_begin
changelog_end
* Update daml-lf/interpreter/src/main/scala/com/digitalasset/daml/lf/speedy/SBuiltin.scala
Co-authored-by: Remy <remy.haemmerle@daml.com>
* Add tests for wrongly-typed contract ids to EngineTest
changelog_begin
changelog_end
Co-authored-by: Remy <remy.haemmerle@daml.com>