Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

store state for any # of networks #235

Merged
merged 2 commits into from
Nov 22, 2022
Merged

Conversation

dan-da
Copy link

@dan-da dan-da commented Nov 17, 2022

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.

Addresses kindelia#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.
@developedby
Copy link
Contributor

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

@dan-da dan-da changed the base branch from master to dev November 17, 2022 15:53
@dan-da
Copy link
Author

dan-da commented Nov 17, 2022

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

Addresses kindelia#163

node.network setting is now specified on a per network basis, eg:

   [node.network.0xCAFE0004]
   initial_peers = [
      "64.227.110.69",
      "188.166.3.140",
   ]

   [node.network.0xCAFE0005]
   initial_peers = [
     ...
   ]

Additionally:
* updated default.toml to use the new config syntax
* AppSettings::prop is now a String instead of &'static str
* fixed a typo in error string
@dan-da dan-da marked this pull request as ready for review November 18, 2022 03:20
@steinerkelvin steinerkelvin requested a review from racs4 November 18, 2022 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants