Commit Graph

9617 Commits

Author SHA1 Message Date
Moisés Ackerman
f9f1611d46
Unsafe interface conversion primitives (#13391)
* Add unsafeFromInterface method to HasFromInterface class

* Use unsafeFromInterface instead of fromInterface + experimental primitive

* Drop THROW_WRONGLY_TYPED_CONTRACT experimental primitive

* Add UnsafeFrom{,Required}Interface LF primitives

* Add convertPrim cases for UnsafeFrom{,Required}Interface

* Add InterfaceGuarded tests for WronglyTypedContract cases

changelog_begin
changelog_end

Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
2022-03-25 10:07:14 +00:00
tudor-da
3fac74f9e2
Release 1.18.2 RC (#13393)
changelog_begin
changelog_end
2022-03-25 06:47:39 +01:00
Stephen Compall
467b8fbbe7
shorter Value expressions in json-api tests (#13358)
* template ID variables
* remove duplicate function

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-24 15:51:55 +00:00
Sergey Kisel
d329db0ee7
Transaction Privacy test evidence [DPP-966] (#13395)
* Transaction Privacy test evidence [DPP-966]

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-24 15:45:23 +00:00
Sofia Faro
3646ec2358
interfaces: Add unsafe conversion to LF spec (#13399)
changelog_begin
changelog_end
2022-03-24 15:22:39 +00:00
Gary Verhaegen
a994288f96
damlc visual docs: remove <> (#13398)
These characters have a special meaning in Bash, so it's better to avoid
them as placeholders.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-24 15:07:39 +00:00
Robin Krom
ff333c8f07
ifaces: evaluation order tests for exercise/fetch (#13396)
This add a first test for evaluation order of exercise_interface and
fetch_interface. More tests will come in the following PR's.

This is part of #12697.

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-24 15:49:01 +01:00
Hubert Slojewski
92bf78e2b6
Change misleading messages (#13388)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-24 13:19:38 +01:00
Robert Autenrieth
f4363b3c41
DPP-906 Move conditional evaluations from SQL to JVM (#13212)
* Factor out offset comparison

... and move special treatment for offset begin to JVM code

changelog_begin
changelog_end

* wip
2022-03-24 11:23:17 +01:00
Sergey Kisel
e4cac30c92
Test evidence support for Ledger API tests [DPP-965] (#13387)
* Test evidence support for Ledger API tests [DPP-965]

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-24 11:17:59 +01:00
Moisés Ackerman
a88079e41a
Interface reference docs, cont. (#13378)
changelog_begin
changelog_end
2022-03-23 18:33:03 +01:00
Sergey Kisel
b5c3b9460b
Publish test evidence generator library (#13389)
changelog_begin
changelog_end
2022-03-23 17:24:14 +00:00
Sergey Kisel
55ca1af7e3
PublicServiceCallAuthTests security test evidence [DPP-961] (#13363)
changelog_begin
changelog_end
2022-03-23 17:37:19 +01:00
Stefano Baghino
d1feab0796
Address review comments on documentation improvements (#13386)
* Address review comments on documentation improvements

Address https://github.com/digital-asset/daml/pull/13381#pullrequestreview-918754656

changelog_begin
changelog_end

* Address https://github.com/digital-asset/daml/pull/13381#discussion_r833249949

* Address https://github.com/digital-asset/daml/pull/13381#discussion_r833253079

* Address https://github.com/digital-asset/daml/pull/13381#discussion_r833254062
2022-03-23 10:57:08 -04:00
azure-pipelines[bot]
c6cd84b882
rotate release duty after 2022-03-23 (#13374)
@victormueller-da is taking care of [testing](https://github.com/digital-asset/daml/blob/main/release/RELEASE.md) today's release, so they get pushed back to the end of the line.

Please do not merge this before the release is fully tested.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-03-23 12:45:46 +00:00
Remy
fe25205098
LF: cleanup snapshot replay + add minimal doc (#13360)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-23 13:37:40 +01:00
Sergey Kisel
fe654eba21
Change ownership of test-evidence library (#13380)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-23 13:32:55 +01:00
Gary Verhaegen
d0f372cbdb
retry 2.0.1 snapshot (#13373)
I have no idea why this should work, but I don't know what else to try
at this point.

cc @tudor-da

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-23 13:11:28 +01:00
Stefano Baghino
30acaaea77
Document how to connect HTTP JSON API Service to an HA participant (#13381)
* Document how to connect HTTP JSON API Service to an HA participant

Fixes https://github.com/digital-asset/daml/issues/13369

changelog_begin
changelog_end

* Add dummy Canton docs ref for `high-availability`
2022-03-23 13:05:15 +01:00
Moisés Ackerman
1185eb32bc
Preserve inherited choice info in daml test coverage report (#13354)
* Preserve inherited choice info in 'daml test' coverage report

changelog_begin
changelog_end
2022-03-23 12:28:04 +01:00
Stefano Baghino
50fd93c250
Address remaining issues about CVE-2021-44906 (#13382)
Addresses https://github.com/digital-asset/daml/security/dependabot/28
Addresses https://github.com/digital-asset/daml/security/dependabot/24

changelog_begin
changelog_end
2022-03-23 11:06:31 +00:00
Stefano Baghino
98a62622e8
Address open security advisories (#13377)
Address CVE-2022-24771
Address CVE-2022-24772
Address CVE-2022-24773

changelog_begin
changelog_end
2022-03-23 11:05:20 +01:00
Moisés Ackerman
9f6c1757bc
Interface reference docs (#13337)
* Prefix contract keys and exceptions reference docs with 'Reference:' to match siblings

* Interface reference docs: syntax

* Interface reference docs: functions

changelog_begin
changelog_end
2022-03-23 10:43:39 +01:00
Stefano Baghino
9fef07a02a
Address CVE-2021-44906 (#13376)
changelog_begin
changelog_end
2022-03-23 09:27:15 +00:00
Stefano Baghino
50f0c568f4
Remove unneccesary generality from Scala codegen (#13372)
changelog_begin
changelog_end

Addresses https://github.com/digital-asset/daml/pull/13367#discussion_r832251452
2022-03-23 09:07:53 +00:00
Stefano Baghino
587d9abfc3
Standardize package for JVM codegen (#13370)
The Scala codegen code lives under `com.daml.codegen` but the common
library and the Java codegen both live under `com.daml.lf.codegen`.

In order to share code while preserving package private access of
certain facilities (i.e. `DependencyGraph`) the package needs to
be standardized. I chose to go the Java way mostly to reduce noise
on work currently on its way on the Java codegen (#13366).

Contributes towards https://github.com/digital-asset/daml/issues/13324

changelog_begin
changelog_end
2022-03-23 09:03:35 +01:00
Robin Krom
d10f678518
ifaces: tests for by_interface in transactions (#13365)
We add tests to check that by_interface fields are set for interface
transactions. We also extend the scenario service to show the
by_interface fields in the pretty printed transactions.

Fixes #13333

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-22 19:53:49 +00:00
tudor-da
61941673a3
2.0.1 RC release (#13371)
changelog_begin
changelog_end
2022-03-22 19:55:15 +01:00
Victor Peter Rouven Müller
dcd726e113
Add security evidence to the simple trigger tests (#13231)
changelog_begin
changelog_end
2022-03-22 17:01:35 +00:00
Stefano Baghino
f4580aeeff
Move DependencyGraph from //language-support/scala/codegen to //language-support/codegen-common/ (#13367)
Move `DependencyGraph` from `//language-support/scala/codegen` to `//language-support/codegen-common/`

changelog_begin
changelog_end

The idea is that of re-using `DependencyGraph` for the Java codegen.

Builds on top of https://github.com/digital-asset/daml/pull/13361 and
contributes towards https://github.com/digital-asset/daml/issues/13324.
2022-03-22 12:36:46 -04:00
nickchapman-da
6a869fc7a3
remove speedy compilation validate phase (phase4) (#13353)
changelog_begin
changelog_end
2022-03-22 14:56:40 +00:00
Sergey Kisel
1543dd2bb4
Generator for test evidence using ScalaTest framework [DPP-962] (#13345)
* Generator for test evidence using ScalaTest framework [DPP-962]

changelog_begin
changelog_end
2022-03-22 15:50:54 +01:00
Stefano Baghino
452d37c6a1
Refactor Scala codegen: simplify by removing unnecessary abstractions (#13361)
* Refactor Scala codegen

changelog_begin
changelog_end

* Remove unnecessary abstractions

`DependencyGraph` and `LFUtil` both had an abstract superclass of
which they were the only implementation. Removing this unneccesary
layer of abstraction allows to avoid jumping between the superclass
and its concrete implementation to make sense of the overall meaning
of the code. Removing this layer also allows to find and remove
dead code and unused parameters.

* Throw away dead code around `BaseNode` and remove the unnecessary abstraction

* Throw away unused code

* Fix typo: unsopported -> unsupported

* Remove incorrect capitalization of type definitions

Before the refactoring, both `Util` and `LFUtil` had an implementation
of `toTypeDef` which were mostly matching, apart from the fact that
one capitalized its output while the other didn't. Apparently, I used
the wrong version and this broke existing code.
2022-03-22 13:39:13 +01:00
tudor-da
ed585780f0
Fix mutable state cache updates synchronization (#13325)
* Implemented race conditions test for mutable contract state cache upload

changelog_begin
[Ledger API] A race condition bug is fixed in the Ledger API mutable contract state cache.
The bug allowed the cache to become corrupted with stale references when the Ledger API
was subjected to concurrent submissions racing to update/fetch the same contract key.
The stale references were causing the Ledger API to erroneously reject submissions in
certain corner-cases.
changelog_end

* Pull cache indexes to StateCache
* Passes the test

* Fixing StateCacheSpec and MutabelCacheBackedContractStoreSpec
* Added invalidate test to ConcurrentCacheCachingSpecBase

* Address Marton's review comments

* Do not log a warn on negative contract lookups

* Update cache outside the source restart
2022-03-22 13:09:25 +01:00
Sergey Kisel
9eeacdca94
Library for test evidence [DPP-959] (#13319)
* Test library for test evidence to annotate scala and ledger api tests. [DPP-959]

changelog_begin
changelog_end
2022-03-22 11:02:34 +01:00
azure-pipelines[bot]
171670197b
update NOTICES file (#13359)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-03-22 10:46:54 +01:00
nickchapman-da
53c4447152
add stack-safety tests for wide expressions (#13347)
* add stack-safety tests for wide expressions

changelog_begin
changelog_end

* add links to quadratic issue
2022-03-22 08:44:38 +00:00
tudor-da
49e950dc59
Validated package uploads on SandboxServer startup (#13340)
* Validated package uploads on SandboxServer startup

changelog_begin
changelog_end

* Addressed Martino's review comments
2022-03-21 21:39:51 +01:00
Stephen Compall
2dd248cd68
move nonempty code to new nonempty library (#13350)
- new nonempty artifact, separate from scala-utils
- com.daml.scalautil.nonempty is now com.daml.nonempty

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-21 17:14:17 +00:00
Victor Peter Rouven Müller
1d2c01d2ca
Fix main build (#13352)
just runs the formatter again which fixes the diff in security-evidence.md

changelog_begin
changelog_end
2022-03-21 15:41:10 +00:00
Victor Peter Rouven Müller
8e6493b02a
Add security evidence about the failure tests from the json api (#13229)
changelog_begin
changelog_end
2022-03-21 15:58:59 +01:00
Victor Peter Rouven Müller
47ca2cb953
Add security evidence annotations to the integration tests of the json api (#13225)
changelog_begin
changelog_end
2022-03-21 15:58:23 +01:00
Victor Peter Rouven Müller
31366b939c
Add test evidence annotation to unit test of the json api (#13219)
changelog_begin
changelog_end
2022-03-21 15:57:59 +01:00
Victor Peter Rouven Müller
bfd69b0bee
Test that we return a 404 when requesting information about non-existing packages (#13346)
changelog_begin

- [HTTP-JSON] If information about a package is requested that doesn't exist on the ledger you will now get a 404 instead of a 500 as response.

changelog_end
2022-03-21 15:57:32 +01:00
Remy
f7d1901a5c
LF: split Command into ApiCommand and ReplayCommand (#13323)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-21 14:07:41 +01:00
Moisés Ackerman
b800fdc99a
expand buildLfPackageGraph docstring (#13343)
changelog_begin
changelog_end
2022-03-21 13:29:59 +01:00
Remy
6c2dc2d508
Move Replay from KV to LF land (#13243)
* Move Replay from KV to LF land

+ base it on submission entries instead of ledger export

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-21 13:03:10 +01:00
azure-pipelines[bot]
8438b57542
rotate release duty after 2022-03-16 (#13302)
@remyhaemmerle-da is taking care of [testing](https://github.com/digital-asset/daml/blob/main/release/RELEASE.md) today's release, so they get pushed back to the end of the line.

Please do not merge this before the release is fully tested.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-03-21 13:01:44 +01:00
azure-pipelines[bot]
2500dd7cd8
update NOTICES file (#13342)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-03-21 11:07:45 +01:00
Stephen Compall
d37a63f56e
interface choices in json-api (#13301)
This expands the domain of the exercise endpoint to accept interface IDs
instead of template IDs when exercising by contract ID. The argument is
still [compatibly] called templateId; interface IDs are accepted nowhere
else.

CHANGELOG_BEGIN
- [JSON API] Supports interface choices, including exercise by contract
  ID accompanied by an interface ID.
  See `issue #13301 <https://github.com/digital-asset/daml/pull/13301>`__.
CHANGELOG_END
2022-03-18 17:47:30 +00:00