Packages com.digitalasset.daml and com.daml have been unified under com.daml
Ledger API and DAML-LF DEV protos have also been moved from `com/digitalasset`
to `com/daml` on the file system.
Protos for already released DAML LF versions (1.6, 1.7, 1.8) stay in the
package `com.digitalasset`.
CHANGELOG_BEGIN
[SDK] All Java and Scala packages starting with
``com.digitalasset.daml`` and ``com.digitalasset`` are now consolidated
under ``com.daml``. Simply changing imports should be enough to
migrate your code.
CHANGELOG_END
* Fix test for groupContiguous
Automatic generation of test values was prone to cause flakiness, removed in favor of a simpler test case.
changelog_begin
changelog_end
* Relax order sensitivity
* Update ledger/sandbox/src/test/suite/scala/com/digitalasset/platform/store/dao/events/GroupContiguousSpec.scala
Co-Authored-By: Remy <remy.haemmerle@daml.com>
* Fix compilation issue
Co-authored-by: Remy <remy.haemmerle@daml.com>
* sandbox: Move the events page size configuration value into config.
* sandbox: Pass `config` directly into JdbcIndexerFactory.
* sandbox: Reorder `eventsPageSize` before `metrics` in parameters.
* sandbox: Move `seeding` into `ApiServerConfig`.
CHANGELOG_BEGIN
CHANGELOG_END
* sandbox: Name all parameters of `JdbcLedgerDao.writeOwner`.
Co-Authored-By: stefano.baghino@digitalasset.com
* Implement timed command deduplication in kvutils
This adds a field deduplication_time to DamlCommandDedupValue for
deduplication timeout checking.
* Bump kvutils version to 4
* Fix CommandTracker pulling commandResultIn multiple times
Now that the timeouts are generated out of band, we have 2
"unsynchronized" places that pull on commandResultIn.
Whenever we pull, we need to check that commandResultIn hasn't been
pulled before.
* Add inStaticTimeMode flag to enable command dedup in sandbox-next with static-time
Fixes#4624.
CHANGELOG_BEGIN
[kvutils] KVUtils now respects the command deduplciation time instead of
deduplicating commands forever.
CHANGELOG_END
* kvutils: Remove the LedgerEntry trait; it's no longer necessary.
This was introduced to allow for heartbeats, which no longer exist.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils: Make LedgerRecord a case class again.
We used to store the envelope as an array of bytes, which doesn't have a
value-based `equals` method and therefore should not be used in a case
class. We now use a `ByteString`, so this is no longer an issue.
* Migrate create_consumed_at to offset
This is a leftover from the stable offsets migration and causes issues when serving active contracts from the new schema.
changelog_begin
changelog_end
* No decoding necessary for create_consumed_at
* kvutils: Use `.view` in SubmissionValidator.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils: Don't compute missing inputs unless we're asked.
* ledger-on-memory: Do less in `InMemoryLedgerStateOperations`.
* ledger-on-memory: Use `RangeSource` instead of `OneAfterAnother`.
Should be faster to just take a slice.
* ledger-on-memory: Don't bother locking when reading.
We're only reading the log, which is append-only; we never mutate
existing data. This means we don't need to lock to read it.
* ledger-on-memory: Make it impossible to construct a state with data.
This can fail in CI, especially when we're running tests in parallel,
and starting PostgreSQL as well.
I've increased the limit from 30 seconds to 1 minute.
This is hopefully not a permanent fix; I'm going to look into doing this
without an `Await.result`.
CHANGELOG_BEGIN
CHANGELOG_END
* Refactor flat events range queries
By factoring out query routing, this logic can be re-used to serve active contracts.
changelog_begin
changelog_end
* Fix copyright notice header
* participant-state-metrics: Wrap metric names in a value type.
For safety, and for simplicity when building upon prefixes.
CHANGELOG_BEGIN
CHANGELOG_END
* sandbox: Use MetricName within MetricsNaming.
* kvutils: Use `MetricName` in `Committer`.
* sandbox | kvutils: Extract common metric prefixes.
* sandbox: Remove a redundant visibility modifier in `MetricsNaming`.
* participant-state-metrics: `MetricName` doesn't need to be a case class.
Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
* Retry if time lookup failed
An error while looking up the maximum ledger time for the used contracts
likely means that one of the contracts is already not active anymore,
which can happen under contention.
Retry finding a suitable ledger time in this case instead of crashing.
CHANGELOG_BEGIN
CHANGELOG_END
* Handle archived contracts in JDBC max time lookup
* Don't retry if ledger time lookup fails
The retry might not fix anything.
Instead, log a helpful message.
Contributes to #4231.
Remove checkpoints from Participant Server storage:
- Removed code to store checkpoints in the index database.
- Remove existing checkpoint rows in ledger_entries and participant_command_completions.
- Removed ObservedTimeServiceBackend
This commit modifies the java migration V2_1__Rebuild_Acs. This is safe to do, because:
a) any even semi recent persistent sandbox had already gone through this migration and won't re-run it
b) A new database doesn't even have entries yet to migrate.
CHANGELOG_BEGIN
[DAML Ledger Integration Kit] Removed the ``Hearbeat`` state update.
[Sandbox] Checkpoints are no longer emitted in regular intervals in wall
clock time mode.
CHANGELOG_END
* Use com.daml as groupId for all artifacts
CHANGELOG_BEGIN
[SDK] Changed the groupId for Maven artifacts to ``com.daml``.
CHANGELOG_END
* Add 2 additional maven related checks to the release binary
1. Check that all maven upload artifacts use com.daml as the groupId
2. Check that all maven upload artifacts have a unique artifactId
* Address @cocreature's comments in https://github.com/digital-asset/daml/pull/5272#pullrequestreview-385026181
* kvutils: Do less in the ledger transaction.
* kvutils: Make `SubmissionValidator#runValidation` tail-recursive.
Because otherwise IntelliJ is very unhappy.
* kvutils: Time transaction acquisition and release.
CHANGELOG_BEGIN
- [Ledger Integration Kit] Metrics for acquiring and releasing
transactions.
CHANGELOG_END
* kvutils: Include the word "lock" in validator transaction lock metrics.
* kvutils: Record successful + failed transaction acquisitions separately.
Just to get them consistent with the others.
CHANGELOG_BEGIN
- [Ledger Integration Kit] Prefixed all metrics with "daml." for
consistency.
CHANGELOG_END
* kvutils: Use `MetricRegistry.name` to create metric names.
String interpolation is 4TL.
* sandbox: Make the metric names of the services consistent with kvutils.
CHANGELOG_BEGIN
- [Sandbox] Move the service metrics from ``daml.sandbox.indexService``
and ``daml.sandbox.writeService`` to ``daml.services.index`` and
``daml.services.write`` respectively. This brings Sandbox in line with
the Ledger Integration Kit.
CHANGELOG_END
* sandbox: Use `MetricRegistry.name` to create metric names.
String interpolation is 4TL.
* kvutils/app: Publish JVM metrics.
* kvutils/app: Sort the metrics prefixes.
* kvutils/app: Allow for specifying a metrics reporter as a CLI argument.
No changelog as this is hidden.
CHANGELOG_BEGIN
CHANGELOG_END
* sandbox: Remove an unnecessary string interpolation mark.
Co-Authored-By: Miklos <57664299+miklos-da@users.noreply.github.com>
Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
* Add canonical string representation for identifiers
An identifier is represented as a string as a package identifier and a qualified name separated by a colon.
changelog_begin
changelog_end
* Simplify explicit type signature for HexString
Thanks @remyhaemmerle-da
Co-Authored-By: Remy <remy.haemmerle@daml.com>
* Fix hashing test expected output
* Fix key hasher test expected output
Co-authored-by: Remy <remy.haemmerle@daml.com>
Before this reaches production-ready status, it's time to squash the
migrations. This will improve startup performance a little.
CHANGELOG_BEGIN
CHANGELOG_END
* Remove old time model from ledger config
CHANGELOG_BEGIN
- [Ledger API] Fields related to the old ledger time
model have been removed from the configuration
management service and the ledger configuration service.
CHANGELOG_END
* Update ledger/ledger-api-test-tool/src/main/scala/com/daml/ledger/api/testtool/tests/LedgerConfigurationService.scala
Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com>
Co-authored-by: Gerolf Seitz <gerolf.seitz@digitalasset.com>
* Remove documentation for a removed option
CHANGELOG_BEGIN
- [DAML Integration Kit] The CLI option command-submission-ttl-scale-factor was
removed, as the LET/MRT/TTL fields have recently been removed
from the command submission service.
CHANGELOG_END
* Minor renaming
* sandbox: On reset, wait for the API server to start before replacing it.
Hopefully this addresses the flickering behavior we're seeing in CI.
CHANGELOG_BEGIN
CHANGELOG_END
* sandbox: Scale the retries in ResetServiceIT along with everything else.
* Allow to have both verbose and succinct row parsers
This will be used when we need to stream transactions and not individual
events.
changelog_begin
changelog_end
* Succinct parser should have verbose = false
* Introduce DamlSubmissionBatch and the BatchingLedgerWriter
This introduces the DamlSubmissionBatch message to group
submissions into a single message and extends Envelope to
carry the batch. We're using the envelope wrapping for consistency
and compatibility.
We're adding this to kvutils version 3 as it has not yet been released
into the wild and as this is not backwards incompatible change.
Support for batching is implemented with the BatchingLedgerWriter
that wraps a LedgerWriter and groups submissions into a batch based
on size and time duration.
For implementing the validation of a batch we will require some rework
in the SubmissionValidator to be able to produce multiple "LogResult"s,
e.g. commit on the in-memory ledger results in an "Index" which is used
to signal new head to dispatcher. With a batch we'd need to pick max index.
CHANGELOG_BEGIN
CHANGELOG_END
* Add missing copyright header
* Address code reviews
* Post rebase fixes
* Rename BATCH -> SUBMISSION_BATCH
* Address code reviews, add further tests and cleanup.
* Add test for DefaultBatchingQueue.close
* Use generous timeouts
* Renamed BatchMessage => SubmissionBatchMessage. Added default boolean parameter value. Added simple test case.
* Removed unused include.
* Address final code review
Co-authored-by: Miklos Erdelyi <miklos.erdelyi@digitalasset.com>
Add keys with maintainers to Fetch nodes
The new field is populated by the interpreter whenever the fetched
contract has a key. Used for contract key reinterpretation in Canton.
CHANGELOG_BEGIN
- [DAML-LF] Add keys with maintainers to Fetch nodes in transactions.
CHANGELOG_END