-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metadata with output #51
Comments
Hey, this is something I have so far always leaned against introducing into Kupo. There are two reasons for it:
So, all-in-all, this whole dance took about 100ms, because accessing blocks directly from the node isn't a very expensive operation. Since the information is already available in the node's database, it seems counter-intuitive to duplicate it in the indexer as well. Bear with me a second. Having said that... you've been the second person to request that so it seems like there's a use-case for it -- might it be only convenience. Since Kupo already has a privileged access to the node (or Ogmios), those steps could be combined into one API query to make it easier for people to do this sort of operations. Also, since Kupo is also already processing all transactions one-by-one anyway it would be relatively easy to also add metadata to the batch. Given the amount of metadata, this would certainly slow down a few other things and increase the size of the database, but I can imagine making this available only behind some (compilation or runtime) flags. |
Having been chasing a good solution, other than blockfrost, for last few months my self to get metadata. I would like to share my metadata adventures while working on frew projects and most recent ones. Currently I am working on a project https://enterthemandala.app and it relies pretty heavily on the NFT metadata for the user experience, especially forward as we build out our game play. I use Kupo and Ogmios throughout the whole project to aggregate UTXO data, Asset data, pool delegation information and pool information. AND recently in version 2.0.0-BETA the most beautiful query of being able to search for policy id EG: We use it to see which player holds which Mandala NFTs for extra rewards. THIS IS AMAZING MAN!!!! However for metadata I have been chasing this devil with different solutions: First I started with Oura: where I setup a Oura filter to only stored txs/metadata with label CIP-25(label721) dump into a JSON file and then dumped into mongodb through a script. This solution worked ok, wasn't the most efficient and it was hard to index mondodb since the policyID and Asset name by CIP-25 are objects not . However it made for a nice small DB of only about 4.5GB with all the metadata since Shelley era meeting the label cip-25(label 721) criteria. Soon after dcSPark released CARP, which uses Oura under the hood but they also added a postgresql indexer where you can setup certain jobs/workflows as well and saves it in CBOR. This is THE fastest solution so far for me to use to obtain metadata and query with really nice speed. The downside is, Carp will save only the cip25 metadata but it will save every single TX as well one even without metadata in it, which bloats the DB to 45GB. So currently my stack consists of: Cardano node, Ogmios, Kupo, Carp, and it's a very nice working solution and even very feasible for a home enthusiast to spin up and connect Mandala app through their own solution which is the whole idea for us. My apologies this got somewhat lengthy at this point, but I think my adventure story hehe, is crucial in trying to say how absolutely amazing it would be if Kupo, even if it took a little longer to sync had an option through either a flag or whatever, to store TX metadata that could be searchable by PolicyID/Asset. Not to mention how much more friendly the Development stack for any cardano dev would become, literally Cardano Node, Ogmios(Optional) and Kupo. With that said, Kupo is already an amazing tool and I would not be one bit disappointed if this option didn't make it in. Thanks Again, |
If size, complexity and lightweight is a concern, another approach may be to have kupo post a webhook info to an outside endpoint and let the user process/save the output if using this metadata flag or any other optional flags in their own database. Thanks for making Kupo, this will be a very useful tool for a lot of people. |
I think this would already be much better than having to use a second solution(mentioned in my comment above) just to sync metadata.
|
So, I am curious whether the solution I am proposing above could work because this is a relatively low hanging fruit with high impact. The question really being: does an endpoint in the form of
Would work? In prose, I propose to query auxiliary data by slot-no, possibly filtered by transaction Id. This would return a list (possibly empty) of associated auxiliary data. The slot-no and transaction id can be obtained from the /matches endpoint results, or simply be completely arbitrary (coming from other sources). Would that solve everyone's problem by any chance 😅? |
Additionally, it should be relatively easy to also add an optional |
Now you've triggered me. How fast 😏? I'd love to get some high-level baseline to see whether what I am proposing is unusable or somewhat in the realm of what exists. |
this would work for me. However, can the webhook also be something that can be implemented? Something where matches will dump everything available to an endpoint? |
Let's make a separate ticket for the webhook because that's a whole different conversation. This is clearly not sustainable to do when synchronizimg from scratch. Or at least, the target server would need to be able to sustain 10k + req/s, not impossible but demands some thinking. Plus, if a client needs this level of control, why not use the chain-sync protocol directly 🤔? |
I was thinking of kupo doing the match and then posting matched transaction to a webhook. But what we have got here is good for me. |
Describe your idea, in simple words.
Get metadata info included with transaction info if possible.
Why is it a good idea?
Get more complete info.
Are you willing to work on it yourself?
I don't have the skills to work on this.
The text was updated successfully, but these errors were encountered: