Pages

Thursday 14 August 2014

16.7 Satoshi's hashrate

Suggested reading:

Note: I refer to Satoshi as "he" throughout this post. This is for stylistic reasons, and perhaps next time I'll refer to Satoshi as "she", or "it" or "them". Use of the masculine pronoun does not imply I have any special inside information.

0. Introduction
There are many reasons I enjoy working at coinometrics.com, and having access to data I wouldn't otherwise have is chief among them. Recently, Jonathan Levin had been discussing whether or not Satoshi's coins had been moved (which was in the news at the time) and Martin Harrigan of QuantaBytes (who had recently started working with us) was able to provide the sort of data that we needed to assign blocks to Satoshi.

With that information I was able to do what I'd wanted to do since I first started mining - estimate Satoshi's hashrate. At the time I didn't realise that I would also be provided with a small window into the great man's thinking - his plan for managing his personal hashrate.

1. The Well Deserved Fortune of Satoshi Nakamoto, Visionary and Genius
The link above takes you to a famous post by Sergio Demian Lerner which provides the main clues I used to determine which blocks belonged to Satoshi. It is a great post and easy to follow - I recommend you read it and the other posts in the "Suggested reading" section.

To simplify, in the early days of bitcoin mining when a nonce range was exhausted or when a block was solved, an "extra nonce" counter at the start of the coinbase hash would tick over. Even more simply, the "extra nonce" is a counter that can increment by time and by block height.

Sergio Demian Lerner found that if he plotted the "extra nonce" as a function of time and used colours to indicate whether or not a transaction was spent, some interesting features arose (click on the plot for a greater level of detail):





Mr. Lerner realised that there were two groups here: one of blocks with spent block rewards, and one of blocks with unspent block rewards. He also noticed that the "Unspent" group seemed to have sequential increases in the extra nonce at a rate greater than one per block, and the "Spent" group seemed to have sequences in which the extra nonce increased at a rate of one per block. More simply, the second group is not able to exhaust their nonce range between blocks, but the first group is able to do just that. This could be because the "Unspent" group had a much higher hashrate than the spent group, or because it was using a more restricted nonce range.

It turned out that the nonce range was more restricted for the "Unspent" group, and since the 'extra nonce' per block rate was in excess of 1.0 at the very start when only Satoshi was mining, we can be confident that Satoshi's blocks are the blocks which belong to the 'more vertical' series in the plot above.

I wasn't able to figure out a nice simple mathematical method to programmatically extract only those blocks that belonged to "Satoshi" series so I decided I'd have to select them by hand. One at a time. With teeth clenched.

Luckily, I had a small short cut.


2. Early non-Satoshi miners
Over time, I have collected odd bits of data that allow me to accurately attribute two thousand three hundred and forty five blocks of the first seventy thousand blocks to one of five known entities. I'm confident that most readers with an interest in the early days of bitcoin mining will also know these entities and their blocks; if not, then a little google-fu will put you on the right track. I'm not going to post their names here, but if you're a researcher and you need to know, please contact me.

Each colour in the next chart represents a different mining entity.





3. Satoshi's blocks
It's obvious that all these early miners have an extra nonce rate of ~1.0 per block, until about block 70000 when the rate increases, probably due to GPU bitcoin mining (which started in July 2010) increasing the nonce exhaustion rate to less time than it took to solve a block, unless some of the mining software being developed at that time used a reduced nonce range.

After removing all these known miners, and manually selecting only blocks in Satoshi's extra nonce rate series, we get the following chart of Satoshi's blocks:




Every series starts (from the smallest extra nonce value) only after the previous series has ended - Mr. Lerner thinks this is when Satoshi was backing up his client. Each series is quite regular at first, with back up occurring every five days or so:



but soon becomes much less consistent. There are also series with half the extra nonce rate as usual, a section where it appears that the bitcoin client has been launched in two separate threads, and other interesting occurrences - for more interesting details refer to Mr. Lerner's other interesting posts in the "Recommended reading" section.

However, we don't need to know extra nonce rates to determine Satoshi's hashrate - all we need to know is which blocks were his, and we need to hope that if he was using more than one computer that all their time clocks were synchronised.


