This ticket proposes to remove the old inefficient algorithm and instead use Kupo's database lookups for this.
Blocked By
A quick (perhaps incorrect) glance at CTL suggests that there is no direct support for sending our own arbitrary queries to Kupo. If not, then we'd have to write some of our own code to get the query working. Or alternatively, we can beg the CTL team to put this feature in for us :D
Goals
[ ] replace findUtxoByValueAt (and related functions) with a function that uses Kupo's indexes. Indeed, the Address input can most likely be removed since this lookup is mostly used to identify NFTs that identify a UTxO and in most cases the onchain code guarantees that the NFT will be paid to "the right" address
Tests
[ ] all tests shouldn't be broken.
[ ] (optional) some manual test net testing would be nice.
Issue by: jaredponn Original date: 2023-05-17 06:44:14 UTC Originally opened as: mlabs-haskell/trustless-sidechain/issues/436 Original assignees: Status on 2023-06-20: open
Description
A main selling point of Kupo was that it provides an efficient index from policy ids and asset names to UTxOs.
The current implementation implements this by an inefficient linear scan.
This ticket proposes to remove the old inefficient algorithm and instead use Kupo's database lookups for this.
Blocked By
Goals
findUtxoByValueAt
(and related functions) with a function that uses Kupo's indexes. Indeed, theAddress
input can most likely be removed since this lookup is mostly used to identify NFTs that identify a UTxO and in most cases the onchain code guarantees that the NFT will be paid to "the right" addressTests
Links