Commit Graph

274 Commits

Author SHA1 Message Date
Beth Aitman
befcb0995c Move release note (#1113) 2019-05-14 11:40:26 +00:00
Francesco Mazzoli
186cf14729 fix duplicate contract ids when loading scenarios with pass (#1105)
* rename --jdbcurl to --postgres-backend

* increment ledger end correctly when loading from scenarios

fixes #1079
2019-05-14 10:05:43 +00:00
Nick Smith
6f6f3337c7
Fixes 895: Improve DA Bazel rules for building javadocs. (#896)
* 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.
2019-05-14 09:40:30 +02:00
Beth Aitman
1b6df13861 Improve docs flow (#1101)
* Improve docs flow

* Move integration kit as Simon requested

* Update daml-foundations/daml-ghc/base-rst-prefix.rst

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
2019-05-13 18:24:18 +00:00
Beth Aitman
8c8bd5e6b9 Full documentation for the new assistant (#740)
* First draft of new assistant docs

* Quick pass to fix up references

* Apply suggestions from code review

Co-Authored-By: bethaitman <bethaitman@users.noreply.github.com>

* Apply suggestions from code review

* Fix links

* Fill out assistant docs somewhat

* Update docs/source/tools/extractor.rst

* Update quickstart guide from #720

* Fixes

* daml new changes

* Update docs/source/getting-started/quickstart.rst

Co-Authored-By: bethaitman <bethaitman@users.noreply.github.com>

* Fix build

* Fix todos about protobuf

* Final tidying up

* Add installer link

* Apply suggestions from code review

Co-Authored-By: bethaitman <bethaitman@users.noreply.github.com>

* A couple of corrections

* Add release note

* Fix release notes

* AAAAAAAAAARGH
2019-05-13 16:33:59 +00:00
Neil Mitchell
ed431b4717
Move Tuple and Either types to DA.Types (#1099)
* 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
2019-05-13 16:36:21 +01:00
Gerolf Seitz
17df4e78e1
Java Codegen: generate methods for CreateAndExerciseCommand (#1107)
The Java Codegen now generates methods for creating a
CreateAndExerciseCommand for a particular choice given a template.

Contributes to #1092.
2019-05-13 16:11:10 +02:00
Gerolf Seitz
8158269b7d
Remove ExercisedEvent in Event oneof. (#1067)
* 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.
2019-05-13 14:36:13 +02:00
Gerolf Seitz
199d0a4740 Update release instructions and add missing release label (#1078) 2019-05-13 08:04:20 +00:00
Neil Mitchell
88d166d642
Add String compatibility helper (#1070)
* 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
2019-05-10 14:17:09 +01:00
Moritz Kiefer
debe58e351 Release 0.12.17 (#1071) 2019-05-10 13:02:53 +01:00
Beth Aitman
348e302370 Cleaning up release notes (#1042)
* 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
2019-05-10 10:22:26 +00:00
Gabor Aranyossy
4abc18d8a1
avoiding linear searching for transactions from genesis (#994)
* 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
2019-05-10 11:28:14 +02:00
Gerolf Seitz
c89f3bdebe
Sandbox: Respect MRT (#990)
Transactions with a record time > maximum record time are now rejected
with a timeout error instead of being committed to the ledger.
2019-05-09 11:10:54 +02:00
Gary Verhaegen
ef82cbe5ea add anchors to release notes (#999) 2019-05-08 16:01:09 +00:00
Stefano Baghino
f9839a7e4c
Re-order fields in records if all labels are provided (#989)
* 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>
2019-05-08 12:54:53 +02:00
gleber
2aa14338a1
Release DAML Integration Kit as ALPHA. (#892) 2019-05-07 18:20:27 +02:00
Francesco Mazzoli
bd4ca991ec
release (#985)
* release

* update release notes
2019-05-07 17:57:08 +02:00
Leonid Shlyapnikov
8534e2837f
quickstart-scala DAML Assistant template (#745)
* 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
2019-05-07 11:41:29 -04:00
Gerolf Seitz
bac5c4a6f4 Java Bindings: Properly convert CreateAndExerciseCommand (#982)
The conversion of the CreateAndExerciseCommand in the Command base class
was missing. This also adds a missing test for that.

Fixes #979.
2019-05-07 17:04:48 +02:00
Francesco Mazzoli
bb6f21373d
record keys locally to a single update, fixes #969 (#970)
* 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
2019-05-07 16:09:52 +02:00
Gerolf Seitz
2c04e1fd6d
Java Codegen: Generate types with multiple name components (#946)
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.
2019-05-07 11:12:42 +02:00
Beth Aitman
d77384bcb6 Migration guide for new assistant (#768)
* 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
2019-05-06 14:55:20 +00:00
Moritz Kiefer
7f42f2e556
Release 0.12.15 (#925) 2019-05-06 09:57:15 +02:00
Martin Huschenbett
0ebdcb961e
Add fromListWith and merge to DA.TextMap and DA.Next.Map (#898)
Also, resurrect the tests we had for both functions when we still tested
`DA.Map`.
2019-05-03 20:41:11 +02:00
Martin Huschenbett
16ea1ceacd
Add Functor/Applicative/Action instances for reader monad (#888)
* 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
2019-05-03 17:01:09 +02:00
Martin Huschenbett
59abe7e384
Deprecate DA.{Map, Set} in favour of DA.Next.{Map, Set} (#886)
* 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
2019-05-03 16:53:50 +02:00
Gerolf Seitz
ecf6ece8c4
CommandService returns useful data for successful submissions (#875)
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
2019-05-03 16:01:41 +02:00
Moritz Kiefer
45101fe0f9
Release 0.12.14 (again) (#874)
Apparently I haven’t had enough coffee and forgot to update the
VERSION in the previous commit …
2019-05-03 11:27:46 +02:00
Stephen Compall
f5490a5454 add LF 1.dev "minor dev version" (#709)
* 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
2019-05-03 10:36:45 +02:00
Moritz Kiefer
b081a8320f
Release 0.12.14 (#870) 2019-05-03 09:31:16 +02:00
Gerolf Seitz
f4d8e134e3
Add TransactionService methods for looking up flat transactions (#830)
This change is needed in preparation of #406, where we want to return a
transaction tree and flat transaction after a SubmitAndWaitForTransaction(Tree).
2019-05-03 09:03:12 +02:00
Neil Mitchell
4b89903a73 Delete the id function (#851)
* Delete the `id` function

* Fix documentation that referred to id

* Fix some DAML-LF tests that relied on id
2019-05-02 22:57:52 +00:00
Martin Huschenbett
df230912c7
Drop DAML-LF 1.0 support from compiler (#863)
* 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
2019-05-02 21:35:06 +02:00
Jussi Mäki
9d66ee4fa2
Release version 0.12.13 (#856) 2019-05-02 18:49:43 +02:00
Francesco Mazzoli
cf89366ac6 respect contract visibility when looking up contract keys (#753)
* 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
2019-05-02 14:02:30 +00:00
Gabor Aranyossy
c501d64264
fixing bug for mishandling potential offset gaps (#802)
* 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
2019-05-02 15:00:41 +02:00
Moritz Kiefer
053b2ad160
Release 0.12.12 (#792)
We need a release for a client, I’ll take care of testing it and
making it public.
2019-04-30 15:29:55 +02:00
Martin Huschenbett
033e637209
Rename DA.TextMap.filter into filterWithKey (#731)
* 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
2019-04-30 11:45:13 +02:00
Jussi Mäki
d887b21036
Release scala source jars to bintray (#767)
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
2019-04-29 17:11:01 +02:00
Gabor Aranyossy
8e54bf2e67
documenting persistence with Postgres in SDK docs (#722)
* documenting persistence with Postgres in SDK docs

* revealing jdbcurl flag as it's docuemnted now

* updating release notes

* Update docs/source/tools/sandbox.rst

Co-Authored-By: gaboraranyossy-da <gabor.aranyossy@digitalasset.com>

* Update docs/source/tools/sandbox.rst

Co-Authored-By: gaboraranyossy-da <gabor.aranyossy@digitalasset.com>

* Update docs/source/tools/sandbox.rst

Co-Authored-By: gaboraranyossy-da <gabor.aranyossy@digitalasset.com>

* Apply suggestions from code review

Co-Authored-By: gaboraranyossy-da <gabor.aranyossy@digitalasset.com>

* changed release note entry as suggested

* Apply suggestions from code review

Co-Authored-By: gaboraranyossy-da <gabor.aranyossy@digitalasset.com>
2019-04-29 15:22:05 +02:00
gleber
c095a2e20c Ledger api test tool release (#756)
* 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.
2019-04-29 12:16:19 +00:00
Jussi Mäki
fce04b9e4a Track the packages used to produce a transaction (#735)
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.
2019-04-27 01:12:04 +00:00
Stephen Compall
a3e9aad147
remove major LF dev version (#681)
* 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
2019-04-26 13:10:09 -04:00
Beth Aitman
591f3ff94e
Rework the app dev docs (rebased) (#699)
* 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
2019-04-26 14:09:38 +02:00
Simon Meier
7696f085b5
daml-integration-kit: release PRE-ALPHA version in SDK (#440)
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.
2019-04-26 13:41:18 +02:00
Gabor Aranyossy
cc32ee5025
adding missing tests around Sandbox's CLI module (#668)
* introducing CliSpec

* updating sandbox sdk docs

* fixing the missing code block

* adding missing copyright headers

* making allow-dev hidden

* HardCoded -> Predefined

* updated changelog
2019-04-26 10:12:23 +02:00
Moritz Kiefer
80e2107130 Release 0.12.11 (#713)
Now that the Windows release should be fixed, let’s try again.
2019-04-26 10:10:43 +02:00
Beth Aitman
ed690e51cb Document flexible controllers... (#634)
* First stab at flexible controllers placeholders

* Add release note

* Fixing up errors

* Finish flexible controllers todos

* Incoporate Martin's feedback

* Fix return type error
2019-04-25 16:35:16 +02:00
Stefano Baghino
7ac438e87b
Remove //language-support/js (#691)
The JavaScript ecosystem support is being spun off in its own
repository. The new home is https://github.com/digital-asset/daml-js

For further details, here is the counterpart issue in the new repo:

https://github.com/digital-asset/daml-js/issues/1
2019-04-25 14:30:25 +02:00
Martin Huschenbett
b7e6cc8948 Release SDK 0.12.10 (#686)
The main effect is that we switch to DAML-LF 1.3 as the default compilation
target, which enables contract keys and text maps.
2019-04-25 11:37:23 +02:00
Francesco Mazzoli
a504bbdc9e make DAML-LF 1.3 the default (#654) 2019-04-25 08:10:44 +00:00
Gary Verhaegen
963d0779c3 release 0.12.9 (#645) 2019-04-24 21:56:48 +00:00
Gerolf Seitz
7f8dbfeca0 Add CreateAndExercise command throughout the stack (#563)
* 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
2019-04-18 16:05:16 +00:00
Bernhard Elsner
aa247e4db6 Embryonic math library for DAML (#419)
* 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
2019-04-17 21:15:25 +00:00
Gary Verhaegen
1697e764bd
release 0.12.7 (#579) 2019-04-17 16:41:35 +01:00
Gary Verhaegen
bef7f758cb
release 0.12.6 (#539) 2019-04-16 15:44:20 +01:00
Gerolf Seitz
f1b077dd1a
Remove blocking call in Bot.wire (#521)
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".
2019-04-16 11:53:29 +02:00
Gary Verhaegen
4e80b1f927
release 0.12.5 (#504) 2019-04-15 21:17:38 +01:00
Stefano Baghino
4110e039dd
Fix the DAML-LF Archive package structure (#502)
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.
2019-04-15 18:25:09 +02:00
Gary Verhaegen
e83c21ae11
release 0.12.4 (#489) 2019-04-15 15:47:32 +01:00
Francesco Mazzoli
6af84051ee
fix various conversion functions from string to Decimal (#439)
* 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
2019-04-14 13:49:28 +02:00
moritzkiefer-da
1326596795
Release 0.12.3 (#458) 2019-04-12 20:22:31 +02:00
Gary Verhaegen
59f480d978 prepare release note for next release (#443) 2019-04-12 16:17:31 +02:00
Gabor Aranyossy
3e154fd682
Sandbox Postgres support with passing api integration tests (#392)
* 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
2019-04-12 12:25:48 +02:00
Jussi Mäki
1f2246c822 Do not divulge contracts to observers in nonconsuming exercises (#325)
* 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
2019-04-11 14:41:35 +02:00
Stefano Baghino
e775b4974e
Amend the Node.js bindings Ledger API values representation (#338)
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.
2019-04-10 10:47:29 +02:00
Stefano Baghino
fa5c704e7e
Map Protobuf's 64 bit integers to strings in JS (#324) 2019-04-09 15:19:32 +02:00
Nick Smith
3d9731162b
Java codegen daml lf map (#201)
* Fixes #184 java-codgen: Correct num. of type params for DamlLf Map primitive.
2019-04-08 08:31:23 +02:00
Stefano Baghino
f275b0c471 Add verbosity option for Java codegen (#218)
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.
2019-04-05 10:54:42 +02:00
Bernhard Elsner
e2524806ac Incorporate Robert's suggestion 2019-04-04 16:40:36 +02:00
Bernhard Elsner
d03c24262f Update release notes for Navigator changes 2019-04-04 16:40:36 +02:00
Francesco Mazzoli
9c7357c7de update all references of old repo to new repo 2019-04-04 16:20:07 +02:00
Digital Asset GmbH
05e691f558 open-sourcing daml 2019-04-04 09:33:38 +01:00