ScanSupport

scalus.cardano.node.stream.ScanSupport

What happens to a subscription the provider cannot serve from an index.

The distinction between the first two is not how clever the matching is — it is whether the provider already holds the block's contents. An in-memory ledger, a chain-sync follower and a gRPC stream all see every transaction anyway, so a subscription that matches everything costs them nothing beyond the fan-out they already do. A REST provider whose cheap path is per-address endpoints has to fetch the block and then a UTxO set per transaction in it, which is the difference between a handful of requests a day and a spent quota.

The third is a different kind of answer, and it needs to be stated rather than approximated by the second: a provider built entirely out of per-source lookups has no request sequence that would answer "every transaction" at all. Calling that Metered would let a caller consent, via allowUnindexedScan, to something that cannot happen — and the subscription would then be accepted and deliver nothing, forever, with no error. Consenting to an impossibility is worse than being refused.

Attributes

Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Enum entries

case Free extends ScanSupport

The provider already has every block's contents; scanning adds nothing.

The provider already has every block's contents; scanning adds nothing.

Attributes

case Metered extends ScanSupport

Examining a block the provider would not otherwise fetch costs it real requests, so a caller must opt in with SubscriptionOptions.allowUnindexedScan.

Examining a block the provider would not otherwise fetch costs it real requests, so a caller must opt in with SubscriptionOptions.allowUnindexedScan.

Attributes

case Unsupported extends ScanSupport

The provider cannot examine a block it was not asked about at all, so it serves exactly what StreamCapabilities.pushdown covers and refuses everything else.

The provider cannot examine a block it was not asked about at all, so it serves exactly what StreamCapabilities.pushdown covers and refuses everything else.

Attributes