Commit Graph

1340 Commits

Author SHA1 Message Date
mziolekda
0ff919f498
Update offset when party/config rejected on a duplicate (#8463)
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
2021-01-12 13:43:15 +00:00
Moritz Kiefer
6b2ac0e0c6
Port parts of //ledger/... to Scala 2.13 (#8470)
* 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
2021-01-12 10:55:00 +01:00
Moritz Kiefer
aebde84842
Upgrade scopt to 4.0.0 (#8466)
* 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
2021-01-11 21:23:02 +01:00
Robert Autenrieth
57217f33e8
Remove expensive test (#8450)
The test was useful for finding the bug in groupContiguous,
but is not useful in the long term.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-11 16:16:47 +01:00
Remy
fef1c70b9b
Sandbox: add early access flag to the sandboxes (#8441)
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
2021-01-11 14:03:57 +01:00
Moritz Kiefer
22ce940954
Upgrade scalafmt and enable trailing commas (#8437)
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
2021-01-09 11:37:37 +01:00
Moritz Kiefer
3a8f5e8aaa
Port //language-support/scala to Scala 2.13 (#8442)
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
2021-01-08 20:28:15 +01:00
Gerolf Seitz
3f54258a22
Fix rare out of order transaction delivery on the ledger api (#8336)
* 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>
2021-01-08 20:12:19 +01: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
Moritz Kiefer
424faa923a
Port damlc dependencies to Scala 2.13 (#8423)
* 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>
2021-01-08 07:22:38 +01:00
Samir Talwar
6d2140072f
kvutils: Wrap raw key and value bytestrings in types. (#8408)
* 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`.
2021-01-07 15:28:14 +00:00
Remy
440b17af24
LF : Fix/Clean some LF related TODOs (#8387)
CHANGELOG_BEGIN
CHANGELOG_END
2021-01-07 15:13:28 +01:00
Gary Verhaegen
427179ab27
fix (some) copyright headers (#8422)
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
2021-01-07 11:48:59 +01:00
Samir Talwar
c68ba11080
participant-integration-api: Dedicated execution context for requests. (#7945)
* 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>
2021-01-05 18:11:54 +00:00
fabiotudone-da
9224ecea03
KV pre-exec: don't prefetch indirect state inputs from keys (#8323)
* 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.
2021-01-05 16:30:01 +01:00
Moritz Kiefer
19c66d1a9c
Drop unused Source.empty (#8383)
changelog_begin
changelog_end
2021-01-05 08:30:53 +01:00
fabiotudone-da
78ea8ed825
Don't sync-succeed (potentially) before async assertions (#8375)
CHANGELOG_BEGIN
CHANGELOG_END
2021-01-04 17:11:33 +01: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
Samir Talwar
4447685755
ledger-on-memory: Don't bother with fingerprints. [KVL-747] (#8340)
* 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.
2020-12-18 17:07:28 +00:00
Remy
9ba146a3e4
LF: Preview of LF 1.11 (#8280)
First step of LF 1.11 release #7139

Preview version is not stable and cannot be used in the ledger only in dev mode.

CHANGELOG_BEGIN
CHANGELOG_END
2020-12-18 17:08:22 +01:00
Matthias Schmalz
6bdfadd06c
Shutdown the GrpcServer and LedgerClient, even if there are active subscriptions (#8279)
* 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
2020-12-18 14:02:38 +01:00
Samir Talwar
cb0f681932
kvutils: Remove fingerprints from the PreExecutingValidatingCommitter. [KVL-747] (#8337)
* 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
2020-12-18 08:13:14 +00:00
Samir Talwar
72b00a05f2
kvutils: Avoid serializing keys and values except when necessary. [KVL-747] (#8319)
* 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.
2020-12-18 06:54:40 +00:00
Remy
649f740efd
LF: retire ValueVersion (#8303)
use TransactionVersion instead.

This is part of #7788

CHANGELOG_BEGIN
CHANGELOG_END
2020-12-17 17:35:43 +01:00
Robert Autenrieth
f3d8f05070
Enable multi-party submissions [KVL-708] (#8266)
* 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>
2020-12-17 13:42:39 +01:00
Samir Talwar
021697fff7
kvutils: Remove fingerprints from the pre-executing validator. [KVL-747] (#8296)
* 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`.
2020-12-16 15:15:08 +00:00
curiousleo-da
edae9ddb33
Add spans for index DB reads [LPF-270] (#8239)
CHANGELOG_BEGIN
- [Integration Kit] Emit OpenTelemetry spans and events for index DB
  reads
CHANGELOG_END
2020-12-16 12:39:24 +01:00
Samir Talwar
54687a579c
kvutils: Reduce the surface area of fingerprints in pre-execution. [KVL-747] (#8289)
* 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.
2020-12-15 12:52:08 +00:00
Stefano Baghino
6580dbd15c
Benchmarks for Speedy/DAML-LF/Protobuf translations [DPP-104] (#8272)
* Fix typos and inconsistencies

* Implement toString for SRequiresOnLedger

* Add benchmarks

changelog_begin
changelog_end

* Add copyright headers

* Make SubmissionBuilder final

* Address missing reference ledger export on Windows

* Fix README.md

* Add clarification on README.md

* Limit visibility of reference ledger export output

* Ensure benchmark recognizes the optionality of exercise return values

* Address https://github.com/digital-asset/daml/pull/8272#discussion_r542194308

* Follow up to changes from https://github.com/digital-asset/daml/pull/8273
2020-12-15 11:49:52 +00:00
Kamil Bożek
ad432592b8
Multi-party submissions in kvutils [KVL-707] (#8275)
* Multi-party submission authorization in the TransactionCommiter

* Unit tests for committer's authorization

* Reduced code duplication in TransactionCommitterSpec

* Formatted changes

* Changelog
CHANGELOG_BEGIN
CHANGELOG_END

* Formatting fixes

* Fixed a typo

* Formatted changes
2020-12-15 10:14:18 +01:00
Samir Talwar
70af09db51
kvutils: Generalize caching. [KVL-747] (#8262)
* 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.
2020-12-14 20:13:34 +00:00
Moritz Kiefer
1b32044a74
Build //libs-scala/... on 2.13 (#8282)
* 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>
2020-12-14 17:36:53 +00:00
Remy
7d31135645
LF: retire VersionTimeline (#8273)
CHANGELOG_BEGIN
CHANGELOG_END
2020-12-14 16:56:47 +01:00
tudor-da
ae28cf40c2
Safely update ledger end (#8221)
CHANGELOG_BEGIN
[Integration Kit] Re-enabled asynchronous commits in JdbcIndexer.
CHANGELOG_END
2020-12-14 12:07:03 +02:00
Moritz Kiefer
76b6fd86fb
Upgrade Scala dependencies for 2.13 compatibility (#8268)
* 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
2020-12-14 09:59:00 +01:00
Gary Verhaegen
acf654ca55
replace new Prim with Prim.valueOf (#8270)
Creating new primitives has always been a bad idea.

Stolen from #8267 which stole it from #975.

CHANGELOG_BEGIN
CHANGELOG_END
2020-12-11 18:50:37 +01:00
Samir Talwar
c15071e8ca
kvutils: Extract out a common type for the ledger state readers. (#8264)
CHANGELOG_BEGIN
CHANGELOG_END
2020-12-11 16:59:47 +00:00
Remy
44c5b8a777
LF: remove version from value nested in GenNode. (#8217)
CHANGELOG_BEGIN
CHANGELOG_END
2020-12-11 17:12:14 +01:00
Moritz Kiefer
5c077a4550
Add multi-party submissions to DAML Script (#8240)
* Add multi-party submissions to DAML Script

changelog_begin

- [DAMl Script] Add early-access submitMulti and submitMultiMustFail
  for multi-party submissions. This is only supported in DAML Studio at
  the moment.

changelog_end

* Fix daml-lf prettyprinter

changelog_begin
changelog_end

* Cleanup visibleIn

changelog_begin
changelog_end

* Fix JsonApiIt

changelog_begin
changelog_end

* s/Set()/Set.empty

changelog_begin
changelog_end

* Cleanup token check

changelog_begin
changelog_end

* Update daml-script/runner/src/main/scala/com/digitalasset/daml/lf/engine/script/LedgerInteraction.scala

Co-authored-by: Remy <remy.haemmerle@daml.com>

* Document ParticipantView

changelog_begin
changelog_end

Co-authored-by: Remy <remy.haemmerle@daml.com>
2020-12-11 12:45:32 +01:00
Kamil Bożek
5db4ca687b
Multi-party command submission [KVL-699] (#8152)
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
2020-12-11 10:04:15 +01:00
Remy
76c4380fef
LF: drop support from deprecated LF value versions. (#8083) (#8237)
* LF: drop support from deprecated LF value versions. (#8083)

CHANGELOG_BEGIN
CHANGELOG_END
2020-12-10 17:14:36 +01:00
Moritz Kiefer
4478d63c68
Improve error messages on use of contract ids in contract keys (#8236)
* 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
2020-12-10 16:26:55 +01:00
curiousleo-da
f4fa88c977
Trace index DB -> Ledger API read path [LPF-223] (#8233)
CHANGELOG_BEGIN
- [Integration Kit] Emit OpenTelemetry events for transactions streamed
  to the client from the Ledger API
CHANGELOG_END
2020-12-10 15:06:17 +01:00
Oliver Seeliger
e23f44f47d
Ledger api server index h2 avoid reliance on PUBLIC schema (#8223)
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
2020-12-10 10:11:47 +01:00
Samir Talwar
79a91669b2
kvutils: Use mockito-scala's ArgumentMatchersSugar. (#8218)
CHANGELOG_BEGIN
CHANGELOG_END
2020-12-09 15:34:38 +00:00
Samir Talwar
4e2e39f871
kvutils: Add a test case for conflicts during fetching by key. [KVL-759] (#8204)
* 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.
2020-12-09 14:01:07 +00:00
Samir Talwar
c588b5cc34
kvutils: Extract a SimplePackage class from TestHelpers. [KVL-759] (#8203)
* 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
2020-12-08 16:08:30 +00:00
Samir Talwar
f7465f0646
kvutils: Extract out a trait from StateUpdates. (#8201)
This allows us to mock the object without resorting to mocking final
classes, which is _hella_ flaky.

CHANGELOG_BEGIN
CHANGELOG_END
2020-12-08 15:33:35 +00:00
Remy
8f3c6a4494
LF: Add version directly in GenNode (#8154)
CHANGELOG_BEGIN
CHANGELOG_END
2020-12-08 16:12:12 +01:00
Samir Talwar
fdde69a599
kvutils: Throw if CommitContext#read encounters missing input state. [KVL-757] (#8194)
* kvutils: Throw if CommitContext#read encounters missing input state.

CHANGELOG_BEGIN
CHANGELOG_END

* kvutils: Revert CommitContext#get.

* ledger-on-memory: The pre-execution tests are no longer flaky.

* kvutils: Update the Scaladoc for CommitContext to mention exceptions.

* kvutils: Moar CommitContext testing.
2020-12-08 13:25:11 +00:00