Commit Graph

33 Commits

Author SHA1 Message Date
Remy
f100750386 daml-lf: create value version 5 for enum types (#1917)
* lf-encoder: minor fix for let expression

* extractor: add test for enum types

* navigator: a small test for enum type

* daml-lf: create value version 5 for enums

* formatting

* daml-lf: fix version timeline

* extractor: fix enum support
2019-07-03 07:16:52 +00:00
Stefano Baghino
3dc0c02766
Add contract key support to Scala bindings and navigator (#1950)
* Expose the contract key in the Scala bindings

* Expose contract keys on the navigator

* Update release notes

* Remove ui-backend.conf file from navigator scenario

Addresses https://github.com/digital-asset/daml/pull/1950#discussion_r298814223

* Fix broken docstring reference to DamlLfDefRef

Addresses https://github.com/digital-asset/daml/pull/1950#discussion_r298814301
2019-06-30 20:57:55 +02:00
Stefano Baghino
f8bebffb4e Expose signatories and observers throughout the platform (#1814)
* Add signatories and observers to Ledger API

Cascade fixes deriving from compilation and test errors.

* Add signatories and observers to Java bindings and codegen

* Add signatories and observers to Scala bindings and codegen

* Add signatories and observers to navigator

* Add signatories and observers to the Haskell bindings

* Add integration test

* Comply with formatting standard

* Add release notes

* Apply edits from CI feedback and self-review

* Fix wrong input on test case for observers sorting

Co-Authored-By: Robert Autenrieth <31539813+rautenrieth-da@users.noreply.github.com>

* Read JSON as strings from DB, parse them as parties

Address https://github.com/digital-asset/daml/pull/1814#discussion_r296405252

* Change parties rendering and observer display condition

Address https://github.com/digital-asset/daml/pull/1814#discussion_r296390104

* Fix sorting tests, implement sorting by agreement

Address https://github.com/digital-asset/daml/pull/1814#discussion_r296397390

FIXME notes have been added for suspicious test cases

* Prevent any mutation of CreatedEvent arguments

Address https://github.com/digital-asset/daml/pull/1814#discussion_r296572639

* Comply with formatting standard

* Stakeholders are filtered up to the witnesses

Addresses https://github.com/digital-asset/daml/pull/1814#discussion_r297102521
2019-06-26 14:02:59 +00:00
Robert Autenrieth
868a72b93a
Add support for DAML_PROJECT in Navigator (#1458)
* Add circe-yaml

* Add new helper library to load SDK config files

* Add support for DAML_PROJECT in navigator

Fixes #1128
2019-06-24 17:06:20 +02:00
Stefano Baghino
6ba26f4e1f Add contract keys to created events in the Ledger API (#1586)
* Add contract keys to created events in the Ledger API

Fixes #1268

* Update ledger/ledger-api-integration-tests/src/test/itsuite/scala/com/digitalasset/platform/tests/integration/ledger/api/TransactionServiceIT.scala

Co-Authored-By: Stephen Compall <scompall@nocandysw.com>

* Update language-support/java/bindings-rxjava/src/test/scala/com/daml/ledger/rxjava/grpc/helpers/TransactionGenerator.scala

Co-Authored-By: Stephen Compall <scompall@nocandysw.com>

* Update ledger/ledger-api-integration-tests/src/test/itsuite/scala/com/digitalasset/platform/tests/integration/ledger/api/TransactionServiceIT.scala

Co-Authored-By: Stephen Compall <scompall@nocandysw.com>

* Add run suffix to transaction service integration tests

Addresses https://github.com/digital-asset/daml/pull/1586#discussion_r293233810
Addresses https://github.com/digital-asset/daml/pull/1586#discussion_r293233886

* Re-introduce unused bindings

Addresses https://github.com/digital-asset/daml/pull/1586#discussion_r293056685
Addresses https://github.com/digital-asset/daml/pull/1586#discussion_r293056741

* Update ledger/ledger-api-common/src/main/scala/com/digitalasset/platform/participant/util/LfEngineToApi.scala

Co-Authored-By: Stephen Compall <scompall@nocandysw.com>

* Use newly introduce assertOrRuntimeEx method

Applies the suggestion introduced by 7cc5c3eb71

* Contract keys to be typed after generated types

Also adds support in daml-lf/interface for contract keys

Addresses https://github.com/digital-asset/daml/pull/1586#pullrequestreview-249431707

* Address https://github.com/digital-asset/daml/pull/1586#discussion_r293773427

* Fix compilation error from previous commit

* Fix compilation errors in navigator
2019-06-14 16:45:12 +00:00
Remy
c76274585a navigator: add enum types (#1529)
* navigator: add enum types

* Address Stephen's comments

* do not serialize enum types

* add comment dropped in previous commit
2019-06-06 16:24:42 +00:00
Jost Berthold
5ffe4a70c0 extractor, navigator: --ledger-api-inbound-message-size-max option replaces 50MiB hard-coded [package size] limit (#1520)
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
2019-06-05 12:09:11 -04:00
Robert Autenrieth
fe96e79987
Add missing column in Navigator database (#1455)
Fixes #1454
2019-05-29 21:59:24 +02:00
Remy
f84e7d79d2 Add enum type to daml-lf (#1397)
* add enum type to daml-lf dev

* Address Francesco's comments

* Address Martin's comments

* fix daml-lf proto version history
2019-05-29 12:15:01 +00:00
Gabor Aranyossy
ff088efd94
porting API services to used Index Service v2 (#1362)
* moving to index service v2

* damlonx does not depend on v2 index service anymore

* leger -> ledger

* transacion id fix
2019-05-24 19:18:51 +02:00
Remy
4f18b1afa7 DAML-LF internal type safety (#1192)
* Rename Value's ContractId to VContractId

* daml-lf: a bit more about PartyId

* daml-lf: Concatenable MatchingStringModule

* daml-lf make clear type used for Scenarios only

* daml-lf create ContractId, LedgerId, TransactionId

* sandbox-sql conversion util

* LedgerName -> LedgerString

* futher type cleanup in the sandbox

* daml-lf add test for LedgerString

* fixing tests

* a bit more safety in the DB

* Address Stephen's comments

* fix rebase

* More fixes for StringModule

* change length of LedgerString (256 -> 255)
2019-05-24 09:53:29 +00:00
Gerolf Seitz
c645348ca1
Expose a contract's agreement text on the Ledger API (#1151)
* 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
2019-05-17 11:22:05 +02:00
Remy
4935e72c65 navigator: revert commented out tests in 2e3a8793 (#1178) 2019-05-16 09:57:11 +00:00
Remy
c7df212d42 Daml lf type safty (Decimal) (#1098)
* daml-lf: make Decimal type safe

* daml-lf: create Utf8String type

* daml-lf: cleanup in data package

* Address Stephen Comments

* daml-lf: remove UTF8String
2019-05-14 18:10:45 +00: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
Remy
2e3a87934b Daml lf type safty (ChoiceName, VarName, FieldName, ConstructorName) (#983)
* daml-lf: make DefinitionRef more typesafe

* daml-lf: Identifier -> DefinitionRef

* daml-lf: remove unsafe apply and copy methods from DottedName

* daml-lf: create identifier

* daml-lf: make ChoiceNames Identifiers

* daml-lf: cleanup TVar

* daml-lf: FieldNames & VariantConstructors -> Identifiers

* bazel fmt

* daml-lf: VarName -> Identifier

* daml-lf: drop return inside Ref.scala

* daml-lf Identifier -> Name

* daml-lf DefinitionRef -> Identifier

* daml-lf make iface more type safe
+ address Francesco's comments

* daml-lf: remove unsafe unapply from MatchingStringModule

* fix navigator

* Address Stephen's Comments
2019-05-13 11:17:12 +00:00
Remy
0489c6e0a5
Daml lf type safty (Party & PackageId) (#761)
* daml-lf: split SimpleString into Party and PackageId

* daml-lf remove parameter from DefinitionRef
2019-05-06 20:40:43 +02:00
Stephen Compall
157fab963b
daml-lf: move EnvironmentInterface from Scala codegen to interface library (#781)
Also move Interface and InterfaceType out of the reader subpackage; they
belong with the rest of the data model at the iface root.

The specific mechanics of reading a Dar all the way to producing an
EnvironmentInterface are left to Scala codegen's Codegen and Java
codegen's CodeGenRunner; there's no consensus or great stability on the
best way to tie these pieces together, but all the pieces might as well
be available in the interface library at least.

Inspired by a query on Slack by @leonelag regarding reading the
codegen-relevant parts of dalfs and dars; thanks!

* daml-lf: move EnvironmentInterface to interface library from Scala codegen

* daml-lf: move Interface out of reader subpackage

* language-support/java: deal with moving Interface out of reader subpackage

* document Interface and EnvironmentInterface

* missed copyright header in reader package.scala

* extractor: deal with moving Interface out of reader subpackage

* navigator: deal with moving Interface out of reader subpackage
2019-04-29 17:01:01 -04:00
mziolekda
dc17c30d76 implement TLS in reference daml-on-x server (#739)
* implement TLS in reference daml-on-x server

* add tls configuration to LedgerApiTestTool

* add ssl tests to the reference ledger server
2019-04-29 17:01:26 +00:00
Robert Autenrieth
5f7b93e7a4 Fix Navigator console issues (#710)
* Navigator: Fix pretty-printing empty objects

* Navigator: fix display of tables on dumb terminals

For dumb terminals, reader.getTerminal.getWidth returns 0.
2019-04-26 08:45:26 +02:00
Robert Autenrieth
f13b16c78e Navigator console: Fix documentation of contract arguments (#680)
* Navigator: Fix console documentation

Arguments have been using the JSON syntax for a while.

* Navigator: Output arguments in JSON format

... to allow copy-pasting them
2019-04-26 00:33:34 +00:00
Francesco Mazzoli
14f6728219
parametrize iface types only by type... (#678)
...rather than by "field with type". in preparation to enums (#105)
2019-04-25 17:25:23 +02:00
Robert Autenrieth
8655a792c3
Navigator: Print important messages to stderr (#522)
* Navigator: Print important messages to stderr

All messages that users need to act on are now printed to
stderr, in addition to the log file.

Otherwise, it is confusing to users why they have to start
Navigator twice.

Fixes #112
2019-04-16 13:20:59 +02:00
Robert Autenrieth
ae89a0df24
Navigator: URLEncode party names for Akka (#523)
Akka does not like actor names with spaces,
which are valid in DAML.

Fixes #512
2019-04-16 13:20:10 +02:00
moritzkiefer-da
2f6dd7d4ee
Do not add the scala version suffix to navigator and extractor (#456)
Fixes #455
2019-04-12 18:30:49 +02:00
gleber
aa70c7f64e
Enforce consistent formatting of BUILD files. (#412)
* Add buildifier targets.

The tool allows to check and format BUILD files in the repo.

To check if files are well formatted, run:

    bazel run //:buildifier

To fix badly-formatted files run:

    bazel run //:buildifier-fix

* Cleanup dade-copyright-headers formatting.

* Fix dade-copyright-headers on files with just the copyright.

* Run buildifier automatically on CI via 'fmt.sh'.

* Reformat all BUILD files with buildifier.

Excludes autogenerated Bazel files.
2019-04-12 13:10:16 +02:00
moritzkiefer-da
fa4067ad1b
Move POM file generation to Bazel rules (#374)
* Move POM file generation to Bazel rules
2019-04-11 11:24:52 +02:00
Remy
07858455c1
Fix DAML runtime for the new DAML-LF type Map (#204)
* add a test for daml-lf/interface
* fix scala code gen
* fix extractor
* fix navigator backend/frontend
* key of Map are strings in proto/json
2019-04-10 21:30:33 +02:00
Robert Autenrieth
0224e321e4
Navigator: remove test dependency on git revision (#345)
Makes sure tests are not rerun on each commit.

Fixes #243
2019-04-10 10:20:23 +02:00
Robert Autenrieth
fcc8a43394 Navigator: Remove unused Makefile targets
... and fix the "start-frontend" target
2019-04-05 12:10:55 +02:00
Robert Autenrieth
b98fe6312f Navigator: Update readme files
The files contained outdated information on
building and publishing Navigator.
2019-04-05 12:10:55 +02:00
Brian Healey
0205a1a932 #233 remove changelogs 2019-04-04 16:08:52 -04:00
Digital Asset GmbH
05e691f558 open-sourcing daml 2019-04-04 09:33:38 +01:00