Skip to content
Discussions/App Development/Filters in gRPC API and action consequencesForum ↗

Filters in gRPC API and action consequences

App Development5 posts1,449 views6 likesLast activity Nov 2020
OG
oggyOP
Nov 2020

The gRPC API exposes a filtering mechanism for subscriptions:

docs.daml.com

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?

CO
cocreature
Nov 2020

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.

OG
oggy
Nov 2020
cocreature:

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?

ST
stefanobaghino-da
Nov 2020

Not completely. Only the parties from the filter are taken into account.

CO
cocreature
Nov 2020

It’s not just ignored, you will get an error if you specify templates daml/TransactionServiceRequestValidator.scala at 7bea34955ed6605827204f7ef9758b0d44140640 · digital-asset/daml · GitHub.

← Back to Discussions