Bitcoin Forum
May 01, 2024, 07:33:11 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Question about addresses  (Read 545 times)
tingwahk (OP)
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile
May 27, 2013, 04:48:36 PM
 #1

Since every transaction you conduct can have its own address:

If i receive 1.0 BTC  to address 1HSDRZYfcenZBNCZjk4y5wyxzPc79a6y33 and receive another 1.0 BTC to 12Ui8b9q6eqhTxZkow8H7VHbZafEnsPDs3 and then send 2.0 BTC
from address 2MJCaKXznp76qc69BwYDG4C28i8bNQng1N,  Can someone explain how the network is confirming there's sufficient funds for the transaction?

I'm sorry if this is a dumb question but I can't find any documentation that explains it.
1714591991
Hero Member
*
Offline Offline

Posts: 1714591991

View Profile Personal Message (Offline)

Ignore
1714591991
Reply with quote  #2

1714591991
Report to moderator
1714591991
Hero Member
*
Offline Offline

Posts: 1714591991

View Profile Personal Message (Offline)

Ignore
1714591991
Reply with quote  #2

1714591991
Report to moderator
"This isn't the kind of software where we can leave so many unresolved bugs that we need a tracker for them." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714591991
Hero Member
*
Offline Offline

Posts: 1714591991

View Profile Personal Message (Offline)

Ignore
1714591991
Reply with quote  #2

1714591991
Report to moderator
1714591991
Hero Member
*
Offline Offline

Posts: 1714591991

View Profile Personal Message (Offline)

Ignore
1714591991
Reply with quote  #2

1714591991
Report to moderator
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4612



View Profile
May 27, 2013, 05:03:52 PM
 #2

Since every transaction you conduct can have its own address:

If i receive 1.0 BTC  to address 1HSDRZYfcenZBNCZjk4y5wyxzPc79a6y33 and receive another 1.0 BTC to 12Ui8b9q6eqhTxZkow8H7VHbZafEnsPDs3 and then send 2.0 BTC
from address 2MJCaKXznp76qc69BwYDG4C28i8bNQng1N,  Can someone explain how the network is confirming there's sufficient funds for the transaction?

I'm sorry if this is a dumb question but I can't find any documentation that explains it.

Your wallet keeps track of each of those previous unspent transactions that you received.

You can't send 2.0 BTC from address 2MJCaKXznp76qc69BwYDG4C28i8bNQng1N if you haven't received 2.0 BTC at that address.  (technically, bitcoin doesn't send bitcoins from addresses anyhow, it spends previously received unspent transaction outputs)

As an example, lets say you have a new wallet that has 3 addresses: 1HSDRZYfcenZBNCZjk4y5wyxzPc79a6y33, 12Ui8b9q6eqhTxZkow8H7VHbZafEnsPDs3, and 12MJCaKXznp76qc69BwYDG4C28i8bNQng1N
None of these addresses have received any transactions yet.

Now lets say you receive 1.0 BTC at 1HSDRZYfcenZBNCZjk4y5wyxzPc79a6y33, and 1.0 BTC at 12Ui8b9q6eqhTxZkow8H7VHbZafEnsPDs3.

Your wallet now displays a balance of 2.0 BTC.

You tell your wallet to create a transaction with no transaction fee sending 2.0 BTC to someone else's address 1G4dnzDctcLHwGfympFqUL3f7XmMYRKGBd
(Note, with most wallets you don't tell your wallet where to send "from" only where to send "to".)

Your wallet searches through all the unspent outputs that it is tracking and finds the 2 previously received transactions.

It creates a transaction that has 2 inputs.  One input is the transaction output that assigned 1.0 BTC to 1HSDRZYfcenZBNCZjk4y5wyxzPc79a6y33, the other input is the transaction output that assigned 1.0 BTC to 12Ui8b9q6eqhTxZkow8H7VHbZafEnsPDs3.

Then the wallet creates one output in the transaction assigning 2.0 BTC to the recipient's address 1G4dnzDctcLHwGfympFqUL3f7XmMYRKGBd.
(Note that nowhere in this transaction is your unfunded address 12MJCaKXznp76qc69BwYDG4C28i8bNQng1N)

If you specifically want the transaction to appear to have come from your third address: 12MJCaKXznp76qc69BwYDG4C28i8bNQng1N, you would first have to send the bitcoins to that address.
tingwahk (OP)
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile
May 27, 2013, 05:27:20 PM
 #3


It creates a transaction that has 2 inputs.  One input is the transaction output that assigned 1.0 BTC to 1HSDRZYfcenZBNCZjk4y5wyxzPc79a6y33, the other input is the transaction output that assigned 1.0 BTC to 12Ui8b9q6eqhTxZkow8H7VHbZafEnsPDs3.


Thank you!  I think this is the step I was missing. I didn't realize it was publicly announcing how it was funding the transaction.  I wanted to make sure we weren't relying on the client application to be telling the truth
 
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4612



View Profile
May 27, 2013, 05:40:41 PM
 #4

It creates a transaction that has 2 inputs.  One input is the transaction output that assigned 1.0 BTC to 1HSDRZYfcenZBNCZjk4y5wyxzPc79a6y33, the other input is the transaction output that assigned 1.0 BTC to 12Ui8b9q6eqhTxZkow8H7VHbZafEnsPDs3.
Thank you!  I think this is the step I was missing. I didn't realize it was publicly announcing how it was funding the transaction.  I wanted to make sure we weren't relying on the client application to be telling the truth

Bitcoin does not rely on anybody to be telling the truth (Not the miners, or the wallets, or the full nodes that relay transactions).  Bitcoin is designed to assume that everyone/everything might be lying and to therefore verify/validate everything.  The only things bitcoin "trusts" are that ECDSA signatures can't be created without control of the appropriate private key, and that SHA-256 hash functions can not be easily reversed.
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!