Skip to content
CCPEDIAby Unity Nodes
App Development

Filters in gRPC API and action consequences

5 posts1,499 views6 likesLast activity Nov 2020

  1. oggyOP 1

    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?

  2. cocreature 1

    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.

  3. oggy 1
    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?

  4. stefanobaghino-da 1

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

  5. cocreature 2

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