<blockquote>
<ul>
<li>The prefix for transactions was changed from <code>b'c'</code> to <code>b'C'</code>.</li>
</ul>
<p>Is there any specific reason for changing the prefix?</p>
</blockquote>
<p>The entry changed to a new data structure. However in order to be able to upgrade previous database versions to the new one, we need to be able to identify which entry corresponds to the old structure and which corresponds to the new structure. So a different prefix is used.</p>
<blockquote>
<ul>
<li>The <code>nVersion</code> field was dropped from the database.</li>
</ul>
<p>On the other hand, and regarding the version field, it was always set to the same value for every entry (can't recall if 1 or 0), so dropping it seems the right thing to do but, why was it included in first place?</p>
</blockquote>
<p><code>nVersion</code> is the transaction version. It should have been either 1 or 2 as those are the only transaction versions used on the network with version 1 being the most common.</p>

CC BY-SA 3.0
2017-10-24T16:02:49.203Z
Right, but then what was the purpose of storing the version in the first place, and why is no longer necessary?
sr_gi
CC BY-SA 3.0
2017-10-24T18:03:00.247Z
I'm not sure that the version was even used in the first place. It was probably stored because it was thought that it might be useful in the future.
Ava Chow
CC BY-SA 3.0
2017-10-24T15:56:06.833Z
2017-10-24T15:56:06.833Z
2020-06-16T11:10:03.350Z
Ava Chow
<p>Recently updated my LevelDB parser to work with the new LevelDB 0.15 internal structure. However, I'm wondering about two small changes I found:</p>

<ul>
<li><p>The prefix for transactions was changed from <code>b'c'</code> to <code>b'C'</code>.</p></li>
<li><p>The <code>nVersion</code> field was dropped from the database.</p></li>
</ul>

<p>Is there any specific reason for changing the prefix? </p>

<p>On the other hand, and regarding the version field, it was always set to the same value for every entry (can't recall if 1 or 0), so dropping it seems the right thing to do but, why was it included in first place?</p>

<bitcoin-core><leveldb>
Chainstate Bitcoin Core 0.15
sr_gi
# Chainstate Bitcoin Core 0.15

(Asked by: username_0 on 2017-10-24)

Recently updated my LevelDB parser to work with the new LevelDB 0.15 internal structure. However, I'm wondering about two small changes I found:

* The prefix for transactions was changed from `b'c'` to `b'C'`.
* The `nVersion` field was dropped from the database.

Is there any specific reason for changing the prefix?

On the other hand, and regarding the version field, it was always set to the same value for every entry (can't recall if 1 or 0), so dropping it seems the right thing to do but, why was it included in first place?

**Tags:** bitcoin-core, leveldb


---

## 1 answers

### Answer by username_1 on 2017-10-24. Score: 1 | Accepted answer

> * The prefix for transactions was changed from `b'c'` to `b'C'`.
>
> Is there any specific reason for changing the prefix?

The entry changed to a new data structure. However in order to be able to upgrade previous database versions to the new one, we need to be able to identify which entry corresponds to the old structure and which corresponds to the new structure. So a different prefix is used.

> * The `nVersion` field was dropped from the database.
>
> On the other hand, and regarding the version field, it was always set to the same value for every entry (can't recall if 1 or 0), so dropping it seems the right thing to do but, why was it included in first place?

`nVersion` is the transaction version. It should have been either 1 or 2 as those are the only transaction versions used on the network with version 1 being the most common.

> **Comments:**
> **username_0**: Right, but then what was the purpose of storing the version in the first place, and why is no longer necessary?  
> **username_1**: I'm not sure that the version was even used in the first place. It was probably stored because it was thought that it might be useful in the future.  

---

