
To prove that a given output (such as a hash) is the result of a Proof of Work (PoW) from a particular input, nodes use a process that involves non-reversibility and verifiable computation without needing access to the original input. Here’s how it works:
The Process:
1. Hash Function and Input: In Proof of Work (PoW) systems like Bitcoin, a miner’s goal is to find an output (hash) that meets certain criteria, such as starting with a specific number of leading zeros. This is achieved by modifying an input (e.g., a block of transaction data) with a “nonce” — a random value that the miner can adjust.
2. Mining: The miner repeatedly hashes the input data with different nonces until they find one that produces a hash that satisfies the desired condition (e.g., the number of leading zeros in the hash).
3. Proof of Work: The output hash that satisfies the condition is the proof. This hash is presented along with the nonce that was used to generate it. The miner does not need to send the entire input data to prove the work; they only need to provide:
• The resulting hash (the proof).
• The nonce that was used.
• The input data (which is usually the block of transactions, the previous block hash, and a timestamp).
4. Verification: Other nodes can then:
• Take the provided input data.
• Combine it with the nonce.
• Hash the data again using SHA-256.
• Check if the resulting hash meets the criteria (e.g., has the required number of leading zeros).
If the hash is valid (i.e., it matches the criteria), the node has verified that the work was done correctly. The process is computationally expensive and cannot be faked because it’s impossible to predict the correct nonce without actually doing the work.
Example:
1. Miner wants to find a valid hash for a block of transactions.
2. The miner adjusts the nonce until they find a hash like this:
0000000000000000000a1a92d35bfc4f0d24369dbe6ff603fce42d4b315d72ad
3. The miner sends the block header (input data) and the nonce to the network, proving the work was done.
4. Nodes receiving the block can:
• Take the block header and nonce.
• Hash the data to check if the result matches the miner’s hash.
• Verify the hash starts with the required number of leading zeros (meeting the target difficulty).
Since SHA-256 is a one-way function and there’s no shortcut for finding the correct nonce, the nodes are assured that the hash came from the correct input and that the miner did the necessary work to find it.
Thus, while the node does not know the original input directly (beyond the hash and nonce), the proof is valid because the miner’s work is computationally verifiable by re-running the hashing process.
#siamstr #btc #bitcoin #nostr