4. Satoshi's hashrate
Hashrate = blocks * network difficulty * 2^32 / time
If you count the number of blocks solved, multiplied by the network mining difficulty at which they were solved, multiplied by 2^32 and divided by the time period you're considering, you arrive at an average hashrate.  For example, at difficulty 1 and 144 blocks a day, the hashrate would have been about 7.16 Mhps.

This  provides a simple way to determine Satoshi's daily hashrate, and the result when plotted:


I was a little shocked the first time I generated this - it was very clear that Satoshi changed his hashrate four times:




Results are calculated using linear models of hashrates (ignoring those at or near 0 Mhps); only for the last section was there any significant relationship between a change in hashrate and time.

From February to June 2009, his hashrate was stable at 4.35 Mhps; then there was a sudden jump to 2.617 Mhps until October 2009; a short period of 1 Mhps until May 2010, and then a longer period starting at 1.575 Mhps and declining at the a rate of ~ 0.18 Mhps per month until about 1Mhps, after which he stops his clients producing new blocks.

What does this mean in terms of Satoshi's hardware? Did he have three different computers? The first hashrate is about 1.7 Mhps greater than and 166% more than that of the second section. The second hashrate is about 1.6 Mhps greater than that of the third section and 166% greater than the start of the fourth section. It's hard to tell whether or not he removed integer amounts of hashrate or reduced by percentages.

It's clear that Satoshi was able to achieve some sort of fine tuned control. I'm not sure how such control could be maintained, but I'm willing to guess that the standard client on a home PC wouldn't be able to do it.



4. Satoshi -  the first member of the fifty percent club
This section you get for free if you do all the leg work in the above sections. It's interesting, but not very revealing.

Satoshi's proportion of the network seems to be fairly constant until October 2009 when he suddenly reduced his hashrate, and again in December 2009 when the network hashrate started to continuously increase. The times that Satoshi turned his miners off for extended periods in August and September 2009 had a significant effect on the network hashrate, resulting in the familiar "W" shape of the network hashrate estimate at the time.






This can be perhaps more easily observed in the next plot, showing a fairly constant 75% of the network blocks solved per day until September 2009, after which there is a peak (due to the slight increase in hashrate) and then the decline is consistent until he suddenly stops generating blocks.









 I like this next plot because, although it's just a subset of the plot above, it shows the change in the network hashrate more clearly:  the two blue spots are where he switches off, and it is clear that although from June 2009 until December 2009 the network hashrate is at its lowest, Satoshi is clearly following a plan and reduces his hashrate after five months (June 2009) and then after another five months (October 2009).





5. Summary
  • Satoshi initially followed a plan of reducing the hashrate by 1.7 Mhps every five months, but a month after the second such drop abandoned this method in favour of a continuously decreasing hashrate.
  • This implies two things: Satoshi had a hashrate plan, and that initially Satoshi had very coarse-grained control of his hashrate, but then was able to achieve a very fine grained control of the hashrate.
  • These insights may help investigators determine the sort of hardware Satoshi used, and how much control he would have had over the early client or his PC / cloud infrastructure.











organofcorti.blogspot.com is a reader supported blog:

1QC2KE4GZ4SZ8AnpwVT483D2E97SLHTGCG




Thank you to the coinometrics.com team for use of transaction and address data, and to Sergio Demian Lerner for doing research that allowed me to write this post.

Find a typo or spelling error? Email me with the details at organofcorti@organofcorti.org and if you're the first to email me I'll pay you 0.01 btc per ten errors.

Please refer to the most recent blog post for current rates or rule changes.

I'm terrible at proofreading, so some of these posts may be worth quite a bit to the keen reader.
Exceptions:
  • Errors in text repeated across multiple posts: I will only pay for the most recent errors rather every single occurrence.
  • Errors in chart texts: Since I can't fix the chart texts (since I don't keep the data that generated them) I can't pay for them. Still, they would be nice to know about!
I write in British English.





