Commit Graph

8075 Commits

Author SHA1 Message Date
Samir Talwar
139b6f3b9e
CI: Set PROJ_DIR inside the bash lib, not outside. (#11236)
* CI: Set `PROJ_DIR` inside the bash lib, not outside.

We can't reference variables set outside.

CHANGELOG_BEGIN
CHANGELOG_END

* CI: Remove an unnecessary `export`.
2021-10-13 14:55:20 +02:00
Sofia Faro
ce64cb2a13
interfaces: Do some TODOs (#11231)
* interfaces: Do some TODOs

- Add uniqueness check between fixed choices and virtual choices in
  haskell decoder.
- Encode interface methods and fixed choices in scala encoder.
- ExprIterable for interfaces.

changelog_begin
changelog_end

* scalafmt
2021-10-13 13:36:53 +01:00
Robin Krom
7a88c7d97c
trigger-service: dev-mode-unsafe flag (#11233)
* trigger-service: dev-mode-unsafe flag

This adds a `--dev-mode-unsafe` flag analogous to the trigger service
analogous to its counterpart in the trigger runner.

CHANGELOG_BEGIN
CHANGELOG_END

* fix tests
2021-10-13 12:22:10 +00:00
pbatko-da
909a1bf896
[DPP-417][DDP-612] Adapt ApiSubmissionService to support V2 error codes (#11052)
Adapt ApiSubmissionService to support self-service (v2) error codes

CHANGELOG_BEGIN
CHANGELOG_END
2021-10-13 14:19:10 +02:00
nicu-da
514e8b50a3
Extract configuration_rejection.proto from daml_kvutils.proto [KVL-1090] (#11215)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-13 10:34:45 +00:00
Remy
d1611e8bc1
LF: Drop templateID from SEScopeExercise and KCloseExercise. (#11228)
We do not need to keep track of it because we have it in the partial
transaction.

CHANGELOG_BEGIN
CHANGELOG_END
2021-10-13 11:40:30 +02:00
Moritz Kiefer
cb1fb6f7bf
Reuse sandbox & JSON API across daml ledger tests (#11214)
Speeds them up by more than 2x and reduces flakiness. I also added a higher
timeout to the allocate party call since that seems to still be
sometimes too slow if lots of things run in parallel.

changelog_begin
changelog_end
2021-10-13 11:19:44 +02:00
Robin Krom
f4ca876756
interfaces: test for triggers (#11221)
This adds a test checking whether we can exercise choices on interface
contract IDs in triggers. We can only test this for daml-lf 1.dev.

CHANGELOG_BEGIN
CHANGELOG_END
2021-10-13 10:17:17 +02:00
nicu-da
e3ae424682
Extract party_allocation.proto from daml_kvutils.proto [KVL-1090] (#11213)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-13 08:15:17 +00:00
azure-pipelines[bot]
b942011336
update NOTICES file (#11225)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-10-13 06:58:58 +00:00
Moritz Kiefer
af3cd7a3ee
Reduce default assignees (#11219)
Stefano is bored so now he’s responsible for everything

changelog_begin
changelog_end
2021-10-13 08:37:35 +02:00
Moritz Kiefer
74ef17c176
Bump size of ledger-on-memory tests (#11220)
On CI we’ve seen
//ledger/ledger-on-memory:ledger-on-memory-tests_test_suite_src_test_suite_scala_com_daml_ledger_on_memory_InMemoryLedgerReaderWriterIntegrationSpec.scala
run above the 60s timeout.

Even locally under load, it gets easily between 30s and 60s so CI
timing out is fairly reasonable.

changelog_begin
changelog_end
2021-10-12 17:43:30 +00:00
Sofia Faro
7a02e7c440
interface fixed choices: LFConversion support (#11206)
* interface fixed choices: LFConversion support

Part of #11137

changelog_begin
changelog_end

* Update experimental primitives name, invoke UExerciseInterface
2021-10-12 17:06:52 +00:00
nicu-da
73d9ebfe0d
Extract transaction.proto from daml_kvutils.proto [KVL-1090] (#11208)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-12 16:02:33 +00:00
Remy
b2988bc79a
LF: type and compile Interface fixed choices (#11175)
* LF: type and compile Interface fixed choices

CHANGELOG_BEGIN
CHANGELOG_END

* cleanup

* fix some token

* cleanup

* Address sophia's review

* add comment

* cosmetic

* fix
2021-10-12 15:48:36 +01:00
fabiotudone-da
652d56999b
ErrorCodesVersionSwitcher -> ValueSwitch and push it down to /ledger/error also for KV to use (#11207)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-12 14:18:23 +00:00
fabiotudone-da
04494136bd
Allow converting an error into a gRPC status [KVL-1142] (#11204)
* Allow converting an error into a gRPC status

CHANGELOG_BEGIN
CHANGELOG_END

* Add missing dependencies
2021-10-12 14:04:01 +00:00
Moritz Kiefer
83d1e3cc0e
Fix daml test-script ordering (#11210)
The issue is that onComplete is not sequenced here. It’s close to
impossible to hit this by default but I added random delays which
triggered it reliably and confirmed that this fixes the issue.

changelog_begin
changelog_end
2021-10-12 13:57:42 +00:00
Samir Talwar
fe6acb60fb
kvutils: Add VersionedOffsetBuilder#matchesVersionOf. (#11212)
This allows a caller to test whether an offset matches a specific
version without throwing an exception.

CHANGELOG_BEGIN
CHANGELOG_END
2021-10-12 13:54:57 +00:00
nicu-da
24c6329579
Extract package_upload.proto from daml_kvutils.proto [KVL-1090] (#11209)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-12 13:19:13 +00:00
Moisés Ackerman
0de7b2eae5
Use nix-provided gRPC on Unix-like OSs (#11031)
* Use nix-provided gRPC on Unix-like OSs

This fixes the da-ghcid command on macOS and Linux.

Unfortunately on macos at least on CI it still seems to segfault when
trying to run damlc in ghci. However, at least typechecking works
so this is clearly progress.

changelog_begin
changelog_end
2021-10-12 13:43:20 +02:00
tudor-da
578fe7f10b
[Self-service error codes] Refactored for Canton compatibility [DPP-614] (#11164)
* [Self-service error codes] Refactored for Canton integration
* Introduces ErrorCodeLoggingContext which is used to abstract away the logging tech stack

CHANGELOG_BEGIN
CHANGELOG_END

* Moved all error definitions in //ledger/error

* Formatting

* Docs and remove of implicit conversion to DamlErrorCodeLoggingContext

* Fix compilation issues

* Fix tests

* Addressed Pawel's review comments

* Addressed Robert's review comments
2021-10-12 11:29:28 +00:00
nicu-da
b6f3f2087a
Extract the log_entry from daml_kvutils.proto [KVL-1090] (#11193)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-12 11:23:11 +00:00
nickchapman-da
9c107a7aa8
Fix fishy discards (#11197)
* dont discard errors

CHANGELOG_BEGIN
CHANGELOG_END

* remove redundant match case
2021-10-12 11:18:34 +00:00
Robin Krom
9835ccb1ef
trigger runner: added hidden dev-mode-unsafe flag (#11205)
This adds a hidden `dev-mode-unsafe` flag to the trigger runner to allow
running against a daml-lf 1.dev version dar.

CHANGELOG_BEGIN
CHANGELOG_END
2021-10-12 10:54:23 +00:00
Gary Verhaegen
ae41aa2c14
releases: check component status page (#11116)
The component status page have been neglected as of late. Craig
suggested adding a step to the release checklist.

CHANGELOG_BEGIN
CHANGELOG_END
2021-10-12 11:46:01 +02:00
nicu-da
d045ffaf1f
Extract the envelope from daml_kvutils.proto [KVL-1090] (#11192)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-12 02:00:59 -07:00
Stefano Baghino
eb834907d7
Add @stefanobaghino-da and @adriaanm-da for approval of stable releases (#11203)
Also a couple of tweaks to `CODEOWNERS`

changelog_begin
changelog_end
2021-10-12 08:42:43 +00:00
azure-pipelines[bot]
2a6dd3db37
update NOTICES file (#11202)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-10-12 10:35:44 +02:00
Robert Autenrieth
66adbc0366
DPP-463 switch conformance tests to append only (#11101)
* Use append-only schema in tests

changelog_begin
changelog_end

* Fix Oracle build

* Update ledger/ledger-on-memory/BUILD.bazel

Co-authored-by: tudor-da <tudor.voicu@digitalasset.com>

* Run more conformance tests on append-only

* Run pruning tests in split-participant mode

* Disable multi-participant test in split participant

* Add missing ContractIdIT test

Co-authored-by: tudor-da <tudor.voicu@digitalasset.com>
2021-10-11 23:31:30 +02:00
Miklos
7a54ca1926
Damlification of metrics prefix (#9665)
* Damlification of metrics prefix.
CHANGELOG_BEGIN
CHANGELOG_END

* Fixed reference to metrics prefix.

CHANGELOG_BEGIN
CHANGELOG_END
2021-10-11 19:00:27 +00:00
Robin Krom
3115d104aa
daml script interfaces (#11124)
* interfaces: introduce TemplateOrInterface class in stdlib

The template typeclass is to strong for many applications. The new
constraint `TemplateOrInterface` only contains the methods to convert
contract IDs and choices.

CHANGELOG_BEGIN
CHANGELOG_END

* ghc-lib update, interface script tests

* pinned stackage on unix

* added missing implementation in preprocessor

* added test

* fixing tests

* remove Iface type

* pinned stackage windows

* make sure createAndExercise is not called on interfaces
2021-10-11 18:22:40 +02:00
Remy
4af98a63a2
LF: clarify compilation of choice body. (#11195)
* LF: clarify compilation of choice Body.

This is a purely cosmetic choice.

We move up the intro of the choice arg binder to make it clear it
affect the compilation of every expression in the body of a choices (
namely controllers, observers, and update expression).

CHANGELOG_BEGIN
CHANGELOG_END

* formatting
2021-10-11 16:16:05 +00:00
nicu-da
d8651fae32
Extract configuration submission from daml_kvutils.proto [KVL-1090] (#11194)
CHANGELOG_BEGIN

CHANGELOG_END
2021-10-11 07:53:44 -07:00
nickchapman-da
67d4011fcd
Fix NonUnitStatements in daml-lf code (#11145)
* build daml-lf/* with lf_scalacopts_stricter; and fix NonUnitStatements

fix daml-lf/archive

CHANGELOG_BEGIN
CHANGELOG_END

fix daml-lf/data/

fix daml-lf/engine

fixes for scala 2.12

data-scalacheck, interface, kv-transaction-support: switch on; nothing to do

* daml-lf/parser -- switch on; nothing to do

* daml-lf/validation : switch on lf_scalacopts_stricter & fix wartremover:NonUnitStatements

* lf_scalacopts_stricter in daml-lf/transaction-test-lib

* lf_scalacopts_stricter in daml-lf/scenario-interpreter
2021-10-11 14:54:33 +01:00
Miklos
06834936bc
Removed InterpretationCostBasedLedgerWriterChooser*. (#11190)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-11 11:31:54 +00:00
Sofia Faro
174e23a6f8
interfaces: Sync InterfaceDesugared with Interface (#11191)
I think it's helpful for us to keep these two in sync.

changelog_begin
changelog_end
2021-10-11 12:22:02 +01:00
matevarga-da
61a5603acf
cheat sheet: update (#11133)
* cheat sheet: update
CHANGELOG_BEGIN
CHANGELOG_END

* cheat sheet: update 

CHANGELOG_BEGIN
CHANGELOG_END
2021-10-11 11:32:39 +02:00
Marton Nagy
af883fc109
Cleanup and activate unconditionally participant HA feature [DPP-497] (#10870)
* Removes flag and related configuration
* Removes unnecessary keepAlive approach from indexer

CHANGELOG_BEGIN
Participant HA feature added: Indexer component is guarded by database locks, and executes in a critical section (prevents overlapping indexer activity). Supported by Oracle and Postgresql database backends, and not supported by H2.
CHANGELOG_END
2021-10-11 11:13:15 +02:00
Robert Autenrieth
227a27daaa
DPP-641 Fix EndlessReadService and add tests (#11170)
* Fix EndlessReadService and add tests

changelog_begin
changelog_end

* Fix integrity query for H2
2021-10-11 11:10:12 +02:00
nicu-da
664aedd31b
Extract state.proto from daml_kvutils.proto [KVL-1090] (#11174)
CHANGELOG_BEGIN

CHANGELOG_END
2021-10-11 08:56:16 +00:00
Stefano Baghino
6f7ee0b092
Update issue templates (#11181)
* Update issue templates

Add two separate templates for bug reports and feature requests, explicitly ask for the affected Daml version for bug reports.

changelog_begin
changelog_end

* Apply suggestions from code review

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2021-10-11 09:21:51 +02:00
azure-pipelines[bot]
a932c9ff0f
update NOTICES file (#11188)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-10-11 09:09:17 +02:00
Stefano Baghino
12598df78f
Release SDK 1.17.1 (#11182)
changelog_begin
changelog_end
2021-10-11 09:04:21 +02:00
Artúr Poór
0f265fd715
[Docs] Improve manual-download.html phrasing. (#11084)
Emphasize that SDK version 1.4.0 was the latest at the time
of writing instructions, and is outdated now.

changelog_begin
changelog_end
2021-10-11 08:40:50 +02:00
nicu-da
9b2a8c7eb5
Enable top level statement blank lines scalafmt rule, which adds a blank line after imports (#11180)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-10 23:16:48 -07:00
Sofia Faro
7e2edbdfaf
interface fixed choices: Haskell Typechecker (#11177)
Part of #11137

changelog_begin
changelog_end
2021-10-08 15:42:29 +01:00
Sofia Faro
c876bd82a8
interfaces: Add a test for runtime errors (#11179)
changelog_begin
changelog_end
2021-10-08 15:27:24 +01:00
nicu-da
ce24fc8679
Update scalafmt to 3.0.6 (#11178)
* Update scalafmt to 3.0.6

CHANGELOG_BEGIN

CHANGELOG_END

* Disable just docstring wrap for the new scalafmt version
2021-10-08 13:36:36 +00:00
Samir Talwar
e15487422d
kvutils: Add a SubmissionInfo parameter to the replaying read service. [KVL-1082] (#11169)
* kvutils: Tidy up LogAppendingReadServiceFactorySpec.

* kvutils: Add a `SubmissionInfo` parameter to the replaying read service.

Required for other KV ledger implementations.

CHANGELOG_BEGIN
CHANGELOG_END

* kvutils: Rename some constants in LogAppendingReadServiceFactorySpec.
2021-10-08 13:48:24 +02:00