MultiversX Tracker is Live!

How to approach building a custom UTXO index on top of a full-node

Bitcoin Stack Exchange

Bitcoin News / Bitcoin Stack Exchange 152 Views

I want to avoid physically importing addresses into a wallet. I want to write a UTXO indexing system on a per-address basis.

I often wonder how a wallet can keep track of all of its addresses' UTXOs, seeing as transaction outputs can become spent and are therefore no longer spendable.

My concept, as it stands, is to record every vout, of an incoming transaction, against its corresponding address.

So now we have a database of addresses, each with a relation to some txId and vout index that holds the address.

From there, gettxout can be used on each of an address's transactions corresponding to its vout index.

If gettxout responds empty the address's vout has been spent, so is not deemed spendable and does not contribute to calculating the address's balance.

If gettxout responds with a result, the address's vout remains unspent, so is spendable and contributes to the address's balance.

This would obviously only work for addresses where this indexing approach has been implemented. Is this a good idea?

TLDR; how would one go about building a custom index, on top of a Bitcoin node, to track UTXOs, belonging to addresses, given that any vout can become spent?


Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
πŸ’° Install these recommended apps:
πŸ’² SocialGood - 100% Crypto Back on Everyday Shopping
πŸ’² xPortal - The DeFi For The Next Billion
πŸ’² CryptoTab Browser - Lightweight, fast, and ready to mine!
πŸ’° Register on these recommended exchanges:
🟑 Binance🟑 Bitfinex🟑 Bitmart🟑 Bittrex🟑 Bitget
🟑 CoinEx🟑 Crypto.com🟑 Gate.io🟑 Huobi🟑 Kucoin.



Comments