Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Clarify that it is not *possible* to "partially spend" a UTXO. #766

Closed
nathan-at-least opened this Issue Feb 23, 2015 · 3 comments

Comments

Projects
None yet
2 participants

Location: https://bitcoin.org/en/developer-guide#block-chain-overview

The initial part of this sentence sounds slightly confusing to me:

Satoshis cannot be left in a UTXO after a transaction or they will be irretrievably lost,

Saying they "will be lost" makes it sound as if this is somehow possible. My understanding is that the protocol and consensus rules preclude this from even being expressible (since there's no way to modify nAmount in a TxOut, and there's no other field to represent partial spends). In that case, I feel this single word change would emphasize this:

Satoshis cannot be left in a UTXO after a transaction or they would be irretrievably lost,

A more explicit description may be best:

Satoshis cannot be left in a UTXO after a transaction according to consensus rules,

Contributor

harding commented Feb 23, 2015

Thanks for reporting this confusion! I know this confused at least one other person, because we edited before, so I'm all for fixing it.

However, I think it's probably better to scrap the whole clause and start over. Here's the current sentence:

Satoshis cannot be left in a UTXO after a transaction or they will be irretrievably lost, so any difference between the number of satoshis in a transaction’s inputs and outputs is given as a transaction fee to the Bitcoin miner who creates the block containing that transaction.

Lets say instead (new/changed stuff in bold):

Ignoring coinbase transactions (described later), if the value of a transaction's outputs exceed its inputs, the transaction will be rejected---but if the inputs exceed the value of the outputs, any difference in value may be claimed as a transaction fee by the Bitcoin miner who creates the block containing that transaction.

What do you think?

@harding harding added the Dev Docs label Feb 24, 2015

I find the replacement proposal very clear and simple and implicitly covers the impossibility of "partial UTXO values" without drawing any confusing attention to that concept. So personally, I'm all for it.

Contributor

harding commented Feb 24, 2015

@nathan-at-least thanks! I'll push it to the docs in about half an hour. Thanks again for reporting this!

@harding harding closed this in fc10efd Feb 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment