Filters in gRPC API and action consequences
The gRPC API exposes a filtering mechanism for subscriptions:
Ledger API Reference — DAML SDK 1.7.0 documentation
Say I use a filter in GetTransactionsRequest that specifies only a single party P and a single template T, and there’s an exercise event on some instance of T with P as an informee. If the exercise has consequences on other templates, will I receive those consequences?
The gRPC filter does not take consequences into account. That’s one of the reasons why the transaction tree doesn’t have any template filtering. A forest where you randomly select a few nodes by template without taking consequences into account will no longer be connected.
That’s one of the reasons why the transaction tree doesn’t have any template filtering.
I’m not sure what you mean here; you can definitely specify a filter for tx trees as both flat and full transactions use the same request type. Are you saying that the provided filter is completely ignored for transaction trees?
Not completely. Only the parties from the filter are taken into account.
It’s not just ignored, you will get an error if you specify templates daml/TransactionServiceRequestValidator.scala at 7bea34955ed6605827204f7ef9758b0d44140640 · digital-asset/daml · GitHub.