Bitcoin Forum
November 07, 2024, 02:02:40 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 [3]  All
  Print  
Author Topic: I am lost in bitcoin wallet and private key  (Read 3819 times)
CrapMan (OP)
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
April 05, 2014, 08:28:25 PM
 #41

Ok I got that part, both of them will get the payment,
BUT both of them are able to spend it too. REASON: I send the bitcoin to an address, has nothing to do with private key.
John Address is : AAAAA
Sarah Address is: AAAAA

so both open their wallets, they see 10 bitcoins I sent

Even if they have different private keys, since I sent it to an address and not a private key, then the transaction will show on both and both are able to spend it, just a matter of who spend it faster!


This part is correct.

Now John will spend 3 bitcoins.
Then it will show both of them have 7 Bitcoins left.
Then Sarah will spend 5 bitcoins.
Then it will show both of them have 2 bitcoin left.


Just a side note, when bitcoin are spent, you can't use a transaction output partially.
So, if John want to send CrapMan 3 BTC with a piece of "10 BTC" on his address, he need to create a transaction with that 10 btc as input, a output of "3 btc" to address 1 (controlled by CrapMan) and a output of "7 btc" to address 2 (controlled by John).

For most wallets software, by default, the wallet will generate a new change address every time to improve anonymity.
So, after John spend 3 btc, the common addresses held by John and Sarah will have nothing on it.

FYR: https://en.bitcoin.it/wiki/Change

Ok you got me lost, you are way way smarter than me!

I sent John 10 BTC, John received them,
an output from my wallet was created, an input for John's wallet created.
John has now 10 BTC,
now John spent 3 BTC at amazon, an output of 3 BTC for John, an input of 3 BTC for Amazon

BUT I think you are saying my example of (John and Amazon) is wrong when you say partial output,
if I am not mistaken: you are saying that the whole BTCs in the wallet create an output even if you spend only part of them? like when John spent 3 BTC on Amazon from that 10 BTC, it means: an output of 3 BTC created to amazong and another output for 7 BTC created to John (output of his own money to his own wallet)?
Rampton
Hero Member
*****
Offline Offline

Activity: 525
Merit: 500


View Profile
April 05, 2014, 08:31:37 PM
 #42

Why is this particular instance such an issue? The chances of this happening are astronomical.

CrapMan (OP)
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
April 05, 2014, 08:38:39 PM
 #43

Why is this particular instance such an issue? The chances of this happening are astronomical.

It is not an issue, but I like to understand how things work.
Simply put: Would you go buy a car if you don't know how to drive?
hilariousandco
Global Moderator
Legendary
*
Offline Offline

Activity: 3990
Merit: 2713


Join the world-leading crypto sportsbook NOW!


View Profile
April 05, 2014, 09:03:18 PM
 #44

Why is this particular instance such an issue? The chances of this happening are astronomical.

It is not an issue, but I like to understand how things work.
Simply put: Would you go buy a car if you don't know how to drive?

I think a more apt analogy would be going to buy a car and asking the dealer how a combustion engine works and what are the odds of it blowing up and killing you. Cheesy

  ▄▄███████▄███████▄▄▄
 █████████████
▀▀▀▀▀▀████▄▄
███████████████
       ▀▀███▄
███████████████
          ▀███
 █████████████
             ███
███████████▀▀               ███
███                         ███
███                         ███
 ███                       ███
  ███▄                   ▄███
   ▀███▄▄             ▄▄███▀
     ▀▀████▄▄▄▄▄▄▄▄▄████▀▀
         ▀▀▀███████▀▀▀
░░░████▄▄▄▄
░▄▄░
▄▄███████▄▀█████▄▄
██▄████▌▐█▌█████▄██
████▀▄▄▄▌███░▄▄▄▀████
██████▄▄▄█▄▄▄██████
█░███████░▐█▌░███████░█
▀▀██▀░██░▐█▌░██░▀██▀▀
▄▄▄░█▀░█░██░▐█▌░██░█░▀█░▄▄▄
██▀░░░░▀██░▐█▌░██▀░░░░▀██
▀██
█████▄███▀▀██▀▀███▄███████▀
▀███████████████████████▀
▀▀▀▀███████████▀▀▀▀
█████████████LEADING CRYPTO SPORTSBOOK & CASINO█████████████
MULTI
CURRENCY
1500+
CASINO GAMES
CRYPTO EXCLUSIVE
CLUBHOUSE
FAST & SECURE
PAYMENTS
.
..PLAY NOW!..
sgk
Legendary
*
Offline Offline

