Skip to content

Configuration Overhaul RFC#3

Merged
0x009922 merged 3 commits intohyperledger-iroha:mainfrom
0x009922:config-overhaul
Oct 2, 2023
Merged

Configuration Overhaul RFC#3
0x009922 merged 3 commits intohyperledger-iroha:mainfrom
0x009922:config-overhaul

Conversation

@0x009922
Copy link
Copy Markdown
Contributor

@0x009922 0x009922 commented Sep 11, 2023

Rendered


Original PR:

Checklist

  • Tech writers review
  • Make a note about migration (context)
  • Address handling of dev-related fields (context)

Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>
@0x009922 0x009922 self-assigned this Sep 11, 2023
@0x009922 0x009922 changed the title Configuration Overhaul RFC - Configuration Overhaul Sep 11, 2023
@0x009922 0x009922 changed the title RFC - Configuration Overhaul Configuration Overhaul RFC Sep 11, 2023
@mversic
Copy link
Copy Markdown

mversic commented Sep 12, 2023

I think we should also add a way to inject private parameters in a configuration. Those parameters should start with an underscore and should never be a part of our public API contract (and would most likely be only used during testing). If any user depends on this parameter it's on their own responsibility.

A good example of such a parameter is sumeragi::debug_force_soft_fork which, according to what I wrote, should be sumeragi::_force_soft_fork. No user would or should ever use this parameter unless he is an Iroha developer

@0x009922
Copy link
Copy Markdown
Contributor Author

@mversic, I thought about this topic too when faced those several parameters "for development/debugging/testing purposes". Agreed that they should not be a part of our public API.

As for the format, I have some alternatives. IMO, using named nested sections for it might be more explicit:

[sumeragi.debug]
force_soft_fork = true

[kura.debug]
output_new_blocks = true

Another way might be to have an entirely separate debug section with all of the parameters:

[debug]
sumeragi.force_soft_fork = true
kura.output_new_blocks = true

Not sure what keyword to use for it: dev, debug, test, unstable, or something else?

- Include dev-only fields
- Include migration tool mention
- Include human-readable types proposal
- Remove "dual view" proposal as extra

Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>
@0x009922
Copy link
Copy Markdown
Contributor Author

New changes:

  • Combined a proposal "reconsider parameter naming conventions", which includes snake_case, dev fields ("private" fields), and more renaming samples.
  • Added a brief proposal for human-readable types
  • Removed "dual view" proposal
  • In the implementation plan, include a migration tool development

Signed-off-by: Dmitry Balashov <a.marcius26@gmail.com>
@0x009922 0x009922 merged commit 01d8831 into hyperledger-iroha:main Oct 2, 2023
@0x009922 0x009922 deleted the config-overhaul branch October 2, 2023 08:46
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.

2 participants