Skip to content
CCPEDIAby Unity Nodes
#7137OPEN Issue

`listTransactionViews` should have a defensive `LIMIT`

stephencompall-DA04-09-2026Last activity 1d ago

listTransactionViews, used by /v0/events/{update_id} (and /v0/events until #7136 is addressed), selects rows with no LIMIT and no sanity check:

https://github.com/canton-network/splice/blob/1b6c1bb3bb6ca99334fd95595c2f065e685c4bd7/apps/scan/src/main/scala/org/lfdecentralizedtrust/splice/scan/store/db/DbScanVerdictStore.scala#L630-L647

The result length is limited by the number of possible views for a single verdict, and cannot be increased by the caller; the idea here is just defensive coding. Every other related query on this path similarly uses an explicit limit (e.g. getVerdictByUpdateId, getUpdatesWithoutImportUpdates).

Use a Limit of more views than we can reasonably expect, and use HardLimit/sqlLimit as the other store functions do so that there is at least a warning if it's exceeded.

Introduced by #2039.

← Back to Proposals