<p>Finding the nonce and computing Proof of Work is unrelated to transaction validation. Locking blocks together in a chain of expensive Proof of Work ensures that is expensive to replace the current ledger/ blockchain with an alternative.</p>

<p>Further, transactions do not contain information about blocks or Proof of Work. Validation of transactions is achieved through the use of Elliptic Curve cryptography. Specifically, an Elliptic Curve Digital Signature Algorithm (ECDSA) over the curve secp256k1.</p>

<p>The mathematics of ECDSA ensure that only those who know the private key can generate valid signatures. However, any one can use the public key to verify that a signature was produced by somebody who has knowledge of the private key.</p>

<p>Lastly, to ensure that unspent transaction outputs (UTXOs) are not double spent, the Bitcoin protocol dictates that a block is invalid if it includes a transaction which references a specific UTXO as an input which has previously been referenced in a transaction input before.</p>

CC BY-SA 3.0
2018-01-04T18:36:26.197Z
2018-01-04T18:36:26.197Z
Matthew Stannard
<p>I am by no means an expert, nor a cryptographer, but I would be interested in knowning a little bit more than what happens at the end of the following chain of events.</p>

<p><em>What happens at the end of the following chain of events of course is related to what happens first, so please correct me if there are mistakes or incomplete parts in what follows!</em></p>

<p>Suppose we are in the situation where Alice (A) wants to transfer one Bitcoin to Bob (B). </p>

<ol>
<li><p>A's private key has a corresponding public key. The private key is
used for the signature. This, together with hashed information
relative to the previous chain block, the timestamp and other
elements, constitutes the transaction. </p></li>
<li><p>The transaction is broadcasted to the network, where it waits until
    it's validated by the miners (together with other transactions).   </p></li>
<li><p>In extreme synthesis, what miners do is to try to find a nonce that, added to the transaction data they receive and after being double-hashed, is satisfying a certain difficulty condition (set so that on average a new block is added, say, each 10 minutes). </p></li>
<li><p>Once a miner finds a working nonce, she sends it to the network so that it can be (easily) checked.
    In practice, since it takes time and effort to find that working
    nonce, this constitutes the proof of work.</p></li>
</ol>

<p>What I find hard to understand is: <strong>how finding a random number such as a nonce can be proof that the transaction was effectively of one Bitcoin and from A to B</strong>?</p>

<p>And <strong>how can the nonce be the solution of the problem if no one but A knows about her private key</strong>?</p>

<p>In other words, I understand that it's extremely hard to find a working nonce, so that finding a compatible one is effectively proof that a lot of time and energies were spent to find it. 
I don't understand how the solution to the mathematical problem of finding the nonce relates to the fact that the initial A to B transaction is valid (as opposed to be a wrong or "dishonest" one).</p>

<mining-theory><proof-of-work><nonce>
How finding a working nonce says anyting about the validity of an initial transaction
Stefano Lombardi
# How finding a working nonce says anyting about the validity of an initial transaction

(Asked by: username_0 on 2018-01-04)

I am by no means an expert, nor a cryptographer, but I would be interested in knowning a little bit more than what happens at the end of the following chain of events.

*What happens at the end of the following chain of events of course is related to what happens first, so please correct me if there are mistakes or incomplete parts in what follows!*

Suppose we are in the situation where Alice (A) wants to transfer one Bitcoin to Bob (B).

1. A's private key has a corresponding public key. The private key is
   used for the signature. This, together with hashed information
   relative to the previous chain block, the timestamp and other
   elements, constitutes the transaction.
2. The transaction is broadcasted to the network, where it waits until
   it's validated by the miners (together with other transactions).
3. In extreme synthesis, what miners do is to try to find a nonce that, added to the transaction data they receive and after being double-hashed, is satisfying a certain difficulty condition (set so that on average a new block is added, say, each 10 minutes).
4. Once a miner finds a working nonce, she sends it to the network so that it can be (easily) checked.
   In practice, since it takes time and effort to find that working
   nonce, this constitutes the proof of work.

What I find hard to understand is: **how finding a random number such as a nonce can be proof that the transaction was effectively of one Bitcoin and from A to B**?

And **how can the nonce be the solution of the problem if no one but A knows about her private key**?

In other words, I understand that it's extremely hard to find a working nonce, so that finding a compatible one is effectively proof that a lot of time and energies were spent to find it.
I don't understand how the solution to the mathematical problem of finding the nonce relates to the fact that the initial A to B transaction is valid (as opposed to be a wrong or "dishonest" one).

**Tags:** mining-theory, proof-of-work, nonce


---

## 1 answers

### Answer by username_1 on 2018-01-04. Score: 4 | Accepted answer

Finding the nonce and computing Proof of Work is unrelated to transaction validation. Locking blocks together in a chain of expensive Proof of Work ensures that is expensive to replace the current ledger/ blockchain with an alternative.

Further, transactions do not contain information about blocks or Proof of Work. Validation of transactions is achieved through the use of Elliptic Curve cryptography. Specifically, an Elliptic Curve Digital Signature Algorithm (ECDSA) over the curve secp256k1.

The mathematics of ECDSA ensure that only those who know the private key can generate valid signatures. However, any one can use the public key to verify that a signature was produced by somebody who has knowledge of the private key.

Lastly, to ensure that unspent transaction outputs (UTXOs) are not double spent, the Bitcoin protocol dictates that a block is invalid if it includes a transaction which references a specific UTXO as an input which has previously been referenced in a transaction input before.


---