20 comments:

  1. Very interesting read. Would you care posting a QR code too?

    ReplyDelete
  2. based on this data, and the requirements of developing the early software, I would presume he ran his client on virtual machine software which allowed him to set a percentage of CPU time used by the VM, thus controlling his hashrate.

    ReplyDelete
  3. Very interesting, seems like bailed ship after everyone jumped on board.

    ReplyDelete
  4. You haven't said anything about how the distribution of the last bit of the nonce. Sergio Lerner's hypothesis, as I recall, was that Satoshi had a modified client, running on 5 computers and each one of these computers used different bits at the end of the nonce to avoid collisions.

    I think the drop in the last "mining sprint" was not intentional, and may not have been planned.

    ReplyDelete
  5. Maybe he used virtual machines. E.g. VMware hypervisors in 2008 already allowed fine-grained control of the CPU resources assigned to a single VM.

    ReplyDelete
  6. If I wanted to mine BTC in the early days, would I have needed to know how to program? CGMiner is hard enough.

    ReplyDelete
    Replies
    1. the original client

      Delete
    2. yes. You would have to run a full node which would require some level of programming experience.

      Delete
  7. 4.35 - 40% = 2.61
    2.61 - 40% = 1.56

    ReplyDelete
  8. Very good work. I had noticed the decrease in Satoshi's hashrate but I had not discovered the discrete intervals. Regarding how I identified Satoshi blocks easily:
    I created a bitmap (in a low resolution) where I painted manually a bitmap mask with a fixed color, where I masked out all parts that were not in the patters the eye clearly identify. Then the program would check each dot (coinbase) against the bitmap mask.

    It's not perfect, much better than automated "slope following" methods I tested before!

    Sergio D. Lerner.

    ReplyDelete
  9. Thanks for your kind comments!

    My method involved clicking on "not satoshi" blocks in lots of fifty on an interactive graph. The only thing that made it easier the second time around (see most recent post) was using the restricted nonce LSB range.

    ReplyDelete
  10. The apparent decrease of hashrate in the last stage (NOV 2009 - MAY 2014) could be justified by an increase number of orphaned blocks belonging to Satoshi. This is because the orphan rate increases when you have lower hashrate percentage. Also Satoshi's computer connectivity to the network was probably limited to few peer connections, without high-speed backbone connections to other miners, to remain more anonymous.

    So I think there are only stable hashrates, and the last stage is not declining: just an increasing number of blocks did not get into the blockchain.

    ReplyDelete
    Replies
    1. By "MAY 2014" I meant MAY 2010 !

      Delete
    2. That's a really interesting point - as Satoshi's share of the network decreases, he would have experienced more orphaned blocks. It should be possible to model that.

      Delete
    3. You could find out this exactly by running this algorithm:
      Let N =0.
      1. For i = 1 to MaxCoinBaseHeight do
      2. If the coinbase i is not Satoshi's , increase the counter N
      3. If the coinbase i is Satoshi's then
      3.1 If ExtraNonce[i] < ExtraNonce[i-1] then set N :=1 (a extanonce restart)
      3.2. set RealExtraNonce[i] = ExtraNonce[i] - N

      RealExtraNonce[i] will represent the real real time clock of Satoshi computer.

      Then you plot RealExtraNonce[i] against the block time (not block number) for only the i-indexes of Satoshi coinbases. Measure the slope of each segment

      (or alternatively integrate discretely RealExtraNonce[i] over time)

      The slope of the segments in the range NOV 2009 - MAY 2010 should not vary if the hashrate is constant, even if less blocks are created.

      Best regards!

      Delete
    4. How about modelling the change in orphan? I think that will be the trickiest part, wont it?

      Delete
  11. Nice graphs. What did you use to generate them?

    ReplyDelete
  12. great insights here! what do you think about the other latest studies into the early days of Satoshi and his actual BTC holdings? most always said 1 million bitcoin was mined but recently says might only be 700,000 BTC .. any thoughts for this? here was a write up about this lately.

    ReplyDelete
  13. amazing insight! just happen to stumble upon https://bitcoinexchangeguide.com/satoshi-nakamoto-bitcoin-mining-hashrate-blockchain-data/ who took your images and recreated them, pretty cool. thanks for the time and effort, really valuable to keep diving in.

    ReplyDelete

Comments are switched off until the current spam storm ends.