1

I am using Kadena's devnet for integration testing. Unfortunately, every time I start up devnet it begins from scratch, with no history, and it takes a long time (more than an hour) to become usable. As described in the README:

If you are starting from a fresh database, you may wish to wait for the block height of each chain to pass the latest feature fork for devnet. As of 2.15, this is a height of 165. It takes an hour or so to reach this from scratch.

This sounds like I can avoid my issue with long startup times by beginning from an already-populated database. The database is deleted every time docker compose is terminated, but the README states that this can be avoided with a devnet.yaml file:

Node restarts without deleting the database can be performed by defining nodes in devnet.yaml that store the database on a named value or on the host.

However, there is no example devnet.yaml file in the devnet repository, and I don't know what I should write in this file to make snapshots appropriately. How do I snapshot the database using a devnet.yaml file so that I can restart devnet at a block height of at least 165?

trh
  • 171
  • 6

2 Answers2

1

We're hoping to make the forks on devnet manually controlled rather than triggering them at fixed block heights. In the meantime, the database (by default) is located in the db-server-db Docker volume, and you can copy it out of there.

0

If you use docker compose down your database will be reset, so I prefer to stop the docker with docker compose stop.

I haven't tried taking snapshots with devnet.yaml.

bart
  • 21
  • 4
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 11 '22 at 01:09