* 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
* 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.
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.
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.
* 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
* 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
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.
* 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
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".
* 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
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.
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.
* 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).
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.
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.
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.
* 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
* 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