Bitcoin Stack Change is a query and reply website for Bitcoin crypto-currency fanatics. It solely takes a minute to enroll.
Anyone can ask a query
Anyone can reply
The most effective solutions are voted up and rise to the highest
Requested
Seen
1k occasions
When a block is mined, for example there is just one single invalid transaction out of let’s imagine 2000 transactions in a block.
Will they do away with that one transaction and settle for that remaining block or for that one single invalid transaction will they reject the entire block?
1
It is not accepted. In a block, each transaction needs to be legitimate by itself, however the entire block needs to be legitimate as nicely. If something is flawed concerning the block, it is merely invalid—there isn’t any “partially proper”.
For instance a miner creates such a block and broadcasts it to their friends. Every full node peer makes an attempt to validate the block and realizes that the block doesn’t observe the principles. They drop the block, don’t ahead it to their friends, don’t add it to their blockchain, and don’t replace their UTXO set. Relying on how the miner relayed the block to them, they most likely even drop the connection and ban the miner for sending invalid information. No person else sees the invalid block until somebody posts about it on social media to ridicule the miner…
Will they do away with that one transaction and settle for that remaining block
That’s not how Bitcoin (and every other blockchain primarily based system) works. You can not ever alter a block. By no means. You possibly can settle for or decline a block, that is it when it comes to anybody’s choices.
However “altering/omitting/rejecting a single transaction”? That might result in a cascadingly growing change to that block’s Merkle Tree, leading to a unique ultimate hash and subsequently (nearly definitely) requiring a unique nonce. Which is called a totally totally different block that simply so occurs to additionally include plenty of the identical transactions. It will nonetheless be a unique block in all different regards, and most significantly: it must be mined fully individually (aka attempting out totally different nonces). And anybody attempting to mine that related however totally different block would most definitely put themselves (or their pool) because the reward-adress, so yet one more factor totally different about that block
Bear in mind, each full node constructs and submits their very own block after which compete to seek out the nonce to their very own block.
That’s to say, full node miners will not be competing over the identical block. This implies even when a block acquired rejected on account of an invalid tx, there will probably be one other peer who finds a nonce to their very own block which most likely consists of the identical legitimate txs and their block will get accepted on the chain. There is no such thing as a time wasted because of a foul actor sending an invalid tx.
It’s because every block incorporates a hash of the earlier block within the blockchain, so altering even a single transaction within the block would change the hash of the block, which might, in flip, make the hash of the subsequent block invalid. This could break the continuity of the blockchain and compromise the integrity of all the community.
Due to this fact, to make sure the safety and integrity of the Bitcoin community, any block with even a single invalid transaction will probably be rejected. The miner who created the block won’t obtain the block reward or any transaction charges related to the rejected block.