Commit Graph

43 Commits

Author SHA1 Message Date
nicu-da
7cc698948c
Add multiple ways of specifying deduplication [KVL-1047] (#10601)
CHANGELOG_BEGIN
ledger-api - Command deduplication period can now be specified by setting `deduplication_offset` instead of `deduplication_time` (only valid for v2 WriteService). This change is backwards compatible.
CHANGELOG_END

* Propagate the enriched deduplicationPeriod instead of deduplication duration

* Update the Haskell bindings for the new deduplication period

* Calculate the deduplicateUntil using the new deduplication period for backward compat

* Use consistent naming for deduplication_period

* Cleanup command timeout extraction from deduplication period

* Add the required deduplication_offset to deduplication instead of deduplication_start

* Update haskell bindings to support deduplication_offset

* Add support for deduplication_offset in the ledger-api

* Remove the timestamp-based deduplication from our models to simplify upgrade for users

* Add optional conformance test for offset based deduplication

* Remove buf rule for FIELD_SAME_ONEOF as our change is backwards compatible

* Disable FIELD_SAME_ONEOF buf check for commands file

* Apply suggestions from code review

Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>

* Update comment for deduplication period

Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2021-08-25 05:58:03 -07:00
nicu-da
35641b7f62
Add submission id to the GRPC api [KVL-999] (#10467)
* Add optional submission id to commands.proto

This allows to propagate a submission id. If no id is submitted (the submission id is empty) then we generate a new submission id

CHANGELOG_BEGIN
Add optional submission_id to the commands.proto.
CHANGELOG_END

* Update haskell bindings to include the submission id

* Code review - rename submission id extractor

* Code review - update comment and remove braces from if block

* Fix braces
2021-08-06 08:54:54 +02:00
Bernhard Elsner
cda93db944
Daml case and logo (#8433)
* Replace many occurrences of DAML with Daml

* Update docs logo

* A few more CLI occurrences

CHANGELOG_BEGIN
- Change DAML capitalization and docs logo
CHANGELOG_END

* Fix some over-eager replacements

* A few mor occurrences in md files

* Address comments in *.proto files

* Change case in comments and strings in .ts files

* Revert changes to frozen proto files

* Also revert LF 1.11

* Update get-daml.sh

* Update windows installer

* Include .py files

* Include comments in .daml files

* More instances in the assistant CLI

* some more help texts
2021-01-08 12:50:15 +00:00
Gary Verhaegen
a925f0174c
update copyright notices for 2021 (#8257)
* update copyright notices for 2021

To be merged on 2021-01-01.

CHANGELOG_BEGIN
CHANGELOG_END

* patch-bazel-windows & da-ghc-lib
2021-01-01 19:49:51 +01:00
Gary Verhaegen
93f449d245
rename master to main (#8245)
As we strive for more inclusiveness, we are becoming less comfortable
with historically-charged terms being used in our everyday work.

This is targeted for merge on Dec 26, _after_ the necessary
corresponding changes at both the GitHub and Azure Pipelines levels.

CHANGELOG_BEGIN

- DAML Connect development is now conducted from the `main` branch,
  rather than the `master` one. If you had any dependency on the
  digital-asset/daml repository, you will need to update this parameter.

CHANGELOG_END
2020-12-27 14:19:07 +01:00
Robert Autenrieth
56f5cf107b
Prepare the ledger API for multi-party submissions [KVL-710] (#8125)
* Add multi-party submissions to the ledger API

CHANGELOG_BEGIN
* [Ledger API] Command submission requests now contain new optional
  fields used for multi-party submissions. Such submissions currently
  return UNIMPLEMENTED errors, they will be enabled in the future.
CHANGELOG_END

* Adapt Haskell bindings

* Handle the new ledger API fields

* Fix SubmitAndWaitDummyCommand

* Remove unused methods

* Redesign multi-party auth tests

* Remove direct access of request party

* Apply review comments

* Improve protobuf comments

* Multi-party tracker map

* Fix validation logic

* Consistent metric naming
2020-12-07 16:17:05 +01:00
Martin Huschenbett
b01d327211
Haskell: Add hlint rule to suggest foldl' over foldl (#7897)
* 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
2020-11-05 18:32:44 +00:00
Moritz Kiefer
e09c31899d
Connectify user-facing output (#7624)
Together with #7615, this overs all items in #7612.

changelog_begin
changelog_end
2020-10-09 15:45:02 +02:00
Gary Verhaegen
1872c668a5
replace DAML Authors with DA in copyright headers (#5228)
Change requested by Manoj.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-27 01:26:10 +01:00
Robert Autenrieth
a3ddde3a9d
Remove MRT and LET (#5172)
Contributes to #4194.
Closes #4231.
Closes #5022.
CHANGELOG_BEGIN
- [Ledger API] The protobuf fields ledger_effective_time and maximum_record_time have been removed from
  command submission. These fields were previously deprecated following the introduction
  of a new ledger time model. See issue `#4194 <https://github.com/digital-asset/daml/issues/4194>`__.
[Java Bindings] removed the usage of ledgerEffectiveTime and
maximumRecordTime, and instead added minLedgerTimeAbsolute and
minLedgerTimeRelative in CommandSubmissionClient and CommandClient
CHANGELOG_END
2020-03-25 16:50:27 +01:00
Robert Autenrieth
60a845ec72
Add new protobuf fields for new ledger time model (#5036)
* Add new protobuf fields for new ledger time model

Fixes #4344.

CHANGELOG_BEGIN
CHANGELOG_END

* Adapt haskell bindings
2020-03-19 13:53:49 +01:00
nickchapman-da
d81caa9568
rework daml_compile bazel rule (#5070)
Avoiding `damlc compile/package` commands (which we would like to deprecate), and replace with plain `damlc build` together with a post dar->dalf extraction step in the couple of places where we actually want the .dalf for testing.

changelog_begin
changelog_end
2020-03-18 23:06:55 +00:00
Robert Autenrieth
98095cf80d
Clean up command deduplication (#4801)
* Always return error on duplicate submissions

* Remove unnecessary submission information

Now that duplicate submissions always return an error,
we don't need to store the original submission result.

CHANGELOG_BEGIN
CHANGELOG_END

* Rename ttl to deduplicationTime/deduplicateUntil

* Store absolute deduplicateUntil in domain commands

* Fix my own initials

* Remove CommandDeduplicationEntry

Instead, use CommandDeduplicationResult everywhere,
removing the extra layer.
2020-03-04 14:08:08 +01:00
Moritz Kiefer
d455267e58
Reduce the number of GHCs in our nix closure (#4729)
This reduces the number of GHCs to 2 on Linux (regular and DWARF) and
1 on macOS. Given that each derivation is > 1 GB this should hopefully
help a bit.

changelog_begin
changelog_end
2020-02-26 20:00:07 +01:00
Shayne Fletcher
66dd112960
Remove pragma 'daml 1.2' (#4702)
changelog_begin
- The pragma 'daml 1.2' is now optional.
changelog_end
2020-02-26 13:17:45 -05:00
Robert Autenrieth
79e7ca0627
Implement new command deduplication (#4467)
* Add TTL field to protobuf

* Add command deduplication to index service

* Wire command deduplication to DAO

* Implement in-memory command deduplication

* Remove Deduplicator

* Implement JDBC command deduplication

* Add TTL field to domain commands

* Deduplicate commands in the submission service

CHANGELOG_BEGIN
- [Sandbox] Implement a new command submission deduplication mechanism
  based on a time-to-live (TTL) for commands.
  See https://github.com/digital-asset/daml/issues/4193
CHANGELOG_END

* Remove unused command service parameter

* fixup protobuf

* Add configuration for TTL

* Fix Haskell bindings

* Rename SQL table

* Add command deduplication test

* Redesign command deduplication queries

* Address review comment

* Address review comment

* Address review comments

* Make command deduplication test optional

* Disable more tests

* Address review comments

* Address review comments

* Refine test

* Address review comments

* scalafmt

* Truncate new table on reset

* Store original command result

* Rename table columns

... to be consistent with other upcoming tables

* Rename migrations to solve conflicts

Fixes #4193.
2020-02-26 12:00:02 +01:00
Gary Verhaegen
47bd131f15
add copyright headers to yml files (#4407)
We seem to have forgotten about them in the copyright scripts.

CHANGELOG_BEGIN
CHANGELOG_END
2020-02-06 12:54:07 +01:00
Gary Verhaegen
878429e3bf
update copyright notices to 2020 (#3939)
copyright update 2020

* update template
* run script: `dade-copyright-headers update .`
* update script
* manual adjustments
* exclude frozen proto files from further header checks (by adding NO_AUTO_COPYRIGHT files)
2020-01-02 21:21:13 +01:00
nickchapman-da
69b520c879
Hlb update and document external build steps (#2769)
* stack setup for HLB and Nim

* build_packages.sh and daml-ledger.cabal

* update README

* export-package for daml-ledger

* export-package, run here

* find tmp daml-ledger

* update README for review comments

* ref daml instructions

* further improve the process and documentation in response to comments

* have -with-rtsopts match the bazel build

* fixes for Gary
2019-09-09 14:37:03 +01:00
Andreas Herrmann
ed39800a9f Rename hazel_deps to hackage_deps (#2789)
* hazel_deps --> hackage_deps

Mechanical change:

```
sed -i 's/hazel_deps/hackage_deps/g' $(ag -l hazel_deps)
```

* Hazel dependencies --> Hackage dependencies
2019-09-06 09:01:09 +00:00
nickchapman-da
ea02814b34
hlb, remove dependency on DAML-LF libs (#2650)
* hlb, remove dependency on DAML-LF libs

* Update language-support/hs/bindings/src/DA/Ledger/Services/PackageService.hs

newtype instead of data

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2019-08-23 18:00:58 +01:00
Gary Verhaegen
99ea93168d
update copyright notices (#2499) 2019-08-13 17:23:03 +01:00
nickchapman-da
5ebc5e4d19
Hlb apps package discovery (#2455)
* suggested tiny code simplifications

* fix package discovery for Nim/Chat ledger apps
2019-08-08 16:50:17 +01:00
nickchapman-da
b90862ebec
improve haskell module hierarchy to be more consistent (#2319) 2019-07-29 15:55:55 +01:00
nickchapman-da
b30228ab95
{-# LANGUAGE OverloadedStrings #-} is now on by default (#2270) 2019-07-24 08:09:26 +01:00
nickchapman-da
83e01d42eb
cleanup and refactor code structure for nim/chat ledger apps (#2210) 2019-07-18 12:36:19 +01:00
nickchapman-da
63dd57ab19
fix nim/chat apps (#2120) 2019-07-15 08:57:43 +01:00
nickchapman-da
7a981d0e33
preserve [Transaction] per stream element in getTransactions rpc-wrapper, matching the .proto definition (#2054) 2019-07-09 10:35:34 +01:00
Gary Verhaegen
acbc5de820 remove some build warnings (#2012) 2019-07-04 22:07:49 +00:00
Michał Majcherski
2afefb7883
windows: root build (#1894)
* windows: root build

* windows: fixed haskell bindings tests

* windows: disable client_server_test test

* windows: marking daml_test flaky due to #1907

* windows: removing da-hs-damlc-app run from build.ps1

* windows: disable hie-core alias of currently disabled target
2019-06-28 12:55:31 +02:00
nickchapman-da
eba9af48ac
Hlb review comments (#1881)
* Define LedgerService using ReaderT to avoid boilerplate
* re-export TimeoutSeconds from GRPC.HighLevel.Client, instead of defining as a newtype
* rename: Valuable -> IsLedgerValue
2019-06-26 11:02:12 +01:00
nickchapman-da
4432a79407
refactor (#1865) 2019-06-26 08:09:08 +01:00
nickchapman-da
8cd1bc738c
GroupChat, take 2 (#1671)
* GroupChat, take 2
* GroupChat, last member may leave
* Add origin field into Group to support the group identity
2019-06-17 10:01:25 +01:00
nickchapman-da
106e90e8a6
Group chat daml model (#1618)
Nim:
* fix index numbering in demo.md
* add in game "help" command to show available commands
* small code simplification for code review

GroupChat:
* DAML chat-room model, with support for multiple chat-groups with entry by invitation
* simplify: pass Invitation
* fix bug spotted by Bernhard -- Gain access to a Group without a valid invite
2019-06-13 11:06:49 +01:00
Beth Aitman
e6c1d1e414 Suggestions for demo instructions (#1580) 2019-06-11 11:25:27 +01:00
nickchapman-da
19449affb5
Ledger App Demos (#1572)
* chat ledger-app, first cut

* pre-demo improvements to nim-console

* Valuable instance for Text

* nim-console/demo.md
2019-06-10 15:08:57 +01:00
nickchapman-da
47e6d9ab05
Haskell ledger bindings (#1460)
* use with syntax in Daml

* attend to code review comments

* move ledger services implementation to own sub-module

* use ledger reset service when running tests for haskell-ledger-bindings

* expose LL.ClientCall in high level interface

* cancel streaming gRPC calls when attached stream is closed

* fix modification to gRPC-haskell so existing interface in preserved

* ClientCall and clientCallcancel were already available on HighLevel interface
2019-05-30 15:00:42 +01:00
nickchapman-da
7ee7931407
nim-console Ledger App (#1342)
* Use closable Stream in Haskell ledger bindings

* move PastAndFuture abstraction into ledger interface code

* distinguish past/future transactions in return of Ledger.getTransactionsPF

* first cut: nim-console running against a ledger

* remove flaky failing test
2019-05-23 15:56:12 +01:00
nickchapman-da
8510e6afc5
Haskell ledger bindings (#1181)
* Bindings & tests for more ledger services

* fix hardcoded package id in test

* language-support/hs/bindings/examples/nim-console

* make hlint happy

* headers & format

* README

* increase timeouts; track location of GPRC Deadline Exceeded.

* Update language-support/hs/bindings/examples/nim-console/README.md

Co-Authored-By: Neil Mitchell <35463327+neil-da@users.noreply.github.com>

* rename: Mes --> Logger, mes --> log, tagMes --> tagLog (etc)

* replace isOpen with ==Open

* Avoid fragile hardcoded PackageId in testcase
2019-05-16 16:45:54 +01:00
nickchapman-da
c1de0abcd6 haskell-ledger-bindings, test connect against sandbox (#1023)
* haskell-ledger-bindings, test connect with sandbox

* use System.Time.Extra.timeout instead of rolling own

* fix module name to match hierachical path

* increase timeout to 10s, fix macOS CI?

* delete-trailing-whitespace

* dont specify daml version for daml_compile rule

* unalign module imports

* replace xxx with undefined
2019-05-09 17:31:06 +00:00
nickchapman-da
549cf086e1 Haskell ledger bindings (#879)
* HL types for Ledger API. Command Submission & Completion services.

* whitespace

* remove renamed file that came back after bad merge

* delint

* adapt to change in transaction_service.proto
2019-05-03 10:37:08 +00:00
nickchapman-da
15ea5ef8b4 haskell-ledger-bindings: TransactionService, GetTransactions (#816)
* haskell-ledger-bindings: TransactionService, GetTransactions

* passify linter

* passify humans linters!

* format!
2019-05-01 14:29:23 +00:00
nickchapman-da
b2e8df5c6a haskell-ledger-bindings, LedgerIdentity (#755)
* haskell-ledger-bindings, LedgerIdentity

* copyright headers

* address review comments

* format

* fix haskell indentation
2019-04-29 14:02:25 +00:00