Skip to content

Refactor conf with flatten#7761

Open
nitely wants to merge 1 commit into
status-im:unstablefrom
nitely:nitely_conf_flatten_refactor
Open

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

Conversation

@nitely

@nitely nitely commented Nov 28, 2025

Copy link
Copy Markdown
Contributor

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
Comment thread beacon_chain/nimbus_binary_common.nim
Comment thread beacon_chain/nimbus_binary_common.nim Outdated
@github-actions

github-actions Bot commented Nov 28, 2025

Copy link
Copy Markdown

Unit Test Results

       12 files  ±0    2 816 suites  ±0   1h 10m 15s ⏱️ - 9m 40s
15 853 tests ±0  14 288 ✔️ ±0  1 565 💤 ±0  0 ±0 
76 516 runs  ±0  74 776 ✔️ ±0  1 740 💤 ±0  0 ±0 

Results for commit 810ee2a. ± Comparison against base commit 2f5f186.

♻️ 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.

Comment thread beacon_chain/nimbus_binary_common.nim Outdated
Comment thread beacon_chain/conf.nim Outdated
Comment thread beacon_chain/conf.nim Outdated
@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

tersec commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

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
@nitely nitely force-pushed the nitely_conf_flatten_refactor branch 3 times, most recently from ab4e701 to 9227748 Compare April 28, 2026 19:09
@nitely nitely force-pushed the nitely_conf_flatten_refactor branch from 9227748 to 810ee2a Compare April 28, 2026 21:36
@nitely nitely marked this pull request as ready for review April 29, 2026 00:15
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