CardanoSolutions/kupo

(Conditionally) Include resolved Datums & Scripts in responses.

Opened this issue · 0 comments

Discussed in #139

Originally posted by Cauterization October 17, 2023
In plutus-ledger DecoratedTxOut is the main type to which all logic is tied. Accordingly, most of the requests to kupo in our application are to receive a single DecoratedTxOut or Map from TxId's to DecoratedTxOut's.
We (and many other users I suppose) use kupo as a lightweight alternative to plutus-chain-index. However, while plutus-chain-index can retrieve a map of any size with a single request, it may require up to three requests to get one DecoratedTxOut with kupo (to get match, to get datum from its hash, and, in case of ScriptDecoratedTxOut - to get validator from script address). And this situation gets even worse when requesting many DecoratedTxOut's - this easily can take several hundred requests. We managed to get rid of this bottleneck in some parts of our application, but in some places this cannot be done without rewriting a huge part of cardano libraries
So maybe it would be possible to add a new endpoint that will do all these requests to database at once.