6a1e57656c636f6d6520746f20426c6f636b636861696e20416e616c79736973

Category: TIME

Bitcoin Block Time Consistency 3

In a previous post, I summarised that the block time recorded for any Bitcoin block could be as much as 1 hour earlier or 2 hours later than the actual time, under the ideal timing of 10-minute blocks.

This is theoretical, based on what block validators would accept, but I was curious as to the actual time inaccuracy present within blocks. Between blocks 765069 (28th November 2022) and 765873 (4th December 2022) I sampled 100 blocks, comparing their timing to when my full node received and exposed those blocks via the RPC API.

A simple python script was written that continuously polled my full node for the current block height. This was compared to the previous response and if it differed, a new block had been found. On a new block being identified, the script obtained the local machine’s time (which is synchronised via NTP, Network Time Protocol, daily) and logged it against the block number and block time. These were then compared to establish the offset.

The following should be noted when considering this data:

  • It does not account for the time taken for my node to be updated by peers as to a new block being found. This is expected to be variable but within a few seconds, depending on the peering of the miner and my node. The node reported a maximum latency of 281ms for peers when reviewed; this will be variable, however.
  • It does not account for any delay in my node exposing a new block via the RPC API. This is expected to be minimal as once the block is validated it is expected to be exposed. Validation requires minimal resources and the node is operating on a modern multicore system with ample RAM.
  • The block samples were taken during the period 09:00 to 20:00 UTC; it does not, therefore, account for variations relating to timezones/blocks found outside of these hours. This is considered to be negligible as most miners and nodes will operate 24/7 (bar maintenance) and therefore are not affected by the time of day.
  • The script polled was configured to query the node every 50ms. This rate was chosen so as not to overload the RPC server, or delay/block the processing of a new block. In addition, the code’s overhead means that additional time is required to perform the checks and logging as well as network latency. From the output, this appears to be around 50-70ms.
  • Block header times being in Unix time are only as precise as 1 second. This analysis does not seek to determine accuracy to 10s of ms but rather provides an overview.

Overall I would expect the local time to be within 1-4 seconds of the block creation, but this is unproven. This may be considered further with an experiment on the Bitcoin Testnet.

The results were somewhat unspectacular; the largest difference was 51 seconds, the smallest -16 with an average (mean and median) of 21 seconds. Based on the sample, a tolerance of +/- 60 seconds appears reasonable when considering block times.

The full captured data is below:

