3

I have been reading a lot about the validation of transactions. I understand the actual method in which a transaction is composed (inputs and outputs). However, I don't know what happens with that transaction once its "ready":

  1. Do miners check it before including it in a block?
  2. Do other nodes check it and where there is a certain consensuous miners include it into a block? Who composes the blocks then? Are all miners trying to solve the same block at the same time or different blocks?

Thanks in advance

2

Other nodes check if the transaction is valid, and if it is, they relay the transaction to other nodes. Mining pools have also (at least one) nodes, they verify it too, and if it's valid and the fee is enough, they put it in the block they're working on.

Do miners check it before including it in a block?

Yep. If they include an invalid transaction, the other nodes will not accept that block, and that miner won't earn the block reward for that block. (currently 125k dollars!)

Do other nodes check it and where there is a certain consensuous miners include it into a block

Yes.

Who composes the blocks then?

Miners.

Are all miners trying to solve the same block at the same time or different blocks?

They are trying to find a block with the same height, but with different transactions, different nonces (a random number - related to block hash and difficulty) and different block reward addresses.

  • So the process is the following: 1. Alice does a transaction 2. Sends it to other nodes of the network that verify that transaction 3. When a miner sees there is a transaction being verified by a large number of nodes (is there a number or %?) checks it before introducing it into a new block 4. Once verified, create the block, solves the hash and sends it to all nodes. Now it is confirmed 5. Nodes include the block into the blockchain – Nacho Dec 1 '17 at 12:44
  • @Nacho 2 should be "sends to other nodes, because a few nodes are miners, and the miners are the ones who make the transactions 'confirmed'" 3 should be "the other nodes verified it, and because it wasn't invalid, they relayed to other nodes. The miner was one of the nodes." The others are correct – MCCCS Dec 1 '17 at 13:04
  • @Nacho Your step 3 is completely wrong. The miner knows the transaction is valid. Why would he care what other nodes think? 99% of the other nodes might be controlled by the same person. He has no reason to trust other nodes. He doesn't care what their opinion of the transaction is. He'll probably include it in a block if that makes him more money (because of how big a transaction fee it pays and how much space in the block it occupies) and won't if it doesn't. He's in this to make money, not to make nice with people. – David Schwartz Dec 1 '17 at 14:16
  • 1
    Miners know that transactions are valid by running a node that validates them. – Pieter Wuille Dec 3 '17 at 8:10
  • 1
    @Nacho Different people who run nodes have different reasons. Miners who run them do so because otherwise, they would have no way to know what block to mine and what transactions to put in it to maximize their return. People who transact with bitcoins run them so that they'll know when they received bitcoins and to relay their own transactions. – David Schwartz Dec 4 '17 at 9:19
1

Do miners check it before including it in a block?

Yes. If they include an invalid transaction in a block, that block will be invalid.

Do other nodes check it and where there is a certain consensuous miners include it into a block?

Miners include it in a block if they wish to and if it's valid. They don't have to care about what anyone else thinks. They can put whatever valid transactions in their blocks that they wish to. Typically, they'll pick transactions that maximize the fees they make.

Who composes the blocks then?

Every miner composes blocks and attempts to mine the blocks the compose.

Are all miners trying to solve the same block at the same time or different blocks?

That's a matter of definition. Each miner is trying to produce a valid next block for the longest chain of valid blocks that they know about. But each miner is trying to mine a block that includes a transaction that pays them the block reward. So in that sense, they're trying to mine different blocks.

  • What is the purpose of other noder (not miners) in the network if miners have to validate the transactions they recieve? – Nacho Dec 4 '17 at 8:44
  • They allow people who want to use the network to know what transactions are valid. They also relay valid transactions to other servers to ensure that miners can find them. They relay the blocks that miners find. – David Schwartz Dec 4 '17 at 9:18

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.