New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache config in config file is useless for mainnet #21090
Comments
Hey i would love to work on this one. Can somebody please give me a bit of context as i'm new to this codebase? |
@iraj465 Hi! It would be nice if you can pick it up. Now Geth supports two approaches for the configuration: cmd flags and config files. The order for applying the configs is: (1) default config (2) config file (3) command-line flags(if they are set) Now the issue is even the command-line flags for the cache are not set, the cache config in the config file will be overwritten by the default value. Before a bit more context in the codebase, check here https://github.com/ethereum/go-ethereum/blob/master/cmd/geth/config.go#L119 |
The real root cause is: we will try to bump the default cache size for mainnet before we initialize the configs. https://github.com/ethereum/go-ethereum/blob/master/cmd/geth/main.go#L309 So the command-line flags will be set anyway |
Thanks @rjl493456442 for the detailed context ! Let me have look into it. |
Hey! Is @iraj465 still working on this? I don't see an assignee... Looking for a good first issue in this project, so let me know! |
If we config the cache options in the config file, then it will be overwritten.
The text was updated successfully, but these errors were encountered: