Commit Graph

6250 Commits

Author SHA1 Message Date
Moritz Kiefer
cf3d0876af
Add a prototype for DAML Script dumps (#7934)
* Add a prototype for DAML Script dumps

This is still fairly rough unfortunately but it does at least have
some tests and it doesn’t interact with anything else, so hopefully we
can land this and then parallelize the work from there on.

changelog_begin
changelog_end

* Update daml-script/dump/src/main/scala/com/daml/script/dump/Encode.scala

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* view all the things

changelog_begin
changelog_end

* Update daml-script/dump/src/main/scala/com/daml/script/dump/Dependencies.scala

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

* Fixup the switch to exists

changelog_begin
changelog_end

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2021-02-05 13:19:20 +01:00
Remy
e2c7dd05cc
tag the docker image build locally (#8760)
This was forgotten in #8745

also add a missing ''\" in the bash script.

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-05 11:07:07 +01:00
Samir Talwar
9c477ffdf5
ledger-on-memory: Only support pre-execution. [KVL-821] (#8757)
* ledger-on-memory: Rename `PreExecutingOwner` to just `Owner`.

* ledger-on-memory: Push the committer execution context up a little.

* ledger-on-memory: Use pre-execution in tests, not batching.

* ledger-on-memory: Remove support for batching submissions.

Pre-execution is pretty much always faster; let's use it.

CHANGELOG_BEGIN
CHANGELOG_END

* ledger-on-memory: Simplify construction.

Now we only support pre-execution, we can be less general.
2021-02-05 08:56:55 +00:00
Robin Krom
e79966b890
ghcide: cached goto definitions (#8751)
We update ghcide, which enables cached goto definitions that keep
working when the document doesn't compile anymore. This also adds a test
to lsp-tests for this feature.

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-04 21:05:12 +01:00
Stefano Baghino
2dbeb7e27c
Fix typos in docs (#8761)
Originally reported in https://discuss.daml.com/t/my-feedback-on-daml-in-general-and-documentation-as-a-non-coder/2043

Standardise (sic) to US English spelling. ;-)

Typos

acessToken -> accessToken
assignement -> assignment
calulated -> calculated
certicates -> certificates
comitted -> committed
commited -> committed
conctract -> contract
corrseponding -> corresponding
couteroffer -> counteroffer
Decmial -> Decimal
desireable -> desirable (archaic)
Distpute -> Dispute
encoutered -> encountered
enviroment -> environment
Exercse -> Exercise
exeuction -> execution
familiarise -> familiarize (British spelling)
fistName -> firstName
follwing -> following
fullfil -> fulfill (fulfil would be British spelling)
intepretation -> interpretation
leger -> ledger
lookupBeyKey -> lookupByKey
Messsaging -> Messaging
mimick -> mimic
Modelling -> Modeling (British spelling)
occured -> occurred
Partipant -> Participant
partiuclarly -> particularly
possibiy -> possibly
PostreSQL -> PostgreSQL
preceed -> precede
preceeding -> preceding
preferrable -> preferable
programatically -> programmatically
prohibitied -> prohibited
readyness -> readiness
Readyness -> Readiness
resepond -> respond
similiar -> similar
snipppets -> snippets
somone -> someone
succintly -> succinctly
transacion -> transaction
transfering -> transferring
transferrable -> transferable

I was surprised by the last two.

I hope this commit message does not contain any typo.

changelog_begin
changelog_end
2021-02-04 19:44:15 +01:00
Samir Talwar
c212fe9407
integrity-checker: Switch to pre-execution. [KVL-822] (#8743)
* kvutils: Extract out a `WriteSetSelector`.

We want to replace this with one that's always successful in the
integrity checker.

* integrity-checker: Better logging when the write sets are different.

* integrity-checker: Switch to pre-execution.

The batching support is still there for now, just unused.

Tests are now run using pre-execution exports.

CHANGELOG_BEGIN
CHANGELOG_END

* integrity-checker: Attempt to fix the Scala 2.13 build.

* integrity-checker: Improve comments.

Co-authored-by: Fabio Tudone <fabio.tudone@digitalasset.com>

* kvutils: Rename a couple of parameters.

* integrity-checker: Pull out write set comparison functions into a class.

And move all the tests to its test class.

* integrity-checker: Fix logging output.

We don't need all those DEBUG logs.

* integrity-checker: Add tests for pre-execution committing.

* integrity-checker: Be friendly towards Windows newlines in tests.

Co-authored-by: Fabio Tudone <fabio.tudone@digitalasset.com>
2021-02-04 15:32:42 +00:00
Stefano Baghino
b0ba8514f7
Replace Daml logo on README (#8756)
changelog_begin
changelog_end
2021-02-04 16:28:52 +01:00
Moritz Kiefer
4b33da2420
Expose transaction trees in DAML Script (#8750)
This is spun off from #7934 for ease of review.

For now, all of this is hidden (and for extra caution also marked as
early access). I expect we’ll tweak the API in a bunch of ways before
marking it stable but this at least is sufficient for the prototype.

At this point, we cannot support this over the JSON API. Not too
worried about that at least for now.

fixes #7847

changelog_begin
changelog_end
2021-02-04 15:21:30 +01:00
Stefano Baghino
491a1b29f4
Non-repudiation: add persistent, SQL-backed signed commands repo (#8723)
* Non-repudiation: add persistent, SQL-backed signed commands repo

Closes https://github.com/digital-asset/daml/issues/8634

Contributes to https://github.com/digital-asset/daml/issues/8658

changelog_begin
changelog_end

* Address https://github.com/digital-asset/daml/pull/8723#discussion_r569228934

* Fix issues after rebase, address https://github.com/digital-asset/daml/pull/8723#discussion_r569227969

* Fix certificate table and column names, add timestamp to persistent store, address https://github.com/digital-asset/daml/pull/8723#discussion_r569223780

* Fix outstanding compilation errors

* Fix tests after rebase

* Address comments from https://github.com/digital-asset/daml/pull/8723#pullrequestreview-582106893

- Address https://github.com/digital-asset/daml/pull/8723#discussion_r569216711
- Address https://github.com/digital-asset/daml/pull/8723#discussion_r569217401

* Address https://github.com/digital-asset/daml/pull/8723#discussion_r569215383
2021-02-04 14:15:36 +00:00
azure-pipelines[bot]
6cf854e5ee
update compat versions for 1.10.0-snapshot.20210202.6218.0.c0573678 (#8729)
* update compat versions for 1.10.0-snapshot.20210202.6218.0.c0573678

CHANGELOG_BEGIN
CHANGELOG_END

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-02-04 13:16:27 +01:00
Remy
24e0c0cf22
LF: fix transaction validation (#8749)
The bug affected only LF 1.12

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-04 12:06:56 +00:00
Gary Verhaegen
ab5f62abac
ci/clean-up: s/lsof/pgrep (#8748)
CHANGELOG_BEGIN
CHANGELOG_END
2021-02-04 12:21:55 +01:00
Remy
2610026f5a
Script to build docker locally (#8745)
CHANGELOG_BEGIN
CHANGELOG_END
2021-02-04 11:11:35 +00:00
Moritz Kiefer
03e0dbc4ed
Desperate attempt at reducing the flakiness in the hs bindings tests (#8747)
At the very least this should produce better error messages and at
least on my machine it does reduce flakiness significantly by bumping
the timeout and increasing Bazel’s resource allocation (and thereby
reducing parallel runs).

Unfortunately, a proper fix here is much more involved than I have
time for right now.

changelog_begin
changelog_end
2021-02-04 10:45:55 +01:00
Gary Verhaegen
24a39d4c55
remove dependency-check (#8744)
It relies on a Bintray URL, which is likely to break soon as Bintray
sunsets.

It's also not been referenced by anything in this repo since at least
open-sourcing, so the value it provides seems low. There's no
documentation of why it's here and what its planned usage was, but based
on the [project page](https://github.com/jeremylong/DependencyCheck) I
imagine it's been supplanted by BlackDuck now.

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-04 09:36:33 +00:00
Samir Talwar
5944179828
kvutils: Prepare the integrity checker for pre-execution. [KVL-822] (#8740)
* integrity-checker: Actually log the error, and fail.

Previously, we were just logging "FAIL" and exiting with a status code
of 0, which is not great.

* integrity-checker: Move the commit logic into the support class.

CHANGELOG_BEGIN
CHANGELOG_END

* integrity-checker: Run with `exec` to get rid of a bash instance.

* integrity-checker: Throw away the write set instead of clearing it.
2021-02-04 08:49:10 +00:00
Stefano Baghino
5a08c5276f
Switch from public keys to certificates for non-repudiation (#8739)
changelog_begin
changelog_end

Un-butchering the original design document
2021-02-04 08:27:37 +00:00
Stefano Baghino
6673efeb5c
Timestamp non-repudiation signed payloads (#8736)
Adds a timestamp when a payload signature has been verified.

This ensures that multiple commands sharing the same identifier can still be
told apart thanks to the signature.

changelog_begin
changelog_end
2021-02-04 08:56:09 +01:00
Gary Verhaegen
5734730d50
tweak local cache cleanup (#8738)
For various reasons, my attempts at improving the cache cleanup process
have been delayed. There are, however, two simple, non-controversial
changes I can "backport" without having to wait for consensus on the
whole thing:

1. Increase the threshold. At least for the compat jobs, we have seen
   builds failing after starting with ~32GB free.
2. Kill dangling Bazel processes, which keep some files open and
   sometimes cause the clean-up process to crash.

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-03 19:47:52 +01:00
Gary Verhaegen
29c2577fa2
fix perf_speedy report (escaping ") (#8655)
The report currently chokes on quotes in the commit message (see
550aa48fc5). Rather than trying to
correctly excape things in Bash, this PR delegates the quote handling to
jq, because having to deal with Bash embedded in YAML is hard enough.

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-03 19:47:27 +01:00
Samir Talwar
fa475a1359
kvutils: Export writes when using pre-execution. [KVL-822] (#8737)
* kvutils: Trust the pre-execution output with the state.

If we're out of bounds, the state will be empty; we don't need to force
it in the finalizer.

* kvutils: Move pre-execution write set selection into the committer.

There's really only one way to do it.

* kvutils: Split `LedgerStateOperations` into read and write sides.

* kvutils: Write pre-executed write sets to an export on demand.

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-03 18:25:04 +00:00
Martin Huschenbett
06a33d2c53
DLint: Disable "Redundant pure" lint by default (#8733)
* DLint: Disable "Redundant pure" lint by default

When using `ApplicativeDo`, e.g. in Daml Scripts, a final pure might be
necessary although it would be redundant in a monadic context. This
leads to spurious warnings from the linter which I found quite
confusing.

CHANGELOG_BEGIN
CHANGELOG_END

* Adjust tests

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-03 17:38:19 +00:00
azure-pipelines[bot]
5b967493b4
rotate release duty after 1.10.0-snapshot.20210202.6218.0.c0573678 (#8725)
@hurryabit is taking care of 1.10.0-snapshot.20210202.6218.0.c0573678 (#8724), so they get pushed back to the end of the line.

Please do not merge this before #8724.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-02-03 17:14:09 +01:00
Andreas Herrmann
5a96ad0c93
Update grpc (#8720)
To include https://github.com/grpc/grpc/pull/24953 and
https://github.com/protocolbuffers/upb/pull/356 which fix
https://github.com/protocolbuffers/upb/issues/354.

The issue manifested on Windows CI with errors of the form

```
bazel-out/x64_windows-opt/bin/external/com_google_protobuf/google/protobuf/descriptor.upb.c: Permission denied
```

See https://dev.azure.com/digitalasset/daml/_build/results?buildId=68545

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-02-03 16:47:08 +01:00
Samir Talwar
9f06a28838
ledger-on-memory: Move committer construction into the writer. (#8735)
Closer to where it's used.

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-03 13:37:45 +00:00
Stefano Baghino
45336d6fb5
Implement fmt.sh --diff for the Java style check (#8734)
When run with --diff, fmt.sh now only checks for the .java files that have been
changed since the fork point. This makes local git pre-push hooks more quiet
while preserving the safe CI behavior (which doesn't use --diff).

changelog_begin
changelog_end
2021-02-03 14:00:34 +01:00
Samir Talwar
b413d7e405
ledger-on-memory: Split the Writer from the Reader. (#8732)
There's no real reason to connect the two.

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-03 12:34:03 +00:00
Moritz Kiefer
d7d954335e
Retry asset downloads in check_releases (#8730)
We’ve seen a number of "resource vanished (connection reset by peer)"
errors. Slapping some retries on that should hopefully make the CI job
a bit more robust.

changelog_begin
changelog_end
2021-02-03 12:04:59 +01:00
Stefano Baghino
42e071f2c2
Add //libs-scala/doobie-slf4j and replace usages of jdkLogHandler (#8731)
The jdkLogHandler provided by Doobie exists purely as an example and the library
itself does not recommend using it in production.

Note that this slightly changes the runtime behavior, logging successful queries
at debug level rather then info. The message itself is preserved from the original
MIT-licensed example.

This uses Slf4j as most of our components, instead of java.util.logging.

changelog_begin
[HTTP JSON API] The server now logs successful queries at debug level
instead of info
[Trigger Service] The server now logs successful queries at debug level
instead of info
changelog_end
2021-02-03 10:45:05 +00:00
Remy
5c00a8b449
KV: flag to enable preview version in kvutils (#8718)
CHANGELOG_BEGIN
CHANGELOG_END
2021-02-03 11:34:47 +01:00
Robert Autenrieth
1e9e3c1b10
Add a test for DeduplicatingPackageLoader (#8722)
changelog_begin
changelog_end
2021-02-03 10:47:02 +01:00
azure-pipelines[bot]
3299bdfa9c
release 1.10.0-snapshot.20210202.6218.0.c0573678 (#8724)
This PR has been created by a script, which is not very smart and does not have all the context. Please do double-check that the version prefix is correct before merging.

@hurryabit is in charge of this release.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-02-03 09:22:41 +01:00
Samir Talwar
c05736787d
participant-integration-api: Don't copy the DAR file bytes. (#8717)
This doesn't seem to improve performance much (probably because the
real bottleneck is elsewhere), but at the very least it's not necessary.

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-02 13:04:00 +00:00
Stefano Baghino
d6cbd86f8d
Ensure the pre-load executor is reused across calls (#8716)
changelog_begin
changelog_end

The current behavior is that of creating a new preload executor at every call,
which is a very complex way of simply spawning a thread and defeats the purpose
of having a shared executor, sequencing the pre-loading of packages to maximize
the usage of cache (among other things).
2021-02-02 13:46:26 +01:00
Robert Autenrieth
f13c96bdde
Retrofit types in verbose mode [DPP-154] (#8656)
* Factor out package loding deduplication

* Remove unused LfValueTranslation

* Fill in missing type information

changelog_begin
changelog_end
2021-02-02 11:45:00 +01:00
Robin Krom
6bb76bda58
lsp-tests: test for no internal symbols (#8708)
This updates the daml-ghcide dependency and also adds a test to check
that we are not showing any internal symbols and dependencies in the
outline in daml studio.

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-02 11:28:22 +01:00
Moritz Kiefer
b07ab07fc1
Drop early access marker from choice observers (#8713)
changelog_begin
changelog_end
2021-02-02 10:44:47 +01:00
Moritz Kiefer
2528998d00
Generate docs for preview LF version (#8712)
changelog_begin
changelog_end
2021-02-02 10:25:30 +01:00
Stefano Baghino
5cea37f057
Revise signed payload repository (#8709)
* Review signed payload repository

A few improvements made as part of https://github.com/digital-asset/daml/issues/8634.

- revised signed payload repository to hold more relevant data on the signed payload
- more specific types when handling bytes and strings

changelog_begin
changelog_end

* Limit access of proxy to signed payload repository

* Address https://github.com/digital-asset/daml/pull/8709#discussion_r568395864

* Remove unused type parameter from NonRepudiationProxy.owner method
2021-02-02 09:25:19 +00:00
mzagorski-da
77f42792e0
[DPP-142] Explicitly deflate/inflate data outside of the index (#8646)
* [DPP-142] Explicitly deflate/inflate data outside of the index
* [DPP-142] Explicitly deflate/inflate data outside of the index - review fixes - exposing prepare update parallelism as param

changelog_begin
[Integration Kit] Compression and decompression of stored DAML-LF values
 is now executed outside of the index database, allowing to make more
  efficient use of the participant resources when indexing.
changelog_end
2021-02-01 18:18:22 +01:00
mziolekda
5bb3a6c4b5
Manual release 1.10.0-snapshot.20210201.6207.0.7cf1914d of the daml-sdk (#8704)
CHANGELOG_BEGIN
CHANGELOG_END
2021-02-01 17:26:24 +01:00
Moritz Kiefer
040cb937a1
Disable ghcide tests (#8705)
CI is unfortunately slow enough and those tests haven’t really proven
to be very valuable.

changelog_begin
changelog_end
2021-02-01 15:30:53 +00:00
Moritz Kiefer
afb2006566
Upgrade gRPC C library (#8693)
We can’t upgrade to the latest version 1.35.0 since it depends on a
newer version of Bazel but we can at least go to 1.34.1. We also have
to patch absl and grpc itself to fix mingw support and some undeclared
inclusions on Windows. Both patches are taken from upstream PRs (the
mingw one has not been merged yet).

There is also a small patch to grpc-haskell-core. I’ve started working
on upstreaming that but the nix build system is a mess and I haven’t
quite managed to get it working there.

changelog_begin
changelog_end
2021-02-01 16:11:06 +01:00
Kamil Bożek
7cf1914d6d
Increased compatibility test size for classic-postgresql to large. (#8666)
CHANGELOG_BEGIN
CHANGELOG_END
2021-02-01 15:25:18 +01:00
tudor-da
3ce8a672d2
Convert participant_events low-cardinality columns to btree (#8667)
CHANGELOG_BEGIN
- Changed index method type back to B-Tree from Hash for: participant_events_template_id_idx, participant_events_contract_id_idx indices of participant_events table
CHANGELOG_END
2021-02-01 13:57:56 +00:00
Moritz Kiefer
310f893fa7
Bump JVM on Darwin and force TLS 1.2 (#8697)
Details are in the comments but this seems to workaround the annoying
tls issues we have been dealing with for the past few days.

changelog_begin
changelog_end
2021-02-01 13:04:14 +00:00
Samir Talwar
31cbcc7c52
participant-integration-api: Make the RecoveringIndexer use a real execution context. (#8688)
* participant-integration-api: Fix a RecoveringIndexerSpec flake.

Sometimes the log lines don't come in quite the same order, and that's
OK.

* participant-integration-api: Use the Akka EC to recover the indexer.

Using the DirectExecutionContext opens us up to abusing a random EC,
sometimes with big delays. Using the Akka EC is not quite ideal, but
still means that we know that we're not hogging an entire pool by
accident.

CHANGELOG_BEGIN
CHANGELOG_END

* participant-integration-api: Fix the RecoveringIndexerSpec for good.

We can fix it by filtering out the floating log line, instead of
guessing where it will end up.
2021-02-01 13:04:07 +00:00
Robert Autenrieth
7c891ae49e
Use real identifiers in JdbcLedgerDaoSpec (#8670)
This prepares the test for the retrofitting of removed
type identifiers in verbose mode.

changelog_begin
changelog_end
2021-02-01 09:13:07 +01:00
Moritz Kiefer
f261e0489a
Bump akka to 2.6.12 to fix oom issue (#8698)
This includes a fix for https://github.com/akka/akka/issues/29966
which we hit in some of our tests.

changelog_begin
changelog_end
2021-01-30 07:47:10 +01:00
Robin Krom
5c5c2527a2
lsp-tests: test for no internal imports (#8699)
We add a test to check that there are no internal imports returned by
the `getDocumentSymbols` endpoint for an empty module.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-29 22:17:21 +01:00