Block HeightDetected New Block (Readable)Detected New Block (Unix)Block Time (Unix)Time Difference (seconds)
76506928/11/22 17:24:361669656276166965624828
76507028/11/22 17:42:17166965733716696573370
76507128/11/22 17:42:491669657369166965733732
76507228/11/22 17:43:231669657403166965736835
76507328/11/22 17:47:341669657654166965762430
76507428/11/22 17:49:461669657786166965777412
76507528/11/22 17:54:361669658076166965804828
76507628/11/22 18:07:371669658857166965881839
76507728/11/22 18:15:571669659357166965932433
76507828/11/22 18:19:351669659575166965956015
76507928/11/22 18:25:541669659954166965992034
76508028/11/22 18:27:04166966002416696600159
76508128/11/22 18:58:211669661901166966188219
76508228/11/22 19:04:531669662293166966226429
76530330/11/22 09:12:131669799533166979949340
76530430/11/22 09:22:141669800134166980009836
76530530/11/22 09:35:161669800916166980089620
76530630/11/22 09:35:381669800938166980091622
76530730/11/22 09:37:091669801029166980097851
76530830/11/22 09:38:34166980111416698011104
76530930/11/22 09:40:12166980121216698012048
76531030/11/22 10:12:19166980313916698031345
76531130/11/22 10:19:101669803550166980353020
76531230/11/22 10:22:221669803742166980372022
76531330/11/22 10:28:26166980410616698041051
76531430/11/22 11:23:031669807383166980735825
76531530/11/22 12:22:141669810934166981091816
76531630/11/22 12:34:401669811680166981164931
76531730/11/22 12:43:181669812198166981217226
76531830/11/22 12:49:201669812560166981252040
76531930/11/22 12:51:411669812701166981266239
76532030/11/22 12:52:251669812745166981272223
76533630/11/22 17:01:231669827683166982767211
76533730/11/22 17:04:00166982784016698278328
76533830/11/22 17:09:201669828160166982814119
76533930/11/22 17:10:191669828219166982818237
76534030/11/22 17:33:331669829613166982958627
76534130/11/22 17:37:531669829873166982983934
76534230/11/22 17:45:151669830315166983028233
76544901/12/22 09:09:591669885799166988575247
76545001/12/22 09:23:441669886624166988661410
76545101/12/22 09:26:541669886814166988678727
76545201/12/22 09:34:531669887293166988726627
76545301/12/22 09:44:25166988786516698878632
76545401/12/22 10:03:221669889002166988898418
76545501/12/22 10:22:071669890127166989008839
76545601/12/22 10:31:0816698906681669890684-16
76545701/12/22 10:47:091669891629166989160227
76545801/12/22 10:56:48166989220816698922008
76545901/12/22 11:04:53166989269316698926894
76546001/12/22 11:05:25166989272516698927232
76546101/12/22 11:15:02166989330216698932948
76546201/12/22 11:28:461669894126166989411313
76546301/12/22 11:38:08166989468816698946835
76546401/12/22 11:40:481669894848166989482919
76546501/12/22 11:57:311669895851166989583120
76546601/12/22 11:57:441669895864166989585113
76546701/12/22 12:21:481669897308166989726543
76546801/12/22 12:25:171669897517166989748928
76549201/12/22 17:38:10166991629016699162828
76549301/12/22 17:42:121669916532166991650725
76549401/12/22 17:43:301669916610166991657634
76549501/12/22 18:01:501669917710166991768921
76549601/12/22 18:02:501669917770166991773436
76549701/12/22 18:14:01166991844116699184347
76549801/12/22 18:18:351669918715166991868134
76558402/12/22 09:11:29166997228916699722818
76558502/12/22 09:12:091669972329166997231910
76558602/12/22 09:12:521669972372166997235913
76558702/12/22 09:42:201669974140166997412812
76558802/12/22 10:48:371669978117166997810611
76558902/12/22 11:01:441669978904166997887529
76559002/12/22 11:07:431669979263166997923231
76559102/12/22 11:10:531669979453166997943716
76559202/12/22 11:43:521669981432166998141517
76559302/12/22 11:49:531669981793166998176429
76559402/12/22 12:46:131669985173166998513637
76559502/12/22 13:01:571669986117166998609027
76559602/12/22 13:02:41166998616116699861529
76559702/12/22 13:04:071669986247166998620245
76559802/12/22 13:06:29166998638916699863836
76559902/12/22 13:11:0216699866621669986665-3
76560002/12/22 13:30:13166998781316699878103
76560102/12/22 13:31:081669987868166998784424
76560202/12/22 13:32:53166998797316699879694
76560302/12/22 13:47:451669988865166998885411
76575803/12/22 18:07:121670090832167009081121
76575903/12/22 18:42:511670092971167009294526
76576003/12/22 18:45:111670093111167009307239
76586304/12/22 12:57:031670158623167015861211
76586404/12/22 13:17:571670159877167015986017
76586504/12/22 13:24:471670160287167016026423
76586604/12/22 13:37:481670161068167016104028
76586704/12/22 13:39:411670161181167016114932
76586804/12/22 14:05:38167016273816701627326
76586904/12/22 14:22:541670163774167016375519
76587004/12/22 14:49:311670165371167016532150
76587104/12/22 15:04:39167016627916701662736
76587204/12/22 15:15:311670166931167016691021
76587304/12/22 15:37:561670168276167016825719

Bitcoin Block Time Consistency 2

In the previous post, I explored the timing of individual blocks. Generally, 6 blocks are used to confirm a transaction. This attempts to mitigate the possibility of the transaction being included in an orphaned block as a result of a fork caused by two blocks being found concurrently and to act as security against a malicious actor with considerable hashing power reverting previously mined blocks. A block is considered immutable after 6 confirmations.

While the previous analysis showed blocks in recent years may take up to 2 hours and 19 minutes, the chances of 6 constitutive blocks taking a similar amount of time is considered highly unlikely.


A snapshot of block headers was taken at block 763308 (15th November 2022) and an analysis of rolling 6 block timing was completed.

The average 6-block confirmation time over the entire history of the blockchain was 3436 seconds (57 minutes, 16 seconds). Closely aligned to the target time of 3600 seconds (60 minutes); 6x target block time of 10 minutes.

Over the past 5 full years – 2016 to 2021 – the longest 6-block confirmation time was just over 6 hours in 2021. This was exceptional, with other years being around 4 hours. If you were lucky enough to be awaiting your transaction confirmation during the shortest period in these years you could have been waiting for as little as 2 minutes (2020)!

