Replies: 3 comments 8 replies
-
Current access time for metadata is already logarithmic.
My own experience and benchmarks have been more in the range of 10-20ms. Do you have any particular reproducible case / setup where you observe such large delays ? |
Beta Was this translation helpful? Give feedback.
-
I will try to set up something reproducible! If you want to play around with it in the meantime, this example comes from the MinSwap orderbook contract, transactions close to launch of the platform on mainnet. |
Beta Was this translation helpful? Give feedback.
-
I have a use case for this as well. Storing metadata in the database would be an awesome feature. My use case is for a simple API that can get the assets within a user's wallet for example. Right now Kupo is great because I can get how much Cardano (and other tokens) and # of NFT's a user has, but obviously the output looks like I tried using the |
Beta Was this translation helpful? Give feedback.
-
What is your idea? Provide a use case.
When querying the transaction history of DEXs, it is interesting to see what metadata was provided with each transaction (i.e. to distinguish order placed through the main interface, trading bots and DEX Aggregators).
This requires quick access to transaction metadata.
Why is it a good idea?
By storing the metadata in a local table in kupo, access time can be reduced to logarithmic time. By pruning away metadata unrelated to the stored transactions, this wouldn't affect the size of the database too much either.
What is the current alternative and why is it not good enough?
Currently kupo offers an option to access metadata for a transaction. Access time is easily on the order of 1-2s though since the metadata is not stored in the local database, but fetched from the node. This makes analysis of DEX transactions (easily exceeding 1M unique transactions) infeasible.
Another alternative is fetching data from blockfrost or seperate instance, which however seperates sources and may lead to problems when accessing "fresh" data on chain (one instance having picked up a transaction with the other instance missing it)
Beta Was this translation helpful? Give feedback.
All reactions