Commit Graph

8544 Commits

Author SHA1 Message Date
Moisés Ackerman
0b79d8ae7c
Deprecate 'controller ... can' syntax (#11363)
Closes #11317

* Add warning for uses of 'controller ... can' syntax

* Remove uses of 'controller ... can' syntax

* Add test cases for -W{,no-}controller-can

* Update docs to reflect 'controller ... can' syntax deprecation

changelog_begin
* Deprecate 'controller ... can' syntax.
  * It will be removed in a future version of Daml.
  * Instead, use 'choice ... with ... controller' syntax. Note that this does not implictly add the controller as an observer, so it must be added explictly as one (or as a signatory).
changelog_end
2021-12-01 13:36:04 +01:00
nicu-da
bf239882f0
Update nix to include bazel fix for Monterey (#11929)
changelog_begin
changelog_end
2021-12-01 04:01:46 -08:00
Moritz Kiefer
bbef7e3a8e
Only run migration tests for stable versions on each PR (#11938)
* Only run migration tests for stable versions on each PR

The ones that also go through snapshots are still there but only run
on the daily run.

The reason for this PR is that we’ve actually gotten damlc tests
pretty fast now to the point where I’m waiting for the compat tests to
finish on PRs that don’t force conformance test reruns.

changelog_begin
changelog_end

* actually use it …

changelog_begin
changelog_end
2021-12-01 11:00:25 +00:00
Moritz Kiefer
8179c73763
Drop support for Daml-LF party literals from the Scala side (#11922)
* Drop support for Daml-LF party literals from the Scala side

This PR enforces that forbidPartyLiterals is always `true` and drops
the corresponding literals from the AST. Haskell side is in #11930

fixes #11581

changelog_begin
changelog_end

* Update daml-lf/interpreter/src/test/scala/com/digitalasset/daml/lf/speedy/ComparisonSBuiltinTest.scala

Co-authored-by: Remy <remy.haemmerle@daml.com>

* Revert "Update daml-lf/interpreter/src/test/scala/com/digitalasset/daml/lf/speedy/ComparisonSBuiltinTest.scala"

This reverts commit 55e542ce4e3a7fd15544ee703de3277ffc309b17.

Co-authored-by: Remy <remy.haemmerle@daml.com>
2021-12-01 10:37:42 +00:00
azure-pipelines[bot]
18dc85680a
release 2.0.0-snapshot.20211130.8536.0.683ab871 (#11934)
* release 2.0.0-snapshot.20211130.8536.0.683ab871

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.

@SamirTalwar-DA is in charge of this release.

Commit log:
```
683ab87143 Move ghc-lib{,-parser} to bazel-haskell-deps (#11775)
9350632eae Fix releasing of resources in case connection initialization failed (#11915)
e1559af313 Update `ModelConformanceValidator` comments and prevent them from getting outdated easily (#11924)
16a41f7da2 Avoid package validation in speedy compilation benchmark. (#11927)
16135e6f7c Limit supported input versions in damlc to >= LF 1.8 (#11905)
0ee4154972 Use Absolute-indexes as keys for the Env-mapping during closure-conversion (#11912)
1d7bca801e Add optional typerep argument in UExerciseInterface. (#11910)
c2c22f8dea kvutils: Protos no longer depend on the Daml-LF transaction proto [KVL-1166] (#11909)
5641948410 [Docs] Add labels to error codes to support references to them (#11913)
0e776769ee Update protobuf docs template to handle oneOf (#11887)
5a9481f9d8 unify heading markup according to README.md (#11919)
61334cff77 kvutils - Add Writer which can handle deduplication periods as offsets [KVL-1172] (#11900)
0b9d57b95e Add ContractDoesntImplementInterface error. (#11884)
49e5d415f6 align index.rst files for HTML and PDF (#11907)
dbbb05fe2e Split daml-lf encode/decode Haskell libraries (#11906)
e5d3902372 iface: support for fixed choices in TS codegen (#11630)
31cc540cf9 Turn package name & version warnings into an error (#11859)
4e50060021 self-service compat: set branch name to not main (#11902)
2f4aa4797e refactor to avoid impossible code path (#11901)
a81995c82e switch dev images to Temurin (#11895)
f3a0e2eba1 Set scalafmt dialect explicitly (#11898)
60e372dcd2 Don't run pruning tests on H2, they time-out (#11897)
58e69ade1a LF: replace "dev" LF version by "1.dev" in bazel files (#11894)
8ef348dab0 Use absolute stack locations in SExpr1 (#11877)
071bcf7639 update NOTICES file (#11892)
a1705d669a participant-state - Add an implicit logging context to the write service [kvl-1072] (#11838)
9ff64f7faa Change daml script’s sleep to sleep for a minimum amount of time (#11886)
132c277bda Add a Canton sandbox to the SDK (#11881)
68a23436e8 Only run self-service compat job on PRs (#11893)
c27406cdcf [DPP-762][Self-service error codes] Automate generation of inventory of error categories. #11879
13797229cf Adapt the compatibility exclusions (#11872)
d66ecc90c9 LF: Drop Archive Snapshot for LF < 1.14 (#11820)
abc141b57e Increase pruning tests timeout (#11891)
66b407467f Update protobuf docs plugin (#11880)
b0dda53868 LF check stable proto with buf and md5sum. (#11888)
056fc52706 Log while processing base64 encoded server key [DPP-761] (#11835)
dbda67ba81 bump JVM in Docker image (#11883)
f69bd688cc ledger-api-bench-tool: Fix flaky `MetricsCollectorSpec` (#11750)
cb758e8d91 Fix call to experimental interface signatory builtin (#11882)
024400b9e4 Error when fetching the wrong template id (via fetch by interface). (#11862)
0852c8f6fa Make DA.List.Total return Optional instead (#11878)
df373466dc [JSON-API] Add query store metrics (#11809)
2f8f69e7cb Drop DA.Next.Set and DA.Next.Map (#11864)
5f3a4d2067 [Self-service error codes] Fix section numbering in pdf for error codes section by moving it a level higher. (#11867)
cf3ac011ca [Self-service error codes] Do not return error code id and definite_answer in metadata for security sensitive errors (#11828)
026b92a8b1 Add gRPC definitions for participant user management service (#11818)
2fde30d916 Disable writing volatile bits in Scala statsfile (#11875)
4ed9deda39 Remove xxd from dev-env (#11876)
eaded41aca remove mergify (#11866)
3cd5028b61 fix a few more things in the daml-lf spec (#11851)
beca0ee3e9 Refactor StandaloneApiServer factory (#11842)
6356f13cde Properly upgrade gRPC to 1.41.0 (#11858)
f6accd3a2f Release 1.18 RC2 (#11869)
d858873c44 fix main (#11868)
da8dd7ee2f rotate release duty after 1.18.0-snapshot.20211123.8463.0.bd2a6852 (#11845)
066da4f30c [Self-service error codes] Small fixes for docs/scripts/live-preview.sh (#11856)
258fb65d1c Document how to deal with HTTP JSON API schema changes (#11336)
b8937ad81b ci: self-service compat test start (#11853)
de8d15fb1e fix Nix install on macOS nodes (#11696)
b3d1d40b50 Expose submissionId via the Java bindings (#11839) (#11847)
86da6e8eef LF: Test scala interface type checking (#11833)
5f52f00afb increase linux cluster size (#11860)
5c12d757f4 Add a guard when exercising by interface. (#11836)
7c3a2a7801 Add a new KV submission failure error (#11854)
aebc5a734f All packages must be valid (#11850)
0374843143 speedy compilation benchmark (#11852)
393893a601 LF encoder: make package validation optional (#11849)
25b476fdb2 DPP-726 Add string interning unit tests (#11841)
59eb0d2eff kvutils - For duplicate command rejections, add the submission id as metadata [KVL-1175] (#11848)
970243dd46 Ensure stack-safety during closure-conversion. (#11778)
e63c80dddd update LATEST (#11846)
db425216d1 libs-scala: Change `SourceQueueResourceOwner` to `BoundedSourceQueueResourceOwner` [KVL-1177] (#11832)
109b60613c Make the `InstrumentedSource.queue` use the `BoundedSourceQueue` [KVL-1177] (#11807)
```
Changelog:
```

- [Daml Compiler] The supported input LF versions for
  data-dependencies are now limited to LF 1.8 and newer.

- [Daml2js] DARs with LF version < 1.8 are no longer supported.

- [Integration Kit] kvutils protos no longer depend on the Daml-LF transaction proto

- [Daml Standard Library] DA.List.Total functions now return Optional
  instead of being polymorphic in the return type. DA.Optional.Total
  has been removed.

- [JSON-API] added metrics to separately track:
    - time taken to update query-store ACS (from ledger)
    - lookup times for the query store

- [Daml Standard Library] DA.Next.Map and DA.Next.Set have been removed
  after being deprecated since Daml-LF 1.11

- [Ledger API] Introduce gRPC definitions for experimental user
  managament service to manage users and their rights for interacting
  with the Ledger API served by a participant node.

[HTTP JSON API] [Docs] Document lack of data continuity guarantees and how to deal with schema changes
[Java Bindings] submissionId is now exposed via the bindings, see issue #11705
[Integration Kit] Add a new SUBMISSION_FAILED internal error
kvutils - For duplicate command rejections, the submission id of the already accepted transaction is returning as part of the gRPC metadata. The submission id will be included under the key `existing_submission_id`.

- [Integration Kit] `SourceQueueResourceOwner` has been renamed to `BoundedSourceQueueResourceOwner` and takes a `BoundedSourceQueue` from now on

- [Integration Kit] InstrumentedSource.queue.offer no longer returns a Future

```

CHANGELOG_BEGIN
CHANGELOG_END

* bump to include fix for damlc package validation

changelog_begin
changelog_end

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-12-01 11:26:59 +01:00
Moritz Kiefer
cf172619e5
Drop support for Daml-LF party literals-LF from the Haskell side (#11930)
This PR enforces that forbidPartyLiterals is always `true` and drops
the corresponding literals from the AST in our Haskell code. Scala
code will follow separately.

part of #11581

changelog_begin
changelog_end
2021-12-01 11:00:09 +01:00
Moritz Kiefer
1d0ff3cc71
Fix package version validation in damlc (#11937)
Currently the validation only allows for 3-component version
names. However even our own releases don’t respect that for snapshots
so instead we relax the validation to allow an arbitrary number of
numeric components which matches what ghc-pkg allows.

changelog_begin
changelog_end
2021-12-01 08:17:48 +00:00
azure-pipelines[bot]
e3aa2444aa
update NOTICES file (#11936)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-12-01 08:24:31 +01:00
Moisés Ackerman
683ab87143
Move ghc-lib{,-parser} to bazel-haskell-deps (#11775)
* Move ghc-lib{,-parser} to bazel-haskell-deps

changelog_begin
changelog_end

* Always show changes to bazel-haskell-deps.bzl
2021-11-30 18:11:33 +00:00
Marton Nagy
9350632eae
Fix releasing of resources in case connection initialization failed (#11915)
Previously InitHookDataSourceProxy was not closing the connection if initialization failed,
which causing worker-locks to stuck on PostgreSQL side, preventing subsequent HA initialization.
This PR fixes by closing explicitly the connection, if initialization failed.

changelog_begin
changelog_end
2021-11-30 18:21:37 +01:00
Hubert Slojewski
e1559af313
Update ModelConformanceValidator comments and prevent them from getting outdated easily (#11924) 2021-11-30 16:54:00 +00:00
nickchapman-da
16a41f7da2
Avoid package validation in speedy compilation benchmark. (#11927)
changelog_begin
changelog_end
2021-11-30 16:50:42 +00:00
Moritz Kiefer
16135e6f7c
Limit supported input versions in damlc to >= LF 1.8 (#11905)
* Limit supported input versions in damlc to >= LF 1.8

1.8 was the version that introduced type synonyms, we really don’t
gain much by dropping more since data-dependencies mainly depends on
that. and this provides for a very natural upgrade path for users
where pretty much everyone should be able to upgrade directly to SDK
2.0 without having to go through intermediate versions.

changelog_begin

- [Daml Compiler] The supported input LF versions for
  data-dependencies are now limited to LF 1.8 and newer.

changelog_end

* fix some tests

changelog_begin
changelog_end

* Drop export 1.6 tests

changelog_begin
changelog_end

* Drop daml2js support for LF < 1.8

changelog_begin

- [Daml2js] DARs with LF version < 1.8 are no longer supported.

changelog_end

* .

changelog_begin
changelog_end

* bash is bad, stop using it

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2021-11-30 17:24:08 +01:00
nickchapman-da
0ee4154972
Use Absolute-indexes as keys for the Env-mapping during closure-conversion (#11912)
* Use Absolute-indexes as keys for the Env-mapping during closure-conversion.

Do runtime check to confirm behaviour matches the existing Relative-indexes.

changelog_begin
changelog_end

* remove quadratic shift!

remove (dev)pretty-print code
remove relative-index keys from Env-mapping
remove runtime *diff* check
increase depth for stack-safety tests

* improve/simplify indexing calculation for Env-keys
2021-11-30 16:07:17 +00:00
Sofia Faro
1d7bca801e
Add optional typerep argument in UExerciseInterface. (#11910)
* Add type rep argument for interface exercises.

(Still WIP.)

Part of #11703. Fixes the order in which errors are raised ("wrong type"
takes priority over "does not implement interface"). This PR also simplifies
ExerciseInterface by making the guard mandatory, otherwise there's too
many variations. We can revisit that later if we want.

changelog_begin
changelog_end

* haskell side

* dont throw exception in checkTemplateId

* scalafmt

* evidence security

* fix TypingSpec test
2021-11-30 15:10:33 +00:00
Hubert Slojewski
c2c22f8dea
kvutils: Protos no longer depend on the Daml-LF transaction proto [KVL-1166] (#11909)
CHANGELOG_BEGIN

- [Integration Kit] kvutils protos no longer depend on the Daml-LF transaction proto

CHANGELOG_END
2021-11-30 15:25:18 +01:00
pbatko-da
5641948410
[Docs] Add labels to error codes to support references to them (#11913)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-30 14:30:58 +01:00
Moritz Kiefer
0e776769ee
Update protobuf docs template to handle oneOf (#11887)
Builds upon #1180 to render the oneof fields a bit nicer.

Note that we also need to kill newlines in the descriptions. That’s
not an issue in the plugin but in how rst renders tables.

fixes #11761

changelog_begin
changelog_end
2021-11-30 13:22:57 +01:00
Andreas Lochbihler
5a9481f9d8
unify heading markup according to README.md (#11919)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-30 11:32:09 +01:00
nicu-da
61334cff77
kvutils - Add Writer which can handle deduplication periods as offsets [KVL-1172] (#11900)
changelog_begin
changelog_end
2021-11-29 10:28:07 -08:00
Sofia Faro
0b9d57b95e
Add ContractDoesntImplementInterface error. (#11884)
* Add a ContractDoesntImplementInterface error

Part of #10810 and #11703

changelog_begin
changelog_end

* use inside

* rename error
2021-11-29 15:54:31 +00:00
Andreas Lochbihler
49e5d415f6
align index.rst files for HTML and PDF (#11907)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-29 14:48:20 +01:00
Moritz Kiefer
dbbb05fe2e
Split daml-lf encode/decode Haskell libraries (#11906)
* Split daml-lf encode/decode Haskell libraries

I was working on limiting the supported input versions in damlc. This
requires the list of stable package ids so we can allow those to be
decoded even if they are older.

However that leads to a cyclical dependency:
To get the package ids of the stable packages, I need to encode
them. The version check is in the decoder. If those live in the same
package, I now end up with a cyclical dependency and
Bazel (understandably) gets very sad.

This PR splits decoding/encoding into two libraries with the
generation of stable packages only depending on encoding.

changelog_begin
changelog_end

* Fix dependants

changelog_begin
changelog_end
2021-11-29 12:49:02 +00:00
Robin Krom
e5d3902372
iface: support for fixed choices in TS codegen (#11630)
This adds support for fixed choices to the TS codegen. However,
currently this fails because the JSON API does not accept interface
template ID's when exercising a choice.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-29 08:07:36 +00:00
Moritz Kiefer
31cc540cf9
Turn package name & version warnings into an error (#11859)
* Turn package name & version warnings into an error

fixes #11321

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2021-11-26 18:46:33 +00:00
Gary Verhaegen
4e50060021
self-service compat: set branch name to not main (#11902)
The "tell slack about failures" step is conditional on the branch name
being main; for whatever reason if we don't supply a branch name Azure
sets it to `main`, regardless of the fact that the commit is not in that
branch at all.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-26 16:50:53 +00:00
nickchapman-da
2f4aa4797e
refactor to avoid impossible code path (#11901)
changelog_begin
changelog_end
2021-11-26 15:46:26 +00:00
Gary Verhaegen
a81995c82e
switch dev images to Temurin (#11895)
The AdoptOpenJDK project has been renamed to Adoptium so they renamed
the adoptopenjdk images to Temurin.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-26 14:45:35 +00:00
Moritz Kiefer
f3a0e2eba1
Set scalafmt dialect explicitly (#11898)
Scalafmt started issuing warnings because we don’t do this since our
latest nixpkgs upgrade which included a scalafmt upgrade.

changelog_begin
changelog_end
2021-11-26 13:57:57 +00:00
mziolekda
60e372dcd2
Don't run pruning tests on H2, they time-out (#11897)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-26 13:06:03 +00:00
Remy
58e69ade1a
LF: replace "dev" LF version by "1.dev" in bazel files (#11894)
the more consistent, as asked by Moritz in review of #11820

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-26 12:23:17 +00:00
nickchapman-da
8ef348dab0
Use absolute stack locations in SExpr1 (#11877)
* SExpr1.SELocS - carry relBad/absGood - abs unused so far

* compute/pass SELocS.abs in ClosureConversion, and check in Anf that it matches the reconstructed value

CHANGELOG_BEGIN
CHANGELOG_END

* Remove relative stack locations. Rename as SELocAbsoluteS. Simplify Anf. Remove shiftLoc in ClosureConversion.
2021-11-26 12:10:30 +00:00
azure-pipelines[bot]
071bcf7639
update NOTICES file (#11892)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-11-26 11:12:28 +00:00
nicu-da
a1705d669a
participant-state - Add an implicit logging context to the write service [kvl-1072] (#11838)
changelog_begin
changelog_end
2021-11-26 11:12:17 +00:00
Moritz Kiefer
9ff64f7faa
Change daml script’s sleep to sleep for a minimum amount of time (#11886)
* Change daml script’s sleep to sleep for a minimum amount of time

We’ve seen a few flaky test failures where we slept for less than the
expected amount of time which isn’t what we want. We definitely cannot
guarantee an exact sleep time but at least a minimum.

changelog_begin
changelog_end

* Update daml-script/runner/src/main/scala/com/digitalasset/daml/lf/engine/script/ScriptF.scala

Co-authored-by: Remy <remy.haemmerle@daml.com>

Co-authored-by: Remy <remy.haemmerle@daml.com>
2021-11-26 11:12:08 +00:00
Moritz Kiefer
132c277bda
Add a Canton sandbox to the SDK (#11881)
This is only the first step so we have something to use in tests,
eventually `daml sandbox` should map to this Sandbox.

part of #11831

changelog_begin
changelog_end
2021-11-26 11:27:41 +01:00
Moritz Kiefer
68a23436e8
Only run self-service compat job on PRs (#11893)
This is currently failing for the notice file update PR. While we
could try to hack around the git commands to do something sensible, I
don’t really see the point. We really only need this for PRs.

changelog_begin
changelog_end
2021-11-26 10:26:21 +01:00
pbatko-da
c27406cdcf
[DPP-762][Self-service error codes] Automate generation of inventory of error categories. #11879
Other changes:
- Fix ErrorCodeDocumentationGeneratorSpec not being in any bazel target.
- (partially) Fix inconsistent usage of deprecated, Deprecation and DeprecatedDocs annotation.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-26 10:22:14 +01:00
nicu-da
13797229cf
Adapt the compatibility exclusions (#11872)
changelog_begin
changelog_end
2021-11-26 10:07:02 +01:00
Remy
d66ecc90c9
LF: Drop Archive Snapshot for LF < 1.14 (#11820)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-26 09:18:52 +01:00
tudor-da
abc141b57e
Increase pruning tests timeout (#11891)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-26 08:16:35 +00:00
Andreas Herrmann
66b407467f
Update protobuf docs plugin (#11880)
* Try to upgrade protobuf docs plugin

changelog_begin
changelog_end

* Fix extension number 65020 is already registered

Building `//ledger-api/grpc-definitions:ledger-api-docs` [failed
with](https://github.com/digital-asset/daml/issues/11761#issuecomment-978947565)
```
panic: proto: extension number 65020 is already registered on message google.protobuf.FieldOptions
```

Go dependencies are now pulled in via Gazelle. By default Gazelle will
generate new proto rules for any `.proto` files encountered in third
party Go dependencies. However, many of these already have pregenerated
`.pb.go` files generate with the appropriate configuration.

The problem can be avoided by configuring Gazelle to not generate new
proto rules, but instead use pre-existing `.pb.go` files.

For reference the field number is set in
[go-proto-validators](32a686adf8/validator.proto (L19))
which is an indirect dependency through protoc-gen-doc.

In this case we need to update protoc-gen-validate to v0.6.2 to include
4f41f10dde
which fixes unknown label errors.

* ./fmt

* Expose gRPC status.proto for Haskell bindings

* Update Gazelle to support embedsrcs on Windows

`protoc-gen-doc` relies on `go:embed` file embedding
2dde01902b/resources.go (L8).
Gazelle supports `embedsrcs`, however, it did not generate the attribute
correctly on Windows due to the different directory separator. This is
fixed in https://github.com/bazelbuild/bazel-gazelle/pull/1101.

* Add gazelle to compatibility workspace

It's loaded into `@daml`'s top-level `BUILD` file and ends up being a
dependency of the compatibility workspace as well.

* shift go_googleapis import

* Delete dead code

protobuf is imported transitively.

* Document how to add Go dependencies

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-11-25 20:51:24 +00:00
Remy
b0dda53868
LF check stable proto with buf and md5sum. (#11888)
The resulting tests should be faster and more reliable

fixes #11443

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-25 20:23:46 +00:00
mziolekda
056fc52706
Log while processing base64 encoded server key [DPP-761] (#11835)
* Log while processing base64 encoded server key

CHANGELOG_BEGIN
CHANGELOG_END

* address review comments

* demote logs from error to debug

* format
2021-11-25 18:02:35 +00:00
Gary Verhaegen
dbda67ba81
bump JVM in Docker image (#11883)
Please don't depend on this, it breaks all the time.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-25 18:08:38 +01:00
Kamil Bozek
f69bd688cc
ledger-api-bench-tool: Fix flaky MetricsCollectorSpec (#11750)
* Renamed MetricReporter to MetricFormatter

* Make MetricsCollector communicate via messages only, not by logging

* Logging reports from MetricManger

* Cancel periodic report request when stream is done

* Removed debug sleep

* Fix error when defining reporting period less than one second

* Fixed flaky MetricsCollectorSpec test

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-25 17:39:30 +01:00
Moritz Kiefer
cb758e8d91
Fix call to experimental interface signatory builtin (#11882)
Turns out if you mistype the name it doesn’t work, who would have
thought.

changelog_begin
changelog_end
2021-11-25 16:33:18 +00:00
Sofia Faro
024400b9e4
Error when fetching the wrong template id (via fetch by interface). (#11862)
* Prevent wrongly typed fetch by interface.

When doing a "fetch by interface" command with a known template id,
error out with a WronglyTypedContract if the fetched contract has
a different template id. This doesn't affect daml, only affects
replays, so it's rather minor. I also enabled the engine test that
caught this.

Part of #11703, follow up to #11836.

changelog_begin
changelog_end

* strengthen test output checks
2021-11-25 16:19:36 +00:00
Sofia Faro
0852c8f6fa
Make DA.List.Total return Optional instead (#11878)
* Make DA.List.Total return Optional instead.

Instead of using ActionFail or CanAbort, return an Optional. The library
user can then convert this into the appropriate error if they wish.

This PR also removes DA.Optional.Total (and the deprecated DA.Maybe.Total)
for having questionable utility.

changelog_begin

- [Daml Standard Library] DA.List.Total functions now return Optional
  instead of being polymorphic in the return type. DA.Optional.Total
  has been removed.

changelog_end

* update Examples.daml
2021-11-25 14:33:48 +00:00
Victor Peter Rouven Müller
df373466dc
[JSON-API] Add query store metrics (#11809)
* Add query store metrics

CHANGELOG_BEGIN

- [JSON-API] added metrics to separately track:
    - time taken to update query-store ACS (from ledger)
    - lookup times for the query store

CHANGELOG_END

* Apply review comment
2021-11-25 13:04:28 +00:00