Commit Graph

4460 Commits

Author SHA1 Message Date
Remy
39ceac7a2c
LF: Change engine output from GenTransaction to VersionedTransaction (#6311)
CHANGELOG_BEGIN
CHANGELOG_END
2020-06-15 17:35:15 +02:00
Samir Talwar
8ccbd00f0d
Document a more modern way of using IntelliJ with our Bazel project. (#6328)
* Document a more modern way of using IntelliJ with our Bazel project.

Specifically, avoid `bazel-project-view` in favor of excluding a few
slow/unnecessary directories.

CHANGELOG_BEGIN
CHANGELOG_END

* Add .bazel-cache to .bazelignore instead of .bazelproject.

* Bazel: Don't mention a particular version of IntelliJ; just link.

Trust the canonical source.
2020-06-15 15:06:31 +00:00
Samir Talwar
5399f3ff44
ledger-api-client: More backwards-compatibility. (#6346)
Let's not break others' code until they've had a chance to migrate.
This changes `LedgerIdRequirement` so that properties don't change
types, and adds `@deprecated` where necessary.

There is one behavior change: `ledgerId` used to return whatever string
was passed in (typically `""`) if the requirement was not enabled. It
now throws an exception.

In the future, we will change the type of `ledgerId` to be
`Option[String]`, and make `optionalLedgerId` an alias for that
property.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-15 14:26:13 +00:00
Stefano Baghino
0b861fe376
Add missing patterns to .gitignore (#6348)
* Add missing patterns to .gitignore

changelog_begin
changelog_end

* Address https://github.com/digital-asset/daml/pull/6348#discussion_r440158423
2020-06-15 13:25:36 +00:00
Stefano Baghino
55f9de87ca
Check application identifier when authorizing a Ledger API call (#6342)
* Check application identifier when authorizing a Ledger API call

Fixes #4409

changelog_begin
[Ledger API] Bugfix: the application identifier in a request is checked against
the authorization token. See https://github.com/digital-asset/daml/issues/4409.
changelog_end

* Fix accidental infinite loop

* Address a few comments from https://github.com/digital-asset/daml/pull/6342#pullrequestreview-430401649

- Address https://github.com/digital-asset/daml/pull/6342#discussion_r439992312
- Address https://github.com/digital-asset/daml/pull/6342#discussion_r439999084
- Address https://github.com/digital-asset/daml/pull/6342#discussion_r439999280

* Address https://github.com/digital-asset/daml/pull/6342#discussion_r440001538

As discussed in https://github.com/digital-asset/daml/pull/6342#discussion_r440003568

* Address https://github.com/digital-asset/daml/pull/6342#discussion_r439993762
2020-06-15 12:35:55 +00:00
Remy
45746ac604
Ledger: move TransactionBuilder in LF and use it more broadly (#6322)
CHANGELOG_BEGIN
CHANGELOG_END
2020-06-15 14:13:14 +02:00
Miklos
d033f6560e
Fix prefix for some validator metrics (#6343)
CHANGELOG_BEGIN
CHANGELOG_END
2020-06-15 13:43:45 +02:00
Miklos
bee5af77c1
Made CacheMetrics public so that caches defined outside of com.daml.metrics can be instrumented. (#6345)
CHANGELOG_BEGIN
CHANGELOG_END
2020-06-15 13:43:11 +02:00
Martin Huschenbett
79e1f9d105
damlc: Run simplifier on templates as well (#6286)
* damlc: Run simplifier on templates as well

Currently, the simplifier only runs on top-level value definitions.
However, there's no good reason for not running it on all expressions
within templates as well.

This does not significantly improve the `CollectAuthority` benchmark,
but there's not much code in the templates.

CHANGELOG_BEGIN
CHANGELOG_END

* Verification tool bugfix in variable projection and substitution with… (#6344)

* Verification tool bugfix in variable projection and substitution within let expressions

* Remove redundant substitution ; apply feedback Martin

Co-authored-by: Gert-Jan Bottu <gertjanbottu@hotmail.com>
2020-06-15 11:24:25 +00:00
Robert Autenrieth
31ccc8b9f5
Add cache for contract arguments during execution (#6289)
* Add cache for contract arguments during execution

Fixes #5754

CHANGELOG_BEGIN
CHANGELOG_END

* Add proper ADT for cache keys

* scalafmt

* Address review comments

* Separate contract and event caches

* Address review comments
2020-06-15 10:46:18 +02:00
Samir Talwar
792b5e6545
Update links in the SECURITY file. (#6327)
* Update links in the SECURITY file.

We no longer point people to Stack Overflow for general questions,
instead favoring the forum. In addition, we provide a link to GitHub
Issues for filing a new issue without security impact.

CHANGELOG_BEGIN
CHANGELOG_END

* Security: Update the link to the latest release.

We now point to the release notes, not the GitHub releases page.
2020-06-15 08:24:45 +00:00
Samir Talwar
858dbc67fd
ledger-api-client: Support legacy LedgerApiRequirement#copy behavior. (#6330)
* ledger-api-client: Clarify LedgerIdRequirementTest names.

* ledger-api-client: Re-add the old `LedgerApiRequirement#copy` behavior.

This is used by some users; we don't want to break their code if we can
help it.

CHANGELOG_BEGIN
- [Ledger API Client] The signature of `LedgerApiRequirement` has
  changed slightly. The old signature is now deprecated.
CHANGELOG_END

* ledger-api-client: Test deprecated LedgerApiRequirement behavior.
2020-06-15 07:56:36 +00:00
Nemanja
2f58e31b6c
GSG navigation hierarchy based on user feedback (#6339)
In user tets users complained that they were missing an overview of how all the components in the GSG are connected. This is a very simple fix addressing it: the 'App Architecture' and 'Your First Feature' sections are moved to be on the same level as 'Build Your App'

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-15 09:41:28 +02:00
Nemanja
e0614d94e0
GSG Next steps (#6340)
After going through the GSG users were not sure what are the next steps. Adding the next steps at the end of the GSG is an easy fix for this,

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-15 09:41:09 +02:00
Gary Verhaegen
1300644668
fix error message on daily compat failure (#6337)
When I changed the quoting for the success case as part of #6267, I
forgot to update the error case, so now we don't get well-formed JSON
for errors.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-14 22:52:57 +02:00
Rohan Jacob-Rao
3cfed4d7a3
Trigger Service: Refactor running trigger access using DAO interface (#6334)
Trigger Service: Refactor running trigger access using DAO interface

This introduces a RunningTriggerDao trait and two classes that implement
it, one for in-memory and one for database storage. This moves a lot of
code out of the Server class and into the DAO classes. The class chosen
at runtime depends on whether a JDBC config has been provided.

The database DAO also has methods for initialization and clean up used by
the server main function and the test fixture.

This is a pure refactoring (modulo some minor error message changes) so
functionality should stay the same.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-13 14:33:46 -04:00
Shayne Fletcher
11f9bbf44d
Fix missed Trigger Service capitalizations (#6336)
changelog_begin
changelog_end
2020-06-13 14:40:33 +00:00
Shayne Fletcher
148c98e115
Fix tiny mistake in output (#6335)
changelog_begin
changelog_end
2020-06-13 08:20:33 -04:00
Shayne Fletcher
23e7dc826e
Trigger service docs and SDK integration basics (#6329)
* Integrate trigger-service into the assistant

changelog_begin
changelog_end

* Assistant integration and bare bones docs

changelog_begin
changelog_end
2020-06-12 18:54:38 +00:00
Gary Verhaegen
087d03f9f6
remove bazel cleanup (#6331)
See #6321

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-12 20:21:45 +02:00
Andreas Herrmann
2628e1857e
Validate data-dependencies test DARs (#6320)
* Validate data-dependencies test DARs

In addition to building the coin upgrade DAR with data-dependencies on
the coin1 and coin2 packages built with an older SDK, this will also
define cases that run `damlc validate-dar` on the compiled coin upgrade
package.

changelog_begin
changelog_end

* fmt

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-06-12 17:21:00 +00:00
Brian Healey
b03cf7b598
update various yarn lock and package json files to resolve security vulnerabilities (#6319)
* update various lock files

CHANGELOG_BEGIN
CHANGELOG_END

Signed-off-by: Brian Healey <brian.healey@digitalasset.com>

* further version upticks from yarn upgrade
2020-06-12 11:35:37 -04:00
Samir Talwar
fde1bb7ef2
Delete some unused files in the root. (#6326)
CHANGELOG_BEGIN
CHANGELOG_END
2020-06-12 15:20:08 +00:00
Moritz Kiefer
ccd36146a4
Prune SDK versions in compat tests (#6325)
This PR does two things:

1. It makes use of the new sha256sums file to speed up the script to
   update the versions significantly. The code here is a bit hacky but
   as mentioned in the comment, this script is only run offline atm so
   that seems reasonable.
2. It prunes SDK snapshot versions to those for which there is no
   corresponding stable release.

changelog_begin
changelog_end
2020-06-12 17:03:38 +02:00
Simon Maxen
5329a4f97f
Ledger id requirement (#6323)
* Add option based constructor for LedgerIdRequirement

changelog_begin
changelog_end

* Make option based consructor the default, deprecate old constructor

* Update with review comments
2020-06-12 15:00:32 +00:00
Remy
3351dd8963
Address miklos' comments made in #5966 (#6315)
CHANGELOG_BEGIN
CHANGELOG_END
2020-06-12 16:33:52 +02:00
Samir Talwar
31d5fb7304
A terser .gitignore file. (#6324)
* A terser .gitignore file.

I trimmed _.gitignore_ to the stuff that looked like it was still useful
(at least, to me). Most of what's in there seemed like remnants of
previous build systems (Buck, Stack, etc.). Other stuff includes
editor-specific configuration files, which you can add to your global
_.gitignore_ (`git config --global core.excludesfile ~/.gitignore`).

I left the macOS _.DS_Store_ files in, even though I believe they should
also go into your global, machine-specific _.gitignore_ file, because
eventually someone's going to check them in otherwise.

On my machine, this has exactly the same effect as the longer one.
However, it's highly likely that I've overlooked something; let me know
and I can add it back.

CHANGELOG_BEGIN
CHANGELOG_END

* Add editors back into the .gitignore file.

I guess we really don't want people checking these files in by accident.
2020-06-12 13:44:43 +00:00
Andreas Herrmann
d1e422580a
Increment Windows cache URL (#6321)
We've seen a series of failures of the form
```
ERROR: D:/a/1/s/daml-assistant/integration-tests/BUILD.bazel:162:1: output 'daml-assistant/integration-tests/create-daml-app-tests.exe' was not created
ERROR: D:/a/1/s/daml-assistant/integration-tests/BUILD.bazel:162:1: not all outputs were created or valid
```
across multiple machines. We suspect cache poisoning as the cause. This
increments the cache URL to effectively clear the cache.

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-06-12 15:33:38 +02:00
Stefano Baghino
2fc2237989
Add migration test for contract key transfers (#6298)
* Add migration test for contract key transfers

Fixes #6238

changelog_begin
changelog_end

* Complete transaction verification

* Remove unnecessary bits

* Address https://github.com/digital-asset/daml/pull/6298#discussion_r439242912

* Address https://github.com/digital-asset/daml/pull/6298#discussion_r439244897

* Address https://github.com/digital-asset/daml/pull/6298#discussion_r439246799

* Address https://github.com/digital-asset/daml/pull/6298#discussion_r438779291

* Address https://github.com/digital-asset/daml/pull/6298#discussion_r438784947

* shut up buildifier

changelog_begin
changelog_end

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-06-12 12:29:27 +00:00
Remy
969b0ff2c4
LF: typo in contract ID specification (#6316)
CHANGELOG_BEGIN
CHANGELOG_END
2020-06-12 11:00:57 +00:00
Andreas Herrmann
f2cd820f42
Add data-dependencies compatibility tests (#6313)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-06-12 09:48:53 +02:00
Shayne Fletcher
0f47b8d1bf
Simplify findCredentials logic (#6301)
changelog_begin
changelog_end
2020-06-11 23:04:14 +00:00
Shayne Fletcher
b8126ee75c
Add --no-secret-key (#6309)
changelog_begin
changelog_end
2020-06-11 18:41:26 -04:00
Moritz Kiefer
4f486623f1
Upgrade sphinx-autobuild dependencies (#6318)
This PR upgrades the dependencies of sphinx-autobuild to address
security vulnerabilities. I tested on Linux that the docs preview
script which is the only user of sphinx-autobuild still works
correctly.

I’ve renamed default.nix to requirements.nix to match the name used by
pypi2nix (otherwise you just have to rename it ant the end which is a
bit stupid). I’ve also added a brief readme.

I would appreciate if somebody could test the docs preview script on
macos.

fixes #6317

changelog_begin
changelog_end
2020-06-11 20:56:41 +02:00
Brian Healey
f903ba70a6
Upgrade auth0 jwks-rsa version to 0.11.0 (#6218)
CHANGELOG_BEGIN
Upgrade auth0 jwks-rsa version to 0.11.0
CHANGELOG_END
2020-06-11 13:59:30 -04:00
dependabot[bot]
79837875e0
Bump pyyaml from 3.12 to 5.1 in /nix/tools/sphinx-autobuild (#3216)
Bumps [pyyaml](https://github.com/yaml/pyyaml) from 3.12 to 5.1.
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/master/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/3.12...5.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-11 17:39:45 +00:00
Brian Healey
d0304fb7aa
Upgrade yarn dependencies (#6300)
* upgrade npm libraries to address security vulnerabilities

CHANGELOG_BEGIN
Address npm library versions to address potential security
vulnerabilities
CHANGELOG_END
Signed-off-by: Brian Healey <brian.healey@digitalasset.com>

* format bazel
2020-06-11 13:36:40 -04:00
Remy
5051383aca
Ledger: remove optionality of submissionSeed in TransactionMeta (#6307)
CHANGELOG_BEGIN
CHANGELOG_END
2020-06-11 17:49:59 +02:00
Moritz Kiefer
93eac7400d
Add release checklist to release instructions (#6308)
* Add release checklist to release instructions

This includes a couple of checks that internal projects have been
tested on the release candidate.

changelog_begin
changelog_end

* Update release/RELEASE.md

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2020-06-11 16:33:43 +02:00
Moritz Kiefer
7717574d00
Bump Windows cache (#6310)
We are seeing

ERROR: D:/a/2/s/compiler/scenario-service/protos/BUILD.bazel:67:1:
output
'compiler/scenario-service/protos/_obj/scenario_service_haskell_proto/ScenarioService.o'
was not created

again so following our experiments, let’s reset the cache to see if it
fixes anything.

changelog_begin
changelog_end
2020-06-11 16:26:31 +02:00
Remy
f487b051f9
Ledger: use standard transactions in the indexer (#6297)
CHANGELOG_BEGIN
CHANGELOG_END
2020-06-11 16:12:21 +02:00
Remy
da48be2be5
LF: Make VersionedTransaction a CidContainer (#6304)
plus some minor cleanup in CidContainer

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-11 14:49:33 +02:00
Remy
b4488b7099
LF: fix contract ID length in specification (#6303)
CHANGELOG_BEGIN
CHANGELOG_END
2020-06-11 10:27:29 +02:00
Remy
cb23eb2c29
Ledger: use EventId instead of LedgerString (#6278)
CHANGELOG_BEGIN
CHANGELOG_END
2020-06-11 09:49:12 +02:00
Rohan Jacob-Rao
4b7bcc21df
Release 1.3.0 snapshot (#6294)
changelog_begin
changelog_end
2020-06-11 09:00:50 +02:00
Shayne Fletcher
07f24c0d93
Encrypt credentials (#6296)
* Encrypt credentials

changelog_begin
changelog_end

* Move key aquisition and write a big fat warning

* Only write encrypted token to DB.
2020-06-10 17:14:29 -04:00
Robert Autenrieth
ad16f563b4
Add CLI option for ledger time skew (#6287)
* Add CLI option for ledger time skew

CHANGELOG_BEGIN
- [sandbox] Added a CLI option for specifying the initial ledger time model
CHANGELOG_END

* scalafmt
2020-06-10 20:49:24 +02:00
Gary Verhaegen
9c8c1fa909
lightly safer docs cron: fail instead of error (#6288)
See @cocreature's comment on #6285.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-10 19:18:14 +02:00
Andreas Herrmann
0544323dfc
upgrade rules_haskell (#6284)
* upgrade rules_haskell

CHANGELOG_BEGIN
CHANGELOG_END

* Use autogenerated stack_snapshot tools

* ghcide import-dirs flags

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-06-10 17:21:31 +02:00
Rohan Jacob-Rao
68ff2de123
GSG: update outdated text and add a link (#6281)
* Update MessageList explanation

* Update MessageEdit description

* Link to testing guide at the end of first feature

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-10 09:49:07 -04:00