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

Split config into genesis config and mutable config #3348

Closed
lrettig opened this issue Jul 11, 2022 · 0 comments
Closed

Split config into genesis config and mutable config #3348

lrettig opened this issue Jul 11, 2022 · 0 comments

Comments

@lrettig
Copy link
Member

lrettig commented Jul 11, 2022

Description

Right now, we have a single config file (config.toml by default) containing a number of sections. Some of these sections contain data that the node operator can update at-will, e.g., NTP server list, API config, and logging section. Some sections should not be updated unilaterally by a node operator but could conceivably change in a coordinated fashion post-genesis, e.g., HARE config. Other sections contain things that can never change post-genesis, e.g., main.genesis-time and main.golden-atx, and the entire genesis section (containing genesis accounts and balances). Some of the beacon and tortoise sections of the config should probably not be able to change after genesis, we need to double check this. (For now, we'll leave alone the second class of config items, those that should not be updated unilaterally; we may want to revisit this in future.)

The task: split out immutable, genesis-related config items from the main BaseConfig object and move them into the Genesis config object. Split this from config.toml and move it into a new standalone genesis.toml file.

Every time the node starts, check that the genesis config has not changed (and panic/refuse to start if it has): this may involve saving a hash of the config to the database, something along these lines.

Affected code

  • api/config/genesis.go
  • cmd/node/node.go
  • config/config.go
  • config.toml

See also:

This issue appears in commit hash: 5eb9998

@WilfredTA WilfredTA mentioned this issue Aug 22, 2022
19 tasks
@pigmej pigmej closed this as not planned Won't fix, can't repro, duplicate, stale Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants