Commit Graph

22 Commits

Author SHA1 Message Date
Remy
35eae895e4
Compiler: expose LF builtin ExerciseByKey (#12615)
With this change, Daml exerciseByKey use the LF primitive
ExerciseByKey instead of the combinason of FetchByKey + Exercise.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-28 16:29:16 +01:00
Gary Verhaegen
d2e2c21684
update copyright headers (#12240)
New year, new copyright, new expected unknown issues with various files
that won't be covered by the script and/or will be but shouldn't change.

I'll do the details on Jan 1, but would appreciate this being
preapproved so I can actually get it merged by then.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-03 16:36:51 +00:00
Moritz Kiefer
1e6540f8f2
Stop using controller _ can syntax in daml-lf tests (#10805)
If we want to kill this, as a first step let’s stop using it in tests.

changelog_begin
changelog_end
2021-09-08 11:49:46 +02:00
Moritz Kiefer
836a82a6b6
Add proper error handling for missing contract keys (#9972)
* Add proper error handling for missing contract keys

These are clearly not internal errors so we should not be calling
`crash` here. Canton in fact already started string matching on the
crash message which is definitely not what we want.

changelog_begin
changelog_end

* backwards compat

changelog_begin
changelog_end

* fix tests

changelog_begin
changelog_end
2021-06-14 09:12:30 +00:00
Gary Verhaegen
a925f0174c
update copyright notices for 2021 (#8257)
* update copyright notices for 2021

To be merged on 2021-01-01.

CHANGELOG_BEGIN
CHANGELOG_END

* patch-bazel-windows & da-ghc-lib
2021-01-01 19:49:51 +01:00
Kamil Bożek
012ae55d65
Engine API - multi-party submissions [KVL-703] (#8081)
* Multiple submitters field for Command

* Multiple submitters field for Engine API

* Tests for multi-party submissions in Engine

* Make use of multi-party Engine capabilities in the engine benchmark

* Enable multi-party submission in Engine's API
CHANGELOG_BEGIN
CHANGELOG_END

* Separate unit tests for multi-party engine

* Unit tests for multi-party submission transaction replay
2020-11-30 15:04:30 +01:00
Remy
9b2a7d59e8
LF: enforce non-empty maintainers in contract key in fetchByKey (#7649)
This fixes a bug in the Speedy interpreter. With this change, the
interpreter crashes if it attempts to fetch using a contract key that
has an empty set of maintainers. This propagates to exerciseByKey as
this command is compiled using fetchByKey speedy built-in.

This is a breaking change approved by @bame-da .

CHANGELOG_BEGIN
    [LF] (Bug fix) enforce non-empty maintainers in contract key during fetchByKey and exericiseByKey.
CHANGELOG_END
2020-10-15 12:22:56 +02:00
Remy
cf89f6a74d
LF: enforce non-empty maintainer in contracts key. (#7597)
This fixes a bug in the Speedy interpreter.  With this change, the
interpreter crashes if it attempts to create a contract containing a 
contract key that has an empty set of maintainers.

This is a breaking change approved by Bernhard Elsner. 

CHANGELOG_BEGIN
- [LF] (Bug fix) enforce non-empty maintainers in contract key during
  contract creation.
CHANGELOG_END
2020-10-08 14:59:41 +02:00
Martin Huschenbett
9f43ab95ac
Fix evaluation order for create with contract keys (#5972)
Currently, a call to `create` for a template with a contract key
evaluates the key even before _executing_ the `create`, which is _way_
too early. See #5967 for examples what this implies.

This change moves the evaluation of the key into the execution of the
`create` and therein _after_ the evaluation of the `ensure` clauses,
which is where it belongs according to the DAML-LF specification.
Unfortunately, the specification does not say anything about the
relative evaluation order of the `agreement`, `signatory`, `observer`
and `key` clauses. Thus, I've deciced to evaluate the key after the
other three, which seems to be its natural place given its optionality.

This fixes #5967.

CHANGELOG_BEGIN
CHANGELOG_END
2020-05-13 21:31:32 +00:00
Moritz Kiefer
288f9479df
Fix warning in DAML-LF test DAR (#5798)
I finally got sufficiently annoyed seeing the warning scroll by in
build logs that I fixed it.

changelog_begin
changelog_end
2020-04-30 15:57:13 +02:00
Remy
b3ccacc006
DAML-LF. fix computation of cid (#5486)
The fix is to use the number of nodes of the partial transaction instead of the number of nodes of the full transaction.


CHANGELOG_BEGIN
CHANGELOG_END
2020-04-08 16:44:48 +02:00
Ognjen Maric
5be5036f27
Engine: support reinterpreting LookupByKey nodes (#5271)
Fixes #5264

CHANGELOG_BEGIN

- [Engine] Support reinterpreting LookupByKey nodes

CHANGELOG_END
2020-03-30 15:13:43 +02:00
Gary Verhaegen
1872c668a5
replace DAML Authors with DA in copyright headers (#5228)
Change requested by Manoj.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-27 01:26:10 +01:00
Ognjen Maric
f7aa2a3db0
Add keys with maintainers to Fetch nodes (#5186)
Add keys with maintainers to Fetch nodes

The new field is populated by the interpreter whenever the fetched
contract has a key. Used for contract key reinterpretation in Canton.

CHANGELOG_BEGIN

- [DAML-LF] Add keys with maintainers to Fetch nodes in transactions.

CHANGELOG_END
2020-03-26 14:07:17 +01:00
Remy
267671c340
[engine] track usage of getTime (#4790)
CHANGELOG_BEGIN
CHANGELOG_END
2020-03-04 10:17:55 +01:00
Shayne Fletcher
66dd112960
Remove pragma 'daml 1.2' (#4702)
changelog_begin
- The pragma 'daml 1.2' is now optional.
changelog_end
2020-02-26 13:17:45 -05:00
Tamás Kálcza
64864d9d9c
Partition function to prelude (#4318)
* Added a partition function to prelude.

* Fixed partition function documentation.

* CHANGELOG_BEGIN
- Added `partition` function to prelude.
CHANGELOG_END

* Fixed partition documentation.
2020-01-31 12:20:50 +01:00
Gary Verhaegen
878429e3bf
update copyright notices to 2020 (#3939)
copyright update 2020

* update template
* run script: `dade-copyright-headers update .`
* update script
* manual adjustments
* exclude frozen proto files from further header checks (by adding NO_AUTO_COPYRIGHT files)
2020-01-02 21:21:13 +01:00
Gary Verhaegen
99ea93168d
update copyright notices (#2499) 2019-08-13 17:23:03 +01:00
Stefano Baghino
656e456b78 Add ExerciseByKey command to Ledger API (#1724)
Fixes #1366

Also adds support for the new command to the Java bindings and codegen
2019-06-19 09:11:52 +00:00
Neil Mitchell
4b89903a73 Delete the id function (#851)
* Delete the `id` function

* Fix documentation that referred to id

* Fix some DAML-LF tests that relied on id
2019-05-02 22:57:52 +00:00
Digital Asset GmbH
05e691f558 open-sourcing daml 2019-04-04 09:33:38 +01:00