1

Until today, I thought the transactions are just gathered until big enough to construct a block. Once it is constructed, the ethereum miner will race to find a secret nonce, and the block will be available on the main network.

But today, while reading the book "Mastering Ethereum" by Andreas and Gavin, I come up with the following sentence. "In a few seconds, the new transaction will be mined by the Ropsten miners".

Now the question is, what is mined? Is it each transaction, or each block?

Once I send ether to account x, is this transaction will go to an unverified block or what? How this process exactly works? What about smart contracts? Do it needs to be verified as well before appearing on blockchain?

0

Now the question is, what is mined? Is it each transaction, or each block?

It is both. A block is mined when added to the chain once the consensus is reached. A transaction is said to be mined when it is included to the blockchain in a new block. Therefore a mined block has several mined transactions.

Once I send ether to account x, is this transaction will go to an unverified block or what? How this process exactly works?

Transactions are propagated to the network according to a P2P protocol and included to the blockchain following a consensus algorithm.

  1. Transaction propagation

The transaction first goes to the transaction pool of your node. This one will verify it doing some basic checks (correct signature, correct nonce, well RLP-encoding, etc). If the transaction is valid, the node broadcasts it to its peers which will repeat the process (verify and broadcast the transaction). Within a few seconds, the transaction is propagated to the whole network.

  1. Mining

Each miner builds its own block, picking valid transactions (favoring those with a higher gas price), and executing them. After having constituted their block, miners start the resolution of the PoW consensus algorithm (find the nonce). The first miner to find the solution broadcasts its candidate block to the network. The other nodes will check the validity of the solution and execute all the transactions included in the block. If the majority of miners agree, the new block is added to the blockchain, and a new sate is attained.

What about smart contracts? Do it needs to be verified as well before appearing on blockchain?

Yes, as smart contract creations are transactions. All state changes come from a transaction, and each transaction need to be mined.

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.