* enable Return wartremover wart
* remove return keyword from various places in daml-lf
* remove return keyword from various places in ledger
* simpler ImmArray equals
* move traverseEitherStrictly to point of use
* remove return from ledger-api-server-example
* Remove ExercisedEvent in Event oneof.
The Event message is only used in the Transaction message. Flat
transactions do not contain exercised events, but only created and
archived events. Therefore we can remove the ExercisedEvent from the
Event oneof, without breaking transport compatibility.
HOWEVER: The Java Bindings used to use the data.Event class for both flat
transactions and transaction trees. To properly represent the actual
event types in the two transaction structures,
1) Event is now and interface and is only used in the Transaction class.
2) there is a new interface TreeEvent, which is used in the TransactionTree class.
* CreatedEvent implements Event and TreeEvent
* ExercisedEvent implements TreeEvent
* ArchivedEvent implements Event
Some "pathological" cases where an occurrence of an exercised event
would have resulted only in an exception, are now removed (see change in
LedgerApiV1.scala).
Fixes#960.
* adding necessary @volatiles
* services are factored out
* no need for ResetService to stop the services before
* removing not needed callback methods
* mostly renaming things
* some further cleanup
* avoiding linear searching for transactions from genesis
* validating transaction ids
* one more failing test nailed down
* fixing off by 1 error
* docs + release notes
* fixing EventIdFormatterSpec
* fixing broken validation test
Up to now, the engine blindly assumed that contract ids pointed to
contracts of the right type. However, this assumption is faulty:
contract ids coming from the Ledger API cannot be type checked
in command translation since we need access to the contract itself
to do so.
This caused some seriously surprising / broken behavior: one could
send an exercise command with the wrong template id and still go
through, or break internal invariants about the type of choices.
This commit fixes this by checking that the type of the contract
instances we fetch is correct at runtime.
cc @hurryabit @dajmaki @remyhaemmerle-da @S11001001 @meiersi-da
* Remove ledger-api-server-example
This code does not serve any purpose anymore as it has been replaced
by ledger/participant-state and friends.
* Remove ledger-api-server-example from Windows build
* Use Sandbox's ActiveContracts in reference index service
This properly handles contract key updates and adds the required
checks for contract activeness and visibility.
Could consider moving the ActiveContracts.scala into another library,
but since we're soon starting the work to bring sandbox onto the
daml-on-x stack we might postpone that.
* reformat
* Exclude logback.xml from sandbox the library
This allows users of sandbox as a library to specify their
own logging configuration.
* Re-order fields in records if all labels are provided
Fixes#988
* Add line to release notes
* Fix line on release notes
* Document change on the Ledger API definition
* Simplify pattern matching
* Improve and fix tests
Integration tests now look for the "Missing field label" rather then the
"Mismatching record label" when inspecting errors. Furthermore, a test
has been added that ensures that repetitions in labels still raise an
error.
* Add comment
Comment about relationship between fields length check and fields reordering based on labels
Co-Authored-By: stefanobaghino-da <43749967+stefanobaghino-da@users.noreply.github.com>
* Improve Ledger API docstring
Explicitly state the semantics of labeled fields (i.e. repeated keys are not accepted)
Co-Authored-By: stefanobaghino-da <43749967+stefanobaghino-da@users.noreply.github.com>
* Export daml_kvutils_java_proto and add (un)packDamlLogEntryId
Export needed when using kvutils via bazel from another workspace.
* Use 'String' for participant state's LedgerId
Ref.PackageId is the wrong thing, and likely MatchingStringModule
isn't very usable from Java.
* Drop LedgerTestingHelpers.asyncFromTimeService as unused.
* ledger-api-test-tool: Add clues to asserts in the main code paths.
This ensures that users get more informative errors for the currently used
semantic tests.
* semantic tester: add operation description to an underlying ledger.
This allows to provide richer error messages to users of LedgerApiTestTool.
* Extend test durations on CI for Ledger API Test Tool driven test.
This introduces a command-line argument to scale timeouts used in the test.
* ledger-api-its: Make FutureTimeouts.timeout duration scaled inside.
Also include more information in the error message.
* simple test to hedge against existing sql migration files
* copyright
* adding better failure message
* adding intructions on generating the digest file
* Add configuration to LedgerInitialConditions
* Wait until index state is established in reference index service
This fixes a race condition where the daml-on-x server has been
brought up before the index service can serve it.
* Remove ledgerId checks from index service
Now that we have decided on non-changing ledger identifiers, remove
the ledgerId checks from index service and simplify the interface.
* Reformat and fix leftover ??? from DamlOnXTransactionService
This reverts commit 3d8acde916.
For some reason that commit seems to have resulted in a lot of
"unexpected end of file" errors during cache downloads. I do not know
what is going on here or how to fix it so let’s revert it for now.
Submitting a command via the CommandService now returns either the
transaction id (SubmitAndWaitForTransactionId), the flat transaction
(SubmitAndWaitForTransactionResponse), or the transaction tree
(SubmitAndWaitForTransactionTreeResponse).
This means that users don't have to wade through the transaction stream
to retrieve the resulting transaction. This is particularly useful in
combination with #479.
Fixes#406
* Allow to mangle names used in scenarios before their executions.
This allows to run a scenario against a long-running server repeatedly and avoid
clashes between runs, since each party is unique (up to the randomness used).
* ScenarioRunner: add test for partyNameMangler
This change is needed in preparation of #406, where we want to return a
transaction tree and flat transaction after a SubmitAndWaitForTransaction(Tree).
* remove outdated flags from comments
* update tests in preparation for visibility rules
* check visibility of contract keys, fixes#751
* add release notes
* include visibility check in scenario runner
* stephen's suggestions
* fix type error in api server example
* scalafmt
* bring TransactionFiltration.scala up to speed with disclosure
see
<faf1cde1a1/ledger-api/grpc-definitions/com/digitalasset/ledger/api/v1/event.proto>
for an in-depth description. fixes#794.
* add tests for contract key visibility
* move a lot of ledger testing utils out of command checks
* move a lot of ledger testing utils out of command checks
* remove useless checks regarding divulgence
* add tests regarding event witnesses
* update release notes
* re-introduce safety when disclosing
* hedging against possibly gaps in offsets
* doing the math right
* adding some notes
* extracting pipeline logic
Please enter the commit message for your changes. Lines starting
* extracting "run until" logic to be testable
* testing _run until_ logic
* adding release note
* copyright
* adding link to PR
* changing lookUpByTransactionId to use TransactionPipeline
* fixing issue identified by Extractor tests
* reference-server: Add invariant that observed offset is monotonic.
* reference-server: Fix offset handling for empty resulting transaction streams.
If the requested transaction stream (by range) returns empty, code - previously
- would reset 'currentOffset' to None, which was breaking invariants for the
next transaction stream request. Ensure that 'currentOffset' is maintained in
such scenario.
- Make `getLedgerInitialConditions` a `Source` to mirror `stateUpdates`.
This makes it easier to implement in Java.
- Expose transaction submission outputs with `KeyValueSubmission.transactionOutputs`
for ledger implementations that require knowledge of outputs up-front.
- Fix typo in unpackDamLLogEntry.