We introduce in #7835 VersionedNode which associate to each node a
version. In this PR, we update Transaction validation to take into
account this version when comparing nodes.
This advances the state of #7788
CHANGELOG_BEGIN
CHANGELOG_END
* Include listKnownParties in DAML Script docs
Ratko pointed out that this can often be useful in demo scenarios so
we might as well include it while documenting the caveats. I’ve also
added some subheadings since this got a bit out of hand.
changelog_begin
changelog_end
* Fix tests
changelog_begin
changelog_end
* daml ledger: add a max-inbound-message-size flag for grpc
This new flag allows to set the maximal accepted inbound message size
when using gRPC to interact with a legger.
CHANGELOG_BEGIN
CHANGELOG_END
* added a test
* Allow for lets before letrec transformation.
Fixes#7953 by adjusting the letrec transformation to handle
(optional) nonrecursive lets before the letrec binding, and adds
a regression test.
changelog_begin
changelog_end
* typo
* apply martin suggestions
* Factor out oauth2 test server body into a class
changelog_begin
changelog_end
* move start into class
* mutable authorized parties
* add function sfor party authorization
* manage party authorization in trigger fixture
* enable deleting cookies
* Add access denied test cases
* Track readAs and actAs claims
* Enable ignored auth tests
* fmt
* add method comments
* Update triggers/service/auth/src/main/scala/com/daml/oauth/server/Server.scala
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Update triggers/service/auth/src/main/scala/com/daml/oauth/server/Server.scala
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Explain party authorization modes
* inline expected status codes
* fix closing brace
* use shouldBe instead of should equal
* Use shouldBe instead of should equal
* Explain revoking access and deleting cookies
* foreach requires a total function
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Following what have been done in #7944, we add a check in the Scala
version of the LF type checker that rejects invalid kinds (i.e. kinds
of the form k -> Nat).
This PR does the "Scala side" of #7917.
CHANGELOG_BEGIN
CHANGELOG_END
* Require pattern match exhaustiveness in spec.
Changes the rules for case expressions to require exhaustiveness.
This involves moving out the "well-formed case alternative" rules
to a separate judgement, and introducing a "pattern match
exhaustiveness" judgement.
The symbol ⊲ used for pattern match exhaustiveness comes from
sheaf theory and formal topology, where "A ⊲ B₁, …, Bₙ" means
"A is covered by { B₁, …, Bₙ }", indicating an exhaustive
coverage of A by possibly overlapping conditions B₁, …, Bₙ.
For example, see [this nlab page](https://ncatlab.org/nlab/show/posite).
It seemed appropriate.
changelog_begin
changelog_end
* rst syntax
* fix ExhaustVariant and some weird other syntax
* review comments
This PR adds encoders to the various types defined in `@daml/types`. The
serde mechanism did not need one so far because all of the types we're
currently exposing map one-to-one to an appropriate (or, I suppose,
tolerable) JS equivalent. This will not be the case anymore with generic
maps, which means that if we want to provide our users with decent types
(I do), we'll need some real encoding/decoding moving forward.
CHANGELOG_BEGIN
CHANGELOG_END
* Pipelined parallelization for Participant Indexer (#7923)
* Extract transactionWriter.prepare into its own Akka operator
CHANGELOG_BEGIN
[Integration Kit] Pipelining in the indexing process improves throughput by up to 15%
CHANGELOG_END
* Address review comments
* Support --sql-backend-jdbcurl-env
CHANGELOG_BEGIN
- [DAML on SQL] Support passing the PostgreSQL JDBC URL through an environment variable via `--sql-backend-jdbcurl-env`
CHANGELOG_END
* Fix cleanup logic
* Improve cmdline help
* Check that the environment variable is defined
* Perform kind-checking in DAML compiler.
This PR avoids generating invalid kinds (i.e. kinds of the form k ->
Nat) during LF conversion, and adds a small "kind checking" step
whenever a type variable is introduced in the LF typechecker (since the
only way to get invalid kinds is to introduce them in a `forall`).
Right now there's no way to test that both the typechecker & the
conversion raise an error here, and in general, we try to always push
our LF type errors into GHC type errors or LF conversion errors. This
is something we can work on (adding actual LF typechecker tests). But
also, I verified manually that the type checker raises the error, in
the absence of the changes to LF conversion.
Ok, last point: The test case here has a weird location, but I tried and
couldn't figure out how to get a better location. I think this is a
general problem with the GHC Core representation?
changelog_begin
changelog_end
* Add more kind checks and restrict test version.
* fix test again
@SamirTalwar-DA is taking care of 1.7.0-snapshot.20201110.5615.0.b35c9fcb (#7937), so they get pushed back to the end of the line.
Please do not merge this before #7937.
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
* restate the submit stage as a Flow and derived Sink
* take submit out of the trigger-to-submit flow
* type for the failures produced directly by command submission
* directly connect the msgSource failure queue to the submitter output
* parens
* slow down submission as we exceed max parallel submissions
* restricting alterF so it will be usable with ConcurrentMap
* disable buffer for the delay
* split out the delay function
* drafting a retry loop
* degenerate test for retry loop, factoring the forAllFuture utility
* map input to retrying properly
* make retrying accessible to tests
* test happy path and fix off-by-one
* further tests for retrying
* reveal that elements can get lost
* more determinism in test
* let failures block further elements from being attempted
- Previously failures would go into a separate queue, where they awaited expiry
of their delay and further initial upstream elements were given their first
tries. However, closing the upstream could mean that queue was dropped, and
detecting that situation is not trivial. So, instead, we don't use a separate
queue.
* plug retrying into the trigger submission flow
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* remove throttle; pendingCommandIds may leak
* report random parameter on failure
* revert comment about throttling
* explanation for fail in the error queue
- suggested by @cocreature; thanks
* Add a warning for GHC.Types.Symbol
CHANGELOG_BEGIN
- [DAML Compiler] Added a warning for references to
the GHC.Types.Symbol kind since these cannot be
preserved across data-dependencies.
CHANGELOG_END
* lint
* Address review comments
* fix LFNameCollisions test
* improve LFNameCollisions fix
* Upgrade ledger-api-test-tool-on-canton to the canton 0.19.0 release
- Reflecting changes related to the Community edition of canton
- Testing full ContractKeysIT in a separate canton environment with
unique contract keys. The ability to run multiple canton environments
will come in handy when we introduce the participant pruning test suite.
- Slight canton configuration changes
CHANGELOG_BEGIN
CHANGELOG_END
* Formatting
* Review feedback by Samir
* Fixup
* damlc: fix: relative output path relative to cwd
This fixes#7913. Build output path were considered relative to the
project root instead of the current working directory.
CHANGELOG_BEGIN
CHANGELOG_END
* adding a test
Remove file describing how contract key will be implement. The file
is not usefull as contract key have been fully implemented. Futhermore
the file contains plenty of out of date information.
CHANGELOG_BEGIN
CHANGELOG_END
This PR prepares the change of inference algorithm described #7788
where each node is version independently. This PR associates to each
node of `VersionedTransaction` a version. In the current state, all
nodes are associated to the version of the transaction itself. The
inference algorithm (that will make those versions potentially
distinct) will be implemented in an upcoming PR.
CHANGELOG_BEGIN
CHANGELOG_END
* oauth error response
* oauth server parties parameter
* implement request denial in oauth test server
* Test oauth test server for access denied
* test unauthorized party on auth middleware
* Handle OAuth2 login flow error response in auth middleware
* Forward login error to auth middleware client
* fmt
* fix server test
* fmt
* Handle login failure in trigger service
* Test unauthorized trigger start
* Cleanup authCallback
* Update authentication specification
- The auth middleware accepts an arbitrary callback URI on /login
- The auth middleware will forward OAuth2 authorization failures to the
client service.
changelog_begin
changelog_end
* Update triggers/service/authentication.md
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
This PR fixes two bugs in the type checker:
- Fetch are now rejected if the type constructor does not match a
template
- to_any, from_any, and type_rep are now rejected if the type
parameter contains synonyms.
Additionally, this PR adds the type of the validation error that each
test case should throw in the test that ill formed expression are
properly rejected. In the way we fix some wrong test cases.
CHANGELOG_BEGIN
CHANGELOG_END
* daml ledger: implementation of ledger commands
Implementation of the remaining daml ledger commands via HTTP JSON
service endpoints instead of gRPC.
Fixes#4824 .
CHANGELOG_BEGIN
[daml assistant] `daml ledger` commands can now also be run against the JSON API instead of the gRPC API.
CHANGELOG_END
* damlc: Check DAML-LF pattern matches for exhaustiveness
`damlc` has always produced exhaustive pattern matches in DAML-LF since
GHC adds a default branch with a call to `error` message as soon as a
pattern match is not exhaustive. It was a complete oversight on our
side that we did not enforce this properly in DAML-LF. Since `damlc`
has never produced non-exhaustive pattern matches, enforcing this now
and for all DAML-LF versions is only theoretically a breaking change,
namely if people hand-crafted DAML-LF, but not practically.
This check is as under-tested as the rest of our Haskell implementation
of the DAML-LF type checker. Well, all our other tests implicitly check
that the type checker does not give false errors. However, we have no
tests ensuring that the type checker is not too permissive. Fixing this
situation would require a big time investment since we currently don't
have a simple way to produce DAML-LF without going through GHC, which
will always produe well-typed DAML-LF.
I will update the DAML-LF specification wrt pattern matching
exhaustiveness in a separete PR.
This PR does not have a changelog entry since there's no impact for our
users.
CHANGELOG_BEGIN
CHANGELOG_END
* Make check linear in match size not constructor number
CHANGELOG_BEGIN
CHANGELOG_END
* Move lookupWithIndex in Data.List.Extended
CHANGELOG_BEGIN
CHANGELOG_END
* Implement the suggestions
CHANGELOG_BEGIN
CHANGELOG_END
* assistant: prompt users to automatically update PATH
We ask the Max/Linux users on installation if we should update their
PATH environment variable to point to the assistant binary and
automatically do so when the answer is affirmative.
CHANGELOG_BEGIN
CHANGELOG_END
* set .profile insetad .bashrc
* add a case for sh
* fix tests
CHANGELOG_BEGIN
CHANGELOG_END
* use imports only on nix systems
* update windows updatePath function for YesNoAuto flag.
CHANGELOG_BEGIN
CHANGELOG_END
* Validations for state updates, indexing, --skip-byte-checking
CHANGELOG_BEGIN
CHANGELOG_END
* Document new integrity checker options
* Remove v2 from the bazel target in README
* Address some review comments
* Refactor integrity checker into published "tools" lib + binary
CHANGELOG_BEGIN
CHANGELOG_END
* Refine split
* Refactor integrity checker into published "tools" lib + binary
CHANGELOG_BEGIN
CHANGELOG_END
* Refine split
* Add --index-only, --jdbc-url and --full-metrics support to IntegrityChecker
CHANGELOG_BEGIN
CHANGELOG_END
* Tidy up
* Tidy up
* Address review comments
* Code tidying (do not inject config just the variable needed, better readability for multi-line if/else).
* Address review comments
Co-authored-by: Miklos Erdelyi <miklos.erdelyi@digitalasset.com>
Note: this file is meant to represent the content on [Docker Hub], but
syncing is currently a manual process. I will propagate once this is
approved and merged.
[Docker Hub]: https://hub.docker.com/repository/docker/digitalasset/daml-sdk
CHANGELOG_BEGIN
CHANGELOG_END
* Document new integrity checker options
* Remove v2 from the bazel target in README
* Refactor integrity checker into published "tools" lib + binary
CHANGELOG_BEGIN
CHANGELOG_END
* Refine split
* Release tools lib
* Generalize IntegrityChecker.run
* Use glob for test source definition
* Widen glob for tools-tests to all (future) tool tests, not just integritycheck
* Simplify test source globs
* Simplify tools lib source glob
* Fix build
* Remove export.v2
* Validations for state updates, indexing, --skip-byte-checking
CHANGELOG_BEGIN
CHANGELOG_END
* Tidy up
* Skip non-log entries when processing updates
* Tidy up
* Tidy up
* Tidy up
* Document new integrity checker options
* Remove v2 from the bazel target in README
* Tidy up
* Address review comments
* Add LogAppendingReadServiceFactorySpec
* Fix header
* Generalize IntegrityChecker.run
* Export a run utility that can take a parsed Config
* Fix test definition
* Address some review comments
* Add test for KeyValueParticipantStateReader in skipping-non-log-entries mode
* Enable, fix and improve LogAppendingReadServiceFactorySpec
* Tidy up
* Check the trigger dao migrations digest
Following the example of the corresponding ledger on SQL tests.
The digests had to be updated as both of them had gone out of sync.
The init digest presumably due to the change in #7226 and the one for
adding the access token during review of #7890.
changelog_begin
changelog_end
* define abstract migrations test
* Use abstract migrations test in trigger service tests
* use abstract migrations test in ledger on SQL
* Retain check for number of .sql resources
* Factor out the hash-migrations script
* Consistent shell settings
Addressing review comment
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* com.digitalasset.platform --> com.daml.platform in logbacks
* correct some broken running scala test examples
* correct com.digitalasset.platform broken links
CHANGELOG_BEGIN
Correct some remaining package name references to
com.digitalasset.platform in logback and readme file
CHANGELOG_END
Signed-off-by: Brian Healey <brian.healey@digitalasset.com>
* Haskell: Add hlint rule to suggest foldl' over foldl
`foldl` is lazy in a way that almost never is what you want since it
can cause space leaks without any benefit. `foldl'` does not have this
problem. See https://www.well-typed.com/blog/2014/04/fixing-foldl/ for
more details.
CHANGELOG_BEGIN
CHANGELOG_END
* Fix all existing occurrences of foldl
CHANGELOG_BEGIN
CHANGELOG_END
- Exercises' results are checked after the children have been checked.
- output the mismatching nodes in case of comparison failure.
CHANGELOG_BEGIN
CHANGELOG_END
Currently, we're warning that both extensions might not work with
`data-dependencies`. However, we have tests that demonstrate that both
extensions actually do work with `data-dependencies`. Since there's
been customer demand to remove these warnings, we'll do so.
CHANGELOG_BEGIN
[damlc] Don't warn anymore that the language extensions TypeOperators
and UndecidableInstances might not work with `data-dependencies`.
CHANGELOG_END
fixes#7097
changelog_begin
- [Triggers] The trigger service now has a `--port-file` option
matching the corresponding option in the JSON API.
changelog_end
This allows you to write somewhat useful update functions since you
can inspect the transactions. Created and Archived are kept abstract
but we expose fromCreated/fromArchived to interact with them.
fixes#6968
changelog_begin
- [DAML Triggers] The `Daml.Trigger` module now reexports `Event`
which avoids having to import `Daml.Trigger.LowLevel` for implementing
a non-trivial `updateState` function.
changelog_end
* Bump timeouts in build-and-lint’s
We’ve seen some timeouts on CI so let’s bump everything to 100ms and
see if that fixes it. If it doesn’t, we can increase those 100ms as well.
changelog_begin
changelog_end
* Fix race on registering open event
changelog_begin
changelog_end
Limiting this to a single one makes little sense and while you can
work around it by uploading more packages, that can be annoying during
development.
fixes#6332
changelog_begin
- [Triggers] The trigger service now accepts multiple `--dar`` options.
changelog_end