Author

Topic: The Easy Attack - What am I missing? (Read 1272 times)

legendary
Activity: 1100
Merit: 1030
August 04, 2015, 05:27:16 AM
#7
Thanks. Wasn't aware that every single node receiving a new block also checks the transactions in the new block.

Bitcoin protocol being trustless means that the bitcoin code trusts no-one, so it checks everything before accepting it.

Most of the bitcoin kernel code is made up of a of checks that protect relatively few additions and subtractions.

This is completely different from centralized apps, where your bank app trusts the bank servers, your store app trusts the store servers, etc. and so perform only very minimal checks (only at the network connection level).
hero member
Activity: 798
Merit: 1000
August 03, 2015, 06:22:54 AM
#6
The fact that every node would reject the attempt to just create bitcoin is what makes our little project so great. Traditional money systems allow slect individuals to do just that. Change the rules abit and create money out of thin air  Wink
legendary
Activity: 1792
Merit: 1097
August 01, 2015, 02:43:55 PM
#5

Another thought occured: what if Eve changes her input to 1000 (of account A) and then send that 1000 to B. But this (https://en.bitcoin.it/wiki/Protocol_rules#.22block.22_messages) reads it becomes an orphan transaction, because there is no corresponding 'out' for Eve's 'input'.

This tx is obviously invalid, as the reason you mentioned. Except the 25BTC reward for each block, any attempt to generate bitcoin out of thin air is invalid.

A block containing any invalid tx is simply invalid. Miners mining invalid blocks are just wasting time and energy.
legendary
Activity: 2646
Merit: 1137
All paid signature campaigns should be banned.
August 01, 2015, 11:02:08 AM
#4
Great first post.  I love your enthusiasm.  Reminds me of me when I first found out about Bitcoin.  You brightened my day.  Thanks.
newbie
Activity: 17
Merit: 6
August 01, 2015, 07:01:44 AM
#3
Thanks. Wasn't aware that every single node receiving a new block also checks the transactions in the new block. I assume each node also performs a "block message" (https://en.bitcoin.it/wiki/Protocol_rules#.22block.22_messages) check upon receiving new blocks.

Another thought occured: what if Eve changes her input to 1000 (of account A) and then send that 1000 to B. But this (https://en.bitcoin.it/wiki/Protocol_rules#.22block.22_messages) reads it becomes an orphan transaction, because there is no corresponding 'out' for Eve's 'input'.
-ck
legendary
Activity: 4088
Merit: 1631
Ruu \o/
August 01, 2015, 06:47:24 AM
#2
The block would be rejected by every single node it's sent to as every transaction included in the broadcast block is checked by every node it's sent to.
newbie
Activity: 17
Merit: 6
August 01, 2015, 06:40:15 AM
#1
Hi all,

While trying to understand how Bitcoin operates under the hood, I was wondering if it's not dead easy to cheat (in Bitcoin).

Suppose we have Alice and Bob, you may know them, and Alice wants to send 10 BTC to Bob. Suppose both have a Bitcoin client (https://en.bitcoin.it/wiki/Clients) running on their device. From what I understand, a client is build upon Bitcoin core. Bitcoin core contains all protocol rules (https://bitcoin.org/en/developer-guide), such as transaction and block rules (https://en.bitcoin.it/wiki/Protocol_rules).
Now, in short, if Alice wants to send Bob 10 BTC, her client verifies the transaction (tx message: https://en.bitcoin.it/wiki/Protocol_rules#.22tx.22_messages), the client broadcasts the transaction to peers/miners, who add the transaction into their block they're about to mine. The miner itself also performs a check (block message: https://en.bitcoin.it/wiki/Protocol_rules#.22block.22_messages). If Alice wants to cheat (e.g. tries a double spend), it's either detected by her own client, or by the miner.

Now, suppose the following. Eve wants to get rich. Fast. She decides upon the following. She downloads the source code of Bitcoin Core and makes some adjustments in its protocol, particulalrly, all checks on tx and block messages will pass the check, no matter how the transaction or block looks like. She then compiles the code and has her home-brewn Eve-Bitcoin-client.
Now, Eve creates two addresses (A and B), both contain 0 Bitcoins. Then, she creates a transaction, which sends 1000 BTC from address A to B. She does not broadcast this transaction to the network. Instead, she starts mining a block (based on the latest block in the blockchain) which include her own transaction. Suppose Eve is lucky or very patient and finds the right hash. Her client performs a block checks (which passes all criteria, remember Eve's client) and broadcasts the block to the network. Since the hash is correct, it seems that the network will add Eve's block to the chain. Eve just created 1000 BTC out of thin air.

It sounds too obvious though - what am I missing? Are there additional checks? What are the exact criteria upon which a block is added to the chain, and who decides this?

Fevir.
Jump to: