<p>The <code>initialblockdownload</code> field in the output of the <code>getblockchaininfo</code> RPC reports the internal &quot;IsInitialBlockDownload&quot; state of the node software.</p>
<p>The value of this state is always <code>true</code> at startup, and latches to <code>false</code> whenever both of these conditions are true:</p>
<ul>
<li>The currently active chain has at least as much cumulative PoW as the hardcoded constant in the software (updated every major release).</li>
<li>The timestamp of the currently active tip is no more than 24 hours in the past.</li>
</ul>
<p>Whenever the IsInitialBlockDownload state latches to <code>false</code>, it never reverts to <code>true</code> (unless restarted).</p>

CC BY-SA 4.0
2024-03-08T15:44:22.640Z
What would happen if your node was running but had no connection to another node? Wouldn’t it revert to `initialblockdownload: false` after 24h?
Murch
CC BY-SA 4.0
2024-03-08T16:08:40.873Z
@Murch No, it never reverts to `false` unless restarted (as of Bitcoin Core 26.x). I don't think there would be anything wrong with reverting in such a scenario, but I also don't think it adds much.
Pieter Wuille
CC BY-SA 4.0
2024-03-26T20:17:54.177Z
This one-way behavior also has the advantage that once `initialblockdownload` becomes `false` (actually, `ChainstateManager::m_cached_finished_ibd` becomes `true`), this state can be reported to other software without locking `cs_main`. This improves system performance, since this state is queried often.
Larry Ruane
CC BY-SA 4.0
2024-03-07T21:11:42.437Z
2024-03-07T21:26:50.447Z
2024-03-07T21:26:50.447Z
Pieter Wuille
<p>Let's say I have a fully synced node that returns <code>&quot;initialblockdownload&quot;: false</code>. If I turn it off, will it show <code>&quot;initialblockdownload&quot;: true</code> when I start the node again? In other words, if initialblockdownload is false, will it be set to true again if the node needs to resync?</p>

<bitcoin-core><json-rpc><synchronization>
How does the initialblockdownload field in the getblockchaininfo RPC work?
sanket1729
# How does the initialblockdownload field in the getblockchaininfo RPC work?

(Asked by: username_0 on 2024-03-07)

Let's say I have a fully synced node that returns `"initialblockdownload": false`. If I turn it off, will it show `"initialblockdownload": true` when I start the node again? In other words, if initialblockdownload is false, will it be set to true again if the node needs to resync?

**Tags:** bitcoin-core, json-rpc, synchronization


---

## 1 answers

### Answer by username_1 on 2024-03-07. Score: 5 | Accepted answer

The `initialblockdownload` field in the output of the `getblockchaininfo` RPC reports the internal "IsInitialBlockDownload" state of the node software.

The value of this state is always `true` at startup, and latches to `false` whenever both of these conditions are true:

* The currently active chain has at least as much cumulative PoW as the hardcoded constant in the software (updated every major release).
* The timestamp of the currently active tip is no more than 24 hours in the past.

Whenever the IsInitialBlockDownload state latches to `false`, it never reverts to `true` (unless restarted).

> **Comments:**
> **username_2**: What would happen if your node was running but had no connection to another node? Wouldn’t it revert to `initialblockdownload: false` after 24h?  
> **username_1**: @username_2 No, it never reverts to `false` unless restarted (as of Bitcoin Core 26.x). I don't think there would be anything wrong with reverting in such a scenario, but I also don't think it adds much.  
> **username_3**: This one-way behavior also has the advantage that once `initialblockdownload` becomes `false` (actually, `ChainstateManager::m_cached_finished_ibd` becomes `true`), this state can be reported to other software without locking `cs_main`. This improves system performance, since this state is queried often.  

---

