Add tTansactionServiceIT into Ledger API Test Tool as an optional test.
Available tests can be listed with the --list option.
Tests can be included with --include, and excluded with --exclude.
Fixes#1372, #1472
50MiB is no longer hard-coded on extractor, navigator input for sandbox
or any other server, permitting large packages; e.g. pass
--ledger-api-inbound-message-size-max 62914560 to extractor or navigator
to get a 60MiB limit.
Fixes#1463.
* extractor: --ledger-api-inbound-message-size-max option replaces 50MiB hard-coded [package size] limit
* navigator: make inbound buffer size configurable in navigator backend
* _actually_ change the max inbound size, scalafmt
* release note for --ledger-api-inbound-message-size-max option
* another release note for --ledger-api-inbound-message-size-max option
* Improving logging, adding scala-logging, #1502
check-enabled calls were missing for a lot of trace calls.
scala-logging relies on macros, so string concatenation won't happen.
* Release notes
* added recovery logic when ledger entry persistence fails
* adding release notes
* logging only when the queues are closed due to an error
* using error instead of warn
* Drop support for DAML-LF 1.3 from damlc
This means `damlc` now only supports versions allowing arbitrary expressions
as contract keys. This is very helpful for the upcoming new template
de/re-sugaring underpinning generic templates.
* Unpin a few DAML-LF target versions in tests
* Fix golden tests
* Adapt changelog to rebase
* Rename DAML-LF scenario tests to 1.dev
* Update tests to --target 1.dev
* Fix release notes
* Add support for optional `--templates` configuration, #1352
template configs can be passed in the format:
`--templates <module1>:<entity1>,<module2>:<entity2>`
if no templates passed, use `Filters.defaultInstance`,
which means subscribe for all templates
* TemplateConfigs is a Set now
converting set to a sorted list, when validating previous startup params
so we have a deterministic order of template configs.
* Adding test case for template filtering and logging
Test fails: Template filtration is not supported on GetTransactionTrees
RPC. To get filtered data, use the GetTransactions RPC
Some refactoring will follow.
* Proper template ID filtering, more tests
have to convert Identifier to tuple
* Updating release notes.
* Replacing filter-map chain with collect
Because the record time was mapped to the ledger effective time field
when deserializing contracts from the SQL database, a subsequent
comparison between the LETs of two nodes in the same transaction caused
the transaction to be rejected.
Fixes#1435.
The extractor --party option may now specify multiple parties, separated
by commas; e.g. instead of --party Bob you can say --party Bob,Bar,Baz
and get the contracts for all three parties in the database.
Fixes#1353.
* refactor figuring the TransactionFilter to give to API
* replace ExtractorConfig#party with parties
* adjust remainder of extractor main code to handle multiple parties
* previous extractor tests pass
* factor dar production for extractor tests
* configureExtractor to change ExtractorConfig elements
* test that party-set extracts the inclusive union of visible contracts (and only that)
* release note for extractor multi-party support
* test faithfulness of --party splitting, including with spaces
* remove unused mixins from MultiPartySpec
* update --party's help text regarding multiple parties
* report malformed party errors at extractor cmdline option parse time
* Allow leading plus sign in parseInt/parseDecimal
This behaviour is in line with the newly added DAML-LF primitives
`FROM_TEXT_INT64` and `FROM_TEXT_DECIMAL`.
* Update release notes
* Allow leading plus in parseDecimal as well
* Freeze DAML-LF 1.dev into DAML-LF 1.5
In other words, we release DAML-LF 1.5.
This is required for generic templates (#1387).
* description of FROM_TEXT_INT64 & FROM_TEXT_DECIMAL
* amend version history
add ``FROM_TEXT_INT64`` and ``FROM_TEXT_DECIMAL`` in the specification changelog
* typos
* Fix markup in DAML-LF spec
* Add release notes
* Drop support for DAML-LF 1.1 from damlc
Part of #853.
* Fix docs test
* Add show party test back
* Update release notes
* Remove target version from Java codegen test
* List all available versions.
* Add --all flag in daml version
* Save version list to cache
* Update version cacheing logic.
* Linting error
* PR revisions.
* Update release notes.
* Update daml-assistant/src/DAML/Assistant/Version.hs
* Update docs/source/support/release-notes.rst
Co-Authored-By: Beth Aitman <bethaitman@users.noreply.github.com>
* If you write an invalid range annotation for a test, raise an error, rather than making something garbage up
* Make empty record with an error, just like in Haskell
* Update the release notes
Fixes#1250
The previous behavior when receiving a transaction filter without any
party was to reply with an empty stream. Since, given the current
situation, no data could ever be served for such request, it represents
a better feedback for the user to reject such requests as carrying an
`INVALID_ARGUMENT`.
* Release 0.12.18
We have accumulated quite a few fixes and improvements in the last
week so it’s time for another release.
* tidy up release notes
* mark breaking change as such
* add createAnd syntax to prepare CreateAndExercise commands from Scala codegen contracts
* open-style ExerciseOn typeclass
* GADT-style ExerciseOn works perfectly well, so let's go with that instead
* testing implicit conversion + ExerciseOn TC lookup
* use scalatest-style typesafe === to avoid Anys
* many more ExerciseOn tests
* support ExerciseOn polymorphism in Primitive.exercise
* generate ExerciseOn references in Scala codegen, permitting `createAnd` to combine with exercise* methods
* refactor testCreateContractAndReceiveEvent to support other commands
* compare create and createAnd's command generation behavior in a simple test
* bazel style
* test CreateAndExercise from Scala codegen against sandbox
* release note for Scala codegen create-and-exercise support
* Warn if there are any missing methods in type classes in DAML
Helps with #1194
* Make missing methods a fatal warning
* Update release-notes.rst
* Fix a test that had no signatories
* Update docs/source/support/release-notes.rst
Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Added agreement_text field to the CreatedEvent in Ledger API.
* Changed java bindings + java codegen
* Changed utilities for scala codegen
* Made necessary changes in Sandbox to propagate the agreement text from ContractInst to the CreatedEvent
* Made changes to the navigator to show the agreement text in the contract details page when it is set and not empty
Fixes#1110
The DAML Bintray repository is now accessible without
credentials. Therefore our users don't need to change their local
maven settings.xml file. Considering that this particular step has shown
to be somewhat a barrier or hurdle to overcome, I am removing the
instructions for the settings.xml setup, and adding a note to the java
bindings documentation about adding the repository to the project's
pom.xml file.
Fixes#1207.
* Store divulgence info for contracts
* Store divulgence info for contracts
* some documenting refactors
* Use fail instead of sys.error in test
* Add release note
* Rename migration files
* Fix typo
* Fix updating divulgence info in scenarios
The ACS was comparing differently formatted contract IDs.
Fixes#1166
This is not the perfect fix since the definition `data TextMap` is still
living in the wrong module, see issue #1142. However, this PR forces people
to import `DA.TextMap` when they want to use the `TextMap` type, which is
the desired behaviour for the future.
* Fixes 895: Improve DA Bazel rules for building javadocs.
Extend the da_java_library Bazel macro to also build the Javadoc for the
target. Add the Javadoc artefacts to the release procedure.
* Add a helper function to qualify things with respect to a module
* Supress some warnings I saw when building
* Move Tuple* and Either to daml-prim:DA.Types, so they have a nice name for Java users (instead of GHC.Tuple or DA.Internal.Prelude)
* Add copyright header
* Update daml-foundations/daml-ghc/daml-prim-src/DA/Types.daml
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* Update daml-foundations/daml-ghc/daml-prim-src/DA/Types.daml
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* Update the daml-lf translation of tuple types
* Fix up the scala bindings for how to use types
* Clarify what action people need to take following the release notes
* Fix an expected test
* Clarify the changelogs even more
* Run ScalaFmt
* Clean up the release notes a bit
* Use the changelog from Beth
* Update the release notes again
* Update docs/source/support/release-notes.rst
Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com>
* Fix up the scenario error messages
* Remove ExercisedEvent in Event oneof.
The Event message is only used in the Transaction message. Flat
transactions do not contain exercised events, but only created and
archived events. Therefore we can remove the ExercisedEvent from the
Event oneof, without breaking transport compatibility.
HOWEVER: The Java Bindings used to use the data.Event class for both flat
transactions and transaction trees. To properly represent the actual
event types in the two transaction structures,
1) Event is now and interface and is only used in the Transaction class.
2) there is a new interface TreeEvent, which is used in the TransactionTree class.
* CreatedEvent implements Event and TreeEvent
* ExercisedEvent implements TreeEvent
* ArchivedEvent implements Event
Some "pathological" cases where an occurrence of an exercised event
would have resulted only in an exception, are now removed (see change in
LedgerApiV1.scala).
Fixes#960.
* Add a Compatibility alias for String, for people coming from Haskell
* Clean up the deprecated messages, no point saying which DAML version given its no longer interesting information
* Cleaning up release notes
* Finish cleaning up release notes
* use non-stupid link syntax
* And fix the note at the top too
* Correct DAML to DAML stdlib
* avoiding linear searching for transactions from genesis
* validating transaction ids
* one more failing test nailed down
* fixing off by 1 error
* docs + release notes
* fixing EventIdFormatterSpec
* fixing broken validation test
* Re-order fields in records if all labels are provided
Fixes#988
* Add line to release notes
* Fix line on release notes
* Document change on the Ledger API definition
* Simplify pattern matching
* Improve and fix tests
Integration tests now look for the "Missing field label" rather then the
"Mismatching record label" when inspecting errors. Furthermore, a test
has been added that ensures that repetitions in labels still raise an
error.
* Add comment
Comment about relationship between fields length check and fields reordering based on labels
Co-Authored-By: stefanobaghino-da <43749967+stefanobaghino-da@users.noreply.github.com>
* Improve Ledger API docstring
Explicitly state the semantics of labeled fields (i.e. repeated keys are not accepted)
Co-Authored-By: stefanobaghino-da <43749967+stefanobaghino-da@users.noreply.github.com>
* Add quickstart-scala IOU example, DAML Assistant template, #614
* Move all scala examples under language-support/scala/examples
* Removing target dirs which don't get excluded by the glob, #614
* record keys locally to a single update, fixes#969
* do not delete keys in machine for nonconsuming choices, fixes#973
* amend release notes
* actualize new test results
If a variant itself is not serializable, but the synthesized record for
one of its constructors is, then said record is returned by the
interface reader in the set of type declarations, when the variant type
itself is not.
When constructing the InterfaceTree in preparation of the codegen, we
previously rejected such a situation.
We now generate Java code for such a synthesized record, as it is a more
generally correct way of interpreting DAML LF (i.e. the DAML compiler
could decide tomorrow to create such multi-component record names for
regular records).
In any case, we consider this to be an edge case, as the synthesized
record for the variant constructor cannot be used directly either from
DAML or the Ledger API.
* Migration guide for new assistant
* Add some more words about the changes and start explaining config file.
* Flesh out migration of configs.
* Fix summary of changes.
* Fix formatting of list
* Tidying up migration guide
* Add Functor/Applicative/Action instances for reader monad
This is possible because we dropped DAML-LF 1.0 support from the
compiler lately.
* Add release notes
* Fix language-server-tests
* Deprecate DA.{Map, Set} in favour of DA.Next.{Map, Set}
`DA.Next.{Map, Set}` were known as `DA.Experimental.{Map, Set}` until now.
We also remove the tests for `DA.{Map, Set}` because our test infrastructure
can't nicely deal with tons of deprecation warning. Since we're not going to
change these files anymore, this seems to be a fair trade-off.
* Fix code spans in release notes
Submitting a command via the CommandService now returns either the
transaction id (SubmitAndWaitForTransactionId), the flat transaction
(SubmitAndWaitForTransactionResponse), or the transaction tree
(SubmitAndWaitForTransactionTreeResponse).
This means that users don't have to wade through the transaction stream
to retrieve the resulting transaction. This is particularly useful in
combination with #479.
Fixes#406
* clean up v3 contract key case in TransactionVersions
* clean up duplicate cases in ValueVersions.assignVersion
* make LanguageMinorVersion a proper ADT, aliased LanguageVersion.Minor
* port DecodeV1 to LanguageMinorVersion ADT via implicit conversion
- @remyhaemmerle-da might prefer the explicit application of Stable/Dev
* make releasePrecedes private
* add dev versions to the timeline
* copyright header for LanguageMinorVersion
* build the package database for 1.dev, support 1.dev as --target
* test presence and new-ness of "dev" in timeline
* report dev versions in engine info; note 1.dev target in release notes
* spec and governance rules on 1.dev and minor dev in general
* make the governance rule about dev more direct
* 1.x
* missed plural; thanks @leo-da
* further definition of 1.dev in LFv1 spec; thanks @remyhaemmerle-da
This change is needed in preparation of #406, where we want to return a
transaction tree and flat transaction after a SubmitAndWaitForTransaction(Tree).
* Drop DAML-LF 1.0 support from compiler
This will enable us to add `Functor`, `Applicative` and `Monad` instances
for `(->) r` in the `daml-stdlib`. We'll do this in a separate PR.
* Remove codegen test for DAML-LF 1.0
* remove outdated flags from comments
* update tests in preparation for visibility rules
* check visibility of contract keys, fixes#751
* add release notes
* include visibility check in scenario runner
* stephen's suggestions
* fix type error in api server example
* scalafmt
* bring TransactionFiltration.scala up to speed with disclosure
see
<faf1cde1a1/ledger-api/grpc-definitions/com/digitalasset/ledger/api/v1/event.proto>
for an in-depth description. fixes#794.
* add tests for contract key visibility
* move a lot of ledger testing utils out of command checks
* move a lot of ledger testing utils out of command checks
* remove useless checks regarding divulgence
* add tests regarding event witnesses
* update release notes
* re-introduce safety when disclosing
* hedging against possibly gaps in offsets
* doing the math right
* adding some notes
* extracting pipeline logic
Please enter the commit message for your changes. Lines starting
* extracting "run until" logic to be testable
* testing _run until_ logic
* adding release note
* copyright
* adding link to PR
* changing lookUpByTransactionId to use TransactionPipeline
* fixing issue identified by Extractor tests
* Rename DA.TextMap.filter into filterWithKey
`filterWithKey` reflects better that the predicate used for filtering
takes the key as an argument.
* Add filter back as deprecated and change DA.Map as well
* Adapt tests to renaming
Tested with a dry run:
Copying .../com_github_digital_asset_daml/bazel-out/k8-fastbuild/bin/ledger/api-server-damlonx/api-server-damlonx_src.jar
to .../com/daml/ledger/api-server-damlonx_2.12/100.12.11/api-server-damlonx_2.12-100.12.11-sources.jar
* release: make 'ci/release.sh' runnable for dry runs.
release-dry-run.sh is outdated and duplicates logic from ci/release.sh, so it
got deleted.
* ledger-api-test-tool: release the tool together with the SDK components.
* ledger-api-test-tool: update docs to reflect distribution mechanism.
* ledger-api-test-tool: further docs refinements.
* Add Ledger API Test Tool mention into release notes.
Add field 'usedPackages' to Transaction to record the packages
that were used during interpretation to produce said transaction.
This serves as a hint to specify what packages are required to
validate the transaction. Note that this may not be sufficient
for future implementations that e.g. compile DAML-LF to JVM
bytecode and require packages containing only type definitions
as inputs.
This hint is mainly required for ledger implementations for which the
packages are tracked similarly to contract instances, and which
require that all inputs to their transaction must be declared
beforehand.
This work is required for the participant-state key-value utilities
described in issue #410 and implemented in PR #637.
* removing major LF dev version from Haskell proto codecs
* removing major LF dev version from scenario service client
* missed import
* remove Scala support for dev major version; remove --allow-dev option from sandbox cli
* Version.minorFromCliOption function
* don't build daml-stdlib artifacts for dev major
* remove damlc CLI --target dev
* release note about removed dev major LF version
* governance now discusses minor dev, no more major dev
* don't build from daml_lf_dev.proto anymore
* remove daml_lf_dev.proto
* raise deprecated release
* reserve 9999 in the ArchivePayload sum, as suggested by @bitonic
* use reserved proto keyword, as suggested by @bitonic
- `reserved` cannot occur within `oneof` block
* remove --allow-dev test
* dev removal release note followed the previous release; move it back to HEAD
* Move application architecture guide
* Changing titles etc
* Reshuffling
* More reshuffling of files and content
* Refactoring iinto more sensible pages:
* Getting most stuff into place
* A ton of tidying up
* Fixing things up
* Tidying up
* Address review comments
* Fixes
* Fix warnings etc
* Update redirects
* Try to add copyright header
* Fix headers issue
* Clarify DAML-LF relationship
* Change I missed
The documentation is in a state that interested third-parties can
consume; and will likely find valuable to consume. It also contains a
description of the current status of the integration kit and the roadmap
outlining its expected evolution.
We have added links to GitHub issues where documentation is missing, or
where it refers to missing pieces of code.
* Add release notes entry
* Add CreateAndExercise command to Java Bindings data layer
* Add CreateAndExercise command to DAMLe
The CreateAndExerciseCommand allows users to create a contract and
exercise a choice on it within the same transaction. Users can use this
method to implement "callable update functions" by creating a template
that calls the update function in a choice body.
Fixes#382.
* Add CreateAndExercise command handling to the sandbox
* Add CreateAndExercise command to the Ledger API
* First versions of taylor series based power and log functions
* Improve precision by switching exp algo and shifting points
* Code comments for the math library
* Trig functions
* Update daml-foundations/daml-ghc/daml-stdlib-src/DA/Math.daml
Co-Authored-By: bame-da <40762178+bame-da@users.noreply.github.com>
* More efficient integer exponentiation
* Make Powerable the typeclass for (^) only.
* Move `(^)` to `Multiplicative` and fix package-database
* Round all Decimal literals to 10 digits
* Add release notes
* Update daml-foundations/daml-ghc/daml-stdlib-src/DA/Math.daml
Co-Authored-By: bame-da <40762178+bame-da@users.noreply.github.com>
* Add comment on performance
* Remove default definition for `(^)`
* Fix comments
* Fix scenario-error test
* Fix tests again
The call to blockingGet can lead to no progress being made in certain
scenarios. Therefore I am removing the blocking call and replacing it
with a regular "doOnSuccess".
The DAML-LF Archive Protobuf definitions, as packaged and distributed
via Bintray and the SDK, currently packages the files in a directory
structure that does not match with the actual one, causing the usage of
`protoc` on the packaged definitions to raise errors. This commit fixes
it by packaging the files in the same directory structure as the one
found in the repository.
* fix various conversion functions from string to Decimal
Fixes#399.
This fixes a critical bug -- since:
* The DAML-LF spec specifies that the scale of `Decimal` is 10 --
that is, there are at most 10 digits past the decimal point:
<79bbf5c794/daml-lf/spec/value.rst (field-decimal)>.
* However, the code converting from the string representation that
we get on the wire was _not_ performing this check. This is due
to two reasons:
- `Decimal.check` is a function that checks whether a given
`Decimal` is within the upper and lower bounds of what the
DAML-LF spec specifies, but crucially it does _not_ check that
the scale is not exceeded:
<79bbf5c794/daml-lf/data/src/main/scala/com/digitalasset/daml/lf/data/Decimal.scala (L31)>.
This behavior is correct in some cases (more on that later),
but not in others. Crucially, `Decimal.fromString`, which was
supposed to check if a decimal string literal is valid, used
this function, which means that it accepted string literals
containing numbers out of the required scale, rounding them to
make them fit within the scale. This function has been renamed
to `Decimal.checkWithinBoundsAndRound`, and a new function
`Decimal.checkWithinBoundsAndWithinScale` has been added, which
fails if the number provided has data not within the scale.
`Decimal.fromString` now uses
`Decimal.checkWithinBoundsAndWithinScale`.
- `ApiToLfEngine.parseDecimal` assumed that `Decimal.fromString` _did_
fail when passed numbers that were in any way invalid, and
moreover did _not_ use the result of `Decimal.fromString`, but rather
re-parsed the string into an unconstrained `BigDecimal`:
<79bbf5c794/ledger/ledger-api-common/src/main/scala/com/digitalasset/platform/participant/util/ApiToLfEngine.scala (L96)>.
The reason for the code to work this way is that in the past
it was responsible for converting decimal strings both for the
current engine but also for an older version of the engine which
handled decimals of a different type. Both issues have been fixed.
* Therefore, `Decimal`s with scale exceeding the specified scale
made it into the engine, and contracts could be created containing
this invalid value.
* Once on the ledger, these bad numbers can be used to produce extremely
surprising results, due to how `Decimal` operations are
implemented. Generally speaking, all operations on `Decimal`
first compute the result and then run the output through
`Decimal.checkWithinBoundsAndRound`. The reason for this behavior
is that we specify multiplication and division as rounding their
output. Consider the case where the bad value 0.00000000005 made
it to the engine, and is then added to 100. The full-precision
result will be 100.00000000005, which after rounding becomes 100.
Therefore, on a ledger where such invalid values exist, it is not
the case that `y > 0 ==> x + y != x`, and so on.
Thanks a bunch to @briandbecker for the excellent bug report.
* fix failing test using to much precision
* TransactionServiceIT passes
* fixup
* using record time taken from TimeProvider
* taming TransactionBackPressureIT to avoid overloading of submission service
* implement AutoClosable on all Ledger related components having stateful resources
* reenabling InMemory fixture
* disabling contract key integration test for SandboxSQL fixture
* removing TODO
* bumping up timeout on TransactionServiceIT due to slow Azure pipeline
* 1 minute timeout for SqlLedgerSpec
* making jdbcurl CLI argument hidden
* updating release notes
* Do not divulge contracts to observers in nonconsuming exercises
Disables support for non-default ledger feature flags, as they
are meaningless since ledger server logic does not respect the flags.
Instead of large refactoring to add support for the old flag settings,
it is best to disallow the deprecated flags, and later on phase out the
flags completely.
Re-enables test_divulgence_of_token in sandbox semantic tests.
Fixes#157.
* purge LedgerFlags entirely...
...since we only support one version of them anyway, and clearing them
* updated release notes
Finishes the work started in #324:
- drops deprecated `name` in identifiers, adopting `moduleName` and `entityName`
- use string to represent `timestamp`s to avoid a loss of precision
- use string for `date`s too for consistency and future-proofness
The work unconvered a quite serious bug caused by the lack of coverage
on the validation of timestamps: the model was expecting timestamps to
be of type timestamp, whereas in Ledger API values they are represented
by numbers.
Allows users to supply the argument -V or --verbosity with a number from 0 to 4 for additional logging.
Also, the first and last log message is logged as a warning, when it really
should just be on INFO level.