Commit Graph

647 Commits

Author SHA1 Message Date
Remy
1b014ae4c6
fix flakyness of //daml-script/test:multi-participant-integration-test (#16489)
Co-authored-by: Samuel Williams <samuel.williams@digitalasset.com>
Co-authored-by: Carl Pulley <106966370+carlpulley-da@users.noreply.github.com>
2023-03-13 20:59:18 +01:00
atriantafyllos-da
e58ea28601
Upgraded circe-yaml to 15.0-RC1. [#16412]. (#16415) 2023-03-13 14:51:43 +01:00
Remy
39d816f657
[Speedy] move compilation of disclosure outside of the Machine. (#16453)
Machine is not supposed to compile anything.
2023-03-06 19:04:31 +01:00
Sergey Kisel
b33d635beb
Customizable JWT audiences (#16330) 2023-02-27 16:05:38 +01:00
azure-pipelines[bot]
0dbbcfe0f1
bump canton to 20230224 (#16383)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2023-02-27 12:55:16 +01:00
Moisés Ackerman
dd9c07177f
Timeouts are now reported correctly for daml-script Scripts (#16344)
Co-authored-by: Remy Haemmerle <Remy.Haemmerle@daml.com>
2023-02-20 11:03:21 +01:00
mziolekda
1a3980bf89
Separate test-common from the rest of the ledger code (#16307)
* move files

* format

* wrong file

* fix conformance tests

* add readme

* fix compatibility tests

* fix haskell tests
2023-02-14 15:29:13 +00:00
nickchapman-da
7ed5799a02
[engine] more testing for with-authority (#16308)
* enable correct behaviour expectation in daml-script with-authority example

* add testing for daml-lf examples with sequenced WITH_AUTHORITY, and extend testing for nested exammples
2023-02-13 17:28:22 +00:00
mziolekda
d9974984fd
Remove circular dependency on the //ledger project caused by ledger-resources [DPP-1410] (#16295)
* remove circular dependency on the //ledger project caused by ledger-resources

* format
2023-02-13 08:38:44 +00:00
Moisés Ackerman
9582832c2c
Fix try-catch scoping bug in daml-script (#16190)
* _tryCatch sig

* CatchPayload now only continues via 'continue' field

* fmt

* Add test cases

* update docs for CatchPayload

* fix type of CatchPayload.continue

* Add x type parameter to CatchPayload, drop toLedgerValue
2023-02-06 14:01:40 +01:00
Remy
2851401df6
[ScenarioService] add evaluation timeout (#16204)
Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
2023-02-06 08:59:12 +01:00
Remy
aad8725ea7
[damlc] change default output to 1.15 (#16157) 2023-02-06 08:58:47 +01:00
nickchapman-da
d406e0a8df
remove clunky of suffix from with-authority internal names (#16214) 2023-02-01 16:19:06 +00:00
Carl Pulley
1e967d0ea3
ACS Overflow detection (#16195) 2023-02-01 13:48:56 +00:00
Carl Pulley
3d6ac11357
Bug fix to avoid potential JVM OOM errors in the converter (#16193) 2023-01-31 09:10:27 +00:00
Rex Ng
d287649fef
Fix potential embarrassing spelling (#15354)
CHANGELOG_BEGIN
[daml-script] Fix documentation spelling
CHANGELOG_END
2023-01-27 09:54:44 +00:00
Remy
3603ba870b
[Speedy] add cooperative interuptions (#16129)
Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
2023-01-26 16:05:33 +01:00
Sergey Kisel
efcc6620ed
Implement IDP ID check transactionally within persistence layer [DPP-1386] (#16134) 2023-01-26 11:21:18 +01:00
nickchapman-da
4aa5b7d768
add new tx node type: Node.Authority (#16070) 2023-01-25 11:09:56 +00:00
Nicu Reut
85eff2930f
Configure OpenTelemetry using the sdk [PLEN-68] (#16083) 2023-01-24 08:53:25 +01:00
nickchapman-da
ca4ec1ed93
dummy implemention of withAuthorityOf primitive as the identity function (#16086) 2023-01-18 12:13:12 +00:00
nickchapman-da
f32419da20
[engine] withAuthorityOf: support from Daml --> Speedy (#16029) 2023-01-16 12:55:34 +00:00
Moisés Ackerman
3633d3bb52
Require HasAgreement t in template-only daml-script/daml-trigger functions (#16039) 2023-01-12 13:55:30 +01:00
Gary Verhaegen
151e12b81a
bump copyright (#16002)
This is the result of:

- Updating `./COPY` to say `2023`.
- Running `./dev-env/bin/dade-copyright-headers update .`
2023-01-04 18:21:15 +01:00
Remy
2152b72755
[Speedy] Make Machine parametric wrt questions (#15576) 2023-01-03 15:12:33 +01:00
Remy
f1aca5e11c
[Speedy] create Scenario Machine (#15588) 2022-12-16 08:20:42 +00:00
Remy
311f419842
LF: get rid of agreement text in ContractInst (#15818) 2022-12-14 10:39:29 +00:00
Sergey Kisel
db7f629c9e
Add todos to support IdentityProviderAdmin in the Daml-Script (#15858)
* Add todos to support IdentityProviderAdmin in the Daml-Script

* update todo
2022-12-14 10:00:57 +00:00
Sergey Kisel
212955cc31
Add "iss" claim support for JWT tokens. (#15880) 2022-12-13 15:26:36 +01:00
Nicu Reut
25f1254120
Move the metrics API to the observability module [PLEN-35] (#15831) 2022-12-12 09:35:55 +00:00
Sergey Kisel
e880f26b36
Identity Provider Management exposed via API [DPP-1334] (#15774) 2022-12-09 10:25:14 +01:00
Stefano Baghino
18ed316827
Accept uppercase English alphabet letters in user IDs (#15832)
* Accept uppercase English alphabet letters in user IDs

changelog_begin
Accept uppercase English alphabet letters in user IDs
changelog_end

* Fix title case in docs change

Co-authored-by: Sergey Kisel <98825453+skisel-da@users.noreply.github.com>

Co-authored-by: Sergey Kisel <98825453+skisel-da@users.noreply.github.com>
2022-12-08 16:44:54 +00:00
Moisés Ackerman
f35ebb8dcd
Move stdlib datatypes into stable packages (#15795)
* Move datatype DA.Action.State.State into a stable package

* Move datatype DA.Stack.SrcLoc into a stable package

* Move datatype DA.Random.Minstd into a stable package

* Skip doctest for DA.Action.State.Type

* Don't use magic numbers in CodeGenRunnerTests.scala

* Update comment in StablePackageTest.scala
2022-12-06 15:48:35 +01:00
Sergey Kisel
1c6f6a748b
IdentityProviderId support for the persistence layer of user/party management [DPP-1332] (#15716) 2022-12-02 16:12:04 +01:00
azure-pipelines[bot]
3daa60f9d1
bump canton to 20221129 (#15735)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-11-30 11:46:56 +01:00
nickchapman-da
6e379dbd5a
[script] update doc for daml-script/interfaces (#15683)
* update reference doc (doc-comments in Script.daml) for daml-script/interfaces

* small english fixes

* update user doc and example for daml-script/interfaces

* build/test ScriptExample.daml at 1.15

* dont show party in interface info message

* fix for: //daml-script/export/integration-tests/golden:matches-docs-test

* disable failing integration test
2022-11-28 08:18:44 +00:00
mziolekda
9cee266479
Move jwt library to libs-scala (#15674) 2022-11-24 11:08:56 +01:00
nickchapman-da
18025794f2
use Jspon API "fetch" endpoint for daml-script queryInterfaceContractId (#15652) 2022-11-23 09:27:49 +00:00
nickchapman-da
697aaf14da
[daml-script] interfaces over JSON API (#15460) 2022-11-21 15:18:41 +00:00
Remy
3dee676cbb
[LF] making LF 1.15 stable (#15614) 2022-11-17 23:30:11 +01:00
Remy
7cac969756
[Speedy] Inline LedgerMode in the Machine (#15514) 2022-11-15 14:47:22 +00:00
atriantafyllos-da
5ddd0646c4
Removed http_json_api metrics from ledger metrics [DPP-1307]. (#15552)
changelog_begin
changelog_end
2022-11-15 14:56:41 +01:00
Remy
d071e5e505
Remove TemplateOrInterface type class (#15347) 2022-11-15 09:44:51 +01:00
nickchapman-da
7abbb694b9
[script] rename: queryView --> queryInterface (#15541) 2022-11-11 11:50:02 +00:00
Moisés Ackerman
8b4603b665
define daml_ledger_export_test in terms of client_server_test (#15535)
* daml_ledger_export_test is now defined in terms of client_server_test

* daml_ledger_export_test now has timeout=short by default

Co-authored-by: Remy <remy.haemmerle@daml.com>
2022-11-11 10:44:40 +00:00
Remy
bec311c039
[Script] strengthen compilation flags (#15509) 2022-11-10 10:55:05 +01:00
Remy
f240917e94
[Speedy] Drop second argument of SResultFinal (#15429) 2022-11-04 14:20:21 +01:00
nickchapman-da
c9db43f579
implement queryView for GrpcLedgerClient (#15406) 2022-11-03 17:41:07 +00:00
nickchapman-da
d00665c764
use all parties for query functions (#15381) 2022-11-01 13:47:39 +00:00
nickchapman-da
a20ac183aa
handle view computations which fail in daml-script (#15384)
changelog_begin
changelog_end
2022-10-28 17:05:18 +01:00
nickchapman-da
70b29e1b63
simplify code (#15380)
changelog_begin
changelog_end
2022-10-28 11:22:09 +00:00
Remy
bd7e12809e
[LF] fix versioning of value w.r.t. interface (#15370)
CHANGELOG_BEGIN
CHANGELOG_END
2022-10-28 12:31:58 +02:00
nickchapman-da
d14e68dc53
[daml-script] queryView (#15286) 2022-10-27 14:06:25 +01:00
Remy
0bba409d0e
[LF] Make ApiCommand.Exercise work directly with type constructor (#15360)
CHANGELOG_BEGIN
CHANGELOG_END
2022-10-26 18:13:38 +00:00
dylant-da
da8064de64
Add AnyView with HasFromAnyView instances (#15280)
* Implement AnyView as a stable package / primitive

* Point to updated GHC

* Export AnyView datatype, move typeclasses, fix convertPrim

* Adjust AnyView w/ InterfaceTypeRep, implement {to,from}AnyView

* fix lint, satisfy changelog

CHANGELOG_BEGIN
CHANGELOG_END

* fix daml-desugar

* Has{From,To}AnyView instances in daml-docs

* Add DA.Internal.Interface.AnyView to LibraryModules for stdlib

* Fix hash for DA.Internal.Interface.AnyView

* Prefix AnyView with CurrentSdk, add to golden for daml-script test

* Remove HasToAnyView

* Split AnyView into AnyView and AnyView.Types

* fix hash

* Remove unused StandaloneDeriving

* Add HasField instances (requires relevant workers)

* Accept desugaring test changes for removal of HasToAnyView

* Update daml-doc for removal/modification of HasToAnyView/HasFromAnyView

* Update StablePackage hash for DA.Internal.Interface.AnyView.Types
2022-10-25 11:49:32 +00:00
Nicu Reut
f550b69463
Reorganize the metrics package structure [PLEN-29] (#15312) 2022-10-25 10:05:40 +00:00
Remy
b0d840019b
[Script] Do not use type constructor in AnyInterfaceChoice anymore (#15188)
companion PR of digital-asset/ghc#137

CHANGELOG_BEGIN
CHANGELOG_END
2022-10-20 10:30:20 +00:00
pbatko-da
fd86551873
[DPP-1278] Shuffle party related domain classes (#15276)
changelog_begin
changelog_end

Status quo:
ledger-api-domain's domain object contained three classes related to parties:
 1. `PartyDetails`, the oldest, which didn't contain the metadata field and was used both in client and indexer code,
 2. `ParticipantPartyDetails`, added recently during the participant-local metadata extensions, similar to the `PartyDetails` above but additionally contains the metadata field,
 3. `PartyRecord` which held participant-local metadata extensions for a party.

Changes:
 1) `PartyDetails` gets renamed to `IndexerPartyDetails` and together with `PartyEntry` gets moved to participant-state-index Bazel package and is removed from client code,
 2) `ParticipantPartyDetails` gets renamed to `PartyDetails` and is now used in the client code instead.
 3) `PartyRecord` gets moved to participant-local-store Bazel package
2022-10-20 09:23:34 +00:00
Moisés Ackerman
6ef040743f
Support interface choices in daml ledger export (#15189)
* Rename test //daml-script/export/integration-tests/golden:{export-=>}values

* Switch 'daml_ledger_export_test' to use 'run' instead of 'run-legacy-cli-config'

* Extract 'encodeImports' from 'encodeModuleHeader'

* Sort import list in 'daml ledger export'

* Add 'dev' argument to 'daml_ledger_export_test'

* Add interfaceId to ExercisedSelector

* Extract 'encodeExercisedEvent' from 'encodeCmd'

* Split 'encodeCid' into 'encodeCid{Expr,Pat}'

* 'CreatedContract' field 'tplId' now has type 'TemplateId'

* Specialize CreatedContract{=>WithPath}

* 'treeEventCreatedConsumedCids' returns Seq[SimpleCreatedContract] instead of Set[ContractId]

* Change type of 'SimpleCommand' field 'contractId' to 'SimpleCreatedContract'

* Coerce ContractIds to underlying template type

* Use interface ContractId in encodeExercisedEvent if present

* Add test //daml-script/export/integration-tests/golden:interface-choices

* Fix encoding of getAnyChoiceTemplateTypeRep in daml-script converter

* Set getAnyChoiceTemplateTypeRep to interfaceId if available

* fromExercised uses choice instead of templateId to find subtree

fromExercised uses exercised.argument.templateTypeRep instead of exercised.contractId.templateId

Previously it used exercised.contractId.templateId, but now it uses
exercised.argument.getAnyChoiceTemplateTypeRep, which corresponds
to the TemplateTypeRep of the {template,interface} that defined the choice.

* TestData.Exercised now takes a more flexible TestData.Choice argument

* Add unit tests for encoding of exercise of interface choice

* Apply code review suggestions

* sealed {trait=>abstract class} CreatedContract

* Use List instead of Seq

* Use ::= instead of :+= and ++=

changelog_begin
- [Daml export] Added support for interface choices (#15189)
- [Daml export] Export.daml imports are now sorted alphabetically
changelog_end

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-10-19 10:43:04 +02:00
Remy
4318a2341b
[LF] Cleanup StablePackage object (#15250)
CHANGELOG_BEGIN
CHANGELOG_END
2022-10-19 08:06:49 +00:00
nickchapman-da
58727f5580
be explict about coerced type at each use of fromLedgerValue (#15252)
changelog_begin
changelog_end
2022-10-18 11:15:07 +01:00
nickchapman-da
d654321432
daml-script: support query by interface-id (#15234) 2022-10-18 09:32:46 +00:00
pbatko-da
61e85b19a2
[DPP-1278] Remove custom daml-script UserManagementStore (#15266)
changelog_begin
changelog_end
2022-10-17 20:58:41 +02:00
Nicu Reut
2f453a145c
Extract the testing metrics instance [PLEN-4] (#15192) 2022-10-10 18:52:49 +00:00
nickchapman-da
ef959deeac
[engine] improve stacktrace for daml-script InterpretationError (#15178)
* improve stacktrace for daml-script InterpretationError

changelog_begin
changelog_end

* adapt expected regexp
2022-10-06 15:54:50 +00:00
Moisés Ackerman
b26eab3d6c
Handle sums-of-products correctly in daml ledger export (#15152)
* Extract encodeVariant

* Add special case for encoding record members of variants

* Test special case for encoding record members of variants

* Test variant records in 'daml ledger export' golden test 'export-values'

* Update TODOs

* Add comments for untested cases in export-values golden test

changelog_begin
- [Daml export] Fixed an issue with the handling of sums-of-products (#14723)
changelog_end
2022-10-04 13:49:05 +02:00
Moisés Ackerman
b30e0a3844
Add non-docs golden test for daml ledger export (#15136)
* Extract example-export-client to //daml-script/export/integration-tests/example-export-client

changelog_begin
changelog_end

* Parametrize example-export-client with Daml script to export

* Parametrize example-export-client with parties

* Extract daml_ledger_export_test to daml-script/export/integration-tests/matches-docs/util.bzl

* Rename daml-script/export/integration-tests/{matches-docs=>golden}

* Rename //daml-script/export/integration-tests/golden:{example-export=>matches-docs}*

* rules_daml/daml.bzl:daml_compile now accepts dependencies

* Drop trailing whitespace in daml ledger export comment

* Add test //daml-script/export/integration-tests/golden:export-values-compare
2022-10-03 15:31:51 +02:00
azure-pipelines[bot]
319afd82d4
bump canton to 20220929 (#15138)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-09-30 09:00:55 +02:00
nickchapman-da
3180094987
[engine] avoid construction of unrestricted speedy expression applications (#15079)
Avoid construction of unrestricted speedy expression applications.SEApp (alias for SEAppGeneral)

- Replace occurrences of SEApp(General) to use SEAppAtomic, with SELet1 as required
- Add new helper SEApp for many cases where arguments are simple values.
- Rename the most general unrestricted constructor as SEAppGeneral_DEPRECATED. The only remaining use is by fromUpdateSExpr and fromScenarioSExpr, due to our unprincipled approach to stack-trace. See TODO in pushLocation. I hope to fix this in a future PR.
- Rename the slightly less unrestricted constructor as SEAppOnlyFunIsAtomic_DEPRECATED. The only call site being in Anf.scala (for the case when ANF is not performed). Maybe one day we can perform ANF in all cases, and hence remove this one remaining usage.
2022-09-26 14:33:51 +01:00
pbatko-da
ca81adeb3e
6 - Ledger API changes for UM/UP extensions for Hub [DPP-1211] (#14937)
changelog_begin

[Ledger API Specification]:
1. Add 'is_deactivated' attribute to participant users.
2. Introduce participant server's local metadata for parties and participant users consisting of:
 - a resource version for optional concurrent change control,
 - modifiable key-value based annotations.
3. Add experimental update RPCs for parties and participant users:
  - participant user's modifiable fields are: 'primary_party', 'is_deactivated', 'metadata.annotations',
  - party's modifiable fields are 'local_metadata.annotations'.
4. Discourage use of 'party_details.display_name' in favor of using party's metadata annotations.

changelog_end


Other notes:

- no-op updates are allowed,
- update paths are resource relative,
- as annotation deletion is by providing an key with the empty string value,
- as a corollary, only non-empty strings are valid annotation values.
2022-09-26 12:56:55 +00:00
mziolekda
41dc32a016
Remove reliance on implicit party allocation in CI tests [DPP-1234] (#15037)
* Remove reliance on implict party allocation in the authorization tests of the sandbox-on-x

CHANGELOG_BEGIN
CHANGELOG_END

* Remove the HOCON and cli config parameters

* Remove implicit party allocation from the Submission Service

* Remove support for implicit parties from the bridge

* Fix codegen reliance on implicit party allocation

* Fix daml script tests

* Fix trigger tests

* format security-evidence.md post rebase

* Fix json-api tests

* One more json-api test

* Fix haskell tests

* Corrections post-review

* Cosmetic improvements

* Fix race condition in party allocation handling
2022-09-22 10:20:53 +02:00
Stephen Compall
99a48557d3
deprecate interface library names; use new names downstream (#14856)
* new names in daml-script/runner

* new names in json-api

* new names in Scala bindings/codegen

* new names in Java bindings/codegen

* new names in daml-lf interpreter tests

* more new names in daml-script tests

* new names in navigator backend

* deprecate all iface symbols and old method names

CHANGELOG_BEGIN
- [Scala API] ``com.daml.lf.iface`` has been deprecated, as discussed
  further in
  `issue #14783 <https://github.com/digital-asset/daml/pull/14783>`__.
  Use the deprecation warnings as guidance to the new names.
CHANGELOG_END

* prefix cases in OrderingSpec

- suggested by @remyhaemmerle-da; thanks
2022-08-29 20:43:47 +00:00
Stephen Compall
f85f7816c7
rename interface library to api-type-signature; alias symbols (#14783)
* move interface directory to api-type-signature; change bazel target; move scala files

* rename iface package to typesig; rename EnvironmentInterface to EnvironmentSignature

* rename Interface to PackageSignature

* rename fromReaderInterfaces to fromPackageSignatures

* rename InterfaceReader to SignatureReader

* rename InterfaceReader to SignatureReader in deprecation note

* rename readInterface to readPackageSignature

* rename InterfaceReaderError to Error

* rename InterfaceReaderMain to SignatureReaderMain

* rename InterfaceType to PackageSignature.TypeDecl

* rename astInterfaces to interfaces

* rename astInterfaces to interfaces in PackageSignature

* rename findAstInterface to findInterface

* rename a couple arguments

CHANGELOG_BEGIN
- [Scala API] The "quasi-public" API in ``com.daml.lf.iface`` has moved
  to the new ``com.daml.lf.typesig`` package, with many accompanying
  name changes as documented in `issue #13669
  <https://github.com/digital-asset/daml/issues/13669>`__.

  Daml 2.5.0 or later will remove the old names, and also rename the
  Maven artifact from ``daml-lf-interface`` to
  ``daml-lf-api-type-signature``.  We recommend that users of this API
  use the deprecation guidance in 2.4.0 to port their applications
  before this happens.
CHANGELOG_END
2022-08-23 15:21:45 +00:00
Remy
48abfeb9dc
LF: distinguish template Id from interface Id in exercise command (#14755)
preliminary work for #14747

CHANGELOG_BEGIN
CHANGELOG_END
2022-08-19 14:00:40 +02:00
Moritz Kiefer
4cd96d2b56
Add performance warning to queryContractId & queryContractKey (#14754)
Turns out people use that when they have tens of thousands if not
hundreds of thousands of contracts and then I have to debug why their
scripts are slow.

changelog_begin
changelog_end
2022-08-18 17:59:46 +02:00
Moisés Ackerman
009c3c306b
Add interface instance syntax, including retroactive interface instances (#14715)
* Extract qualifyLocally in LFConversion

* Update ghc rev

* Add parent type argument to interface instance desugaring types

* Check interface instance parent in LFConversion

* Convert interface instances in interface declarations

* Update daml-test-files to use 'interface instance' syntax

* Update other tests to use 'interface instance' syntax

* Update interface reference docs to use 'interface instance' syntax

* Update other files to use 'interface instance' syntax

* Add todo in DA.Daml.LF.Ast.Pretty

* Add daml-test-files for retroactive interface instances

changelog_begin
changelog_end
2022-08-17 12:06:59 +00:00
Carl Pulley
f65e7f54c7
Adds verified configuration and testing to issue #14562
* Adds verified configuration and testing to issue #14562

CHANGELOG_BEGIN

* DAML Script Runner: DAR upload code in DAML script runner moved to integration tests.

CHANGELOG_END
2022-08-10 23:05:55 +01:00
dylant-da
0d37134bc2
Change placeholder unit viewtypes to empty records (#14656)
* Update views in integration-v1dev to be EmptyInterfaceView instead of ()

* Update expected desugared daml for `EmptyInterfaceView`

* Update compiler Shake / DataDependencies viewtypes to EmptyInterfaceView

* Add record viewtypes to docs, update docs

* Add empty records to daml-lf, language-support, ledger, trigger tests

* Qualify EmptyInterfaceView in ledger semantic Interface tests

* Fix imports for EmptyInterfaceView in IIou / CIou / Transferrable

* empty changelog commit

CHANGELOG_BEGIN
CHANGELOG_END

* Qualify EmptyInterfaceView import

* Fix imports of EmptyInterfaceView in TypeScript codegen tests

* Accept Interface doc changes

* Add EmptyInterfaceView to DataDependencies tests

* Remove missing interface viewtype test - all interfaces must have views

* Replace all EmptyInterfaceView with EmptyInterfaceView {}
2022-08-10 16:45:23 +00:00
nickchapman-da
6b80715dc9
make srcloc test less fragile (#14680)
changelog_begin
changelog_end
2022-08-10 14:02:27 +00:00
Carl Pulley
4f7fb45dd1
DAR upload code in DAML script runner moved to integration tests
* Fixes #14562

CHANGELOG_BEGIN

* DAML Script Runner: DAR upload code in DAML script runner moved to integration tests.

CHANGELOG_END
2022-08-09 15:24:07 +01:00
dylant-da
8e8e0dabdf
Convert viewtype and view methods to LF (#14456)
* Add DA_Internal_Interface to convertTypeDef exclusion check

* Move desugared types/values for interface views into DA.Internal.Desugar

* Convert viewtype and view method declarations

* Typecheck view types and view declarations

* Add unit viewtypes to InterfaceChoiceCollision tests

* Add unit viewtypes to more compiler/damlc tests

* Modify empty interfaces/implements to have viewtypes/views

* Add unit viewtypes to remaining Interface tests

* Test for error thrown when viewtype not specified

* Fix daml-lf/ interface tests to use new syntax / unit views

* Add placeholder view of type Unit to TestInterfaces

CHANGELOG_BEGIN
CHANGELOG_END

* Fix typescript interface tests with unit viewtype

* Add unit viewtype to Java & Scala codegen

* Add unit viewtype to triggers tests interface

* Add unit viewtypes to ledger/test-common

* Add unit viewtypes to ledger-service/http-json

* Fix some damlc tests

* Use viewtype syntax in InterfaceViewNonSerializable test

* Remove HasInferfaceView instances in convertBind

* Add unit view to QualifiedInterface.daml test

* Generate HasInterfaceView instances in DataDependencies

* Add unit viewtypes and views to compiler/damlc/tests

* Document reconstruction of HasInterfaceView

* Move desugared types/values for interface views into DA.Internal.Desugar

* Add desugarable function view w/ EViewInterface desugaring

* Remove templateName and viewtype from generated EViewInterface

* Update desugared-daml

* Proof of concept: use _view -> EViewInterface prim via HasInterfaceView

* Move view, HasInterfaceView to DA.Internal.Interface

* Update desugared-daml tests

* Stop removing and re-generating HasInterfaceView instances

* Do not generate docs for generated "_view_" methods

* Report errors with interface TypeConNames prettily

* Fix InterfaceViewNotSpecified @ERROR to reflect new error text

* Don't import magic `view` method from Prelude to avoid name clash

* Update shake interface goto definition test locations

* Temp disable view spec tests, will re-implement views in speedy

* Add unit viewtype to Java code snippet docs

* Update Interface syntax docs for views

* Add unit viewtype to Transferrable.daml

* Add back "empty" interface implementation to interfaces.rst

* Re-enable view tests by having _view methods on InterfaceViews.daml file

* Remove deprecated commented-out view desugaring code
2022-08-03 16:23:38 +01:00
azure-pipelines[bot]
df139c6eb1
bump canton to 20220718 (#14468)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-07-19 07:03:06 +00:00
nickchapman-da
bbfcc55af7
[engine] Transmit completed transaction via SResultFinalValue. (#14416)
* Transmit completed transaction via SResultFinalValue.

changelog_begin
changelog_end

* remove spurious mods

* mark two commented-out tests with TODO 14431

* address small comments

* rename: SResultFinalValue --> SResultFinal
2022-07-18 09:45:37 +00:00
Sergey Kisel
2e18276b1a
Unify TlsConfiguration between SDK and canton [DPP-1113] (#14349)
* Unify TlsConfiguration between SDK and canton [DPP-1113]

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-14 16:58:59 +02:00
Carl Pulley
cfaa5883d6
Testing infrastructure for disclosed contracts
CHANGELOG_BEGIN

* Changes to facilitate testing explicit disclosure under Engine/speedy-level tests for explicit disclosure #14227.

CHANGELOG_END
2022-07-07 14:23:54 +01:00
Sergey Kisel
e151090cf3
Introduction of HOCON configuration for SoX [DPP-1033] (#14029)
* Introduction of HOCON configuration

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-05 15:35:16 +02:00
Sergey Kisel
f9521f27eb
Accept new form of JWT tokens [DPP-1102] (#14323)
* Accept new form of jwt tokens [DPP-1102]

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-04 17:41:08 +02:00
Moisés Ackerman
ba9abf3c5f
Use the appropriate daml-script for each Script (#14321)
* Add failing test

* Overload daml-script 'Runner.run' to work directly with 'PureCompiledPackages'

* Use new daml-script 'Runner.run' in scenario-service

changelog_begin
* data-dependencies: fixed an issue with the handling of multiple versions of the daml-script package (#14291)
changelog_end

Co-authored-by: Remy <remy.haemmerle@daml.com>
2022-07-04 08:26:12 +00:00
Remy
52ec65040f
[Engine] Rename values/arguments of type PackageInterface (#14305)
to avoid confusion with Daml interface.

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-01 15:38:04 +02:00
Robin Krom
36b39aca7b
Move disclosed contract logic to speedy (#14288)
* Move disclosed contract logic to speedy

This moves the disclosed contract logic from the engine to speedy.

Fixes #14090.

* back to versioned contract instances

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-01 08:40:10 +00:00
Sergey Kisel
6a80a1a82f
Removal of sandbox-classic module and binary (#14201)
* Removal of sandbox-classic module and binary

CHANGELOG_BEGIN
CHANGELOG_END
2022-06-21 11:09:51 +02:00
Sergey Kisel
a6d6b7c324
Remove AuthServiceConfig from StandaloneApiServer (#14133)
CHANGELOG_BEGIN
CHANGELOG_END
2022-06-09 19:39:04 +02:00
Sergey Kisel
1afd0bf479
Sandbox Classic dependency removal from daml-script integration test (#14128)
* Sandbox Classic dependency removal from daml-script integration test

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2022-06-08 15:09:08 +00:00
Sergey Kisel
18a6f30dc3
daml-script test removal dependency to sandbox-classic (#14121)
CHANGELOG_BEGIN
CHANGELOG_END
2022-06-08 13:33:08 +00:00
Sergey Kisel
1d8f195438
Sandbox Classic Removal in Tests (#13934)
CHANGELOG_BEGING
CHANGELOG_END
2022-06-07 19:54:52 +00:00
Remy
7638e086ae
Script: infer the typeId of Choice in daml (#13971)
part of #13653

goes with digital-asset/ghc#122

CHANGELOG_BEGIN
CHANGELOG_END
2022-06-02 14:02:12 +00:00
Stephen Compall
96a6fe62e4
choice name overloading in lf/interface (#13938)
* introduce TemplateChoices to mediate template choice resolution
* if any resolutions fail in EnvironmentInterface, discard the template's resolution
* if any resolutions fail in Interface, discard the remaining unresolved

CHANGELOG_BEGIN
CHANGELOG_END
2022-05-31 08:41:48 -04:00
Remy
76eabe613e
Release Daml-script runner (#13980)
CHANGELOG_BEGIN
CHANGELOG_END
2022-05-25 15:33:21 +02:00
Remy
ea0d101913
Interface: Rename fixedChoice to choice (#13883)
CHANGELOG_BEGIN
CHANGELOG_END
2022-05-17 12:03:53 +02:00
Remy
6f6a3052a1
Repurpose templateId in ExerciseCommand and add interfaceId in ExerciseEvent (#13660)
part of #13653

CHANGELOG_BEGIN
CHANGELOG_END
2022-05-16 15:30:07 +00:00
azure-pipelines[bot]
9ae125eeae
bump canton to 20220505 (#13805)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-05-06 12:52:22 +02:00
Remy
615d2e6206
Daml-script: marking MultiParticipantIT as falky in windows (#13739)
The problem is tracked by #13737.

CHANGELOG_BEGIN
CHANGELOG_END
2022-04-28 16:09:23 +00:00
Nicu Reut
a792de39a5
Update scalafmt to 3.5.1. (#13584)
CHANGELOG_BEGIN
CHANGELOG_END
2022-04-28 09:57:04 +00:00
Remy
7dfbf58147
Daml-script: Use curly braces notation for records in ledger export (#13634)
instead of `with` notation

fixes #13620

CHANGELOG_BEGIN
- [Daml-script] fix a bug in daml-script export formatting
  See https://github.com/digital-asset/daml/issues/13620
CHANGELOG_END
2022-04-26 16:36:18 +02:00
Remy
0be64a8dd0
LF: Structure stable packages (#13682)
CHANGELOG_BEGIN
CHANGELOG_END
2022-04-26 12:47:06 +00:00
Moisés Ackerman
482fb040a4
Ensure MultiTest.waitForCid actually waits (#13698)
changelog_begin
changelog_end
2022-04-26 12:17:44 +00:00
Hubert Slojewski
35b68962e8
Remove remaining kvutils dependencies [KVL-1245] (#13695)
CHANGELOG_BEGIN
CHANGELOG_END
2022-04-26 13:42:18 +02:00
Remy
79af226966
LF: Add a convenient companion object for ArrayList (#13684)
CHANGELOG_BEGIN
CHANGELOG_END
2022-04-26 12:36:36 +02:00
Remy
2894038b04
Daml-Script: fix MultiTestIT test (#13692)
CHANGELOG_BEGIN
CHANGELOG_END
2022-04-26 08:05:26 +00:00
Moisés Ackerman
c61326884e
daml-script/runner: leave application id blank when an access token is provided but an application id isn't (#13654)
changelog_begin
changelog_end
2022-04-21 17:51:35 +02:00
Gary Verhaegen
e085a4932e
bump canton (#13574)
I'm considering automating this, but thought I'd do it manually once
first.

CHANGELOG_BEGIN
CHANGELOG_END
2022-04-12 15:23:11 +00:00
Remy
e94dc3eae8
Allow LF dev for daml script tests (#13455)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-30 10:15:17 +02:00
Rafael Guglielmetti
f24a39d2df
Use Canton 2.1.0-SNAPSHOT (20220328) for conformance tests (#13446)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-29 17:55:21 +02:00
Remy
f7d1901a5c
LF: split Command into ApiCommand and ReplayCommand (#13323)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-21 14:07:41 +01:00
Moritz Kiefer
1a66bb998b
Bump port retries in Canton fixture (#13235)
changelog_begin
changelog_end
2022-03-09 19:18:10 +00:00
Stefano Baghino
b8fd1747e8
Remove mentions of Daml connect (#13230)
Daml Connect is no longer a thing. I replaced usages with
either Daml or Daml SDK.

changelog_begin
changelog_end
2022-03-09 18:18:51 +00:00
Moritz Kiefer
d36123bf03
Bump Canton startup timeout to 2min (#13222)
It looks like 1min is too small under load.

changelog_begin
changelog_end
2022-03-09 13:42:15 +00:00
Gary Verhaegen
dfa648f585
hunt down DAML better (#13195)
Process:

- `git ls-files -z | xargs -0 -n 100 sed -i --follow-symlinks 's/DAML/Daml/g'`
- `git add -p`
- `git restore -p`
- Check there is no unstaged change left.

To review:

- Check for false positives by carefully reviewing the diff in this PR.
- Check for false negatives with `git grep DAML`.
- Quicker check for fals positives:

```
git grep DAML | grep -v migration | grep -v DAML_
```

Fixes #13190

Note: This is the "second half" of #13191, which failed to cover all the
remaining DAMLs because of:

```
$ git ls-files | grep "'"
compiler/damlc/tests/daml-test-files/MangledScenario'.daml
```

CHANGELOG_BEGIN
CHANGELOG_END
2022-03-08 17:04:58 +01:00
Moritz Kiefer
e44b6ef61f
Switch daml script multi-participant tests to Canton (#13171)
* Switch daml script multi-participant tests to Canton

ledger-on-memory is moving repos together with kvutils so this doesn’t
work anymore. Sandbox on X does not (yet) have multi-participant
support so this is our only option.

At a later point, we may want to switch back to sandbox on x once it
supports multiple participants.

changelog_begin
changelog_end

* more startup attempts

changelog_begin
changelog_end
2022-03-07 20:34:17 +01:00
Moisés Ackerman
2dbd91aab9
Interface methods can use plain function declaration syntax (#13102)
* Update 'implements' blocks to use new syntax

* Add InterfaceSyntax test case

* Add InterfaceMultipleMethodDeclsError test case

* Add InterfaceDifferentNumArgsError test case

changelog_begin
changelog_end
2022-03-02 15:59:01 +00:00
Remy
e834a7b85c
Triggers: Connect Logging context from Triggers to the Speedy. (#13009)
Follow up of #12976.
fixes #12208

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-22 18:28:49 +01:00
Remy
ac3d9a4647
LF: Add LoggingContext to Speedy Machine (#12976)
This advances the state of #12208

CHANGELOG_BEGIN
CHANGELOG_END
2022-02-21 13:34:46 +01:00
Moritz Kiefer
756b8bc406
Raise akka log-lveel for CoordinatedShutdown in daml-script (#12919)
Trying to work around https://github.com/akka/akka/pull/30944/files
having introduced rather confusing log messages in Daml script.

There are probably some other tools where we might want to do this but
I think daml script is the main one as the other ones are long-running
services where you don’t expect to shutdown the actor system during
regular operatino.

changelog_begin
changelog_end
2022-02-15 09:07:13 +01:00
tudor-da
307931d5b4
Extracted kvutils Config to //leger/ledger-runner-common [DPP-865] (#12889)
* Extracted kvutils Config to //leger/ledger-runner-config

changelog_begin
changelog_end

* Sandbox-on-X logback.xml does not depend on the kvutils/app one

* Remove unused dependencies

* Add copyright header back

* Remove dependency of SoX on kvutils
2022-02-14 13:52:06 +00:00
Moritz Kiefer
d6e6c568fe
Fold daml test-script under daml script --all (#12895)
I tried to keep the changes somewhat minimal and reuse what is already
there. I think there is a fair amount of cleanup we can do afterwards
but hopefully this way it’s easier to review.

fixes #12837

changelog_begin

- [Daml Script] `daml test-script` has been replaced by `daml script
  --all`. The option to spin up a ledger automatically has been
  removed and you always have to specify one.

changelog_end
2022-02-14 14:23:21 +01:00
Moritz Kiefer
0fb0bf2f52
Disable implicit party allocation in Daml Studio (#12839)
* Disable implicit party allocation in Daml Studio

fixes #12058

This matches what sandbox does in 2.0 so it reduces a source of
inconsistency and potential confusion.

changelog_begin
changelog_end

* Update compiler/scenario-service/protos/scenario_service.proto

Co-authored-by: Remy <remy.haemmerle@daml.com>

Co-authored-by: Remy <remy.haemmerle@daml.com>
2022-02-09 17:47:40 +00:00
Moritz Kiefer
857dff9cd6
Remove option to spin up ledger in-process in daml test-script (#12842)
* Remove option to spin up ledger in-process in daml test-script

This drops the dependency on the kv sandbox which we need to kill for
2.0.

part of #12837

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2022-02-09 16:18:40 +01:00
nickchapman-da
b60a7ef657
belt and braces to ensure no infinite loop (#12770)
* belt and braces

changelog_begin
changelog_end

* comment explaining loop termination for GrpcLedgerClient.listAllUsers

* fix loop termination condition + comment

* update comment
2022-02-08 11:53:10 +00:00
tudor-da
14a0459f0a
SandboxNextFixture replaced by SOX-based SandboxFixture (#12654)
* SandboxNextFixture replaced by Sandbox-on-X based SandboxFixture

changelog_begin
changelog_end

* Some fixed tests

* No direct dependencies on //ledger/sandbox:sandbox and //ledger/sandbox:sandbox-scala-tests-lib

* Fix after rebase

* Rename SandboxFixture and add a missing dep

* Generate valid party names if hint is empty

* Smaller maxInboundMessageSize

* Added test for empty display name

* SandboxServer is a ResourceOwner
* Uses execution context passed as an input for resource management
* Fixes flaky FlywayMigrations issue with null Thread.currentThread.currentClassLoader
* SandboxServer simplification returns Port instead of ApiServer

* Dedicated PMAllocateWithoutDisplayName for non-Canton ledgers
* Created since Canton does not return empty display names
2022-02-07 09:25:22 +01:00
nickchapman-da
56140569f8
Adapt daml-script to paginated listUsers. (#12710)
* Adapt daml-script to paginated listUsers.

changelog_begin
changelog_end

* adapt testUserListPagination to rename listUsers -> listAllUsers
2022-02-04 11:05:48 +00:00
pbatko-da
7137b46543
[User management] Use pagination for listing users [DPP-840] (#12610)
CHANGELOG_BEGIN
Ledger API Specification: UserManagementService.ListUsers is now using pagination
CHANGELOG_END
2022-02-03 20:32:50 +01:00
nickchapman-da
cd16eb740e
Rename: listUsers --> listAllUsers (within daml-script) (#12734)
* Rename: listUsers --> listAllUsers (within daml-script)

changelog_begin
changelog_end

* fix/rename in newly add def: clearUsers

* improve comment doc
2022-02-03 13:07:09 +00:00
Victor Peter Rouven Müller
aa45f48798
Upgrade to Scala 2.13.8 (#12506)
* Upgrade to Scala 2.13.8

changelog_begin
changelog_end

* Update hash for scala in nixpkgs

* update more hashes for scala upgrade

* Fix most warnings etc.

* Fix remaining errors etc.

* Fix formatting

* Resolve last errors hopefully

* Fix ledger api common build file

* Combine imports & revert accidental change that broke the CI run

* Rename exporting vals to scriptExport & minimize diff

* Remove more wrong changes

* moved warning around
2022-02-03 09:05:31 +00:00
Moritz Kiefer
7a5172c025
Make daml-script docs work with a Canton sandbox (#12695)
* Make daml-script docs work with a Canton sandbox

This addresses a few issues:

1. The `--wallclock-time` option does not work.
2. Display names are garbage so dropped the "solution" for
`listKnownParties`.
3. We cannot allocate fixed parties even with
`allocatePartyWithHint`. Switched to `--output-file` and user mgmt.

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* debug windows

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* debug scriptexample

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* Update docs/source/daml-script/index.rst
2022-02-02 21:01:44 +00:00
Moritz Kiefer
0494731928
Adjust response type for script JSON API user mgmt requests (#12683)
This broke due to concurrent merges of #12646 and #12578

changelog_begin
changelog_end
2022-01-31 19:17:00 +00:00
nickchapman-da
54c427f849
Expose documentation for user-management functions in daml-script. (#12674)
changelog_begin
changelog_end
2022-01-31 17:01:22 +00:00
nickchapman-da
3d3d84fa6f
User management in daml-script over json API (#12646)
* WIP

changelog_begin
changelog_end

* small cleanup

* use symbolic names for status codes instead of 404/409

* improve recover methods to have them wrap the success case with Some
2022-01-31 15:28:10 +00:00
nickchapman-da
4a6729eb70
Fix a bug in user management caching (#12605)
* provoke bug using daml-script

* fix bug in user management caching

changelog_begin
changelog_end

* add test case (#12606)

Co-authored-by: pbatko-da <pawel.batko@digitalasset.com>
2022-01-26 20:15:21 +00:00
Stefano Baghino
f1cd4b1c7c
Remove dependencies on compatibility libraries (#12548)
Continues the work started in https://github.com/digital-asset/daml/pull/12543

These libraries were only needed to transition from Scala 2.12 to 2.13
and are no longer useful as all the necessary items are now available
in Scala 2.13.

changelog_begin
changelog_end
2022-01-24 18:04:07 +00:00
Stefano Baghino
aec3390904
Replace silencer plugin with built-in warning configuration (#12543)
Since Scala 2.13.2, Scala introduced built-in support to
manage warnings in a more granular fashion, thus making
the silencer plugin we are currently using no longer
strictly useful. Removing compiler plugins also removes
friction from migrating to Scala 3 in the future. As a
cherry on top, the built-in warning configuration also
allows to check whether a `@nowarn` actually does
anything, allowing us to proactively remove unused
warnings should the need arise.

[Here][1] is s a blog post by the Scala team about it.

Warnings have been either solved or preserved if useful,
trying to minimize the scope (keeping it at the single
expression scope if possible). In particular, all
remaining usages of the Scala Collection API compatibility
module have been removed.

Using the silencer plugin also apparently hid a few
remaining usages of compatibility libraries that were used
as part of the transition from Scala 2.12 to Scala 2.13
that are no longer needed. Removing those warnings
highlighted those.

changelog_begin
changelog_end

[1]: https://www.scala-lang.org/2021/01/12/configuring-and-suppressing-warnings.html
2022-01-24 15:01:35 +00:00
Moritz Kiefer
688f1e1e0b
Drop v0 contract ids (#12464)
* Drop v0 contract ids

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2022-01-20 15:28:27 +00:00
nickchapman-da
ebd3827c4a
Make UserId properly opaque by defining it as a variant (#12476)
* Make UserId properly opaque by defining it as a variant instead of as a record.

changelog_begin
changelog_end

* hand coded Show instance for UserId

* rename: userName --> userIdToText
2022-01-19 17:53:44 +00:00
nickchapman-da
6fbaac467f
Remove user-management error cases from scenario-service proto. (#12460)
* Remove user-management error cases from scenario-service proto.

changelog_begin
changelog_end

* remove Error.UserManagement

* remove UserManagememtError

* simp

* meh... done over by scala's poor excuse for a type system
2022-01-19 10:44:04 +00:00
nickchapman-da
0c13a4f1fd
Error handling for User Management exposed via daml-script (#12416)
* Error handling for User Management exposed via daml-script

changelog_begin
changelog_end

adapt ScriptTest.daml to new user-management interface

adapt create-daml-app Setup.daml to new user-management interface

* Add deriving Ord for UserId

* change example of invalid user-id char to "%" from "." (which is no longer illegal)

* recover/reify ALREADY_EXISTS from GrpcLedgerClient.createuser

* fix testcase expected order of users from daml-script listUsers

* adapt create-saml-app Setup.daml to changed interface of user-management

* reinstate sort lost in merge

* sort user in ScriptService user-management test

* improve comment for error foobar hack

* improve doc comment for validateUserId

* use upper case as test example for invalid user-id
2022-01-18 12:58:51 +00:00
Stefano Baghino
4af48bbccc
Split channel configuration from LedgerClientConfiguration (#12433)
* Split channel configuration from LedgerClientConfiguration

Fixes #12391

The channel configuration now has to be provided separately from the
configuration specific to the ledger client. In this way we avoid
situations where the builder is provided with some configuration
that gets overridden.

changelog_begin
[Scala bindings] The channel configuration has been split from the
LedgerClientConfiguration class. Provide the gRPC channel specific
configuration separately or use a builder. The channel configuration
no longer overrides the builder.
changelog_end

* Fix compilation issues in //ledger-service/...
2022-01-18 10:03:33 +00:00
Moritz Kiefer
b996e5e3fa
Support user tokens in Daml Script over JSON API (#12368)
fixes #12349

changelog_begin
changelog_end
2022-01-17 18:45:31 +01:00
Moritz Kiefer
b21c960232
Make Daml Script user mgmt tests order independent (#12409)
no specific order guaranteed so let’s not assume one.

changelog_begin
changelog_end
2022-01-13 17:51:12 +00:00
Simon Meier
82bdfa5222
ledger-api-auth: remove SupportedJWTPayload (#12343)
* ledger-api-auth: make AuthServiceJWTPayload parse both user and custom daml access tokens

changelog_begin
changelog_end
2022-01-13 16:12:13 +00:00
Moritz Kiefer
bb8f455e2d
Add test coverage for validateTokenParties (#12370)
This is pure refactoring & adding some tests in preparation
for #12368

changelog_begin
changelog_end
2022-01-13 14:40:09 +01:00
Samir Talwar
9c77a3c94b
kvutils: Remove the DAR upload parameters from the runner. (#12366)
* kvutils: Remove the DAR upload parameters from the runner.

No production ledger needs to upload DARs on participant startup; this
feature is primarily for users of Sandbox. The feature never worked in
the case of multiple participants and was only ever used in testing.

This also removes the associated functionality from Sandbox-on-X as they
share a configuration object. Hopefully this won't be an issue.

Some tests were using this feature, so I have updated them to upload the
DARs through the PackageManagementService instead.

CHANGELOG_BEGIN
CHANGELOG_END

* kvutils: Remove the `writePackagesService` factory constructor.

We no longer use it.

* daml-lf/engine: Revert an unnecessary change.

* daml-script/test: Shut down the channel after uploading the DAR.
2022-01-12 12:57:02 +01:00