Commit Graph

621 Commits

Author SHA1 Message Date
Remy
96f16df3c0
remove script/trigger/cantonFixture deps on scala-bindings (#17954)
Basically we remove the dependency of different components on "//language-support/scala/bindings" by:

- replacing com.daml.ledger.api.refinements.ApiTypes.Party by com.daml.lf.data.Ref.Party
- replacing com.daml.ledger.api.refinements.ApiTypes.ApplicationId by Option[com.daml.lf.data.Ref.ApplicationId] (here we use option as ApiTypes.ApplicationId allows empty string while Ref.ApplicationId does not).
- adding rounding logic for timestamp in com.daml.lf.data.Time.Timestamp and use it instead of the one from com.daml.api.util.TimestampConversion

Note we did not clean daml-sript export as it have never pass the alpha stage and will be dropped with the 3.x fork.
2023-12-05 15:08:09 +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
558b5d8adb
disable V2 load testing tests for now (#17866) 2023-11-20 16:18:16 +01:00
mziolekda
8e0b71bb15
clean up test common (#17846)
* move stuff around inside test-common

* move timeout stuff to lapitt, where it is used

* move logging stuff to ledger/error

* move StreamConsumer to libs-scala/grpc-test-utils

* remove dead usages of test-common

* move SimpleHttpServer to a dedicated lib

* format

* final cleanup of the test-common

* add new libraries to maven
2023-11-15 22:36:03 +00:00
mziolekda
b81ee69abe
disentangle ledger api (#17831)
* make testing-utils independent of ledger-api

* remove dead files

* move non ledger-api stuff to libs-scala
2023-11-14 22:44:10 +01:00
Paul Brauner
751423d5a7
Disable v2 integration tests for now (#17813)
* disable v2 integration tests

* remove unused import
2023-11-14 12:08:22 +00:00
Marton Nagy
6933514df5
Switch from Akka to Pekko (#17814)
* Automated renames by bash script

This commit is exclusively contains changes by the bash script.
For the bash script is present at the pull request.

* Manual pekko migration changes

* adapt fully qualified name references
* adapt pekko package declarations
* adapt bazel files with dependency changes
* adapt canton pekko lib shade_rule
* adapt logger configuration declarations
* pin maven dependencies
* revert incorrect changes by script to compatibility module

Workarounds for further TODOs:
* disable http-json-perf and libs-scala/gatling-utils modules to maintain clean pekko dependencies (without akka)
* disable GraphQLSchemaSpec test (sangria library needs to be upgraded)

* Formatting
2023-11-13 23:22:22 +00:00
Paul Brauner
efb6b8ca0a
Revert "Revert "Support both LF v1 and v2 in triggers"" (#17807)
* Revert "Revert "Support both LF v1 and v2 in triggers. (#17586)" (#17802)"

This reverts commit e61edb80f4.

* increase the timeout of oracle tests

* also increase the timeout of non-oracle trigger tests
2023-11-13 17:28:17 +00:00
mziolekda
255da35e2b
Remove deprecated fields (#17740)
* align canton bazel rule with DACH-NY/canton#15189

* formatting

* modify grpc

* fix LAPITT

* make triggers and java bindings compile

* fix compatibility
run-full-compat: true

---------

Co-authored-by: Remy Haemmerle <Remy.Haemmerle@daml.com>
2023-11-13 13:58:58 +01:00
Marton Nagy
78cc750714
Scala upgrade to 2.13.11 (#17803) 2023-11-13 09:05:39 +01:00
Paul Brauner
e61edb80f4
Revert "Support both LF v1 and v2 in triggers. (#17586)" (#17802)
This reverts commit 0850566553.
2023-11-10 17:52:57 +00:00
Paul Brauner
0850566553
Support both LF v1 and v2 in triggers. (#17586) 2023-11-10 11:34:20 +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
tudor-da
42581f2961
Add the LET as created_at in CreatedEvent LAPI proto (#17726)
* Add the LET as created_at in CreatedEvent LAPI proto

* Small fix

* Fix compilation issue
2023-11-02 06:11:34 +00:00
mziolekda
70d7e49312
support custom scope in access tokens (#17631)
* support custom scope in access tokens

* fix problem with ledger client

* fix broken tests
2023-10-26 08:35:16 +02:00
Remy
6169c4fe5d
Bazel rule to build canton ce (#17480)
Co-authored-by: Paul Brauner <paul.brauner@digitalasset.com>
2023-10-24 15:06:17 +02:00
mziolekda
25ae8d2281
Explicit disclosure based on blobs only (#17606)
* Explicit disclosure based on blobs only

* cosmetic changes

* Changes post-review

* remove buf check suppression

* Silence deprecation warnings

* more silencing of deprecation warnings

* Changes after recent round of reveiews
2023-10-23 13:47:30 +00:00
mziolekda
c18e4277c6
Revert addition of derived fields (revert #17539) (#17618)
* Revert "Complete contract data in DisclosedContract (#17539)"

This reverts commit 4927183044.

* suppression rule for buf
2023-10-20 14:15:01 +00: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
tudor-da
4927183044
Complete contract data in DisclosedContract (#17539)
Additionally, forward key_maintainers in CreatedEvent
2023-10-11 17:37:55 +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
623f305e9c
Move canton directory to let place for code drop (#17506) 2023-09-29 14:37:01 +00: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
Moisés Ackerman
6ae0e0111e
Upgrade to Bazel 5 (again) (#17319)
* Update to rules_haskell v0.16
* Update comments re bazel patches
* clean up bazel overrides
* Upgrade to Bazel 5.2.0
* Remove '--distinct_host_configuration=false'
* Update buildifier to 6.3.2
* Suffix macos and ubuntu caches with yyyymm
* bump windows cache to v14
* [REVERTME] bump linux/macos/darwin timeout to 4h
2023-09-01 15:15:36 +02:00
Samuel Williams
9179b2e7d0
Jar licensing (#17299)
* Add _distribute.jar target with correct license
Use it everywhere

* Fixes from review

* Change NOTICES to NOTICES.txt for consistency
2023-08-22 15:56:29 +01:00
Carl Pulley
9f9ecb2094
Trigger simulation use case: Contention (#17024) 2023-08-21 16:32:14 +00:00
Carl Pulley
0ee7aca07c
Trigger simulation use case: ACS growth (#17023) 2023-08-21 14:27:09 +00:00
mziolekda
94c51026e4
extend proto definitions with trace context (#17219)
* extend proto definitions with trace context

* modify v2 protocol

* fixes post-review
2023-08-09 08:36:32 +02:00
Carl Pulley
6462b327b1
Testing for trigger service TLS clients (#17214) 2023-08-04 09:11:57 +01:00
Carl Pulley
7f1750cd37
Trigger Service should support TLS Ledger Clients (#17164) 2023-07-25 21:00:44 +10:00
Remy
235abfa8ed
Revert "[LF] make Timestamp parsing consistent accross Java versions (#17053)" (#17170)
This reverts commit db7a5b3653.
2023-07-24 16:11:00 +00:00
Remy
db7a5b3653
[LF] make Timestamp parsing consistent accross Java versions (#17053)
* [LF] make Timestamp parsing consistent between Java 11 and Java 17

Between Java 11 and Java 17 there is one bug fix on Instant.parse
that expands the range of values that can be parsed into an
Instant. See https://bugs.openjdk.org/browse/JDK-8166138

Daml-LF happened to uses Instant.parse to parse a string into a
Daml-LF timestamp and we observe a different behavior when running
Daml on Java 11 and Java 17

additionally make explicit that conversion form java Instant and
string may drop nanoseconds, i.e. we create a lenient version that may
drop the significant nanoseconds (legacy or) and a strict
version that reject instant/string that cannot be converted without
loss of precision.
2023-07-20 16:18:01 +02:00
Simon Maxen
2b931bff7c
Add placeholder flag for contract upgrading (#17126)
* Add placeholder flag for contract upgrading

* SKIP_DEV_CANTON_TESTS=true

* Remove devMode

---------

Co-authored-by: Nick Chapman <nick.chapman@digitalasset.com>
2023-07-18 09:16:58 +00:00
nickchapman-da
8a3a7d20f9
[engine] improve speedy record value representation (#17054) 2023-06-30 15:25:50 +00:00
Carl Pulley
35f4566222
Expose Daml-LF parser to trigger simulations (#17021) 2023-06-22 12:57:38 +01:00
Carl Pulley
469b78a633
Ensure interface tests run and are no longer dev only (#17033) 2023-06-21 15:02:22 +01:00
Carl Pulley
c8bddba24d
Improve and develop trigger submission reporting (#17019) 2023-06-21 12:58:38 +01:00
Carl Pulley
cd5d2a526f
Additional timer process helper method for a common use case (#17018) 2023-06-21 12:55:46 +01:00
Carl Pulley
4ba5c06608
Explicit building of trigger multi-process simulation code (#17020) 2023-06-21 11:10:29 +01:00
Carl Pulley
4bbf8f89b0
Changes to allow simulations to alter dar files in abstract trigger tests (#17022) 2023-06-20 16:48:42 +01:00
Carl Pulley
76a2947a22
Windows flaky test fix (#16980) 2023-06-13 15:29:45 +01:00
Carl Pulley
54dc8d9f67
Overview of Trigger Simulations (#16903) 2023-06-13 09:57:22 +01:00
Remy
dd98cbec76
[LF] Cleanup API for disclosed contract (#16920) 2023-05-31 14:39:53 +02:00
Carl Pulley
eec7051a7d
Removed cyclic dependency issue in trigger simulation startup (#16916) 2023-05-25 13:30:36 +01:00
mziolekda
06abd5c649
Clean up ledger dependencies (#16894)
* remove sandbox-on-x project

update bazel readme

update release artifacts

comment out last remaining SoX test

remove ledger-runner-common

remove participant-state-kv-errors

remove recovering-indexer-integration-tests

remove participant-integration-api

update doc pages

cleanup ledger-api-auth usage

remove participant-state

fix build

fix build

clean up ledger-api-common part I

clean up ledger-api-comon part II

clean up ledger-api-common part III

remove ledger/metrics

clean up ledger-api-health and ledger-api-domain

* remove ledger-configuration ad ledger-offset

* remove ledger-grpc and clean up participant-local-store

* reshuffle few more classes

* format
2023-05-23 13:44:17 +00:00
mziolekda
95cc249ddd
Remove sandbox on x (#16890)
* remove sandbox-on-x project

* update bazel readme

* update release artifacts

* comment out last remaining SoX test

* remove ledger-runner-common

* remove participant-state-kv-errors

* remove recovering-indexer-integration-tests

* remove participant-integration-api

* update doc pages

* cleanup ledger-api-auth usage

* remove participant-state

* fix build

* fix build
2023-05-23 09:25:54 +02:00
Remy
81272e313d
Move com.daml.caching in libs-scala (#16868) 2023-05-22 15:32:53 +00:00
Remy
e230cf874f
Kill //ledger/cli-opts (#16869)
We inline the content in //trigger/service/auth that seems to be the only user.
2023-05-22 13:04:09 +02:00
Carl Pulley
fcc20eabb5
Improvements for trigger simulations that throw exceptions during initialization (#16885) 2023-05-22 08:54:08 +01:00