config: default config values if not set in config.toml#3111
Merged
config: default config values if not set in config.toml#3111
Conversation
zzzckck
reviewed
May 21, 2025
Collaborator
|
Here is some of the options that better to have expected default value: |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces fallback defaults for configuration fields not set in config.toml and updates several built-in defaults across the node, mining, and txpool subsystems.
- Converts MEV settings to pointer fields and applies defaults at startup
- Adds a default log time format in
node/defaults.go - Adjusts default timeout and queue capacity values in ethconfig and txpool
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| node/defaults.go | Add LogConfig.TimeFormat default and stringPtr helper |
| miner/minerconfig/config.go | Switch MEV fields to pointers, define defaults, update ApplyDefaultMinerConfig |
| miner/miner_mev.go | Dereference BuilderFeeCeil pointer when parsing into big.Int |
| miner/bid_simulator.go | Guard config.Enabled pointer before use |
| eth/ethconfig/config.go | Change default TrieTimeout from 60m to 10m |
| core/txpool/legacypool/legacypool.go | Update default slots, queues, and lifetime values |
| cmd/utils/flags.go | Use pointer deref for Mev.Enabled in feature parsing |
Comments suppressed due to low confidence (1)
miner/minerconfig/config.go:124
- Include a default assignment for
cfg.Mev.ValidatorCommission(and any other pointer fields) insideApplyDefaultMinerConfig, mirroring the pattern used forEnabledandBuilderFeeCeil, to avoid nil dereferences when these fields are unset.
func ApplyDefaultMinerConfig(cfg *Config) {
Comment on lines
+175
to
+178
| AccountSlots: 200, | ||
| GlobalSlots: 8000, | ||
| AccountQueue: 200, | ||
| GlobalQueue: 4000, |
There was a problem hiding this comment.
[nitpick] The new default queue capacities (200, 8000, 200, 4000) lack explanatory comments; consider adding a note explaining the chosen values or the expected ratio.
Suggested change
| AccountSlots: 200, | |
| GlobalSlots: 8000, | |
| AccountQueue: 200, | |
| GlobalQueue: 4000, | |
| AccountSlots: 200, // Number of executable transaction slots guaranteed per account. | |
| GlobalSlots: 8000, // Maximum number of executable transaction slots for all accounts. | |
| AccountQueue: 200, // Maximum number of non-executable transaction slots permitted per account. | |
| GlobalQueue: 4000, // Maximum number of non-executable transaction slots for all accounts. |
MatusKysel
previously approved these changes
May 28, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
zzzckck
reviewed
May 30, 2025
zzzckck
reviewed
May 30, 2025
zzzckck
reviewed
May 30, 2025
zzzckck
reviewed
May 30, 2025
zzzckck
approved these changes
Jun 5, 2025
MatusKysel
approved these changes
Jun 5, 2025
This was referenced Jun 16, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Addresses #2986 with the default values mentioned here: #2986 (comment)
Rationale
tell us why we need these changes...
Example
add an example CLI or API response...
Changes
Notable changes: