Skip to content
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

Closed
rjl493456442 opened this issue May 15, 2020 · 5 comments · Fixed by #22510
Closed

Cache config in config file is useless for mainnet #21090

rjl493456442 opened this issue May 15, 2020 · 5 comments · Fixed by #22510

Comments

@rjl493456442
Copy link
Member

If we config the cache options in the config file, then it will be overwritten.

@rjl493456442 rjl493456442 changed the title Cache config in config file is useless for mainnet [memo]: Cache config in config file is useless for mainnet May 15, 2020
@ligi ligi added the type:bug label Nov 12, 2020
@ligi ligi changed the title [memo]: Cache config in config file is useless for mainnet Cache config in config file is useless for mainnet Nov 12, 2020
@iraj465
Copy link

iraj465 commented Nov 20, 2020

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?

@rjl493456442
Copy link
Member Author

rjl493456442 commented Nov 21, 2020

@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

@rjl493456442
Copy link
Member Author

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

@iraj465
Copy link

iraj465 commented Nov 22, 2020

Thanks @rjl493456442 for the detailed context ! Let me have look into it.

@jchengjr77
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants