Commit Graph

574 Commits

Author SHA1 Message Date
Paul Brauner
6291abbe7a
Remove the V1 major language version from engine (#18400) 2024-02-08 16:09:47 +01:00
Remy
094c392ae7
[LF] default value for Create agreement text (#18399)
This is an intermediary step to remove it without breaking the API LF/Canton
2024-02-06 15:53:36 +01:00
Paul Brauner
35e255e6b0
Address LF2 TODOs in the daml repo (#18386)
run-all-tests: true
2024-02-06 10:45:28 +01:00
Paul Brauner
163b370654
remove the sharedKeys feature flag in the engine (#18376)
* Default to always shared keys

* undo canton changes for now, introduce fields and overloads to maintain compatibility
2024-02-05 18:26:01 +00:00
Paul Brauner
f7dfff8b49
make metadata non-optional in packages (#18363) 2024-02-02 11:16:03 +00:00
Remy
3b292d0032
[LF] drop retroactive interface instance (#18282) 2024-02-01 17:41:51 +01:00
Marton Nagy
6bcd4a8c10
[LF] Remove divulgence based disclosure (#18296)
Co-authored-by: Remy Haemmerle <Remy.Haemmerle@daml.com>
2024-02-01 14:42:12 +00:00
Paul Brauner
f6b49fd430
default to LF2 in the engine (#18320)
* default to LF2

* fix DamlLfEncoderTest.scala

* fix EngineInfoTest

* fix //daml-lf/encoder:validate-dar-2.1

* remove unused features and obsolete comment
2024-01-30 17:22:05 +01:00
Paul Brauner
bfa94a40b7
Delete remaining LF1 scala tests (#18327)
* fix ConcurrentCompiledPackagesTest

* fix EvaluationOrderTest_V1

* fix SerializabilitySpec

* fix TransactionVersionTest

* fix ConcurrentCompiledPackagesTest.scala

* fix tests:damlc-test

* fix security evidence
2024-01-30 13:58:41 +01:00
Hubert Slojewski
3b5dce66f5
#15209 Remove agreement text part 1 (internal changes only) (#18218) 2024-01-22 17:06:17 +00:00
Paul Brauner
6393fd084c
Remove LF1 in the compiler (#18203)
* make lf v2 and daml3-script the default

* delete V1 integration tests

* Remove LF major version V1 from the compiler

run-all-tests: true

* fix security evidence

* fix //compiler/damlc/tests:damlc-test

* fix //compiler/damlc/tests:data-dependencies

* fix //compiler/damlc/tests:integration-v2*

* fix //compiler/damlc/tests:packaging

* fix //compiler/damlc/tests:platform-independence-dar-hash-file-matches

* fix //compiler/damlc/tests:stable-packages

* fix DarReaderTest.scala

* fix DecodeCommonSpec.scala

* fix //daml-lf/archive:proto_immutability_check

* fix DamlLfEncoderTest.scala

* fix //language-support/java/codegen:test

* fix //daml-assistant/integration-tests:integration-tests

* fix artifacts.yaml

run-all-tests: true
run-full-compat: true

* Disable scenario-perf for now

See https://github.com/digital-asset/daml/pull/18217.

run-all-tests: true
run-full-compat: true

* restore explicit target version in docs template

run-all-tests: true
run-full-compat: true

* Restore DamlLfEncoderTest.scala.

Introduce a ENGINE_LF_VERSIONS constant in daml-lf.bzl instead.

run-all-tests: true
run-full-compat: true

* delete daml-lf/scenario-interpreter/src/perf

run-all-tests: true
run-full-compat: true

* Address review comments.

* Apply

Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>

* Restore golden/BUILD.bazel and port to 2.1

run-all-tests: true
run-full-compat: true

---------

Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
2024-01-19 15:19:34 +00:00
Remy
1971ccb930
[LF] Remove agreeement text from LF parser. (#18209)
part of removing agreement text.
(See https://docs.google.com/document/d/14z_OOaeqXjfKrQubkk6Gt1bwHIYnzxzd1xQiarZICKk/edit#bookmark=id.tdh4ghxn547)

also remove  remove the agreement from the Create Node generator
2024-01-19 12:06:48 +00:00
Samuel Williams
a44c30b421
Allow for record re-ordering with upgrades (#18108)
* Implement upgrade re-ordering
Force missing fields to be at the end and consequtive

* Drop sequential requirement on missing fields

* Format

* Enable re-ordering in ValueTranslatorConfig

* Remove field ordering flag

* Explicit Ref.Name usage

* Add upgradeable record tests
2024-01-19 09:41:00 +00:00
Gary Verhaegen
179d85362d
update copyright (#18167)
* update copyright

* undo hack from #18168

* update hash in platform-independence-pre-check
2024-01-15 20:27:42 +01:00
mziolekda
7108f2c76a
Remove triggers (#18142)
* remove triggers

* adopt the codebase to missing triggers

run-all-tests: true

* fix builid

* Remove oracle tests
2024-01-12 17:55:05 +01:00
Remy
ca9bd5e620
Engine: support for upgradable interface instance (#18072) 2023-12-31 18:55:07 +01:00
Remy
daa3f87f00
Propagate PackageRef to submit (#18041) 2023-12-20 12:11:36 +01:00
Remy
c20215028c
Introduce PackageRef (#18023)
this advance the state of #17995

We propagate in ApiCommand and fix preprocessing
2023-12-15 11:45:08 +00:00
Remy
da4033170c
Interpreter populate package name (#17990)
this advances the state of #17995
2023-12-13 16:01:20 +01:00
Remy
d8d114bb80
Propagate package to ContractInstance (#18005)
this advances the state of #17995
2023-12-11 11:31:26 +00:00
Remy
68c8a364da
Add package name to transaction (#17997)
this advances the state of #17995
2023-12-08 08:55:05 +01:00
Simon Maxen
935b351f74
Enable shared keys for vDev (#17946) 2023-12-05 13:48:06 +00:00
Paul Brauner
9dbb53e97e
introduce lf_version_default_or_latest in bazel and use it everywhere were I had replaced the implicit default version with 'latest' (#17930) 2023-11-29 15:53:53 +01:00
Paul Brauner
a572eeabf8
Replace 2.dev with 2.1 everywhere in the engine (#17878)
* re-enable v2 tests temporarily

* replace 2.dev with 2.1 where it makese sense

* replace more 2.dev with 2.1

* Re-disable the long V2 tests
2023-11-23 10:17:54 +00:00
Paul Brauner
2b28e59017
Introduce LF 2.1 (#17865) 2023-11-23 08:59:14 +01:00
Paul Brauner
890dee12bf
Tie right-to-left evaluation order to LF v2 (#17811)
* Tie right-to-left evaluation order to LF v2

* fix typo
2023-11-14 10:34:31 +01:00
Marton Nagy
78cc750714
Scala upgrade to 2.13.11 (#17803) 2023-11-13 09:05:39 +01:00
Remy
6ef062dac9
Revert "Nmarton/pekko rebased (#17789)" (#17796)
This reverts commit d310692d1b.

@remyhaemmerle-da messed up and merged the PR too fast.
2023-11-09 21:23:18 +00:00
Marton Nagy
d310692d1b
Nmarton/pekko rebased (#17789)
* Scala upgrade to 2.13.11
* Switch from akka to pekko
* Also disable gatling based libs to start from a clean stage
2023-11-09 18:17:33 +01:00
Remy
ac2250712f
"[LF] drop transaction version < 14 (#17690) 2023-11-08 08:54:38 +01:00
Remy
851ac87015
fix typo "sey" in a message error (#17764)
Co-authored-by: Meriam Lachkar <meriam.lachkar@digitalasset.com>
2023-11-07 20:55:23 +01:00
Remy
a83a84b326
Add support for explicit disclosure in daml script 3 (#17723) 2023-11-07 15:46:20 +00:00
Remy
dfeb788e8b
[Upgrade] make exercise upgradabale (#17752) 2023-11-07 15:27:16 +00:00
Simon Maxen
ae5e9feda9
Allow for the construction of shared GlobalKeys.
* Revert "Add SharedGlobalKey"

This reverts commit 6592cb7bd5.

* Adding shared flag to GlobalKey

* Remove shared flag from GlobalKey

* Support old and new grcp error parsing

* Add tests for hashContractKey
2023-11-06 20:00:38 +00:00
Gary Verhaegen
fb73ab1614
Pass iterationsBetweenInterruptions config to Speedy (#17725)
Co-authored-by: Christian Grigis <christian.grigis@digitalasset.com>
2023-11-01 15:25:36 +00:00
Remy
8cfe4c01a3
Check qualified name when upgrading a contract (#17662) 2023-10-31 09:53:17 +01:00
Simon Maxen
6592cb7bd5
Add SharedGlobalKey (#17650)
* Add SharedGlobalKey

* Update with review comments

* Add temporary canton compatibility
2023-10-26 14:31:36 +01:00
Remy
422b6934d6
[Speedy] improve upgrade failure error message (#17634) 2023-10-25 15:16:11 +00:00
Samuel Williams
14f9f58dcf
Add support for querying upgraded contracts to daml-script (#17629) 2023-10-23 17:24:56 +01:00
Remy
9575b72a01
[Engine] allow (up/down)grade in create command (#17451)
This PR provides a basic API for ledger client to create contracts with down/up-grade support.
One can send a create Command where the payload contains

-  (upgrade path) less fields than requires by the package definition (as long as the missing fields are optional), in such case the engine assume those fields are None
-  (downgrade path) more fields than requires by the package definition (additional field should be node), in such case the engine drop those fields.

Here are some restrictions we assume for this first step:

 - For the sake of simplicity, we forbid field reordering when upgrade is enable
 - The package of explicit disclosed contract is required
 - we ignore package ID complelty inside value (probably not what we want in final version)
2023-10-19 18:02:02 +00:00
Paul Brauner
f4ee00361e
Make LF v2 non backwards-compatible with LF v1 in the compiler (#17492)
* initial commit

* split gen-stable-packages-v_i into two targets

* rename compatibleWith to canDependOn

* update damlc integration tests annotation to allow for 2.x

* use the right package ID for preconditionFailed when compiling to V2

* fuse stable-packages-v1 and stable-packages-v2 into one single filegroup

* Fix DA.Daml.LF.Ast.Tests

* remove leftover 'undefined' in Version.hs

* progress on fixing DataDependencies.hs

* fix Cross-SDK typeclasses test for 2.dev

* Fix the 'Typeclasses and instances' data dependency test

* Update comment

* fix //compiler/damlc/tests:packaging

* Add TODO

* parameterize the machine by the langage version, hardcode v1 in script v2, v2 in script v2, v1 in exports

* get EngineTests to pass

* fix more tests

* fix canton integration tests

* formatting

* fix more tests

* fix transactionversiontest

* fix exceptiontest

* Fix ValueEnricherSpec

* Fix EngineInfoTest

* fix PartialTransactionSpec

* fix upgragetest

* fix TransactionSnapshot

* Fix ContractKeySpec

* Fix ReinterpretTest

* fix InterfaceViewSpec

* fix InterfacesTest

* fix stable package v1 names

* fix validate.sh tests

* formatting

* Fix ChoiceAuthorityTest

* fix explicit disclosure test

* Fix SpeedyTest

* formatting

* Fix integration test

* fix data dependency tests

* fix package vetting count, increased due to metadata being added

* Redact stable package IDs in error messages in order for the ExceptionSemantics test to work for both v1 and v2

* cleanup

* fix Daml2ScriptTestRunner

* fix JsonApiIT and daml-script golden tests

* fix daml3-script runner test

* enable v2 for all integration tests

* formatting

* fix NodeSeedsTest

* fix since-lf annotations

* add comments, improve consistency

* stop hardcoding V1 in runPureExpr and runPureSExpr

* formatting

* remove harcoding of LFv1 in ConcurrentCompiledPackages.apply

* Parameterize Compiler.Config.Default with major language version

* remove global parser implicit and default package ID and language version
2023-10-11 11:40:17 +02:00
Remy
176c8505b9
[Speedy] Move back contract cache in speedy (#17523)
For reference, this undoes some of the changes from #17171.
2023-10-06 10:04:09 +02:00
Remy
4a8fcd4098
[Speedy] Test node seeds are maintained properly in aborted rollback (#17524)
Test for the bug DACH-NY/canton#14712 fixed in #16422

This is adapted from a minimal example designed by @simonmaxen-da to reproduce the bug.
2023-10-05 17:47:01 +02:00
Moisés Ackerman
e6bf01717f
Remove more internal uses of Scenario (#17375)
* daml-lf-test.sh no longer takes damlc argument

* Split //daml-lf/tests:BasicTests into engine and integration tests

* Remove unused //daml-lf/engine:Optional

* Convert //daml-lf/tests:AuthorizedDivulgence into integration test

* Convert //daml-lf/tests:DontDiscloseNonConsumingExercisesToObservers into integration test

* Convert //daml-lf/tests:ConjunctionChoices into integration test

* Convert //daml-lf/tests:ContractKeys into integration test LFContractKeys

* Move //daml-lf/tests:AuthTests to //daml-lf/engine:AuthTests

* Split //daml-lf/tests:LargeTransaction into ledger and non-ledger tests

* Remove scenarios in //language-support/java/codegen:ledger-tests-model

* Remove unused scenarios in //test-common:src/main/daml/model/Test.daml

* Remove 'enable_scenarios' param in da_scala_dar_resources_library

* Remove 'enable_scenarios' param in damlc_compile_test

* Remove '--enable-scenarios=yes in //compiler/damlc/tests:deterministic

* Convert /daml-lf/tests/scenario/dev/experimental to integration test

* Convert /daml-lf/tests/scenario/dev/interfaces to integration test

* Convert /daml-lf/tests/scenario/stable/big-numeric to integration test

* Convert /daml-lf/tests/scenario/stable/contract-key-through-exercises to integration test

* Convert /daml-lf/tests/scenario/stable/contract-keys to integration test

* Convert /daml-lf/tests/scenario/stable/divulge-iou to integration test

* Convert /daml-lf/tests/scenario/stable/embed-abort to integration test

* Convert /daml-lf/tests/scenario/stable/eval-agreement to integration test

* Convert /daml-lf/tests/scenario/stable/exception-auth to integration test

* Convert /daml-lf/tests/scenario/stable/gen-map to integration test

* Convert /daml-lf/tests/scenario/stable/many-fields to integration test

* Convert /daml-lf/tests/scenario/stable/mustfailcommit to integration test

* Convert /daml-lf/tests/scenario/stable/mustfailinterpretation to integration test

* Convert /daml-lf/tests/scenario/stable/mustfails to integration test

* Convert /daml-lf/tests/scenario/stable/no-contract-ids-in-keys to integration test

* Convert /daml-lf/tests/scenario/stable/pass-time to integration test

* Convert /daml-lf/tests/scenario/stable/pattern-matching to integration test

* Convert /daml-lf/tests/scenario/stable/timeout to integration test

* Remove scaffolding for daml-lf/tests/scenario

* Remove unused 'enable-scenarios' flags

* Remove unused daml-lf/tests/daml-lf-test.sh

* Remove unused daml-lf/tests/scala-test-limited-stack.sh

* Remove comments about deprecated flag 'DontDivulgeContractIdsInCreateArguments' in AuthorizedDivulgence integration test

* Add 'create' in LfStableTimeout:testScriptLoop

* add TODO for nesting limits test in LfStableMustFails

* Move LfStableMustFails expected ledger files into subdir
2023-09-28 16:29:46 +01:00
Paul Brauner
a5cd445d3b
Introduce LF2 major version (#17348)
- Introduces a new major version, "2", in the daml_lf proto
- Adds new major versions to the compiler and the engine
- Updates all code that assumes only one major version
- Updates all code that assumes only one dev version
2023-09-13 10:01:42 +02:00
nickchapman-da
0cac8c29a3
[engine] call: ResultNeedUpgradeVerification (#17360) 2023-09-07 10:18:41 +01:00
Simon Maxen
2d3ac27383
Revert "Add ResultNeedCreate (#17243)" (#17321)
This reverts commit 7ba1e6754c.
2023-08-31 11:18:14 +01:00
Simon Maxen
8b92c9294b
Document ResultNeedUpgradeVerification differences between submission and reinterpretation (#17277) 2023-08-30 14:04:18 +01:00
Paul Brauner
7585f72d7a
Add flag-protected right-to-left evaluation (#17253)
Right-to-left evaluation allows for a faster and simpler interpreter, but is incompatible with the semantics of Daml 2.x. Adding it behind a flag so we can switch to it in Daml 3.0.

See PR #17253 for ample details.
2023-08-15 13:10:44 +00:00
nickchapman-da
4b60e35a5d
[engine] Restructure contract caching (#17171) 2023-08-09 16:09:13 +00:00