brybot (OP)
Newbie
Offline
Activity: 24
Merit: 0
|
|
April 24, 2011, 08:12:28 PM |
|
Hey all,
I am new here. I read through the FAQs and some of the technical details but I still don't have a complete understanding of the system. I was wondering what would happen if I spend my bitcoins, but meanwhile elsewhere in the network another block chain becomes longer and is accepted as the official block chain. The way I understand the bitcoins to work is that I keep my secret keys on my computer and as soon as I spend them, the key changes to a new secret key for the next person. Is that assumption correct? Anyway, what would happen if I spend my coins but then another chain turns out to be longer? Am I just out of luck?
Thanks
|
|
|
|
|
|
"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.
|
|
|
mewantsbitcoins
|
|
April 24, 2011, 08:17:01 PM |
|
When you spend your coins you sign it with your private key. Other nodes can verify it because they have your public key. No one else can spend it unless they have your private key. If two people spend the same coins(with the same key), the first transaction is considered valid
|
|
|
|
brybot (OP)
Newbie
Offline
Activity: 24
Merit: 0
|
|
April 24, 2011, 08:21:16 PM |
|
Either I do not know enough about cryptography to ask what I am trying to ask, or I just didn't convey my question well.
Do I retain my private key even if I have spent the bitcoin?
|
|
|
|
FatherMcGruder
|
|
April 24, 2011, 08:28:12 PM |
|
Do I retain my private key even if I have spent the bitcoin?
Yes.
|
Use my Trade Hill referral code: TH-R11519 Check out bitcoinity.org and Ripple. Shameless display of my bitcoin address: 1Hio4bqPUZnhr2SWi4WgsnVU1ph3EkusvH
|
|
|
mewantsbitcoins
|
|
April 24, 2011, 08:29:46 PM |
|
From FAQ: How does Bitcoin work?
Bitcoin utilizes public/private key digital signatures (ECDSA). A coin has its owner's public key on it. When a coin is transferred from user A to user B, A adds B’s public key to the coin and signs it with his own private key. Now B owns the coin and can transfer it further. To prevent A from transferring the already used coin to another user C, a public list of all the previous transactions is collectively maintained by the network of Bitcoin nodes, and before each transaction the coin’s unusedness will be checked. Private key is yours for ever and ever. If someone gets hold of it - sayonara to your bitcoins
|
|
|
|
dishwara
Legendary
Offline
Activity: 1855
Merit: 1016
|
|
April 24, 2011, 08:43:40 PM |
|
The private keys are stored in wallet.dat. If some one gets that file, then they have your private keys. The private key is nothing but the addresses in your wallet.dat. If you send some one the coins you have, when sending your address(private key) is also added to the coins.
But one thing nudges me, the private key it adds is not controlled by you, It seems it adds the address/addresses to the coins you send, which you used to receive money to your wallet.
|
|
|
|
vuce
|
|
April 24, 2011, 09:13:11 PM |
|
If you send some one the coins you have, when sending your address(private key) is also added to the coins.
private key(s) is not and should NEVER be sent to anyone. Address is a hashed public key.
|
|
|
|
dishwara
Legendary
Offline
Activity: 1855
Merit: 1016
|
|
April 24, 2011, 09:45:04 PM |
|
If you send some one the coins you have, when sending your address(private key) is also added to the coins.
private key(s) is not and should NEVER be sent to anyone. Address is a hashed public key. So private key & address are different? Where is private key stored & is there any way to see it?
|
|
|
|
vuce
|
|
April 24, 2011, 09:50:11 PM |
|
If you send some one the coins you have, when sending your address(private key) is also added to the coins.
private key(s) is not and should NEVER be sent to anyone. Address is a hashed public key. So private key & address are different? Where is private key stored & is there any way to see it? private keys are stored in the wallet only. Public keys are public (doh), everyone can see them. Address is shortened (hashed) public key, as public keys are really long.
|
|
|
|
Garrett Burgwardt
|
|
April 24, 2011, 11:24:02 PM |
|
Hey all,
I am new here. I read through the FAQs and some of the technical details but I still don't have a complete understanding of the system. I was wondering what would happen if I spend my bitcoins, but meanwhile elsewhere in the network another block chain becomes longer and is accepted as the official block chain. The way I understand the bitcoins to work is that I keep my secret keys on my computer and as soon as I spend them, the key changes to a new secret key for the next person. Is that assumption correct? Anyway, what would happen if I spend my coins but then another chain turns out to be longer? Am I just out of luck?
Thanks
I think I understand what you're asking - you broadcast a transaction to everyone, so it should be included in both chains eventually, so it doesn't matter what chain is the longest.
|
|
|
|
Jim Hyslop
Member
Offline
Activity: 98
Merit: 20
|
|
April 24, 2011, 11:42:58 PM |
|
I think I understand what you're asking - you broadcast a transaction to everyone, so it should be included in both chains eventually, so it doesn't matter what chain is the longest.
To refine this slightly: chances are your transaction will be included in both sides of the split. Transactions that are only on the shorter side of the split will automatically get transferred over to the longer side. Except for the first transactions in the block, which pay the miner, because they lost the bid.
|
Like my answer? Did I help? Tips gratefully accepted here: 1H6wM8Xj8GNrhqWBrnDugd8Vf3nAfZgMnq
|
|
|
|