kindelia / Kindelia

An efficient, secure cryptocomputer
https://kindelia.org/
603 stars 39 forks source link

store state for any # of networks #235

Closed dan-da closed 1 year ago

dan-da commented 1 year ago

Addresses #163

Previously chain state was stored under a path such as:

~/.kindelia/state/{blocks,heaps}

With this change, the data is stored at:

~/.kindelia/state/<network_id>/{blocks,heaps}

This enables for example flipping back and forth between a testnet and mainnet just by changing network_id in the config, or even via cli arg.


notes:

  1. --network_id is now a kindelia node param rather than kindelia node start. This is because it also applies to node clean.
  2. I have not yet implemented the suggested config changes. I will work on that next.
developedby commented 1 year ago

You probably wanted to merge this into dev and not into master

dan-da commented 1 year ago

@developedby yeah I just changed it to dev, thx.