1

How are multiple inflight transactions from the same address handled? From my understanding, there are two options depending on how change is handled, but both seem to have substantial drawbacks:

  1. If change for each transaction generates a new address for the change - the usual handling - then you can't handle two transactions since they will both want to use the same unspent output address. And they will both use it entirely by definition. The ergonomics of this seems poor - I can only ever do one transaction from an address at a time. In that case I would want bitcoins sent to me to always be shredded (no bills larger than $20 please).

  2. If I have change sent sent back to the original address, does it matter in what order they are added to the chain? I can't see why. This however allows everybody to track my wallet and where I'm transacting. Also I don't know if all wallets support this.

Is my understanding correct? (This all started with me diving down the rabbit hole on how Lightening and Plasma worked.)

3 Answers 3

1

Addresses are a construct of wallets. The bitcoin system itself doesn't know or care about them. Coins being spent are identified by their creating txid and output-index.

The network verifies that the provided signature is accepted by the required scriptPubKey, but the scriptPubKey (nor the addresses that wallets map to scriptPubKeys) is never used to lookup or in any way reference the coins being spent.

The model you seem to be imagining is more like some other altcoins and can indeed have poor ergonomics.

Normally change goes to a new address and those coins can be immediately spent without waiting for the first transaction to confirm. It sounds like from your question that you might have thought the change could not be spent before the transaction creating it was confirmed, but this is not the case.

I am not aware of any reason why reusing an old address for change would benefit a user, but the system will let you do it without it causing any problems.

In Bitcoin for privacy and security reasons users are advised to avoid reusing addresses, but this doesn't have any interaction with the kinetics of spending coins.

0

How are multiple inflight transactions from the same address handled?

Multiple unspent outputs from the same address can exist at the same time, from which you can send multiple transactions. Also, you can broadcast a transaction which spends output 1 to a new output 2, and then immediately broadcast another transaction which spends output 2 from the previous transaction.

change for each transaction generates a new address for the change

Change doesn't generate addresses, the wallet software does. And it does not have to generate a new address for change, you can send change back to the original address. Of course, this does help protect privacy, and depends on how your wallet software handles change and address generation.

If I have change sent sent back to the original address, does it matter in what order they are added to the chain? I can't see why.

You just have to make sure you don't try to spend a previously spent output.

This however allows everybody to track my wallet and where I'm transacting. Also I don't know if all wallets support this.

Not necessarily, because it is not apparent which output was the change output, if you use a different address. See https://bitcoin.stackexchange.com/a/77520/60443

1
  • I'm think I made some terminology mistakes (accidentally saying address when I meant transaction output id, I think, or whatever it is called). This is leading to confusing answers. I'm going to probably delete this question tomorrow and resubmit it with the terminology fixed and a more detailed description of the issues.
    – JasonN
    Aug 29, 2018 at 7:10
0

”...they will both want to use the same unspent output address”.

Unspent outputs are not listed by address. Multiple UTXOs can exist for the same address, and each can be spent individually. Each entire UTXO must be spent, not the entire ‘address balance’. The concept of ‘address balance’ doesn’t exist at the technical level of the bitcoin blockchain. It is all individual UTXOs.

A UTXO can only be spent once, and any attempt to spend an already-consumed UTXO will be invalid.

As JBaczuk mentioned, you can also have a chain of transactions within a block, where each transaction spends the output of another transaction that is listed earlier within the same block (ordering is important!).

So it is fine to have multiple transactions incoming/outgoing at the same time. As long as they’re valid, they should confirm.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.