* 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
* engine: factorize value translation out of CommandPreprocessor
* ledger-api-test: add semantic equality for events
* engine: fix package resolution for ValueTranslator
* Templates and scenario for generic transfers
* Simplify transfer workflow by self-issuing cash
* Generic swap in the same style as Transferrable
* Use Template class constraints instead of *Instance constraints
* Shorter asset name for transferrable/swappable templates
* Shorten some stuff
* Simplify swap acceptance, remove dependency on transfers, add some checks in scenarios
* Remove FlexibleContexts extension which should be on by default
* Move Asset typeclass and Cash instance to separate module
* Rename Swap module to Swappable
* Revert change to VERSION file
At the moment, if we try to run the build of a release commit after it
has succeeded, the `git tag` step fails. We do not normally try to
rebuild old commits that had succeeded, but sometimes Azure gets
confused when we ask for rerunning specific jobs within a build, and
reruns the whole build.
This creates two (small, bubt annoying) problems:
1. It adds noise to the #team-daml channel as it notifies of the build
failure, and
2. It marks the commit as failed with a red cross on the github list of
commits, which obviously doesn't look great for release commits.
This fixes that. Note that if a release does fail after the `git tag`
step (e.g. some network error between Azure and GitHub), this **does
not** change the necessary steps to remediate, as that situation would
already be broken in the current setup. (Steps to remediate would
essentially boil down to deleting the tag on GitHub before rerunning so
the build can create it again.)
* language: compile everything in the source directory
This removes the need to specify a 'main'. Instead we 'source' in
daml.yaml should point to the source root directory.