<p>Most likely, you'll have to download all the block headers. The easiest way is to get them <a href="http://headers.electrum.org/blockchain_headers">here</a>. Note each block is 80 bytes so it's roughly a 30 MB download.</p>

<p>Next, what you're going to need to parse these block headers and make an array of timestamps. You can then write a program to parse these block headers and find the 3600-second interval that produced the most blocks.</p>

<p>Here's some sample code (Python 2):</p>

<pre><code>data = open('blockchain_headers').read()
timestamps = []
for i in range(len(data//80)):
   timestamps.append(int(data[i*80+68:i*80+72][::-1].encode('hex'), 16))
max_height = len(timestamps)
best = 0
for i in xrange(max_height):
    for j in xrange(i+1, max_height):
        if timestamps[j] - timestamps[i] &gt; 3600:
            if j - i &gt; best:
                best = j - i
                print("%s: %s", (i, best))
            break
</code></pre>

<p>According to the program the most number of mined blocks in one hour is 61 blocks which started at block 65710 and ended at 65770 all within an hour on July 12, 2010.</p>

CC BY-SA 3.0
2016-06-01T18:50:22.737Z
If you can trust block header times...
morsecoder
CC BY-SA 3.0
2016-06-01T19:08:34.857Z
Agreed. There's no real way to verify block header times, though, since they propagate through the network.
Jimmy Song
CC BY-SA 3.0
2016-06-01T17:25:28.420Z
2016-06-01T17:31:12.420Z
2016-06-01T17:31:12.420Z
Jimmy Song
<p>I have see questions about the longest delay between blocks and am aware of some blocks that occur in short succession. However I rarely see many blocks occurring very close to each other (which I suppose is normal since the average time between blocks is 10 minutes) </p>

<p>What is the highest number of blocks that have ever occurred in 1 hour?</p>

<p>How can I search the blockchain to answer this question for myself?</p>

<block-interval>
What is the largest number of blocks that have ever occurred in 1 hour?
Jun Li
# What is the largest number of blocks that have ever occurred in 1 hour?

(Asked by: username_0 on 2016-06-01)

I have see questions about the longest delay between blocks and am aware of some blocks that occur in short succession. However I rarely see many blocks occurring very close to each other (which I suppose is normal since the average time between blocks is 10 minutes)

What is the highest number of blocks that have ever occurred in 1 hour?

How can I search the blockchain to answer this question for myself?

**Tags:** block-interval


---

## 1 answers

### Answer by username_1 on 2016-06-01. Score: 11 | Accepted answer

Most likely, you'll have to download all the block headers. The easiest way is to get them [here](http://headers.electrum.org/blockchain_headers). Note each block is 80 bytes so it's roughly a 30 MB download.

Next, what you're going to need to parse these block headers and make an array of timestamps. You can then write a program to parse these block headers and find the 3600-second interval that produced the most blocks.

Here's some sample code (Python 2):

```
data = open('blockchain_headers').read()
timestamps = []
for i in range(len(data//80)):
   timestamps.append(int(data[i*80+68:i*80+72][::-1].encode('hex'), 16))
max_height = len(timestamps)
best = 0
for i in xrange(max_height):
    for j in xrange(i+1, max_height):
        if timestamps[j] - timestamps[i] > 3600:
            if j - i > best:
                best = j - i
                print("%s: %s", (i, best))
            break

```

According to the program the most number of mined blocks in one hour is 61 blocks which started at block 65710 and ended at 65770 all within an hour on July 12, 2010.

> **Comments:**
> **username_2**: If you can trust block header times...  
> **username_1**: Agreed. There's no real way to verify block header times, though, since they propagate through the network.  

---

