Bitcoin Forum
May 06, 2024, 07:07:29 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Why would a transaction need multiple inputs from the same address?  (Read 1138 times)
amspir (OP)
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
March 22, 2014, 06:22:43 AM
 #1

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?
1715022449
Hero Member
*
Offline Offline

Posts: 1715022449

View Profile Personal Message (Offline)

Ignore
1715022449
Reply with quote  #2

1715022449
Report to moderator
Make sure you back up your wallet regularly! Unlike a bank account, nobody can help you if you lose access to your BTC.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
grau
Hero Member
*****
Offline Offline

Activity: 836
Merit: 1021


bits of proof


View Profile WWW
March 22, 2014, 07:10:05 AM
 #2

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.

wumpus
Hero Member
*****
Offline Offline

Activity: 812
Merit: 1022

No Maps for These Territories


View Profile
March 22, 2014, 07:10:43 AM
 #3

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.

Bitcoin Core developer [PGP] Warning: For most, coin loss is a larger risk than coin theft. A disk can die any time. Regularly back up your wallet through FileBackup Wallet to an external storage or the (encrypted!) cloud. Use a separate offline wallet for storing larger amounts.
jl2012
Legendary
*
Offline Offline

Activity: 1792
Merit: 1093


View Profile
March 22, 2014, 07:16:19 AM
 #4

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)

Donation address: 374iXxS4BuqFHsEwwxUuH3nvJ69Y7Hqur3 (Bitcoin ONLY)
LRDGENPLYrcTRssGoZrsCT1hngaH3BVkM4 (LTC)
PGP: D3CC 1772 8600 5BB8 FF67 3294 C524 2A1A B393 6517
amspir (OP)
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
March 22, 2014, 08:09:59 PM
 #5

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.
jl2012
Legendary
*
Offline Offline

Activity: 1792
Merit: 1093


View Profile
March 22, 2014, 08:58:03 PM
 #6

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)

Donation address: 374iXxS4BuqFHsEwwxUuH3nvJ69Y7Hqur3 (Bitcoin ONLY)
LRDGENPLYrcTRssGoZrsCT1hngaH3BVkM4 (LTC)
PGP: D3CC 1772 8600 5BB8 FF67 3294 C524 2A1A B393 6517
PolarPoint
Hero Member
*****
Offline Offline

Activity: 672
Merit: 500


View Profile
March 22, 2014, 09:42:57 PM
 #7

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.
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!