Bitcoin transaction query

Hi Folks, need some help in understanding on bitcoin transaction verification.

So, since bitcoin blockchain is a transaction ledger, when wallet creates a new transaction, it combines UTXO to cover the transfer amount (say n inputs) and then hash it and after digitally signed by the sender with his private key, it is broadcasted to other nodes for verification. I would like to know what happens when different nodes are verifying this transaction and the payment sender gets a new transaction to his wallet? Now, the verification node will have the transfer amount covered with UTXO which will include sender’s newly received payment? So, in this case verification node’s hash would differ from sender’s hash?

Example: below sender combines 4 UTXO to transfer say 10 BTC.

1BTC
2BTC
4BTC
3BTC

What happens if sender receives additional input shortly after initiating transfer and how verification node will calculate transfer amount from the UTXO to create a hash for comparison?

3BTC – additional
1BTC
2BTC
4BTC
3BTC – was part of initial payment

The hash is on the transaction that was entered at that point in time. Additional inputs afterwards wouldn’t be taken into account in that hash.

The impact would be all former UTXOs being spent (no change addresses needed), with a subsequent 3 BTC from the new input received being a UTXO for future transactions.

Hope that’s clear!

1 Like

I haveone more similar question
Lets say I have 5 UTXO

1 btc
0,5 btc
5btc
3,2btc
4 btc

I want to send only 3,2 btc which is exact amount of one of mine utxo.
Do I have to, combine my all UTXO spend those 3,2 and rest tranfer to my wallet back, or Could I use only this one utxo ?

PS: to simplify lets not speak about transaction fee

I mentioned the fee’s a bit, because it’s really important.

You will need to use the utxo of 4 btc because you need a bit of fee as well. But actually, in a wallet with coincontrol, you can basically choose whatever combination or all utxo’s if you want. As long you have enough to cover the amount. The less utxo’s you need to use, the lower blockspace your transaction will need and thus lower fee in terms of sats/ byte

2 Likes