Updated on May 19, 2021
Migrate the database
As of v21.5.0, new Teku installations use a LevelDB2 database. Previous Teku versions use RocksDB which continue to be supported.
LevelDB2 databases use less memory and are proven to be more stable with Teku. Users can migrate Teku nodes running a RocksDB database to a LevelDB2 database if the Teku node runs in pruning mode.
Teku nodes running in archive mode have to resync from genesis to migrate. Tools to migrate existing databases will be provided in future releases.
To migrate a RocksDB database in pruning mode to a LevelDB2 database:
Download the latest finalized state from a beacon chain node:
curl -o state.ssz -H 'Accept: application/octet-stream' http://other-node:5051/eth/v1/debug/beacon/states/finalized
This step is optional, you can also supply the finalized checkpoint state via URL from a beacon chain node or Infura when restarting Teku in the step below.
Stop the Teku node you intend to migrate.
beacondirectory in your data path.
Ensure not to delete the
validatordirectory if one is present as this contains your slashing protection data.
Restart Teku and specify the downloaded finalized state using the
Teku creates a LevelDB2 database, and starts from the specified recent state. Teku should be in sync and validating within minutes.