CHANGELOG_BEGIN
Advance ledger end when the indexer encounters an duplicate party or configuration update. This allows indexer to skip-over the unexpected message and continue processing subsequent updates.
CHANGELOG_END
* Port parts of //ledger/... to Scala 2.13
Fairly random choice of directories, I just went through them in
alphabetical order. The one thing that I had to disable for now are
the conformance tests since the ledger API test tool has a dependency
not compatible with Scala 2.13.
changelog_begin
changelog_end
* Remove accidentally included //ledger/ledger-api-client/...
doesn’t actually work yet
changelog_begin
changelog_end
* Upgrade scopt to 4.0.0
Scopt 3.x has some issues with Scala 2.13 because it expects an
immutable Seq on 2.13 meaning you cannot just pass in an Array. Rather
than fixing our callsites to convert to an immutable Seq everywhere,
this PR bumps to Scopt 4.0 which goes back to collection.Seq.
and leaving that aside, I’m a fan of upgrading dependencies anyway :)
changelog_begin
changelog_end
* Use val instead of def
changelog_begin
changelog_end
The flag allows the sandboxes (both classic and next) to use preview
version of the upcoming Daml-LF version (currently LF 1.11).
CHANGELOG_BEGIN
* [Sandbox-classic] add a flag to allow early access to the next
Daml-LF to be released.
* [Sandbox] add a flag to allow early access to the next Daml-LF
to be released.
CHANGELOG_END
This PR updates scalafmt and enables trailingCommas =
multiple. Unfortunately, scalafmt broke the version field which means
we cannot fully preserve the rest of the config. I’ve made some
attempts to stay reasonably close to the original config but couldn’t
find an exact equivalent in a lot of cases. I don’t feel strongly
about any of the settings so happy to change them to something else.
As announced, this will be merged on Saturday to avoid too many conflicts.
changelog_begin
changelog_end
The one thing that is still missing is making the generated Scala code
from the codegen compatible with Scala 2.13 so the examples are
excluded for now.
changelog_begin
changelog_end
* Fix out of order transaction delivery on the ledger api
Akka's mergeSubstreams does not guarantee the order of the output.
In rare cases the order of the output doesn't match with the order
of the input, even though we know that the input events are in the
correct order (otherwise groupContiguous would delivery transactions
with random events from other transactions).
This change removes the need for substreams by collecting the events
for a transaction inside statefulMapConcat. The loss of mergeSubstreams'
parallelism is likely no problem, because we anyway need to send out transactions
in the correct order.
Fixes#7521.
CHANGELOG_BEGIN
Ledger API: Fixed an issue that rarely caused transactions to be sent out of order. See #7521
CHANGELOG_END
* Use mergeSubstreamsWithParallelism(1)
* Use concatSubstreams
* Add test that can trigger the error reliably
* Address https://github.com/digital-asset/daml/pull/8336#discussion_r545760676
* Update copyright notice in GroupContiguousHeavySpec.scala
* Remove link to PR
Co-authored-by: Stefano Baghino <stefano.baghino@digitalasset.com>
Co-authored-by: Robert Autenrieth <robert.autenrieth@digitalasset.com>
* 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
* Port damlc dependencies to Scala 2.13
I got a bit fed up by the fact that going directory by directory
didn’t really work since there are two many interdependencies in
tests (e.g., client tests depend on sandbox, sandbox tests depend on
clients, engine tests depend on DARs which depend on damlc, …).
So before attempting to continue with the per-directory process, this
is a bruteforce approach to break a lot of those cycles by porting all
dependencies of damlc which includes client bindings (for DAML Script)
and Sandbox Classic (also for DAML Script).
If this is too annoying to review let me know and I’ll try to split it
up into a few chunks.
changelog_begin
changelog_end
* Update daml-lf/data/src/main/2.13/com/daml/lf/data/LawlessTraversals.scala
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
* fixup lawlesstraversal
changelog_begin
changelog_end
* less iterator more view
changelog_begin
changelog_end
* document safety of unsafeWrapArray
changelog_begin
changelog_end
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
* kvutils: Wrap raw key and value bytestrings in types.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils: Delete `Bytes`.
* kvutils: Inline LedgerStateOperations.{Key, Value}.
* kvutils: Extract out a `Raw` trait.
* ledger-on-memory: Use state reader type aliases.
* ledger-on-sql: Provide implicit conversions for Raw.*.
* kvutils: Merge raw weights.
* kvutils: Move `Raw` into the kvutils package.
* kvutils: Seal `Raw`.
* kvutils: Delete the `SubmissionEnvelope` alias.
* kvutils: Use Raw#size when computing cache weight.
* kvutils: Improve clarity in a couple of places.
* kvutils: Rename the `Raw` trait to `Raw.Bytes`.
* kvutils: Rename `Raw.Pair` to `Raw.KeyValuePair`.
This commit fixes a few copyright headers that have been missed in the
automatic update on Jan 1, as well as the generation code in the compat
workspace so it generates the right headers.
CHANGELOG_BEGIN
CHANGELOG_END
* participant-integration-api: Dedicated execution context for requests.
CHANGELOG_BEGIN
CHANGELOG_END
* participant-integration-api: Construct the services executor outside.
* participant-integration-api: Share the services EC with the GRPC stack.
* participant-integration-api: Use the new EC wherever possible.
And stop using DirectExecutionContext.
* sandbox-classic: Fix DevModeIT to use the right configuration.
I have no idea why this breaks now, but it was always technically
broken, so I'm fixing it.
* participant-integration-api: Push the services EC up one more level.
* Update newly added ApiParticipantPruning service accordingly
see https://github.com/digital-asset/daml/pull/7988#discussion_r525319097
* participant-integration-api: Ensure the LedgerConfigProvider is ready.
Somehow this slipped through.
* sandbox-classic: Fix `DefaultConfig` in tests.
* language-support/java: Disable seeding in tests again.
Co-authored-by: Oliver Seeliger <oliver.seeliger@digitalasset.com>
* KV pre-exec: don't prefetch indirect state inputs from keys
CHANGELOG_BEGIN
CHANGELOG_END
* Ensure that the submission validator reads only once
* Fix test and improve readability
* Fix test and improve readability
* Clarify tested condition
* Tidy up code
* Address review comments
* Remove test about double load not happening with DAML contract key inputs
* Remove stale test that once was about de-referencing DAML contract keys when loading inputs
* StateReader.read ScalaDoc: document that it must be called only once per validation.
* ledger-on-memory: Don't bother with fingerprints.
Instead, just compare values during post-execution.
This has no semantic change, as the "fingerprints" were simply the
serialized bytestrings of the DAML state values. We now just compare the
DAML state values instead.
This change also removes fingerprints entirely from the kvutils code.
Ledgers that use fingerprinting can (and already do) can transform the
state values to include those fingerprints, if necessary.
CHANGELOG_BEGIN
- [Integration Kit] kvutils no longer supports fingerprints directly.
Instead, if the ledger fingerprints the code, you can use the newer,
more generic APIs to transform the state values to include those
fingerprints, if necessary.
CHANGELOG_END
* kvutils: Make `PreExecutingSubmissionValidator` non-final.
It doesn't have a corresponding interface/trait, and it's useful to be
able to mock it.
* Shutdown the GrpcServer and LedgerClient, even if there are active subscriptions.
* Shutdown ledger client in navigator integration test.
* When shutting down GrpcServer, await termination for 1 second to give the reset service time to gracefully complete an ongoing reset request.
changelog_begin
changelog_end
* ledger-on-memory: Create type aliases for caches.
* kvutils: Move caching out of the committer and into the constructor.
* kvutils: Move `reader.map` into the conflict detector.
* kvutils: Remove `LogResult` from the `PreExecutingValidatingCommitter`.
By making it covariant, we can just use `Any`, as we don't care about
the actual type.
* kvutils: Pull the state type out of `PreExecutingValidatingCommitter`.
It is now generic over state types.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils: Let users pass an `Iterable`, not just a `Seq`, to StateReader.
* kvutils: Avoid serializing keys and values except when necessary.
This simplifies the state-reading operations considerably.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils: Remove knowledge on fingerprints from conflict detection.
Generics forever.
* kvutils: Move FingerprintedReadSet.
* kvutils: Remove the `fingerprint` test helper.
* kvutils: Make equality-based post execution even more generic.
* kvutils: Be less variant in the PostExecutionConflictDetector types.
* Remove single-party check
CHANGELOG_BEGIN
- [Ledger API] The ledger API now supports multi-party submissions.
In order to use multi-party submissions, use the new act_as and
read_as fields in submission requests.
CHANGELOG_END
* Remove usage of temporary SubmitterInfo methods
* Fix validator tests
* Fix auth test
* Add multi-party tests to the ledger API
* Fix compile errors
* Improve tests
* Remove temporary single-party method from SubmitterInfo
* Remove temporary single-party method from SubmitterInfo companion object
* Remove temporary single-party method from TxEntry
* Run multi-party submission ITs for ledger-on-memory and ledger-on-sql
* Minor improvement
Co-authored-by: Kamil Bozek <kamil.bozek@digitalasset.com>
* kvutils: Remove fingerprints from the pre-executing validator.
The submission validator doesn't care about fingerprints, it only needs
to know about them in order to discard them from the state value. This
introduces a new typeclass, `HasDamlStateValue`, which can be customized
for various state value types to make submission validation generic.
A little more code for now, but we're setting things up so it can be
deleted later.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils: Add more comments for `PreExecutingSubmissionValidator`.
* kvutils: Move read set generation to the commit strategy.
* kvutils: Make the submission validator abstract over the read set.
* kvutils: Split post-execution conflict detection from finalization.
* kvutils: Ignore the read set in the post-execution finalizer.
* kvutils: Extract a trait for conflict detection.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils: Extract out a trait for post-execution finalization.
* kvutils: Generalize the write set in PreExecutingValidatingCommitter.
* kvutils: In submission validation, create the input state once.
* kvutils: Generalize PreExecutingCommitStrategy over keys and values.
* kvutils: Extract KeyNotPresentInInputException to the top level.
* kvutils: Inline type aliases where they're only used once or twice.
* kvutils: Improve naming and commentary around post-execution.
* kvutils: Remove QueryableReadSet, and simplify caching a little.
* kvutils: Generalize the caching ledger state reader.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils: Make StateReader even more general (no Option).
* kvutils: Convert LedgerStateReaderWithFingerprints to a type alias.
And DamlLedgerStateReaderWithFingerprints too.
* kvutils: Replace LedgerStateReaderWithFingerprintsFromValues.
With LedgerStateOperationsReader and a `.map`.
* kvutils: Replace RawToDamlLedgerStateReaderWithFingerprintsAdapter.
With a `.comapKeys`.
* kvutils: Delete duplicate caching code.
* caching: Move `Cache#get` into its own subtrait.
This method is used by the submission validator, but not by the
caching state readers.
* caching: Move cache mapping from CachingStateReader into Cache.
* caching: Remove an over-eager comment.
* kvutils: Rename `StateReader#comapKeys` to `contramapKeys`.
I got contravariant functors confused with cofunctors.
* caching: Add Scaladoc and improve parameter names in MappedCache.
* kvutils: Adapters everywhere!
* caching: Rename the base test class.
* Build //libs-scala/... on 2.13
One test is unfortunately disabled at the moment since I utterly
failed to figure out why I get a ClassNotFoundException on 2.13.
changelog_begin
changelog_end
* Copyright headers
changelog_begin
changelog_end
* I can’t bazel today
changelog_begin
changelog_end
* Apply suggestions from code review
Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
* Update libs-scala/resources/src/main/2.13/com/daml/resources/UnitCanBuildFrom.scala
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
* No split on view
changelog_begin
changelog_end
Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
* Upgrade Scala dependencies for 2.13 compatibility
This upgrades a bunch of Scala libraries to versions that have 2.13
support. There are two libraries that are still missing:
- diffson, this has a new version but with significant breaking
changes and it is only used in Naigator console which I hope to kill
before I have to worry about this.
- ai.x:diff, this is used in the ledger API test tool. The library is
abondened but there are a few alternatives.
changelog_begin
changelog_end
* Fix pureconfig
changelog_begin
changelog_end
* Fix Navigator
changelog_begin
changelog_end
Changes:
- replaced submitter: Party with actAs: Set[Party] and readAs: Set[Party] in com.daml.ledger.api.domain.Commands
- adapted contract and key lookups for multi-party submissions
* Changed single Commands to accept multiple submitters
* Removed submitter field from Commands
* Replaced submitters with actAs and readAs in Commands
* Moved actAs and readAs to com.daml.ledger.api.Commands
* Contract lookup tests
* Key lookup tests
CHANGELOG_BEGIN
CHANGELOG_END
* Formatted code changes
* Remove unused method
* Formatting fixes
* Simplified logical condition for active contracts visibility
* Removed unused temporary method in Commands
* Unified contract key lookup query for different type of db types
* Simplified ContractReader class structure
* Improved dao unit tests
* Unit tests for lookups as a divulgee
* Reduced code duplication in unit tests
* Minor improvement
* Formatted code
* Fixed a ContractsReader's query
* Improved unit tests
* Explanation for engine's command authorizers and contract readers
* Minor fixes
* Adapted SpannedIndexService for the multi-party submission
* Improve error messages on use of contract ids in contract keys
We got some feedback that "Unexpected contract id" sounds like an
internal error whereas this is really a user error.
changelog_begin
changelog_end
* Include templateId in error message
changelog_begin
changelog_end
by replacing entire `participant_command_completions` table to
prevent assumption that tables reside in the `PUBLIC` schema
which they are not in canton. This is follow-up to #8035
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils: Verify the engine handles an out-of-date pre-execution.
* kvutils: Add a test case for conflicts during fetching by key.
CHANGELOG_BEGIN
CHANGELOG_END
* kvutils: In KVTest, use `Reader` instead of `State` where possible.
* kvutils: Pull out helper methods for pre-execution tests.
* kvutils: Use `Inside` to simplify checks in KVUtilsTransactionSpec.
* kvutils: Simplify KVTest a little.
* kvutils: Split out a SimplePackage manager from TestHelpers.
In an effort to clean up the TestHelpers and associated calls, I have
extracted a class that takes the additional contract data type _once_.
It also provides a useful place to move associated methods and values.
CHANGELOG_BEGIN
CHANGELOG_END