When user send transaction, all evms execute automatically smart contract and which miner include this transaction inside block to mine ?

1 Answer 1


When a miner sees a new transaction he can choose whether to include it in his next block or not. If the tx has high gas price he will probably choose to include it.

After that it's a race against other miners to complete the Proof-of-Work "puzzle": to find the right nonce to get a right hash value for the block.

All miners who manage to find the right nonce and complete the PoW puzzle broadcast their block to the network. After that the network will eventually reach consensus about which of those blocks become uncle blocks and which one becomes part of the canonical chain. All txs in uncle blocks are then readded to be added in new blocks.

The consensus mechanism is a separate topic but basically the heaviest chain (this is very similar concept to the longest chain) always wins and becomes the canonical chain.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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