0

When a miner can find a number to create a hash with enough zeros, the other miners can verify his work by testing that number and seeing if everything is correct. But how do they verify that the transactions in the block are not false? How do they see that the amounts are properly authorized? An attacker could create a transaction in which Alice sends him 5 BTC, without Alice knowing about it. Is it possible?

2

The block validation process involves checking that all the individual transactions in it are all valid according to the consensus rules which are set in the Bitcoin Core C++ implementation.

Block validation is done by Bitcoin full nodes and one would assume by all miners. If a block is not valid then it will be rejected and any miner who attempted to insert an invalid transaction would have wasted all the time and effort to generate the block hash.

2

But how do they verify that the transactions in the block are not false? How do they see that the amounts are properly authorized? An attacker could create a transaction in which Alice sends him 5 BTC, without Alice knowing about it. Is it possible?

Most coins spent to addresses require a signature to spend them. That signature can only be generated if you know the private key(s) corresponding to the address which they were sent to. Without the private key, the transaction spending those coins is invalid, and anyone can see that it is invalid. Thus if a transaction with an invalid signature was included in a block, that entire block would be invalid too, and rejected by the network.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.