I am trying to understand about what bitcoin is. I conceptualize bitcoin as a proof of work required when a new block (or new coin) is created. I also understand that a proof of work involves finding a value (nonce) that would meet a zero bits requirement when hashed. (please correct me if my understanding is wrong). Am I right saying that bitcoin mining is to find such a value that would satisfy the zero bit requirements when itself only is hashed, or one that results in the required zero bits when the value itself and the transactions chosen, the previous hash, and other relevant items are hashed all together? If the latter is right, would finding a coin to create a block be only possible once there is a real transaction occurred? If this is true, what is it people mining bitcoins are doing? Are they actually creating and circulating a block in a peer-to-peer network with real transactions? If not, am I correct to think that they can be random people who use available computing power to find nonce values that meet the zero bit requirements and sell them to real owners of the nodes in a peer-to-peer network who use them to create blocks from their nodes. I am sorry for the dumb questions, but please help me to understand these fundamentals right. Thank you very much!
-
Here's a resource about Nano which is a cryptocurrency that requires PoW for every transaction : reddit.com/r/nanocurrency/comments/gxwbxu/…– MCCCSApr 11, 2021 at 18:25
-
@MCCCS The first statement of the question is: I am trying to understand about what bitcoin is– user103136Apr 11, 2021 at 23:10
-
@MCCCS thank you for the link and your help!– Michael M.Apr 12, 2021 at 0:04
1 Answer
I also understand that a proof of work involves finding a value (nonce) that would meet a zero bits requirement when hashed.
The nonce is a value that a miner can change. It is one part of a block. The other parts are block headers and transaction details. The hash is of most of this, not just the nonce. The hash must be less than the current target "difficulty".
Am I right saying that bitcoin mining is to find such a value that would satisfy the zero bit requirements when itself only is hashed, or one that results in the required zero bits when the value itself and the transactions chosen, the previous hash, and other relevant items are hashed all together?
The latter.
As I mentioned, the comparison is not the number of leading zero bits but a normal numeric comparison. The hash must be numerically less than the target.
If the latter is right, would finding a coin to create a block be only possible once there is a real transaction occurred?
A block can contain no real transactions other than the so-called "coinbase" transaction which pays the miner a mining reward.
Including other people's transactions allows the miner to collect and claim the transaction fees. SO there is a financial incentive for the miner to include transactions.
If this is true, what is it people mining bitcoins are doing? Are they actually creating and circulating a block in a peer-to-peer network with real transactions?
Yes.
If not, am I correct to think that they can be random people who use available computing power to find nonce values that meet the zero bit requirements and sell them to real owners of the nodes in a peer-to-peer network who use them to create blocks from their nodes.
No.
-
Awesome. Thank you very much for your comments. This helps me a lot! Got more questions. Hope you don't mind. If a new transaction is broadcasted, which miner gets to record in a block? Whoever records it in a block and issues it first gets rewarded? Like a competition? Does a miner get to decide how many transactions to be recorded in a block? If you know, can you please share some current applications or cases with me where bitcoin networks and blockchain technologies are actually used in transaction processing? Sorry again for asking so many dumb questions at once. Thanks! Apr 12, 2021 at 0:36
-
2All miners (who want to) can add the transaction to the "block candidate" they're working on. The first who manages to produce an actual block (which meets PoW) that includes the transaction gets it and the fee. Miners have complete authority over the decision what to include in their blocks, as long as the block is valid (no invalid transactions, no money printing, resource limits, ...). Blocks have a "weight" limit, which miners need to stay below. May 11, 2021 at 19:09