Year2009201020112012201320142015
Block Range0-6 74637-74643149092-149098208508-208514215900-215906297493-297499386679-386685
Max
(seconds)
465284267891562414392120421351414428
Max (HH:MM:SS)09:14:4407:26:2904:20:2403:59:5203:20:4203:45:1404:00:28
Year2016201720182019202020212022 (Partial)
Block Range425375-425381494062-494068514763-514769578632-578638622894-622890688986-688992760246-760252
Max
(seconds)
13922139411497212057150752176013434
Max (HH:MM:SS)03:52:0203:52:2104:09:3203:20:5704:11:1506:02:4003:43:54
Maximum 6-block confirmation time per year

Overall, 75% of transactions awaiting 6 block confirmations would be expected to be confirmed within approximately 1 hour and 10 minutes, with 95% being confirmed within approximately 1 hour and 45 minutes.

Bitcoin Block Time Consistency

Bitcoin has a target block time of 10 minutes. Due to the hashing mechanism, it is unknown when a target hash will be achieved; it may be a second or it may be several hours but on average it is aimed to be 10 minutes. The greater the hashing power of the network, assuming a static target difficulty, the quicker a block would be expected to be mined, but due to the randomness of finding a solution the network hashing power is not directly correlated to the block time.

To achieve the 10-minute target block time, the difficulty of the target hash is altered every 2016 blocks, approximately 2 weeks. This re-targeting considers the time taken to mine those 2016 blocks and compares that to the expected time of 20160 minutes (2 weeks). The Bitcoin network then changes the difficulty appropriately; if the 2016 blocks were mined in under 20160 minutes the difficulty target will increase. If the 2016 blocks were mined in over 20160 minutes, the difficulty target will decrease.

The block header contains both the target difficulty and the time the miner reports to have mined the block. The target difficulty is calculated and checked by all verifying nodes on the network. It is therefore considered accurate.

The time, however, is not always accurate, but it is checked that it is greater than the median time of the previous 11 blocks, and not over two hours ahead of the current time as agreed by the connected nodes. In ideal circumstances (11 blocks of exactly 10 minutes each), the median would be 3600 seconds (60 minutes/1 hour). A valid timestamp would therefore be accepted if it were T-60/+120 – a three-hour window, under ideal conditions.


A snapshot of the Bitcoin network’s block headers was taken on 7th November 2022 at block height 762150. The average (mean) block time from the genesis block (3rd January 2009) to block 762150 was 587 seconds; 9 minutes and 47 seconds.

The data was then aggregated by year to give a summary of the Bitcoin’s network performance over that year.

Since 2015, the performance has been impressively consistent; the yearly average (mean) ranged from 563 to 598 seconds; 09:23 to 09:58. In 2010, 2011, 2013, and 2014, the average (mean) time was all under 9 minutes; 07:44, 08:48, 08:17 and 08:55 (respectively). 2012 was an exception during this period with an average block time of 09:39, more aligned with 2015 to 2022 values. Not surprisingly, given the introduction of the Bitcoin network that year and limited adoption, in 2009 the average block time exceeded the target considerably, achieving an average block time of 16:03.

The table below summarises the average (mean) block time per year since Bitcoin’s inception.

Year2009201020112012201320142015
Mean
(Seconds)
963464528579497535580
Mean
(HH:MM:SS)
00:16:0300:07:4400:08:4800:09:3900:08:1700:08:5500:09:40
Year2016201720182019202020212022 (Partial)
Mean
(Seconds)
576563578581594598589
Mean
(HH:MM:SS)
00:09:3600:09:2300:09:3800:09:4100:09:5400:09:5800:09:49
Average Block Time Aggregated By Year

Overall, the Bitcoin network has adapted well to the significant increases in hashing power over its lifetime.


The average, however, doesn’t tell the whole picture. Whilst the time required for a 6-block confirmation for transactions may be considered acceptable based on the average block time, on occasions the block time is significantly greater than 10 minutes.

The table below summarises the longest block times in a given year for the past 5 complete years.

YearBlockTimePrevious
Block
Time
Time
Difference
(HH:MM:SS)
202168930112:46:53
07/01/2021
10:27:39
07/01/2021
02:19:14
202062170108:39:25
15/03/2020
06:46:15
15/03/2020
01:53:10
201959727317:07:42
30/09/2019
15:08:45
30/09/2019
01:58:57
201855432308:06:20
18/12/2018
06:27:32
18/12/2018
01:38:48
201745185821:10:52
06/02/2017
19:31:38
06/02/2017
01:39:14
Longest Block Time 2017 to 2021

These represent the longest blocks, however. Analysis indicates that 95% of blocks will be mined within around 30 minutes of the previous block.