Commit Graph

8836 Commits

Author SHA1 Message Date
Remy
30300fdac6
LF: Revert #7742 (#12354)
Following #12338 which merges the two implementations of the
structural record projection introduced by #7740, this PR merges the two
implementations of the structural record introduced by #7742.

However, this PR does not try to cache the field index as it is done

1- unlike what it is suggested by commit message of #7742, the update
   has a linear complexity anyway, as it has to copy the whole struct.

2- the compiler does not produce any structural record updates

As result the PR is basically a revert of #7742.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-11 15:53:10 +00:00
Moritz Kiefer
631aa5cc76
Create a new split release (#12351)
This time (assuming it succeeds which it won’t) including artifactory
& EE SDK.

changelog_begin
changelog_end
2022-01-11 15:22:22 +00:00
tudor-da
8a2449b87f
TagWithLedgerEndSpec (#12346)
changelog_begin
changelog_end
2022-01-11 15:12:52 +00:00
Moritz Kiefer
b84558732a
Make create-daml-app setup idempotent (#12320)
* Make create-daml-app setup idempotent

changelog_begin
changelog_end

* review feedback

changelog_begin
changelog_end
2022-01-11 15:51:19 +01:00
tudor-da
98b7ad7bab
[SoX unit testing] Refactored for testing [DPP-841] (#12337)
* Refactored for testing
* Global state of ConflictCheckingLedgerBridge is moved to sequence
* `validateParties` is moved to sequence in order to perform all conflict checking operations
that rely on the mutable state inside the single-threaded `sequence` stage

CHANGELOG_BEGIN
CHANGELOG_END

* Extract conflict checking stages logic in own files

* Move to validate package

* Arrange comments

* Addressed Robert's review comments
2022-01-11 14:35:04 +00:00
nicu-da
a7c51efa7a
version-service - Move command deduplication feature descriptors into the experimental features [kvl-1218] (#12318)
Co-authored-by: fabiotudone-da <fabio.tudone@digitalasset.com>
Co-authored-by: Simon Meier <simon@digitalasset.com>
2022-01-11 14:26:19 +00:00
Robert Autenrieth
421155738f
Add string interning benchmark (#12237)
* Add string interning benchmark

changelog_begin
changelog_end

* Update copyright header
2022-01-11 14:48:29 +01:00
mziolekda
fafb86b389
Add static time feature flag and test tool coverage [DPP-849] (#12336)
* Add static time feature flag and test tool coverage

CHANGELOG_BEGIN
CHANGELOG_END

* incorporate the review feedback
2022-01-11 12:21:05 +00:00
Remy
7ec55d7f33
LF: Cache field index inside structural record projection builtin (#12338)
Currently we have two implementations for the projection of structural
record.

1- The first implementation takes as parameter the index of the
projected field and is therefore constant. This implementations is
used when the type checking is enable, as the index cannot be directly
inferred from the AST and must hence be filled in by the DAML-LF type
checker.

2- The second implementation takes as parameter the name of the
projected field and is therefore logarithmic as the field must be
lookup by binary search at each call. This version is used when the
type checking is disable as the index cannot be inferred without type
inference.

In this PR, we modify the second implementation so it cache the index
at the first call, hence avoiding the recomputation during further
calls.  In this way we reach an amortized constant complexity.  The
first implementation is decommissioned in benefit of the second one.

The advantages of this approach are:

- We have a unique implementation of the projection, so the behavior
  of a program is the same whenever the type checking is on or off.

- The AST for structural projection is immutable.

Benchmarks show no performance differences when the type checking is on.

Based on an idea by @sofiafaro-da.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-11 13:03:21 +01:00
Victor Peter Rouven Müller
4deee3fd19
Add get & delete user endpoints (#12332)
changelog_begin

- [HTTP-JSON] Added endpoints:
    - /user/delete that if called with GET will delete the current user & with POST will delete the user specified via the payload
    - /user that if called with POST will now return user info about the user specified via the payload

changelog_end
2022-01-11 12:01:02 +00:00
Moritz Kiefer
79428bb7b4
Add artifactory & SDK EE artifacts to split-release process (#12345)
Apologies for doing two things in one PR but they seemed somewhat
entangled.

For artifactory we follow the approach we use for Maven artifacts and
publish there directly.

For the SDK EE tarball, we just throw it in the split-release
directory and then the assembly repo can pick it up.

changelog_begin
changelog_end
2022-01-11 12:55:14 +01:00
Victor Peter Rouven Müller
e4dbde3f18
[JSON-API] Add list users endpoint (#12323)
* Add list users endpoint

changelog_begin

- [HTTP-JSON] Added an endpoint /users which returns the available users on the ledger.

changelog_end

* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/domain.scala

Co-authored-by: Stephen Compall <stephen.compall@daml.com>

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-01-11 11:18:17 +00:00
nicu-da
50deee3ef1
[ledger-api-test-tool] - Merge KVCommandDeduplicationIT and CommandDeduplicationIT (#12257)
changelog_begin
[ledger-api-test-tool] - Merge command deduplication ledger API tests (`KVCommandDeduplicationIT`, `CommandDeduplicationIT`) into a single suite(`CommandDeduplicationIT`) which uses feature descriptors to handle different participant behaviors
changelog_end
2022-01-11 01:53:55 -08:00
Remy
c7c86d2168
LF: Benchmark for structural record projection (#12329)
CHANGELOG_BEGIN
CHANGELOG_END
2022-01-11 10:36:48 +01:00
Moritz Kiefer
d653ca9c21
Release SDK 1.18.1 RC (#12339)
changelog_begin
changelog_end
2022-01-11 09:12:21 +01:00
Marton Nagy
c8753b527d
Switch to H2 BINARY LARGE OBJECT to work around a limitation with BYTEA (#12334)
CHANGELOG_BEGIN
CHANGELOG_END
2022-01-11 09:06:12 +01:00
azure-pipelines[bot]
fdee5cb256
update NOTICES file (#12342)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2022-01-11 08:44:08 +01:00
akshayshirahatti-da
50de6e3639
[JSON-API] HOCON config json api (#12236)
* Change heartBeatPer to more intuitive naming of heartbeatPeriod

CHANGELOG_BEGIN
CHANGELOG_END

* Initial changes to add HOCON config for json_api

CHANGELOG_BEGIN
CHANGELOG_END

* avoid IllegalArgumentException noise

* use named arguments in big config conversion

* Changes include
 - tests for a full http-json-api config file
 - logging config and non-repudiation config is still specified via cli args.
 - config readers for MetricsReporter

* Add defaults to WebsocketConfig case class to allow partially specifying fields on typeconf file

* changes to the JwtVerifierBase config reader and equivalent test

* message already describes the value

* replace manual succeed/fails with scalatest combinators

* use qualified imports for WebsocketConfig defaults

* add back autodeleted empty lines

* collapse two lists of token verifiers into one

* add new line to config files

* rename dbStartupMode to startMode to keep consistent with cli option and for easy documentation

* Changes to daml docs to specify ways to run JSON-API by supplying a HOCON config file.

CHANGELOG_BEGIN
JSON-API can now be started supplying a HOCON application config file using the `--config` option.
All CLI flags except `logging` and `non-repudiation` one's are now deprecated and will be cleaned up in some future releases.
CHANGELOG_END

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-01-10 23:07:07 +00:00
Gary Verhaegen
9f5a2f9778
Fix terraform (#12333)
Our Terraform configuration has been slightly broken by two recent
changes:

- The nixpkgs upgrade in #12280 means a new version of our GCP plugin
  for Terraform, which as a breaking change added a required argument to
  `google_project_iam_member`. The new version also results in a number
  of smaller changes in the way Terraform handles default arguments, which
  doesn't result in any changes to our configuration files or to the
  behaviour of our deployed infrastructure, but does require re-syncing
  the Terraform state (by running `terraform apply`, which would
  essentially be a no-op if it were not for the next bullet point).
- The nix configuration changes in #12265 have changed the Linux CI
  nodes configuration but have not been deployed yet.

This PR is an audit log of the steps taken to rectfy those and bring us
back to a state where our deployed configuration and our recorded
Terraform state both agree with our current `main` branch tip.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-10 21:56:47 +00:00
Stefano Baghino
face7d303b
Remove unused line as reported in #12325 (#12331)
Reported by @realvictorprm in b4896c84af (r781264686)

changelog_begin
changelog_end
2022-01-10 12:13:03 -05:00
Moritz Kiefer
37680be310
Add sha256sum to dev-env (#12328)
Not quite sure what changed but our macos builds are unhappy and this
fixes it in my tests.

changelog_begin
changelog_end
2022-01-10 17:45:33 +01:00
Kamil Bozek
83d2d98e89
Release SDK v2.0.0-snapshot.20220110.8812.0.3a08380b (#12327)
CHANGELOG_BEGIN
CHANGELOG_END
2022-01-10 17:24:03 +01:00
Sofia Faro
ca33990005
Use canton port file in daml start and tests. (#12324)
changelog_begin
changelog_end
2022-01-10 15:14:54 +00:00
Moritz Kiefer
c8bbeed0d2
Switch to daml-data gcs bucket for split-releases (#12322)
This is a private bucket which allows us to publish EE artifacts.

We could separate public from private artifacts but keeping everything
in a single location is easier to manage.

changelog_begin
changelog_end
2022-01-10 15:29:26 +01:00
Simon Maxen
3a08380b44
Add report metering protobuf definition [DPP-815] (#12303)
* Add report metering protobuf definition

changelog_begin
Added experimental GRPC endpoint for the reporting of metering 
changelog_end

* Update with review comments

* add changes from joint review by Simon and Simon :D

* Update with review comments

* Update with review comments

Co-authored-by: Simon Meier <simon@digitalasset.com>
2022-01-10 14:05:17 +00:00
Moritz Kiefer
0793bdf744
Upgrade h2 to version 2.0.206 (#12307)
* Upgrade h2 to version 2.0.206

changelog_begin
changelog_end
2022-01-10 14:22:40 +01:00
Simon Meier
6dd0eb774e
ledger api server: support auth0 usernames (#12308)
* ledger api: support Auth0 user names in user management

See the `IdString.UserId` and `IdString.ApplicationId` comments wrt the
character classes being introduced.

Many thanks to @cocreature for helping with deciding on the exact
restrictions of user-ids.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-10 12:58:43 +00:00
Remy
8f71669b62
Improve ledger export replay (#12191)
This PR

- allows the tool to extract the program directly from the
  export instead.

- make the tool more robust for large export.

  Instead of enumerated all the the transaction present in the ledger
  export and then selecting the one to be benchmark, this new version
  look only for the one choice to be benchmark.

  This make the tool more capable to handle large ledger export as
  - it has to maintain less data in memory
  - it can stop as soon the data is encounter

  This should not impact performance of benchmarking as JMH create a
  new JVM for each benchmark step, so we cannot anyway cache anything
  between run.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-10 12:42:09 +01:00
Moritz Kiefer
e96e83fdcd
Bump Canton snapshot (#12317)
* Bump Canton snapshot

This bumps to the latest snapshot which should include support for
port files.

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2022-01-10 11:21:33 +00:00
Moritz Kiefer
103327263a
Bump curl to version 7.81 on Windows (#12314)
7.78 404s now :(

changelog_begin
changelog_end
2022-01-10 10:00:49 +00:00
azure-pipelines[bot]
1b23f91a92
update NOTICES file (#12311)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2022-01-08 12:37:35 +00:00
Victor Peter Rouven Müller
f675f1b4fe
[JSON-API] Add create user endpoint (#12272)
* WIP

* Adjust the format of the CreateUserRequest to be a nicer payload & add a simple test

changelog_begin

- [HTTP-JSON] An endpoint user/create has been added to be able to create a user via the json api

changelog_end

* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/Endpoints.scala

Co-authored-by: Stephen Compall <stephen.compall@daml.com>

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-01-07 22:22:13 +00:00
Samir Talwar
658b8f40e9
ledger-on-sql: Remove H2 support, as it's never used. (#12310)
And potentially a security hazard, if we were ever to use it.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-07 22:02:59 +00:00
tudor-da
83c7eef6a6
[SoX with conflict checking] Check time model for transaction submissions (#12304)
* [SoX with conflict checking] Check time model for transaction submissions

CHANGELOG_BEGIN
CHANGELOG_END

* Update ledger/sandbox-on-x/src/main/scala/com/daml/ledger/sandbox/bridge/ConflictCheckingLedgerBridge.scala

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>

Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>
2022-01-07 19:31:53 +00:00
tudor-da
e86b307fa5
[Sandbox-on-X with conflict checking] Full conformance test suite (#12309)
changelog_begin
changelog_end
2022-01-07 18:50:06 +01:00
Moritz Kiefer
3b39028622
Upgrade nixpkgs (#12280)
This gives us GHC 9.0.2 and a new Bazel release.

changelog_begin
changelog_end
2022-01-07 15:48:43 +00:00
Moritz Kiefer
2783b7bdad
Support user management in create-daml-app (#12089)
fixes #11998

changelog_begin
changelog_end
2022-01-07 12:45:13 +00:00
nicu-da
1d258a170c
[ledger-api-test-tool] - Future assertions improvements [KVL-1218] (#12294) 2022-01-07 11:26:25 +00:00
Victor Peter Rouven Müller
886d058628
[TS-Bindings] Add support for get user which recently has been added to the json api (#12271)
* Add support for get user which recently has been added to the json api

changelog_begin

- [TS-Bindings] You can now call getUser to gain information about
    the user that is associated with the currently used JWT.

changelog_end

* Apply review comments
2022-01-07 11:21:22 +00:00
Samir Talwar
b93f473c1c
dev-env: Don't use the "extra-" prefix in nix.conf. (#12306)
It turns out this prefix is only supported as of Nix 2.4.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-07 11:19:40 +00:00
tudor-da
8d0bbde7eb
[SoX conflict checking] Configuration upload conflict checking (#12291)
* [SoX conflict checking] Configuration upload conflict checking

CHANGELOG_BEGIN
CHANGELOG_END

* Created static-time SoX conformance test target
2022-01-07 11:03:48 +00:00
akshayshirahatti-da
19fe4266ed
[Trigger Service/Oauth2-Middleware] Hocon config refactor (#12228)
* Changes to add a pureconfig-util module with some shared config readers, and cleanup some code from oauth2-middleware hocon

CHANGELOG_BEGIN
CHANGELOG_END

* Update triggers/service/auth/src/test/scala/com/daml/auth/middleware/oauth2/CliSpec.scala

Co-authored-by: Stephen Compall <stephen.compall@daml.com>

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-01-07 10:35:31 +00:00
Sofia Faro
8fdc871048
Make daml start integration tests use canton. (#12292)
* Make daml start integration tests use canton.

(Haven't fixed the hot reload test yet.)

changelog_begin
changelog_end

* remove vestigial message

* re-enable hot reload tests for sandbox-kv
2022-01-07 10:13:57 +00:00
nicu-da
ddf4f57b46
CI - Remove backwards compatible check for buf config. [KVL-1131] (#12301) 2022-01-07 02:00:02 -08:00
Simon Meier
a88d875c9a
auth tokens: support legacy sandbox format even with standard JWT claims present (#12297)
Fixes  #12285

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-07 10:33:47 +01:00
Moritz Kiefer
18e1cc5601
Expose trigger actAs party via getActAs (#12296)
fixes #12125

changelog_begin
changelog_end
2022-01-06 21:35:28 +01:00
Moritz Kiefer
2e735c3228
Release RC for SDK 1.18.1 (#12302)
This includes create-daml-app updates for the new daml hub domain and
a fix for the script results timeout issue.

changelog_begin
changelog_end
2022-01-06 19:48:52 +00:00
Moisés Ackerman
eff6df9e52
Fix {im,ex}plictly typoes (#12293)
changelog_begin
changelog_end
2022-01-06 19:15:01 +01:00
Samir Talwar
3b8a9e4432
Revert "devenv: Just require Nix v2.4 or newer." (#12299)
This reverts commit ed442fa8ae.

CHANGELOG_BEGIN
CHANGELOG_END
2022-01-06 18:02:21 +00:00
Alex Matson
2b1db54f14
[create-daml-app] Incorporate hub-react library for new Hub API/domains (#12279)
changelog_begin
changelog_end
2022-01-06 17:36:45 +00:00