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

Migrate config.json to reference and override files in TOML format #1878

Closed
zhyatt opened this issue Apr 5, 2019 · 4 comments

Comments

@zhyatt
Copy link
Collaborator

commented Apr 5, 2019

This ticket is an overview of the plans for upgrading the configuration file from a single config.json to reference and override files in TOML format. The following updates are in scope:

  • Creation of a TOML file containing default configuration values for reference (not used by the node)
  • Creation of a TOML file for updating with override configuration values
  • Node will validate override file when attempting to load and return errors for any improper formatting or out of scope settings/values
  • Node will not write to any configuration file during operation
  • Addition of CLI commands for dumping reference and currently loaded override configuration files
  • Upgrade path for converting existing config.json file to override TOML file
@jcraigk

This comment has been minimized.

Copy link

commented Jun 25, 2019

Was YML considered? Just curious on thoughts around potential tradeoffs.

@cryptocode

This comment has been minimized.

Copy link
Collaborator

commented Jun 26, 2019

YAML was indeed considered and it was a close race. We use YAML for the protocol spec and are familiar with at least some of the tradeoffs. YAML is a complex spec and parsers have a history of issues with getting the fine points right, and there are some usability issues.

In short, TOML seems more end-user friendly as a config format; editing a simple ini-like format is easier to get right than having to deal with issues like invalid indentation. This is a semantics issue as well as syntax. This is especially relevant when you have user-override files - replicating the config indentation is error prone.

We also want to be generous with multiline comments, and I think that works best in a format that doesn't enforce indentation. It's also used by other crypto projects, like Ethereum.

@zhyatt zhyatt added this to Unscheduled in V20 Jul 3, 2019
@zhyatt

This comment has been minimized.

Copy link
Collaborator Author

commented Jul 5, 2019

@cryptocode Keep in mind #1733 with the config file changes

@cryptocode

This comment has been minimized.

Copy link
Collaborator

commented Aug 28, 2019

Closed by #2221

@cryptocode cryptocode closed this Aug 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
V20
Unscheduled
3 participants
You can’t perform that action at this time.