Bitcoin Forum
July 24, 2026, 11:55:41 PM *
News: Latest Bitcoin Core release: 31.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Looking for feedback on my UTXO model and address format  (Read 26 times)
Francesco Ferraro (OP)
Newbie
*
Offline

Activity: 6
Merit: 0


View Profile WWW
Today at 12:20:32 PM
 #1

Hi everyone,

I'm continuing to improve my hobby blockchain project written in Python.

At the moment I'm implementing a Bitcoin-style UTXO model. The node can already return both balance and UTXO information through the API.

Example:

GET /balance/<address>
{
  "balance": 2050000000
}

GET /utxo/<address>
{
  "utxos": [
    {
      "address": "F369-5538-4066-7499-9028-0027",
      "amount": 2050000000,
      "spent": false,
      "txid": "dbd1af28d5894c29ed2231230e1e526d3995585c8b5180b8a94d6a983e05b152",
      "vout": 0
    }
  ]
}

I intentionally keep the structure simple while I learn how Bitcoin's UTXO model works.

I'd like to ask for feedback:

1. Does this UTXO structure look reasonable?
2. Am I missing any important fields?
3. Is there anything you would recommend changing before I continue with transaction validation and mining?

I'm still learning, so any suggestions are appreciated.

Thank you.
OsaiEmma
Full Member
***
Offline

Activity: 420
Merit: 173



View Profile
Today at 01:36:39 PM
 #2

I'd like to ask for feedback:

1. Does this UTXO structure look reasonable?
2. Am I missing any important fields?
3. Is there anything you would recommend changing before I continue with transaction validation and mining?

I'm still learning, so any suggestions are appreciated.

Thank you.
1) Yes it does to me but with a little tweak: I'd recommend you remove this
Code:
 "spent": false,
The reason is that it feels redundant. This is an unspent transaction output (UTXO) meaning it is unspent; spent will never be true, so there is no need for it.

2) Yea, I'd suggest block_height for proper identification.

3) Just the 2 above, I know some other members might have more suggestions.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!