Skip to content
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

Allow indexing outputs on transactions that contain a metadata tag #108

Closed
KtorZ opened this issue Jan 24, 2023 Discussed in #103 · 0 comments · Fixed by #109
Closed

Allow indexing outputs on transactions that contain a metadata tag #108

KtorZ opened this issue Jan 24, 2023 Discussed in #103 · 0 comments · Fixed by #109

Comments

@KtorZ
Copy link
Member

KtorZ commented Jan 24, 2023

Discussed in #103

Originally posted by Quantumplation January 9, 2023
With Sundae governance, we recently implemented on-chain voting; now, users can cast their vote "on-chain" (totally optional, we still support fee-less off-chain voting). This is helpful for people concerned about censorship, or more commonly, those who have hardware or CLI wallets where it's difficult to signData or interface with the web-app.

When it comes time to tally the votes for a given proposal, we then add up the users balances for all of the off-chain votes (already using kupo); and now we need to identify the relevant on-chain transactions to add into the mix.

For this, it would be super useful to be able to specify something like

--matches "meta:31415"

Then, any transactions (or, more accurately, the outputs of that transaction) that have the metadata tag 31415 get indexed and then are queryable.

If this doesn't fit with the design of kupo, this might make sense as an ogmios feature (chainsync, but only tell me about txs that match some pattern), or even it's own standalone tool in the same spirit as kupo.

Obviously, this wouldn't be too hard to implement directly on ogmios ourselves, so if this turns into a "will not do" that's fine, just thought I'd throw it out there :)

KtorZ added a commit that referenced this issue Jan 24, 2023
  This is a first iteration on this feature, which provides a handy way
  to fetch results by metadata tag (match _all outputs_ in a matching
  transaction).

  Metadata can then be retrieved directly from `/metadata` by slot no
  and transaction id.

  Note that we do not however allow to explicitly query by metadata tag.
  In order to do so, we would need to store associated metadata tags
  with the output, or in a side table. For now, this isn't a compelling
  use case.

  Fixes #108
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant