* 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>
* Factor out an Oracle test fixture
We need to add Oracle support to other components like the trigger
service as well. At that point, we cannot assume that things don’t
stomp on each other so this PR adds a fixture that generates a random
user (which also comes with its own schema, creating new databases is
a bit different in oracle) which we use testing.
changelog_begin
changelog_end
* Update libs-scala/oracle-testing/src/main/scala/testing/oracle/OracleAround.scala
Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
* Less top-level stuff in traits
changelog_begin
changelog_end
Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
* Expose libraries for integration testing purposes
The motivation of these changes is to eliminate manual work and reduce duplication between the SDK and oem-integration-kit repos by reusing the same test fixture for integration testing participant state implementations. Also, the DARs required for running these tests won't need to be manually updated.
CHANGELOG_BEGIN
CHANGELOG_END
* Fix a concurrency issue in integration tests
* Fix Bazel error
* Fix conflict resolution
* Move inline daml-lf to separate dar files
* Add a comment
* Add a missing artifact
* Extract method
* Remove maven tags
* Add a macro for Scala libraries with dar resources
* Improve the macro
* Add missing artifact
* Simplify the tests
* Format signature
* Fix the maven tag
* Add missing copyright headers
* Format bazel files
* Make //ledger/test-common lf version dependent (to avoid jar hell)
* Move da_scala_dar_resources_library to a separate bzl file
* Add missing artifacts
Co-authored-by: Hubert Slojewski <hubert.slojewski@tesco.com>
* Take nested consuming choices into account
When determining whether a command is considered a simple command.
changelog_begin
changelog_end
* Add test-case for nested consuming simple createAndExerciseCommand
* Define exerciseByKeyCmd type
changelog_begin
changelog_end
* Recognize exerciseByKeyCmd
changelog_begin
changelog_end
* Test case to identify exercise by key
* test-cases for simple exerciseByKeyCommand
* test encoding of exerciseByKeyCmd
* Refactor ExerciseCommand encoding
* Drop unnecessary lazy
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
changelog_begin
changelog_end
Adds case classes for the four cases
- `submit`
- `submitMulti`
- `submitTree`
- `submitTreeMulti`
Also groups them by single/multi submitter and simple/tree commands
using additional traits.
The logic to classify submits is called earlier to avoid identifying
commands twice, as we did before to correctly identify referenced
contract ids taking `createAndExerciseCmd` into account.
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* damlc: Allow package IDs in data-dependencies.
This is the next step outlined in issue #8976. If package id's are
present in the `data-dependency` section of the daml.yaml file, we try
to fetch them (and their transitive dependencies) from the default
ledger of the project.
CHANGELOG_BEGIN
CHANGELOG_END
* Identify simple createAndExercise command
changelog_begin
changelog_end
* Test simple createAndExercise command
* Don't count created and then consumed contracts
* Test nested createAndExercise
* Expand comment about consuming choice
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* Add documentation for the Daml Profiler
changelog_begin
- [Daml Profiler] Daml Connect EE now includes a profiler which can be
used to profile Daml execution time.
changelog_end
* Update docs/source/tools/profiler.rst
Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
* Make sphinx happy
changelog_begin
changelog_end
Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
* variance calculation without references or cycles
* an idea for handling the recursive reference case elegantly
* extra data for resolving constraints from [recursive] references later
* note on TypeVar case
* trying a different delayed resolution
* quagmire
* the problem: we were trying to solve too early and mix reference levels
* force inner delays to be pulled out; squash the delays iteratively
* make the variance result accessible
* phantoms are covariant
* scalafmt
* simplest GenMap test
* reference tests
* factoring
* don't treat covariant reference arguments as phantom
* making the wrong reference in delays was breaking solve steps
* test cons list self-recursion
* more recursion testing
* -> is better for 2-tuples here
* test cumulative variance tracking
* uninhabited types have variance too
* test mutual recursion with lots of indirect references
* trigger for failing case in incremental resolution
* redesign delayed constraints to handle nesting properly, and be much simpler
* integrate variance calculation with rest of Scala codegen
* handle concrete type and all-phantoms cases; test
* add integration test for variance inference
* add changelog
CHANGELOG_BEGIN
- [Scala Codegen] Type parameters used in GenMap keys are now supported.
See `issue #8879 <https://github.com/digital-asset/daml/pull/8879>`__.
CHANGELOG_END
* proper doc for covariantVars
- suggested by @cocreature; thanks
* remove useless local var
- suggested by @cocreature; thanks
* add another recursive function to capture more invariants
- suggested by @cocreature; thanks
* absence in what
- suggested by @cocreature; thanks
* use Identifier instead of I
- suggested by @cocreature; thanks
* remove unused type vars; make goSdt cleaner
* also precache variance of choice and key-referenced types
- suggested by @cocreature; thanks
@sofiafaro-da is taking care of 1.12.0-snapshot.20210316.6523.0.b382fc45 (#9160), so they get pushed back to the end of the line.
Please do not merge this before #9160.
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
As requested by @coceature.
Note: skipping the ts_lib job is enough to skip all compat tests because
they all depend on it, and in the Azure model if one of your
dependencies was skipped you get skipped too.
CHANGELOG_BEGIN
CHANGELOG_END