Commit Graph

1874 Commits

Author SHA1 Message Date
Moritz Kiefer
402ae2adf2
Fix restriction on child_event_ids (#2783)
Unless I am missing something fundamental here all event_ids are
LedgerStrings not PartyIdStrings.
2019-09-06 10:22:03 +02:00
Brian Healey
5acd470211 #2785 add daml_logo.png for README (#2787)
* #2785 add daml_logo.png for README

* rename daml-log.png

* correct typo in image
2019-09-06 09:35:32 +02:00
Neil Mitchell
fc159a2d41 Fix hie.yaml so you can still load hie-core in hie-core (#2786) 2019-09-06 06:43:31 +02:00
Leonid Shlyapnikov
1ff9b8d1b5
HTTP JSON API daemon: adding named CLI arguments (#2784)
* Adding named CLI arguments
2019-09-05 16:36:04 -04:00
Anup Kalburgi
0a9e0a8911 Adding fields to template graphs (#2673)
* Adding more info to dor

* Adding fields to the graph

* Spelling mistakes and params

* Removing single line function

* Moving the duplicated code

* Revert "Moving the duplicated code"

This reverts commit 520b5d9b0d.

* Adding more structure to graph

* Working tests with graph which is more easy to understand and change.
have few more tests to migrate

* Adding edge details

* One more to go

* Adding more verbose field information

* All tests now tests the fields that are being added

* Removing unused Import

* defined not refined

* Unused imports

* Names need to be consitent

* Acutal and Expected, not expected and expected

* Removing unused export

* Lints
2019-09-05 15:57:58 +00:00
Moritz Kiefer
1fa15ffb1d
Fix typo in filterEverythingForParty in HS ledger bindings (#2771) 2019-09-05 16:08:34 +02:00
Stefano Baghino
dc1eb2b151
Make semantic tests multi-node aware (#2770) 2019-09-05 15:38:51 +02:00
Jussi Mäki
2a20a37139 Rename referencedContracts to divulgedContracts (#2741)
* Rename referencedContracts to divulgedContracts

We do not want to provide all referenced contracts as that would
require the ReadService to be able to read all those contracts, or
we would need to bundle the referenced contracts with the transaction.

The new type should match what was discussed in #2488.

* Add changelog entry to participant.state.v1.Version

* Remove divulgedTo from DivulgedContract

We decided not to prematurely add this feature.
2019-09-05 13:27:41 +00:00
Martin Huschenbett
67ff23e199 Fix typo in DAML-LF spec (#2766)
* Fix type in DAML-LF spec

* Fix RST
2019-09-05 12:38:48 +00:00
Bernhard Elsner
ad77aba246 Fix symbol in DA.Logic (#2765) 2019-09-05 12:17:28 +00:00
associahedron
ce52a0a24f
Escape all text in rst docs. (#2747)
* Escape text in rst.

* Fix the escaping

* Fix spacing and tests
2019-09-05 12:39:29 +01:00
Martin Huschenbett
b7bcba4ca7
Drop deprecated TextMap.filter from daml-stdlib (#2761)
It has been deprecated for a while now with a hint to use `filterWithKey`
instead. We should add
```haskell
filter : (v -> Bool) -> TextMap v -> TextMap v
```
after the next SDK release instead. This is tracked in #2760.
2019-09-05 13:34:49 +02:00
Moritz Kiefer
5e962a2b61
DAML Triggers V0 (#2762)
This is a first step towards DAML triggers. At the moment, triggers
can consume (very simplified) create and archive events via the Ledger
API, update a state based on that and emit log mesages at each update.

All of this is likely to change significantly in the future, so I
would prefer to not focus too much on minor details for now.

As a test, I added a simple trigger that tracks active contract ids.
2019-09-05 12:56:41 +02:00
Moritz Kiefer
1bd2a34877
Update instructions for publishing documentation (#2757) 2019-09-05 11:57:52 +02:00
Gary Verhaegen
d44ba4bb1d
reduce risk of double posting to hubspot (#2756) 2019-09-05 10:20:38 +01:00
Stefano Baghino
4bfabe80fd
First multi-node test (#2737)
* WIP

* Ensure identifier uniqueness across endpoints

* Use Greek alphabet letters for node naming to better tell them apart

* Allow reference server to specify extra participants

* Restore all semantic tests

* Update changelog

* Have exponential backoff retries when creating the endpoint test context
2019-09-05 09:37:51 +02:00
Leonid Shlyapnikov
4036b4ae2e
Adding max-inbound-message-size startup parameter (#2746)
so we can download large DARs to collect TemplateIDs for the future
TemplateID resolution.
2019-09-04 16:28:11 -04:00
Leonid Shlyapnikov
99e765a1e0
Releasing http-json-binary (#2751)
com/digitalasset/ledger-service/http-json-deploy/100.13.21
2019-09-04 15:47:24 -04:00
Rohan Jacob-Rao
e364375ce6
Initiate release (#2745) 2019-09-04 15:39:46 -04:00
Brian Healey
d2803c4d0f Randomize hint to ensure PartyManagement tests are rerunnable on the same ledger (#2749)
* Randomize hint to ensure tests are rerunnable

* Include descriptive party name prefix for randomized party name cases

* resolve scalafmt woes

* try to resolve failing release azure step
2019-09-04 19:29:34 +00:00
Gary Verhaegen
c97c1b1569
fix azure (#2750)
fix release job condition for broken Azure Pipelines
2019-09-04 19:54:50 +01:00
Gary Verhaegen
daf15e6ae6
dev-env: remove gradle (#2738) 2019-09-04 17:44:51 +01:00
Rohan Jacob-Rao
a8100d4d3a Basic docs for generic templates (#2731)
* Fix error in generic template example

* First cut at documenting generic templates

* Change proposal to single receiver

* Address Moritz' feedback
2019-09-03 20:55:24 +00:00
Stefano Baghino
785e41eb2c
Enable multi-node conformance testing (#2735) 2019-09-03 15:57:23 +02:00
Gerolf Seitz
4dbbdaaf52
Use (submitter, command_id, application_id) for command deduplication (#2724) 2019-09-03 10:09:01 +02:00
Martin Huschenbett
b95daba9ed Simplify conversion of top level bindings to DAML-LF (#2730)
At the top level we don't care if bindings are recursive or not. The logic
that takes care of this ignorance is currently mixed with the actual logic
for converting the bindings.

This PR separates these concerns properly. This is also in preparation for
another upcoming change which needs access to all top level bindings.
2019-09-02 19:51:03 +00:00
Martin Huschenbett
f787a0d715 Remove unused tracking of default methods from conversion to DAML-LF (#2729)
The removed code had a purpose in the past but has not been used anymore for
a while. Let's remove it.
2019-09-02 18:49:48 +00:00
Rohan Jacob-Rao
30fe23a4c1 Organise generic templates and instances into separate files (#2727)
* Organise generic templates and instances into separate files, add Fungibility

* Expect hlint warning in scenario
2019-09-02 18:39:45 +00:00
associahedron
ea9d9cb02e Convert Decimal type, literals, and primitives to Numeric when feature is available. (#2723)
* Add missing alpha-equivalence case.

* Type-level nat is not serializable.

* Convert decimal primitives as numeric primitives if feature is available.

* Convert decimal literals to numeric if available.

* Better approach to decimal primitves.

* Fixing BEDecimalFromText

* Add issue number

* Set Numeric feature at v1.7
2019-09-02 17:10:26 +00:00
Moritz Kiefer
336cad1016
Fix ghc-pkg runfiles (#2726)
This allows us to run "damlc build" in Bazel rules which is a
prerequisite for doing anything with DAML packages as they don’t work
with "damlc package".
2019-09-02 18:50:25 +02:00
Moritz Kiefer
185579264f
Add a method to initialize speedy from a non-update expression (#2725)
* Add a method to initialize speedy from a non-update expression

We need something like this for DAML triggers. You can kind of fake it
since all the individual fields of Machine are exposed but `initial`
is private (for good reasons as it sets ctrl to null) which makes this
rather annoying to do.

* Base other initialization methods on fromSExpr
2019-09-02 18:50:13 +02:00
mziolekda
e8c1c55e24
participant id and list of archives are optional command arguments (#2722) 2019-09-02 17:47:02 +02:00
Stefano Baghino
1d88fc3207
Make party and command identifiers unique across runs (#2721)
* Make party and command identifiers unique across runs

* Fix compilation error
2019-09-02 16:02:20 +02:00
Gerolf Seitz
63a92887dc
Store external offset on every state update. (#2719) 2019-09-02 16:00:13 +02:00
Stefano Baghino
e452aa2cea
Port semantic tests to the new test tool (#2718) 2019-09-02 14:40:10 +02:00
Stefano Baghino
13607031f5
Start porting the transaction service integration tests (#2713)
* Start porting the transaction service integration tests

Contributes to #1373

* Simplify creation of multiple contract in a single transaction

* Address https://github.com/digital-asset/daml/pull/2713#discussion_r319562016

* Address https://github.com/digital-asset/daml/pull/2713#discussion_r319562566

* Address https://github.com/digital-asset/daml/pull/2713#discussion_r319563441

* Address https://github.com/digital-asset/daml/pull/2713#discussion_r319563617

* Address https://github.com/digital-asset/daml/pull/2713#discussion_r319563788

* Address https://github.com/digital-asset/daml/pull/2713#discussion_r319563838

* Fix test case description

Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com>

* Fix test case description for disclosure

Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com>

* Fix test description of parallel requests test case

Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com>

* Address https://github.com/digital-asset/daml/pull/2713#discussion_r319883011

* Address https://github.com/digital-asset/daml/pull/2713#discussion_r319567251

* Address https://github.com/digital-asset/daml/pull/2713#discussion_r319567251

* Run all conformance tests in exclusive mode
2019-09-02 13:45:15 +02:00
mziolekda
051c3641b2
add participant-id as command line option to the damlonx reference server (#2717)
* add participant-id as command line option to the damlonx reference server

* address review comments
2019-09-02 13:43:21 +02:00
Martin Huschenbett
222f8c6fc1
Revert type based computation of table headers in scenario view (#2704)
The type based computation doesn't work as intended. Let's go back to the
value based computation for now and fix it later.
2019-09-02 12:35:52 +02:00
Jussi Mäki
07fef0d784 Dispatcher: Provide sub-source in startingAt (#2715)
This allows using the dispatcher in situations where the index is common,
but different data streams are materialized from it.

The practical reason for this is to allow using a single dispatcher to read
from both the ledger_entries and configuration_entries tables, which share
the same ledger offset construction.
2019-09-02 09:05:08 +00:00
Remy
3ee9b83fb1 daml-lf: adapt interface reader to Numeric (#2666) 2019-09-02 10:02:56 +02:00
Jussi Mäki
a96f3fb736 Disable the checkTtl validation in kvutils (#2714)
The time model is being reworked and the current stack is not prepared
to handle this additional check well.

We will reimplement time model related checks once the redesign has been
completed.
2019-09-02 02:57:40 +00:00
Shayne Fletcher
fca502ac9e Update ghc-lib (v8.8.1.20190830) (#2716) 2019-08-30 21:58:23 +00:00
Gerolf Seitz
ecb506e803
SQL diagnostics (#2662)
* Use proper names for the DB connection pools.

* Add some trace logging for DB operations.

This does not capture timing of individual statements but
rather the time for "units of work".
For example "lookup contract" doesn't mean only loading
a single row from the contracts table, but also 2 additional
queries for looking up witnesses and divulgences.

This is not a problem, because this is trace level logging
that helps us debug problems and shouldn't be made sense of by
users at this stage.

* Make description a by-name parameter.

This avoids building up the string if trace logging
is not enabled (i.e. most of the time).
2019-08-30 13:41:44 +02:00
Jussi Mäki
93f39508a3
Add kvutils envelope (#2709)
The kvutils envelope is meant to be used whenever a kvutils produced
data is stored and transmitted over the network. It adds both versioning
and compression to the original message.
2019-08-30 13:28:56 +02:00
Moritz Kiefer
8f56205567 Remove libffi hack from ghc-lib (#2703)
We currently use a custom cabal file for ghc-lib that has libffi in
the extra-libraries section so Hazel adds the headers. Forcing GHC to
use the bundled libffi should hopefully remove the need for this hack
which simplifies things.
2019-08-30 10:47:07 +00:00
Robin Krom
d5c6d93772
langauge: suppress warnings for unrecognised pragams in upgrades (#2711)
This make the build of upgrade modules a bit more quiet. The warnings
appear because in the generated generic instances there is an
unrecognised {-# NO_OVERLAPP #-} pragma annotation.
2019-08-30 12:21:01 +02:00
Gerolf Seitz
0e80f75ff4
Make sure ActiveContractService sends out a consistent snapshot (#2708)
* Make sure ActiveContractService sends out a consistent snapshot

instead of looking up the latest ledger end, we can only take the latest known ledgerEnd in the scope of SqlLedger.
If we don't do that, we can miss contracts from a partially inserted batch insert of ledger entries
scenario:
1. batch insert transactions A and B at offsets 5 and 6 respectively; A is a huge transaction, B is a small transaction
2. B is inserted earlier than A and the ledger_end column in the parameters table is updated
3. A GetActiveContractsRequest comes in and we look at the latest ledger_end offset in the database. We will see 6 (from transaction B).
4. If we finish streaming the active contracts up to offset 6 before transaction A is properly inserted into the DB, the client will not see the contracts from transaction A
The fix to that is to use the latest known head to the dispatcher, which is updated AFTER a batch has been inserted completely.

This PR also factors out the basic readonly functionality that is
duplicated between SqlLedger and ReadOnlySqlLedger into a class
BaseLedger.

* copyright header
2019-08-30 10:56:30 +02:00
associahedron
0eed4afb3f Add Numeric literals in daml-lf-ast and daml-lf-proto. (#2706)
* Add Numeric literals.

* Decode numeric literals

* Add tests and fix Read for s=0

* lint

* Copyright header

* Use numericMaxScale in Serializability check

* Fix comment!
2019-08-30 08:45:03 +00:00
Gerolf Seitz
7311350b55
Extend the timeout for running integration tests with H2 (#2710) 2019-08-30 10:36:40 +02:00
Remy
20649cf78e ledger-api: rename decimal field to numeric in value Proto (#2688)
* add Numeric.java

* ledger-api: rename `decimal` field to `numeric` in value protobuf

* Address Gerolf's comment

* ledger-api: add missing renammings

* ledger-api: relax syntax of numbers that can be sent as numerics

* extractor:  fix

* leger-api: change format of number though ledger api

* daml-lf: fix numeric regexp

* ledger: fix tests
2019-08-29 22:51:33 +00:00