* Upgrade akka-http to 10.2
Follow up to #8048, I left out this upgrade to reduce noise and since
I wasn’t quite sure how involved it was going to be.
changelog_begin
changelog_end
* Reenable transparent HEAD requests
Apparently no longer on by default but we depend on this in waitForHttpServer
changelog_begin
changelog_end
CHANGELOG_BEGIN
kvutils reports LookupByKey node mismatches during validation as Inconsistent
instead of Disputed if they can be due to contention on the contract key
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.
@cocreature is in charge of this release.
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
* Upgrade akka and akka-http
Was chasing an issue somewhere and thought this might affect it in
some way. It didn’t but I might as well turn the upgrade into a PR.
changelog_begin
changelog_end
* Fix trigger service tests
changelog_begin
changelog_end
* Downgrade akka-http again
changelog_begin
changelog_end
* Upgrade akka-http again and fix tests
changelog_begin
changelog_end
* Cleanup trigger service
changelog_begin
changelog_end
* Refactor indexing to minimize transaction traversals
changelog_begin
[Integration Kit] Bugfix: daml.index.db.store_transaction metrics were keeping track of empty insertions, skewing down the numbers
[Integration Kit] Performance: minimizing the number of traversals of a transaction to index it, more efficient indexing
changelog_end
* Add empty stakeholders for non-consuming exercises
* Fix test to check usage of pre-computed blinding info
* Remove unnecessary string interpolators
* Shorten creation of net visibility
* Delete obsolete comment
* Add visibility of divulged contracts
* Address review https://github.com/digital-asset/daml/pull/8019#discussion_r527666572
* Address review https://github.com/digital-asset/daml/pull/8019#pullrequestreview-535399441
* Address review https://github.com/digital-asset/daml/pull/8019#discussion_r527681774
* Fix ordering of batches, use explicitly named types to avoid confusion
* Default to an empty set if a divulged contract is not visible in the current transaction
* Shorten references to store transaction metrics when writing
* Address review https://github.com/digital-asset/daml/pull/8019#discussion_r527745640
* Add divulgences from past transactions
* More fine-grained types and signatures
* kvutils/tools: Factor out builds from IntegrityCheckerSpec.
* kvutils/tools: Verify that write sets are readable.
CHANGELOG_BEGIN
- [Integration Kit] The integrity checker now validates the contents of
each write set, regardless of whether it is used subsequently.
CHANGELOG_END
* kvutils/tools: Move the write set exception outwards.
* kvutils/tools: Make the integrity checker `main` method easier to read.
* kvutils/tools: Move `WriteSetEntries` logic into CommitStrategySupport.
This makes it more flexible with regards to extended write sets.
* kvutils/tools: Use the support state key serialization strategy.
* Participant pruning ledger api server support ported from Canton
CHANGELOG_BEGIN
- [Ledger API]: The preview of `ParticipantPruningService` enables ledger participants to prune the "front" of ledger state at the participant including the ledger api server index.
CHANGELOG_END
* Review feedback from Stefano
* Add pruning tests plus missed command completions change
* Review feedback from Robert
* Improved test readability by having populate helper return offsets
* Review feedback
* Ledger api changes to pruning api and disable canton pruning test
- Change return result to PruneResponse
- Change type of PruneRequest.prune_up_to to string
* Review feedback: Use ApiOffsetSConverter for logged offsets
* kvutils/tools: Fix the integrity checker so it compares state updates.
Previously, it would always take the list of updates _before_ processing
the import, leading to this useless check:
Comparing expected and actual state updates.
Successfully compared 0 state updates.
This makes the snapshotting lazy (by using a function instead of a
value), ensuring we actually perform the assertion.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils/tools: Add a test for the state updates regression.
The stream from the JSON API is split into two sections:
1. The unordered section of ACS events.
2. The ordered transaction stream after the live event.
Our assertions assume that we only get 2 but currently we don’t wait
before sending commands so depending on timing, some of the events can
be delivered as part of the ACS section in a different order causing
very confusing assertion failures.
This test fixes this by waiting for the live event indicating the end
of section 1 and thereby forcing everything to come via the ordered
transaction stream.
Verified that this fixes the flakiness with --runs_per_test=50 which
reproduced it fairly reliable before (on CI, never managed to hit it
locally).
changelog_begin
changelog_end
Add a description of how to enable LaTeX input mode when editing the
DAML-LF spec in VS Code. Also add some additional symbols.
CHANGELOG_BEGIN
CHANGELOG_END
* Test and fix Conversions#encodeBlindingInfo
* Fix rebase
* Read and prefer pre-computed blinding info when decoding KV transaction log entries
CHANGELOG_BEGIN
CHANGELOG_END
* Fix rebase
* Tidy up
* Tidy up
* Fill DamlTransactionEntry#bindingInfo during TransactionCommitter#blind
CHANGELOG_BEGIN
CHANGELOG_END
* Test and fix Conversions#encodeBlindingInfo
* Fix rebase
* Fix non-determinism
* Reduce visibility
* Tidy up
* Do not backpressure from the command tracker output to the submission flow.
This is required to meet the contract of CommandClient.trackCommandsUnbounded, which allows for submitting an unbounded number of commands.
This is in turn required to use CommandClient.trackCommandsUnbounded as part of a flow that retries (some of the) failed command submissions.
CHANGELOG_BEGIN
CHANGELOG_END
* Revert "Do not backpressure from the command tracker output to the submission flow. This is required to meet the contract of CommandClient.trackCommandsUnbounded, which allows for submitting an unbounded number of commands. This is in turn required to use CommandClient.trackCommandsUnbounded as part of a flow that retries (some of the) failed command submissions."
This reverts commit 20c0b8e3
* Adding a disclaimer to the CommandClient so that users are not totally surprised about unexpected backpressure.
* concretize item on "serving the API"
CHANGELOG_BEGIN
CHANGELOG_END
* Revert "concretize item on "serving the API""
This reverts commit 83e35114c4.
* change authentication to authorization
* remove "etc." to make item clearer
Some features, in particular daml-lf encoding features, don't make any sense to have an associated CPP flag. I made the CPP flag optional and removed these unnecessary feature flags (based mostly on whether the flags were used in the standard library).
changelog_begin
changelog_end
fixes#7978
There is no new test in the trigger service since the existing test
for the custom application id already hits this. The difference is
that now the test authorization server will produce a token with the
application id set to what we request rather than the wildcard token
we used before.
changelog_begin
changelog_end
* Minor improvements to getting started doc
* add empty changelog
changelog_begin
changelog_end
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
akka-http gets a bit unhappy if you block within requests and we also
use the unsafeToFuture in the JSON API so it seems sensible to do the
same in both.
I’ve moved out the initDb option out of the Server actor both because
it seemed cleaner than calling sys.exit in the actor and because it
was annoying to fit it in.
changelog_begin
changelog_end
* Adapt to new desugaring for choice observers.
update hash of ghc patch.
changelog_begin
changelog_end
update ghc patch to final version
update stack-snapshot hashes for ghc-lib(-parser)
update stackage_snapshot.json, following `bazel run @stackage-unpinned//:pin`
expose Optional constructors for desugared code to use
adapt LFConversion to expect a 4-tuple for a desugared choice def/sig
update LFConversion for choice-observers
first example using new choice observer syntax.
fix scala type checker to have correct scoping rules for choice-observers
remove comment from example which says it is broken
improve variable names
improve tests for choice-observer clause
only test choice-observers SINCE 1.dev
add jq queries for choice observeres
make positive statement in jq test which checks choice obserers are present
test behaviour of choice observers
squash me
typo
* test more choice-observer divulgence
* Update documention for choice observers.
changelog_begin
Support choice observers in 1.dev
changelog_end
* fix docs build
* fix daml docs choice-observers example
* address comments: rewording text
* annotate choices observers as early-access in documention
* split out documentation code-snippets which require --target=1.dev
* final tweaks to documentation text
* Rewrite multiple binding lets sequentially.
This PR enforces a sequential evaluation and dependency on
multiple-binding lets, by rewriting,
let x1 = e1
x2 = e2
...
xn = en
in b
Into a chain of single-binding let expressions,
let x1 = e1 in
let x2 = e2 in
...
let xn = en in
b
And likewise, rewriting multi-binding let statements in a "do" block,
do
...
let x1 = e1
x2 = e2
...
xn = en
...
Into single-binding let statements,
do
...
let x1 = e1
let x2 = e2
...
let xn = en
...
This PR fixes#6788 and adds a bunch of tests.
This is a bugfix, but it may break existing code that relies on
out-of-order let bindings. The suggested fix is to simply reorder
the let bindings, placing them in order of their dependency.
CHANGELOG_BEGIN
- [DAML Compiler] The DAML compiler now enforces sequential
ordering for ``let`` expressions with multiple bindings.
This fixes a bug where ``let`` expressions would be evaluated
in the wrong order.
CHANGELOG_END
* Update compiler/damlc/daml-preprocessor/src/DA/Daml/Preprocessor.hs
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* adjust last binding behavior
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
ts/daml-ledger: createAndExercise
Fixes#7966.
CHANGELOG_BEGIN
JavaScript Client Libraries: The Ledger object (defined in daml-ledger,
returned by useLedger in daml-react) now sports an additional method
`createAndExercise`, which lets JS users create a contract and exercise
a choice on it in the same transaction.
CHANGELOG_END
This makes the test a lot faster, not just because we don't restart the
Sandbox, but because we don't restart PostgreSQL either.
CHANGELOG_BEGIN
CHANGELOG_END
@garyverhaegen-da is taking care of 1.8.0-snapshot.20201117.5661.0.76fae40c (#7994), so they get pushed back to the end of the line.
Please do not merge this before #7994.
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
* extractor: Use pattern matching to get better error messages.
If the gRPC exception status is not the one we expect, this will ensure
that we log the entire exception and not just the status.
CHANGELOG_BEGIN
CHANGELOG_END
* extractor: Make VeryLargeArchiveSpec an async spec.
* DAML-LF: Add interning for type to DAML-LF 1.dev
We add two new features to DAML-LF 1.dev:
* a per package list (or table) of `Type` messages, and
* a new case in the `Type` message which is an index into this table.
In combination, these two features can be used to allow DAML-LF
encoders to perform hash-consing of `Type` messages. We also change the
Haskell implementation of our DAML-LF encoder to do exactly that when
targetting DAML-LF 1.dev.
Doing this has a few benefits:
1. The DALFs produced by `damlc` get smaller: I've seen a case where
the size dropped from 69MB to 45MB.
2. DAML-LF decoders need to decode less data.
3. Decoded packages use less memory because identical structures are
now shared. This is particularly helpful in situations where we need
to keep the interface (or signature) of a package in memory for a
long time.
This PR mostly takes care of the Haskell implementation. However, we
need to make the Scala implementation of the decoder aware of the new
features as well since we have tests that load DAML-LF 1.dev into the
engine. A decoder and _targeted_ tests on the Scala side will follow
in a separate PR.
CHANGELOG_BEGIN
CHANGELOG_END
* Make jq tests aware of type interning
CHANGELOG_BEGIN
CHANGELOG_END
* Improve jq test
CHANGELOG_BEGIN
CHANGELOG_END
* Apply Remy's suggestions
Co-authored-by: Remy <remy.haemmerle@daml.com>
* Improve the imperative bits
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Remy <remy.haemmerle@daml.com>
* test-common: Make FiniteStreamObserver more lenient.
We can't protect against all possible race conditions; we just have to
accept that sometimes `onNext` will be called after `onCompleted`, or
`onCompleted` will be called twice, or…
CHANGELOG_BEGIN
CHANGELOG_END
* test-common: Avoid calling `onCompleted` twice in `TimeBoundObserver`.
* Add to indexer updates and prefer optional blinding info
CHANGELOG_BEGIN
CHANGELOG_END
* Formatting
* Relax adherence to Scala naming convention for better readability