changelog_begin
changelog_end
temp mod to get build
make sure to maintain localContractSet
engine test for: ExerciseAfterRollbackCreate
fix ContractStateMachineSpec testcases and add new case
rebase and fix build failure
fix test (and comment)
fix evaluation order test fails: revert the failure back to be the expected ContractNotActive, instead of ContractNotFound
improve new test (creates in try are rolled back) to check the DamlException thrown
remove ptx.localContracts. instead use ptx.contractState.locallyCreated
improve test name
un-inline ActiveLedgerState.consume
Set() --> Set.empty
add comments for new components of ContractStateMachine
combine checks: consumedBy / inactive
improve comments, doc and test-evidence
New year, new copyright, new expected unknown issues with various files
that won't be covered by the script and/or will be but shouldn't change.
I'll do the details on Jan 1, but would appreciate this being
preapproved so I can actually get it merged by then.
CHANGELOG_BEGIN
CHANGELOG_END
* Only archive a key if it was brought into scope before
This PR implements the semantics we agreed on in
https://github.com/digital-asset/daml/pull/9472#discussion_r620097844.
Before, archive always marked the key as inactive in `keys`. This is
weirdly inconsistent with other operations. For example, a regular
fetch does not bring a key in scope in `keys`. This PR changes this to
a more consistent model where `keys` is modified exactly under the
following circumstances:
1. A create with a key always overwrites.
2. An archive will only mark a key as inactive if there was an entry
in `keys` with the same contract id.
3. Lookup/fetch by key first check if we currently have an entry in `keys`.
If so, we use that.
If not, we need to ask the ledger. We first check if we have a
ceched entry in `globalKeyInputs`. If we do use that.
If we don’t, we ask the ledger.
If the result is not active or not visible we proceed updating `keys`
and `globalKeyInputs`.
If the result was a cid, we check if it’s still active.
changelog_begin
changelog_end
* Review comments
changelog_begin
changelog_end
* Apply suggestions from code review
Co-authored-by: Remy <remy.haemmerle@daml.com>
* fmt
changelog_begin
changelog_end
Co-authored-by: Remy <remy.haemmerle@daml.com>
* Cache global key inputs
This PR changes speedy such that it will query at most once for a global
key. This is a prerequisite for a (sensible) duplicate key detection
and for sensible multi-key semantics.
Note that there is one outstanding issue here:
As a general rule, we only want by-key operations to bring a key in
scope not just a random operation like an exercise or a fetch that
happens to have a key.
However, for consuming exercises this is currently not the case. They
always bring the key in scope. The plan here is for an archive to not
block a further lookup and instead add an activeness check to the
lookup afterwards.
changelog_begin
changelog_end
* Update daml-lf/interpreter/src/main/scala/com/digitalasset/daml/lf/speedy/SBuiltin.scala
Co-authored-by: Remy <remy.haemmerle@daml.com>
* s/CtrlImportValue/SEImportValue/
changelog_begin
changelog_end
* .
changelog_begin
changelog_end
* Use a custom Scala type instead of Option[Value.ContractId]
changelog_begin
changelog_end
Co-authored-by: Remy <remy.haemmerle@daml.com>