Skip to content

Conversation

@praetoriansentry
Copy link
Member

This change is adding a toJson() method to the Config class and using the Json representation of the Config in order to print.

At a high-level, printing the config in Json format has a few potential advantages:

  • It's a bit easier to verify the loaded configuration against the config file since they're both machine readable
  • It's a nice feature to be able to dump the default config.
    • echo "{}" > empty.json; ./build/zkProver -c empty.json will now print out the defaults that can be copy pasted into a new file and the tweaked
  • I'm hopeful that this is easier to maintain going forward because the toJson() method is just a copy paste / macro of the load(json &config) method
  • The method itself could be useful in other future scenarios where the config needs to be serialized for some reason

@cla-bot
Copy link

cla-bot bot commented Oct 11, 2023

We require contributors/corporates @praetoriansentry to read our Contributor License Agreement, please check the Individual CLA document/Corporate CLA document

@cla-bot cla-bot bot added the cla-signed label Oct 16, 2023
@praetoriansentry praetoriansentry marked this pull request as ready for review October 16, 2023 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants