daml/compiler/damlc/tests
Moritz Kiefer 4e1c5fedb3
Check visibility for by-key operation of local contracts (#9470)
* Check visibility for by-key operation of local contracts

fixes #9454

I tried out two approaches for this:

1. The one here where we add a new callback. This has the advantage
   that the engine remains oblivious to visibility checks. They are all
   done outside and the engine doesn’t even know about the reading
   parties.
2. Make the engine aware of the reading parties. A start of that is in
   #9458.

Both work in principle but I ended up going for 1 in the end. Doing
half of the visibility checks outside the engine and half inside just
seems worse than the current state.

changelog_begin

- [Daml Engine] Fix a bug where it was possible to
  fetch/lookup/exercise a local contract by key even if the reading parties
  are not stakeholders. See #9454 for details.

changelog_end

* Disable new test on Canton

changelog_begin
changelog_end

* Exclude from compat tests

changelog_begin
changelog_end

* s/LocalLookup/LocalFetch/

changelog_begin
changelog_end

* Address review

changelog_begin
changelog_end
2021-04-22 21:39:12 +02:00
..
bond-trading update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
daml-test-files Check visibility for by-key operation of local contracts (#9470) 2021-04-22 21:39:12 +02:00
dars Update checked in DAR to one built with DAML-LF 1.8 (#5021) 2020-03-16 16:54:19 +01:00
src Check visibility for by-key operation of local contracts (#9470) 2021-04-22 21:39:12 +02:00
BUILD.bazel daml package: bump timeout for tests (#9377) 2021-04-12 09:45:32 +00:00
Colliding.daml update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
extract-diagnostics.sed Add sed script to help with updating the damlc ITs (#7727) 2020-10-19 14:26:59 +02:00
PkgManagerTest.daml pkgid data deps (#9153) 2021-03-18 12:17:38 +01:00
ReplMulti.daml update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
ReplTest2.daml update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
ReplTest.daml update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
ReplTestIndirect.daml update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00
util.bzl update copyright notices for 2021 (#8257) 2021-01-01 19:49:51 +01:00