<p>The size of the blockchain on disk can vary depending on how many stale blocks your node has seen. Stale blocks are not part of the main chain, but they are still stored on disk by your node. A new node will have fewer stale blocks than an old, long running, node. Well connected nodes are more likely to see stale blocks than less well connected nodes. So it is possible that your node simply has not seen as many stale blocks as other people's nodes.</p>

CC BY-SA 4.0
2020-02-25T07:26:35.280Z
Thanks, that makes sense, since my node is probably a very peripheral one and also this specific instance has only been running for around 3 months
bitdov
CC BY-SA 4.0
2020-02-25T02:41:54.390Z
2020-02-25T02:41:54.390Z
Ava Chow
<p>The difference in size is due to the number of stale blocks that your node stores. Stale blocks are blocks that once formed the part of the main chain but is not belong to the main chain now.</p>

<p>For example, if say two blocks are mined at height 102 at the same time. When the miner relays the block through the gossip network, the network that is closer to miner 1 will receive its block (102a) first as compared to block mined by miner 2 (102b). Bitcoin core adds the first received valid block to the tip of the chain. The blocks received at the same height after that are not deleted but kept in the database just in case a reorganization happens. So, if the next block 103 is mined on top of block 102b then the node that received 102a first will reorganize its chain to one that contains 102b as shown below.</p>

<pre><code>101 --&gt;102a 
    \
     \     
       102b --&gt; 103 --&gt;104
</code></pre>

<p>Bitcoin Core does not delete any valid block that it receives from its peers. It is stored in your database forever in the file <code>blocks/blk****.dat</code> (which is also same for blocks in the main chain). However, the software does not relay stale blocks. In order to receive stale blocks, you need to be online at the time when your peer broadcasted a block to you from different chain view. Peers will only broadcast those blocks that they view form the current active chain from their perspective. So you will only have the stale blocks that you received when you were online. This also mean you will need to be connected to peers that view one the tip of the chain that is different from other peers. Due to this variability, many nodes will have different view of the sizes of the Bitcoin blockchain</p>

CC BY-SA 4.0
2020-02-25T07:32:32.110Z
Thanks for the detailed explanation. To sum up, it would be correct to assume that the longer I'm online, the closest I'm to miners, and the better my connectivity with other peers - the more stale blocks I will be storing and the higher my size_on_disk will be?
bitdov
CC BY-SA 4.0
2020-02-25T07:38:49.587Z
@bitdov yes, that would be a correct way to think of it. More your connectivity the higher the stale blocks you will receive.
Ugam Kamat
CC BY-SA 4.0
2020-02-25T06:22:50.613Z
2020-02-25T09:33:20.077Z
2020-02-25T09:33:20.077Z
Ugam Kamat
<p>The <code>size_on_disk</code> printed when executing <code>getblockchaininfo</code> is 1.2 GB smaller than other nodes are reporting at the same time/block.</p>

<p>txindex=1</p>

<p>What could it be??
I've asked to other peers on twitter to check if anyone else experiencing the same and everyone has more data in their ledger than me. (<a href="https://twitter.com/bitdov/status/1231915231368163328" rel="nofollow noreferrer">https://twitter.com/bitdov/status/1231915231368163328</a>)</p>

<p>Here's all the info printed with getblockchaininfo on my node:</p>

<pre><code>{
  "chain": "main",
  "blocks": 618824,
  "headers": 618824,
  "bestblockhash": "0000000000000000000a1fb0ec42e380215bb58698a1321d2953ee5d1b7b                                                                                                                                                  685d",
  "difficulty": 15546745765529.37,
  "mediantime": 1582569829,
  "verificationprogress": 0.9999950821417113,
  "initialblockdownload": false,
  "chainwork": "00000000000000000000000000000000000000000cfea65b1b3c9262e87778b8                                                                                                                                                  ",
  "size_on_disk": 299006763199,
  "pruned": false,
  "softforks": {
    "bip34": {
      "type": "buried",
      "active": true,
      "height": 227931
    },
    "bip66": {
      "type": "buried",
      "active": true,
      "height": 363725
    },
    "bip65": {
      "type": "buried",
      "active": true,
      "height": 388381
    },
    "csv": {
      "type": "buried",
      "active": true,
      "height": 419328
    },
    "segwit": {
      "type": "buried",
      "active": true,
      "height": 481824
    }
  },
  "warnings": ""
}
</code></pre>

CC BY-SA 4.0
2020-02-24T19:30:16.717Z
Running Satoshi 0.19.0.1
protocolversion 70015
bitdov
<bitcoin-core><nodes><full-node>
Why do two different fully synced Bitcoin Core nodes differ in the blockchain size?
bitdov
# Why do two different fully synced Bitcoin Core nodes differ in the blockchain size?

(Asked by: username_0 on 2020-02-24)

The `size_on_disk` printed when executing `getblockchaininfo` is 1.2 GB smaller than other nodes are reporting at the same time/block.

txindex=1

What could it be??
I've asked to other peers on twitter to check if anyone else experiencing the same and everyone has more data in their ledger than me. (<https://twitter.com/username_0/status/1231915231368163328>)

Here's all the info printed with getblockchaininfo on my node:

```
{
  "chain": "main",
  "blocks": 618824,
  "headers": 618824,
  "bestblockhash": "0000000000000000000a1fb0ec42e380215bb58698a1321d2953ee5d1b7b                                                                                                                                                  685d",
  "difficulty": 15546745765529.37,
  "mediantime": 1582569829,
  "verificationprogress": 0.9999950821417113,
  "initialblockdownload": false,
  "chainwork": "00000000000000000000000000000000000000000cfea65b1b3c9262e87778b8                                                                                                                                                  ",
  "size_on_disk": 299006763199,
  "pruned": false,
  "softforks": {
    "bip34": {
      "type": "buried",
      "active": true,
      "height": 227931
    },
    "bip66": {
      "type": "buried",
      "active": true,
      "height": 363725
    },
    "bip65": {
      "type": "buried",
      "active": true,
      "height": 388381
    },
    "csv": {
      "type": "buried",
      "active": true,
      "height": 419328
    },
    "segwit": {
      "type": "buried",
      "active": true,
      "height": 481824
    }
  },
  "warnings": ""
}

```

**Tags:** bitcoin-core, nodes, full-node

> **Comments:**
> **username_0**: Running Satoshi 0.19.0.1 protocolversion 70015  

---

## 2 answers

### Answer by username_2 on 2020-02-25. Score: 4 | Accepted answer

The difference in size is due to the number of stale blocks that your node stores. Stale blocks are blocks that once formed the part of the main chain but is not belong to the main chain now.

For example, if say two blocks are mined at height 102 at the same time. When the miner relays the block through the gossip network, the network that is closer to miner 1 will receive its block (102a) first as compared to block mined by miner 2 (102b). Bitcoin core adds the first received valid block to the tip of the chain. The blocks received at the same height after that are not deleted but kept in the database just in case a reorganization happens. So, if the next block 103 is mined on top of block 102b then the node that received 102a first will reorganize its chain to one that contains 102b as shown below.

```
101 -->102a 
    \
     \     
       102b --> 103 -->104

```

Bitcoin Core does not delete any valid block that it receives from its peers. It is stored in your database forever in the file `blocks/blk****.dat` (which is also same for blocks in the main chain). However, the software does not relay stale blocks. In order to receive stale blocks, you need to be online at the time when your peer broadcasted a block to you from different chain view. Peers will only broadcast those blocks that they view form the current active chain from their perspective. So you will only have the stale blocks that you received when you were online. This also mean you will need to be connected to peers that view one the tip of the chain that is different from other peers. Due to this variability, many nodes will have different view of the sizes of the Bitcoin blockchain

> **Comments:**
> **username_0**: Thanks for the detailed explanation. To sum up, it would be correct to assume that the longer I'm online, the closest I'm to miners, and the better my connectivity with other peers - the more stale blocks I will be storing and the higher my size_on_disk will be?  
> **username_2**: @username_0 yes, that would be a correct way to think of it. More your connectivity the higher the stale blocks you will receive.  

---

### Answer by username_1 on 2020-02-25. Score: 4

The size of the blockchain on disk can vary depending on how many stale blocks your node has seen. Stale blocks are not part of the main chain, but they are still stored on disk by your node. A new node will have fewer stale blocks than an old, long running, node. Well connected nodes are more likely to see stale blocks than less well connected nodes. So it is possible that your node simply has not seen as many stale blocks as other people's nodes.

> **Comments:**
> **username_0**: Thanks, that makes sense, since my node is probably a very peripheral one and also this specific instance has only been running for around 3 months  

---

