Skip to content

Refactor conf with flatten#7761

Draft
nitely wants to merge 1 commit intostatus-im:unstablefrom
nitely:nitely_conf_flatten_refactor
Draft

Refactor conf with flatten#7761
nitely wants to merge 1 commit intostatus-im:unstablefrom
nitely:nitely_conf_flatten_refactor

Conversation

@nitely
Copy link
Copy Markdown
Contributor

@nitely nitely commented Nov 28, 2025

Changes:

  • Pack metric opts into MetricsConf
  • Pack keymanager opts into keyManagerApiConf
  • Pack restRequestTimeout, restMaxRequestBodySize, restMaxRequestHeadersSize into RestApiConf. But this could be passed individually instead.
  • Small initKeymanagerServer change to avoid passing rest opts.
  • Clean up no longer needed defaultValueDesc
  • Bumped nim-confutils to Fixes #114; Allow flattening options in objects nim-confutils#118

Beware this contains breaking changes; needs status-im/nimbus-eth1#3848 to be merged after to solve them.

@nitely nitely requested a review from arnetheduck November 28, 2025 10:10
@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 28, 2025

Unit Test Results

       12 files  ±0    2 508 suites  ±0   54m 43s ⏱️ - 8m 5s
13 064 tests ±0  12 517 ✔️ ±0  547 💤 ±0  0 ±0 
66 116 runs  ±0  65 406 ✔️ ±0  710 💤 ±0  0 ±0 

Results for commit 3855b82. ± Comparison against base commit 737dcbe.

♻️ This comment has been updated with latest results.

@nitely nitely force-pushed the nitely_conf_flatten_refactor branch from 1954583 to a2846fd Compare November 28, 2025 12:42
@cheatfate
Copy link
Copy Markdown
Contributor

If you going to refactor configs it would be nice if you split all the configs between parts, because when VC builds it imports whole BN codebase just because of the conf.nim. So it would be nice to have some module with common procedures (which does not import whole BN) and separate conf.nim for every binary we have.

@arnetheduck
Copy link
Copy Markdown
Member

nice if you split all the configs between parts

It's not a bad idea in general but I suspect the gains might be smaller than one would think since the VC already needs a significant portion of spec which is the main part of what's being imported "redundantly". One would also need to introduce additional structure for parsing those options that are common, so it's probably outside of the scope of this PR.

@nitely nitely force-pushed the nitely_conf_flatten_refactor branch from a2846fd to 99b072a Compare January 26, 2026 17:49
@nitely nitely force-pushed the nitely_conf_flatten_refactor branch from d2b1a6a to 3e05f4b Compare March 25, 2026 20:25
@tersec
Copy link
Copy Markdown
Contributor

tersec commented Mar 30, 2026

nim-confutils bump done externally to this PR.

@nitely nitely force-pushed the nitely_conf_flatten_refactor branch from 780e970 to 847f708 Compare March 31, 2026 16:54
@nitely nitely force-pushed the nitely_conf_flatten_refactor branch from 847f708 to 3855b82 Compare April 8, 2026 19:52
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.

6 participants