<p>As of the latest Bitcoin Core release (25.0) and the upcoming 26.0 one, yes, reorganized blocks are retained indefinitely if pruning is not enabled, and they remain accessible through <code>getblock</code> and <code>getrawtransaction</code> (the latter only with txindex enabled). Note that <code>gettransaction</code> is a wallet RPC, which is entirely unrelated to the node's blockchain data.</p>
<p>Old blocks (regardless of whether they have been reorganized out or not) are only deleted through pruning.</p>

CC BY-SA 4.0
2023-10-13T17:04:48.240Z
2023-10-13T17:43:33.497Z
2023-10-13T17:43:33.497Z
Pieter Wuille
<p>In the context of a fully indexed, non-pruned Bitcoin Core node, I am exploring the duration and persistence of data related to disconnected blocks and their contained transactions due to a blockchain reorganization. Specifically, my query revolves around whether such data is retained indefinitely on disk by default, or if it is subject to any expiration or automatic deletion after a certain period.</p>
<p>Additionally, I am interested in understanding the usability of RPC methods, such as <code>getblock</code> and <code>gettransaction</code>, with respect to retrieving information about blocks and transactions that have become disconnected due to reorganization events. Is it always possible to utilize these methods to access data about such entities, or are there circumstances or timeframes post-reorganization that could limit this capability?</p>

<bitcoin-core><json-rpc><chain-reorganization><stale-block>
Retention and Accessibility of Disconnected Block and Transaction Data
Jeff Trimmer
# Retention and Accessibility of Disconnected Block and Transaction Data

(Asked by: username_0 on 2023-10-13)

In the context of a fully indexed, non-pruned Bitcoin Core node, I am exploring the duration and persistence of data related to disconnected blocks and their contained transactions due to a blockchain reorganization. Specifically, my query revolves around whether such data is retained indefinitely on disk by default, or if it is subject to any expiration or automatic deletion after a certain period.

Additionally, I am interested in understanding the usability of RPC methods, such as `getblock` and `gettransaction`, with respect to retrieving information about blocks and transactions that have become disconnected due to reorganization events. Is it always possible to utilize these methods to access data about such entities, or are there circumstances or timeframes post-reorganization that could limit this capability?

**Tags:** bitcoin-core, json-rpc, chain-reorganization, stale-block


---

## 1 answers

### Answer by username_1 on 2023-10-13. Score: 3 | Accepted answer

As of the latest Bitcoin Core release (25.0) and the upcoming 26.0 one, yes, reorganized blocks are retained indefinitely if pruning is not enabled, and they remain accessible through `getblock` and `getrawtransaction` (the latter only with txindex enabled). Note that `gettransaction` is a wallet RPC, which is entirely unrelated to the node's blockchain data.

Old blocks (regardless of whether they have been reorganized out or not) are only deleted through pruning.


---

