Author

Topic: Why would a transaction need multiple inputs from the same address? (Read 1150 times)

hero member
Activity: 672
Merit: 500
Consider it is like gold bullion. As you put 5 pieces of gold into one bag, they won't magically merged into 1 piece. You may spend them in 5 occasions, or you may melt them to create a bigger piece of gold. But if you want to melt them, you need to tell people which 5 pieces you want to melt. That's why you will see 5 inputs from the same address (5 pieces of gold from the same bag)

But once you send those 5 bullions together in 1 transaction, they do fuse together afterwards.
legendary
Activity: 1792
Merit: 1111
Because bitcoin doesn't work as you think

You have 5 inputs from the same address because you have received fund with the same address for at least 5 times. The concept of "balance" does not exist in bitcoin.

Ok.   What is the reason for "fracturing" the balance on an address?  In my false understanding of the bitcoin address paradigm, I had assumed the sender proves that an amount is transferred to an address, and the balance of that address is determined by the public ledger of the blockchain as a sum of the valid inputs to and outputs from transactions -- thus the owner of the address can generate a valid transaction with a single input that can contain up to the balance of the sending address.

BTW, thanks all for explaining this.

You shouldn't use the term "balance" at all. As I said there is no "balance" in bitcoin protocol.

Consider it is like gold bullion. As you put 5 pieces of gold into one bag, they won't magically merged into 1 piece. You may spend them in 5 occasions, or you may melt them to create a bigger piece of gold. But if you want to melt them, you need to tell people which 5 pieces you want to melt. That's why you will see 5 inputs from the same address (5 pieces of gold from the same bag)
member
Activity: 112
Merit: 10
Because bitcoin doesn't work as you think

You have 5 inputs from the same address because you have received fund with the same address for at least 5 times. The concept of "balance" does not exist in bitcoin.

Ok.   What is the reason for "fracturing" the balance on an address?  In my false understanding of the bitcoin address paradigm, I had assumed the sender proves that an amount is transferred to an address, and the balance of that address is determined by the public ledger of the blockchain as a sum of the valid inputs to and outputs from transactions -- thus the owner of the address can generate a valid transaction with a single input that can contain up to the balance of the sending address.

BTW, thanks all for explaining this.
legendary
Activity: 1792
Merit: 1111
I have an imported address in my blockchain hotwallet.   It came from a paper wallet that was loaded with one transaction.

As it lived in my hot wallet, it was used for several send transactions that were less than the amount on the address.   The transactions that the blockchain wallet formed used the entire amount on the address as the single input, and sent the desired amount to the receiver as the first output, then on the second output, sent the change back to the input address.

There were several small transactions receiving funds.

On the final transaction, draining this address, blockchain generated a transaction that had inputs from 4 different address in my wallet, however, in made 5 different inputs to the transaction using amounts from earlier receive and change output from previous transactions.

The final transaction triggered a double miners fee because of the size.

Was there any technical reason why a transaction needs 5 different inputs from the same address?


Because bitcoin doesn't work as you think

You have 5 inputs from the same address because you have received fund with the same address for at least 5 times. The concept of "balance" does not exist in bitcoin.

(This is actually an FAQ which I think we should prepare some canned response)
hero member
Activity: 812
Merit: 1022
No Maps for These Territories
Was there any technical reason why a transaction needs 5 different inputs from the same address?
From the viewpoint of the bitcoin protocol there is nothing special about inputs 'from the same address'.

If people send to the same address multiple times, there will be multiple outputs to that address.

If you then want to send money, and the input selection in your wallet needs to use these, it creates multiple inputs.
hero member
Activity: 836
Merit: 1030
bits of proof
Bitcoin transactions refer to previous transaction outputs, not to addresses on the protocol level.

Actually unspent transaction outputs are the coins. If an address receives several coins and you spend more than an individual input then a selection of previous inputs will be taken and this aggregation is what you see.

A block has a limited size, therefore it is transaction size (not amount!) what determines the fee. The size grows by above aggregation.

member
Activity: 112
Merit: 10
I have an imported address in my blockchain hotwallet.   It came from a paper wallet that was loaded with one transaction.

As it lived in my hot wallet, it was used for several send transactions that were less than the amount on the address.   The transactions that the blockchain wallet formed used the entire amount on the address as the single input, and sent the desired amount to the receiver as the first output, then on the second output, sent the change back to the input address.

There were several small transactions receiving funds.

On the final transaction, draining this address, blockchain generated a transaction that had inputs from 4 different address in my wallet, however, in made 5 different inputs to the transaction using amounts from earlier receive and change output from previous transactions.

The final transaction triggered a double miners fee because of the size.

Was there any technical reason why a transaction needs 5 different inputs from the same address?
Jump to: