Skip to content

Conversation

@nitely
Copy link
Contributor

@nitely nitely commented Nov 28, 2025

Changes:

  • Pack metric opts into MetricsConf
  • Pack keymanager opts into KeymanagerConf
  • Pack restRequestTimeout, restMaxRequestBodySize, restMaxRequestHeadersSize into RequestConf. But this could be passed individually instead.
  • Small initKeymanagerServer change to avoid passing rest opts.

@nitely nitely requested a review from arnetheduck November 28, 2025 10:10
name: "rest-max-body-size" .}: Natural

maxHeadersSize* {.
defaultValue: 128
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note BeaconNodeconf had this set to 64.

defaultValue: 8008
name: "metrics-port" .}: Port

MetricsBetaConf* = object
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this exists because of the port difference and the description adding "BETA". But maybe can just use MetricsConf

@github-actions
Copy link

github-actions bot commented Nov 28, 2025

Unit Test Results

       12 files  ±0    2 432 suites  ±0   47m 0s ⏱️ + 2m 52s
12 658 tests ±0  12 093 ✔️ ±0  565 💤 ±0  0 ±0 
63 636 runs  ±0  62 908 ✔️ ±0  728 💤 ±0  0 ±0 

Results for commit a2846fd. ± Comparison against base commit 8b2923a.

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

if t.nanoseconds < 0: 0'i64 else: t.nanoseconds))

type
RequestConf* = object
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Little nit, but if we pack this perhaps the naming should be a bit more clear that this is about REST API configuration settings. RequestConf seems a bit too general.

example: RestRequestConf or RestApiConf ?

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.

4 participants