RuntimeError: BlockStore does not support database schema v1 on chia 2.1

So I upgraded to chia 2.1 today. I’m using the source method, so I have the repository cloned, and I have the “latest” branch checked out and I did the updates like I normally do (as described in the wiki) But now when I go to start up the farmer with chia start farmer. I get an error complaining about how version 1 of the DB is not supported. I moved over to version 2 of the db long ago. So any idea what is up ? And how to get his fixed ?

File "/home/jhp/chia-blockchain/venv/bin/chia_full_node", line 8, in <module>
    sys.exit(main())
  File "/home/jhp/chia-blockchain/chia/server/start_full_node.py", line 121, in main
    return async_run(coro=async_main(service_config), connection_limit=target_peer_count)
  File "/home/jhp/chia-blockchain/chia/server/start_service.py", line 318, in async_run
    return asyncio.run(coro)
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/home/jhp/chia-blockchain/chia/server/start_full_node.py", line 104, in async_main
    await service.run()
  File "/home/jhp/chia-blockchain/chia/server/start_service.py", line 223, in run
    await self.start()
  File "/home/jhp/chia-blockchain/chia/server/start_service.py", line 182, in start
    await self._node._start()
  File "/home/jhp/chia-blockchain/chia/full_node/full_node.py", line 351, in _start
    self._block_store = await BlockStore.create(self.db_wrapper)
  File "/home/jhp/chia-blockchain/chia/full_node/block_store.py", line 49, in create
    raise RuntimeError(f"BlockStore does not support database schema v{db_wrapper.db_version}")
RuntimeError: BlockStore does not support database schema v1Here is the traceback long when I start the farmer

I’m still on 2.0 but sounds like your Chia config file may have been still referencing v1 DB. Note that after v1 to v2 upgrade the old DB is left in the DB folder and you need to delete it manually if you no longer want to keep it.

What I would do in your place is to backup and remove your ~/.chia/ home folder then init the install from scratch while using your existing CA cert from backup and reimport your private keys from nemonics. This should get you a clean instal. You can stop Chia and move the old blockcain DB to speed up the sync.

So as a follow up, it seems that I had a v1 database in a file with a v2 name, and version 2.1 would no longer tolerate that. Makes sense as it doesn’t really care about the name, but the data in the database is where it would figure out what version it was. The mystery is how did I get a v1 database in there in the first place as I did go though the database update process. My assumption is that at some point it got corrupted and I downloaded a v1 database to jump start a sync, but accidentally named it with a v2 name. So I downloaded the 10/1 database from the chia torrent (which is a v2) and all is well again.

2 Likes