<p>All of these things you want to calculate are <em>highly</em> dependent not just on the hardware you use, but the software you use. For example you can generate signatures many different ways and every bitcoin wallet generates them a little differently. The signature generation performance of Java in bitcoinJ is going to different than that of Go in btcwallet is going to be different than that of C++ in bitcoin core and so on. In addition, deterministic signatures are going to have a different performance profile than non-deterministic signatures and so on.</p>

<p>That said, if you really wanted to, you can run some performance testing on any one of these, though not all of them exist. For verifying signatures in btcd, there is a <a href="https://github.com/btcsuite/btcd/blob/master/btcec/bench_test.go#L87-L113" rel="nofollow">benchmark test</a> that you can use.</p>

<p>Note that block verification (or creation) necessarily means verification of all transactions in the block as well as checking the proof-of-work. Checking the proof-of-work, by the way, is really as simple as a calculation of a double-sha256, or a single "hash" that mining gear can do billions or trillions of per second.</p>

CC BY-SA 3.0
2015-10-11T07:46:08.330Z
Sorry for bothering, so as you said I ran `go test -bench BenchmarkSigVerify` and received an error:  `go tool: no such tool "6g"`
As I've read it can be problem with .bashrc, so I checked it for `export GOROOT=/usr/lib/go` and it was there, but to be sure I did `source .bashrc`, still the same error
Nur
CC BY-SA 3.0
2015-10-12T23:55:34.447Z
Totally depends on your setup. Wherever the btcd repository is, make sure the GOPATH is pointed there. Typically this is /home/<username>/go. `export GOPATH=/home/myusername/go` should set it up.
Jimmy Song
CC BY-SA 3.0
2015-10-10T17:40:33.147Z
Thanks for you reply. To be honest I have never used Go, I basically have academic experience with Python and C++. I installed Go though, but even following the guide from github, still can't properly figure out how to run this benchmark test.
Nur
CC BY-SA 3.0
2015-10-10T22:09:20.083Z
It should be pretty straightforward. Try `go test -bench BenchmarkSigVerify` in the btcd/btcec directory.
Jimmy Song
CC BY-SA 3.0
2015-10-10T15:18:44.250Z
2015-10-10T15:18:44.250Z
Jimmy Song
<p>I read this post on Bitcoin <a href="https://en.bitcoin.it/wiki/Scalability" rel="nofollow">Scalability</a>. 
As far as I understand sequence of steps in Bitcoin, simplified version of performing transaction should be following:</p>

<p>On Sender's side:</p>

<ol>
<li>Create transaction</li>
<li>Generate signature and sign</li>
<li>Broadcast the transaction to peers</li>
</ol>

<p>On Peer's side:</p>

<ol>
<li>Get the transaction</li>
<li>Verify signature</li>
<li>Verify transaction</li>
<li>Pass to the next peer. - ???</li>
</ol>

<p>//if a peer is a miner</p>

<ol start="5">
<li>Collect transactions into block</li>
<li>Calculate PoW for the block</li>
<li>If found include it to his version of the blockchain</li>
<li>Broadcast the block (with nonce and targe)</li>
</ol>

<p>Other peers:</p>

<ol>
<li>Get the block</li>
<li>Verify that PoW for block is Valid</li>
<li>Include the block into their version of the blockchain</li>
</ol>

<p>I would like to understand Bitcoin's performance speed at every step in general or given my specifications of the laptop if possible.
<strong>How I can calculate signature generation, signature verification, transaction verification, block PoW verification, **etc</strong> <strong>speed</strong>?**</p>

CC BY-SA 3.0
2015-10-10T17:02:19.230Z
Typically, it's easy to benchmark times ($end - $start) and send them somewhere. Is there particular software you wish to test?
karimkorun
CC BY-SA 3.0
2015-10-10T17:37:19.820Z
Thanks for you reply.  No I didn't have anything particular on my mind, but I am have more experience with Python and C++, so I thought of those implementations.
Yes as you said I thought of find the start and stop timestamps between parts of code in charge of signature generation/verification, transaction verification, and then just subtract them from each other.
Nur
<transaction-verification><scalability><message-signing><performance><message-verification>
How to calculate signature generation, signature verification, transaction verification speed?
Nur
# How to calculate signature generation, signature verification, transaction verification speed?

(Asked by: username_0 on 2015-10-10)

I read this post on Bitcoin [Scalability](https://en.bitcoin.it/wiki/Scalability).
As far as I understand sequence of steps in Bitcoin, simplified version of performing transaction should be following:

On Sender's side:

1. Create transaction
2. Generate signature and sign
3. Broadcast the transaction to peers

On Peer's side:

1. Get the transaction
2. Verify signature
3. Verify transaction
4. Pass to the next peer. - ???

//if a peer is a miner

5. Collect transactions into block
6. Calculate PoW for the block
7. If found include it to his version of the blockchain
8. Broadcast the block (with nonce and targe)

Other peers:

1. Get the block
2. Verify that PoW for block is Valid
3. Include the block into their version of the blockchain

I would like to understand Bitcoin's performance speed at every step in general or given my specifications of the laptop if possible.
**How I can calculate signature generation, signature verification, transaction verification, block PoW verification, \*\*etc** **speed**?\*\*

**Tags:** transaction-verification, scalability, message-signing, performance, message-verification

> **Comments:**
> **username_1**: Typically, it's easy to benchmark times ($end - $start) and send them somewhere. Is there particular software you wish to test?  
> **username_0**: Thanks for you reply.  No I didn't have anything particular on my mind, but I am have more experience with Python and C++, so I thought of those implementations. Yes as you said I thought of find the start and stop timestamps between parts of code in charge of signature generation/verification, transaction verification, and then just subtract them from each other.  

---

## 1 answers

### Answer by username_2 on 2015-10-10. Score: 0 | Accepted answer

All of these things you want to calculate are *highly* dependent not just on the hardware you use, but the software you use. For example you can generate signatures many different ways and every bitcoin wallet generates them a little differently. The signature generation performance of Java in bitcoinJ is going to different than that of Go in btcwallet is going to be different than that of C++ in bitcoin core and so on. In addition, deterministic signatures are going to have a different performance profile than non-deterministic signatures and so on.

That said, if you really wanted to, you can run some performance testing on any one of these, though not all of them exist. For verifying signatures in btcd, there is a [benchmark test](https://github.com/btcsuite/btcd/blob/master/btcec/bench_test.go#L87-L113) that you can use.

Note that block verification (or creation) necessarily means verification of all transactions in the block as well as checking the proof-of-work. Checking the proof-of-work, by the way, is really as simple as a calculation of a double-sha256, or a single "hash" that mining gear can do billions or trillions of per second.

> **Comments:**
> **username_0**: Thanks for you reply. To be honest I have never used Go, I basically have academic experience with Python and C++. I installed Go though, but even following the guide from github, still can't properly figure out how to run this benchmark test.  
> **username_2**: It should be pretty straightforward. Try `go test -bench BenchmarkSigVerify` in the btcd/btcec directory.  
> **username_0**: Sorry for bothering, so as you said I ran `go test -bench BenchmarkSigVerify` and received an error:  `go tool: no such tool "6g"` As I've read it can be problem with .bashrc, so I checked it for `export GOROOT=/usr/lib/go` and it was there, but to be sure I did `source .bashrc`, still the same error  
> **username_2**: Totally depends on your setup. Wherever the btcd repository is, make sure the GOPATH is pointed there. Typically this is /home/<username>/go. `export GOPATH=/home/myusername/go` should set it up.  

---

