This question already has an answer here:

I am trying to understand the Blockchain algorithm used in Bitcoin.

I do not get the part how blocks are created.

Let’s say transactions occur at some time. Then, if some nodes get these transactions, these verify the transactions are valid and then send it to other nodes.

With this verify-send algorithm, almost every node verifies these newly occurred transactions in few seconds.

Now, it is a time for a miner to do his job, which I do not understand.

He needs to find a nonce which makes a lower value than hash values given in transactions.

Question 1 How many transactions should a miner should verify in a single block? For example, if a miner A finds a nonce which gives a lower value than hash values given in 50 transactions, and if a miner B finds a nonce which gives a lower value than hash values given in 70 transacations, would a reward be given only to the miner B? So should a miner appropriately choose how many transacations he will work for?

Question 2

How is a block created? In some webpages, it is written that if a miner finds an appropriate nonce, a block is created and a miner is rewarded. What exactly is a block? Is it correct that a block is exactly a text file of “transaction lists+ appropriate nonce value corresponding to those transactions”?

Question 3

When is a miner rewarded? Is he rewarded at the time he created a block or at the time after his block is chosen to be a part of the greatest cumulative difficulty chain?

marked as duplicate by Jestin, Andrew Chow Jan 13 at 20:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    Please ask one question at a time. This makes it easier to search for later by other people, and easier to individually answer and/or mark as duplicate with existing questions. – Pieter Wuille Jan 11 at 7:20
up vote 2 down vote accepted

As Pieter said, in future, please limit questions to one at a time :)

which makes a lower value than hash values given in transactions

I think you're a bit confused here. The block hash has to be less than the difficulty target, but that has nothing to do with transaction hashes. The difficulty is just determined by how quickly the previous blocks were being mined.

How many transactions should a miner should verify in a single block?

The miner can choose what transactions to put in the block, usually it is most profitable to fill the block up to its size limit with the highest fee transactions so the miner makes the most profit.

Is it correct that a block is exactly a text file of “transaction lists+ appropriate nonce value corresponding to those transactions”?

It's not a text file, it's just bytes sent around the network. But yes kind of, it's a list of all the transactions in the block plus a block header, which contains a little extra info about the block such as it's timestamp and a nonce.

Is he rewarded at the time he created a block or at the time after his block is chosen to be a part of the greatest cumulative difficulty chain?

The mining reward is just a transaction which pays the miner. So like any other transaction, it is valid as long as it is in the main chain, yes.

See also: What exactly is Mining?

  • Say A sends B a very small amount of bitcoin. Then this would be not profitable to miners and so miners won’t include this transaction in a block. So actually is very small amount of transaction impossible? – Rubertos Jan 11 at 22:44
  • It doesn't matter how much is sent, it only matters how much fee is paid. But actually no there is a limit on how small it can be called dust, you cannot send dust to protect the network from tiny transaction spam (although you will be able to send tiny amounts on lightning) – MeshCollider Jan 11 at 22:48

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