8

I have currently downloaded 300,000 blocks and the last one is generated 1 year and 19 weeks ago. I wonder how many blocks are more to go, before I am up to date.

1

3 Answers 3

6

There's a generic answer to this question that anyone can use, and an answer specific to users of Bitcoin Core (versions 0.10.0 or higher).

Generic version

Rather than directly answer your question with an answer that would become outdated within a few minutes as the next block was discovered, here's a general way you can look up the current number of blocks in the blockchain:

  1. Go to this list of blockchain explorers.

  2. Choose one (or choose several) and visit its website.

  3. Almost all of them on their main page display the heights of recent blocks.

  4. The height of a block is how many blocks there are before that block on the blockchain, so take the height of the highest block and add one—that's how many blocks there are on the blockchain.

Please note that it's not uncommon for blockchain explorers to be wrong about various facts, including the height of the highest valid block. Visiting several sites decreases your risk of getting bad information without realizing it—if different sites disagree about the height by more than a single block, you'll know something is wrong.

For Bitcoin Core users

The getblockchaininfo RPC includes both the height of the highest downloaded block and the height of the highest valid-looking downloaded header. On a fast connection, Bitcoin Core will typically download all the headers within two minutes of the time it is first started, so this number of headers is usually the total number of blocks on the best blockchain (minus one, since counting starts from zero).

{
  "chain": "main",
  "blocks": 381466,
  "headers": 381466,

The first few lines of getblockchaininfo on a fully-synced node

It's important to node that the headers count can conceivably go down if Bitcoin Core discovers the blocks that are supposed to be attached to those headers are invalid. This most recently happened during the 4 July 2015 fork (although 0.10.0 and later Bitcoin Core nodes were unaffected) and it could also happen if there's a hard fork attempt that has the support of the majority of the network hash rate.

In Bitcoin Core GUI (Bitcoin-Qt), you can run the getblockchaininfo RPC by going to Help menu -> Debug item -> Console tab, and then typing in:

getblockchaininfo
2
  • Just in general I'm not sure querying multiple block explorers really decreases your chance of them being wrong, simply comparing the "balance" field for a given address will more than likely give you completely unique results on most of them.
    – Claris
    Nov 1, 2015 at 1:14
  • @Bitcoin True. I clarified that section; doing that made me realize that there's a simpler method possible using just Bitcoin Core, so I added that to the answer. Thanks! Nov 1, 2015 at 3:40
3

As of October 31, 2015, 6:48 PM UTC, there are 381435 blocks.

-1

As of September 20, 2016. 10:16PM CST. There are 430756 blocks.

1
  • -1 Jimmy's answer was somewhat useful, as it directly addressed the asker's question when the question was asked. This answer now is just already outdated two hours later.
    – Murch
    Sep 21, 2016 at 6:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.