Activity: 1470
Merit: 1002


!! HODL !!


View Profile
April 09, 2014, 08:14:30 AM
 #45

Ok you got me lost, you are way way smarter than me!

I sent John 10 BTC, John received them,
an output from my wallet was created, an input for John's wallet created.
John has now 10 BTC,
now John spent 3 BTC at amazon, an output of 3 BTC for John, an input of 3 BTC for Amazon

BUT I think you are saying my example of (John and Amazon) is wrong when you say partial output,
if I am not mistaken: you are saying that the whole BTCs in the wallet create an output even if you spend only part of them? like when John spent 3 BTC on Amazon from that 10 BTC, it means: an output of 3 BTC created to amazong and another output for 7 BTC created to John (output of his own money to his own wallet)?


Not the whole wallet balance has to go out, only the BTC you received in a single transaction.


Think of it this way:

Someone gives you a $50 bill and a $20 bill. Now your pocket has $70. (That makes 2 incoming transactions for you)

You now need to give $40 to James Bond. What you will do is take out the $50 bill (from a single incoming transaction) and will split it into 2 bills: a $40 bill and a $10 bill. The $40 bill will be spent in the outgoing transaction and the $10 bill becomes the incoming transaction for you, which goes back into your pocket. You now have $30, which comprises of one $20 bill and one $10 bill.

The $10 bill becomes the incoming transaction for James Bond.

If James Bond needs to spend an amount smaller than $10, he will also go into the same process as you did.

Now think of the whole process again by replacing 'pocket' with 'wallet' and 'dollar bill' with 'Bitcoin'
hilariousandco
Global Moderator
Legendary
*
Offline Offline

Activity: 3990
Merit: 2713


Join the world-leading crypto sportsbook NOW!


View Profile
April 09, 2014, 09:20:32 AM
 #46

You guys are just making what is quite simple complicated and confusing with these explanations  Cheesy.

  ▄▄███████▄███████▄▄▄
 █████████████
▀▀▀▀▀▀████▄▄
███████████████
       ▀▀███▄
███████████████
          ▀███
 █████████████
             ███
███████████▀▀               ███
███                         ███
███                         ███
 ███                       ███
  ███▄                   ▄███
   ▀███▄▄             ▄▄███▀
     ▀▀████▄▄▄▄▄▄▄▄▄████▀▀
         ▀▀▀███████▀▀▀
░░░████▄▄▄▄
░▄▄░
▄▄███████▄▀█████▄▄
██▄████▌▐█▌█████▄██
████▀▄▄▄▌███░▄▄▄▀████
██████▄▄▄█▄▄▄██████
█░███████░▐█▌░███████░█
▀▀██▀░██░▐█▌░██░▀██▀▀
▄▄▄░█▀░█░██░▐█▌░██░█░▀█░▄▄▄
██▀░░░░▀██░▐█▌░██▀░░░░▀██
▀██
█████▄███▀▀██▀▀███▄███████▀
▀███████████████████████▀
▀▀▀▀███████████▀▀▀▀
█████████████LEADING CRYPTO SPORTSBOOK & CASINO█████████████
MULTI
CURRENCY
1500+
CASINO GAMES
CRYPTO EXCLUSIVE
CLUBHOUSE
FAST & SECURE
PAYMENTS
.
..PLAY NOW!..
baokychen
Full Member
***
Offline Offline

Activity: 280
Merit: 100


View Profile
April 09, 2014, 09:32:07 AM
 #47

All you need is to backup the .wallet or .dat file inside your %AppData%\CoinFolder

or ~/.coinfolder/ if linux

Loophole
Hero Member
*****
Offline Offline

Activity: 619
Merit: 500



View Profile
April 09, 2014, 02:31:25 PM
 #48

You guys are just making what is quite simple complicated and confusing with these explanations  Cheesy.

+1.
All those explanations are pretty much correct, but I don't think an ordinary user (esp. a new bitcoiner) need to understand that much.

Pages: « 1 2 [3]  All
  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!