Post
Topic
Board Development & Technical Discussion
Re: If Bitcoin chooses longest chain, how is it reliable at all ?
by
Killrbit
on 17/05/2018, 12:28:29 UTC
For example, from what I understand,
If Alice and Bob share an Bitcoin Account that holds 500 Bitcoin.

Well the first bit of advice most people would tell you is not to share your private keys(even with a spouse/sibling/child/etc). The nature of blockchains means that you cannot hold btc jointly or share a btc account, and if two people do control one account it just means that both of them know the private keys to one public address. In this case any of them could move the money at anytime (its just a matter of who does it first). Furthermore even if you do trust the other person he could inadvertent disclose the key to someone else or have not kept it securely and there would be very little any one could do about it.

Alice could spend all 500 bitcoins on a car in North America when Bob spends it on a different car
in Asia. Both transactions would go to "pool" to be processed. Both of them would be processed in the next block.

No that is simply not possible, yes 2 people could open up the same address from two different places and broadcast two transactions on the block chain, but only one of them would ever be confirmed, dependent on who sent the transaction first/ the transaction fees offered or just pure luck on which transaction is piked up first by a miner. Both the transactions would of course show up on a blockchain explorer(each with their own transaction hash) as an unconfirmed transaction, while both the receiving addresses will also show the unconfirmed transaction as well as.( some wallets will often show the btc sent from these unconfirmed transaction as part of the receivers balance, however if he were to try to send btc from an unconfirmed transaction to a third wallet it would fail)

In essence once the first 500 btc transaction has been sent from the original address to the first reciever and been confirmed on the blockchain the second transaction hash for the second receiver would show that the btc which was to be sent from the original address has already been spent (check out what the difference is between a spent and unspent transaction for more clarity) and the transaction would fail

2) I get that maybe a few blocks later, the longest chain would be taken and one of the transactions
would be revoked. But how is this reliable at all? The two cars are probably in possession of Alice and Bob already.

Again this is why people wait for the transaction to have been confirmed by at least 6-10 blocks before actually give Alice or Bob the car, if the seller in this case has already given both of them the cars, there would be little he can do about it except file a complaint for fraud/theft or such and such.



The seller needs to wait at least 4 blocks after the transaction is complete?
Also, regarding the 1st question, what happens on the explorer when the longest chain is taken ?
Before longest chain is picked, which one is displayed?

I am very confused with this. I would really appreciate a reply. Thank you very much in advance.

There is also only ever one chain, the failed transaction will simply not be included in any block on the chain.