# Testnet error: First block in database is not block 310000

**URL:** <https://forums.counterparty.io/t/testnet-error-first-block-in-database-is-not-block-310000/610>\
**Category:** Counterwallet\
**Created:** [December 8, 2014, 9:52am UTC](https://forums.counterparty.io/t/testnet-error-first-block-in-database-is-not-block-310000/610 "2014-12-08T09:52:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![something](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/something/32/240_2.png) [@something](https://forums.counterparty.io/u/something)\
**Post date:** [December 8, 2014, 9:52am UTC](https://forums.counterparty.io/t/testnet-error-first-block-in-database-is-not-block-310000/610/1 "2014-12-08T09:52:35Z")

</div>

I'm posting this just in case someone googles for this error.

Error like below happens if you upgrade to 9.48 develop (later master, too) and try to start counterpartyd on testnet.

Reason: starting from a recent update you need to recreate your **testnet** DB and all Counterparty **testnet** assets you may have had before (why, it's explained on Github, see closed issues for&nbsp;counterpartyd).&nbsp;

Fix: move your counterpartyd DB (counterpartyd.9.testnet.db)&nbsp;to another directory and restart counterpartyd server on testnet and give counterpartyd 10-15 mins to recreate the DB. (You do not need to delete Bitcoin testnet data).

  

Traceback (most recent call last):

&nbsp; File "C:\\counterpartyd\_build\\dist\\counterpartyd\\counterpartyd.py", line 931, i

n 

&nbsp; &nbsp; blocks.reparse(db)

&nbsp; File "C:\\counterpartyd\_build\\dist\\counterpartyd\\lib\\blocks.py", line 607, in r

eparse

&nbsp; &nbsp; reinitialise(db, block\_index)

&nbsp; File "C:\\counterpartyd\_build\\dist\\counterpartyd\\lib\\blocks.py", line 577, in r

einitialise

&nbsp; &nbsp; initialise(db)

&nbsp; File "C:\\counterpartyd\_build\\dist\\counterpartyd\\lib\\blocks.py", line 184, in i

nitialise

&nbsp; &nbsp; raise exceptions.DatabaseError('First block in database is not block {}.'.fo

rmat(config.BLOCK\_FIRST))

lib.exceptions.DatabaseError: First block in database is not block 310000.

---

<div class="post-metadata">

**Author:** ![something](https://yyz2.discourse-cdn.com/flex004/user_avatar/forums.counterparty.io/something/32/240_2.png) [@something](https://forums.counterparty.io/u/something)\
**Post date:** [January 1, 2016, 9:18am UTC](https://forums.counterparty.io/t/testnet-error-first-block-in-database-is-not-block-310000/610/2 "2016-01-01T09:18:41Z")

</div>

Funny, I encountered this again more than a year later, and found my own post (which I had forgotten about).

So, this happened on yet-to-be released 9.53.0 (the current `develop` branch).

I am running on testnet, so I just deleted my `counterparty.testnet.db` and restarted.

Normally users would run a newer version only after it’s been released, and by then the fastest way to get the latest DB is to bootstrap:

`$ counterparty-server [--testnet] bootstrap`

In case your DB isn’t in the default location, after you run `bootstrap` you’d have to move the extracted DB file to location specified in `database-file=` (see your counterparty server configuration file `server[testnet].conf`).
