suppose for example if nonce is 32 bit then the total possibility of hashing attempts is 2^32 ( 4,294,967,296 ) times only, but why it is mentioned in every article as PH/s or EH/s (1,000,000,000,000,000,000) or even more. so the question is, is network hash rate different from total possible hash (2^32) expected to do by miner ?
[Ethereum] difference between “network hash rate” and “individual hash rate”
blockchainhashhashrate
Related Solutions
I have read that PoW is about finding a nonce such that: hashOf(Block Data + Previous Block Data + Nonce) == A Hash With Desired Leading Zeros
I suppose you mean hashOf(Block Data + Previous Block Hash + Nonce)
.
And that once a miner has found this nonce, it can broadcast the nonce to the network where each miner can validate that it is the correct nonce by using the same function above.
No. Once a miner has found a nonce leading to a valid hash according to the current difficulty criteria, it should broadcast the block. Ethereum has a slightly more complicated and more memory oriented proof of work than what is usually used as an example, you can read more about it here but we can stick to the basic example.
But from my statement above I feel like if a Miner doesn't have a standard mechanism for ordering and including transactions that complies with at least 51% of the other miners then they will never be able to mine a block.
Correct me if I'm wrong but it seems that you think of the consensus in PoW as miners generally agreeing on what transactions should be contained in a block. To do so they would indeed need to have a shared rule about which transactions to include, and in what order. However, they would also need to all have the same knowledge of pending transactions. That assumption cannot hold due to network delays / message drops / etc...
So it's not about having the right transactions, or any transaction for that matter, a block without transactions is perfectly valid (not including the coinbase tx) as you can see for Bitcoin or Ethereum.
What the consensus is really about is twofold :
- What is the mainchain (longest chain rule for Bitcoin, GHOST for Ethereum)
- Valid block content (hash and transactions)
What we call Proof of Work, is in fact known as Nakamoto Consensus (PoW + chain selection rule).
So when a miner aim to create a new block, it selects some transactions (or none) while maximizing the fees for their personal gain. Those transactions may only be known by this miner and the participants that created them, after all, each transaction includes a signature and the actions that it does can be checked against the current state. The miner then works out the proof of work by varying the block nonce and, if successful, broadcast it to the network.
Other participants will eventually receive that block and basically checks for the following :
- Hash is valid and matches difficulty criteria.
- All tx are valid (no one spends more than it owns / tx nonce are in increasing order if one account has several tx included in the block)
It doesn't matter that participants learn the existence of some previously unknown transactions when the block is received, transactions are signed and their validity can be checked. Plus, a transaction doesn't really "exist" before being included in a block, in the sense that it has no effect whatsoever prior to that inclusion.
If that new block extends the main chain, the state transition is applied and miners will use that block as parent block for their next block creation attempt. And you have a new consensual view of the current state of the blockchain that never required a network wide view of the pending transactions.
I hope that answers your question.
Best Answer
I'm not sure if there is any standard for the nonce range. After a bit of digging Geth uses 64 bits: Will miners meet the situation that they can not find the nonce? and 2^64 is already a lot bigger number.
I'm not sure if you know how the mining actually works, but in any case let me clarify. The aim is to find a hash value which has small enough numerical value. This target numerical value changes between blocks and is called difficulty. So the miners try to find a nonce with which the block's hash has a numerical value below the target difficulty. If blocks start to take too long to mine the target difficulty goes up and it's again easier to to find the right nonce and blocks get faster - and vice versa.
So the hash rate always means how many hashes are tried per second - essentially how many different nonces are tried. Individual hash rate is simply the hash rate a single entity (computer?) produces and network hash rate is the combined hash rate of all miners.
There is no maximum for the network hash rate as in theory everyone can just try the same nonce all the time with lots of computing power - the same applies for individual maximum hash rate. The maximum amount of different nonces depends on the size of the nonce integer, and as mentioned above I'm not sure what is the standard for that. Also each miner chooses which transactions to include in his/her block so the input also changes per miner - therefore different miners using the same nonce get different output.