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

Rune balances for spent outputs #3723

Open
koirikivi opened this issue May 3, 2024 · 5 comments
Open

Rune balances for spent outputs #3723

koirikivi opened this issue May 3, 2024 · 5 comments

Comments

@koirikivi
Copy link

I noticed that /output/<txid>:<vout> doesn't show the Rune balances for spent outputs. It also shows those outputs as indexed: false.

I'm working on a service that accepts Rune deposits from users (and will eventually spend the outputs associated with the users' deposits). The way I'm have currently implemented this is using the listsinceblock Bitcoin RPC api to list the all received transactions, and then for each txid/vout pair I query /output/<txid>:<vout> from the ord api to see the Rune amounts transferred as a part of that transaction. However, this doesn't work for outputs that have been spent before scanning the received transactions.

It would be very helpful to have access to the historical rune amounts transferred as a part of some output.
Maybe we could have a flag like --index-spent-runes, in congruence with --index-spent-sats?

@gmart7t2
Copy link
Contributor

gmart7t2 commented May 3, 2024

Spending the outputs before knowing their runic contents will spend their runic contents willy nilly. Wouldn't you want to know their contents before spending them?

@koirikivi
Copy link
Author

Spending the outputs before knowing their runic contents will spend their runic contents willy nilly. Wouldn't you want to know their contents before spending them?

In my use case, the UTXOs are held in an n-of-m P2WSH wallet that's being scanned by multiple backend instances. It's possible that one instance is down and the other instances agree to spend the outputs. After that, it's not possible for the other instance to scan them properly.

Even if we ignore my use case, it would be a useful feature to be able to construct the Rune transaction history of a wallet. I don't think it's currently possible, at least easily.

@casey
Copy link
Collaborator

casey commented Dec 24, 2024

I think this is a pretty common thing to need. Just saw this tweet today which mentions the same thing.

@raphjaph
Copy link
Collaborator

We could revive our transaction index and adapt it to also store runic information. It's more overhead to index and store but exchanges and @koirikivi probably wouldn't mind the extra overhead.

@gmart7t2
Copy link
Contributor

It probably makes sense to have an option to index spent runic outputs without that also indexing every spent output. Runic outputs are presumably still only a small percentage of all the outputs that have ever existed

@raphjaph raphjaph added this to Tracker Jan 7, 2025
@raphjaph raphjaph moved this to To Do in Tracker Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To Do
Development

No branches or pull requests

5 participants