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

No support for --rpc.gascap --rpc.txfeecap in dumpconfig command #22556

Closed
fkbenjamin opened this issue Mar 23, 2021 · 4 comments
Closed

No support for --rpc.gascap --rpc.txfeecap in dumpconfig command #22556

fkbenjamin opened this issue Mar 23, 2021 · 4 comments
Assignees
Labels

Comments

@fkbenjamin
Copy link

System information

Geth version: 1.10.1-stable-c2d2f4ed
OS & Version: OSX
Commit hash : (if develop)

Expected behaviour

geth --rpc.gascap A --rpc.txfeecap B dumpconfig

should output a config file that includes both of these configurations in TOML format.

Actual behaviour

It puts out a config file without any of these parameters. I've also been struggling to add these parameters manually as their format is not documented. Can anyone provide me with a valid .toml file including these two parameters?

@fkbenjamin
Copy link
Author

It seems that older versions of dumpconfig work. I was able to get this from a node running on 1.9.24-stable:

[Eth]
...
...
RPCGasCap = 25000000
RPCTxFeeCap = 1e+00

Since RPCTxFeeCap expects a float64, is value 0.0 disabling the cap like 0 does for RPCGasCap?

@MariusVanDerWijden
Copy link
Member

MariusVanDerWijden commented Mar 24, 2021

Hmm it works for me on current master

> ./build/bin/geth --rpc.gascap 123 --rpc.txfeecap 1432 dumpconfig
INFO [03-24|13:42:46.742] Maximum peer count                       ETH=50 LES=0 total=50
INFO [03-24|13:42:46.742] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
INFO [03-24|13:42:46.742] Set global gas cap                       cap=123
[Eth]
NetworkId = 1
SyncMode = "fast"
...
RPCGasCap = 123
RPCTxFeeCap = 1.432e+03

I also don't see any commits between 1.10.1 and current master that fixed issues in dumpconfig.
Could you maybe retry?

@fkbenjamin
Copy link
Author

fkbenjamin commented Mar 24, 2021

I had a closer look and it seems that these parameters work with any non-zero value as you show in your example. However, when setting both of these to 0 and therefore disabling them, it doesn't add them to the config. Could you verify if it works with 0-values for you?

geth --rpc.gascap=0 --rpc.txfeecap=0 dumpconfig

Both parameters set to zero:

geth --rpc.gascap=0 --rpc.txfeecap=0 dumpconfig | grep "RPCGasCap\|RPCTxFeeCap"
INFO [03-24|15:49:55.191] Maximum peer count                       ETH=50 LES=0 total=50
INFO [03-24|15:49:55.192] Global gas cap disabled

txfeecap set to zero:

geth --rpc.gascap=123 --rpc.txfeecap=0 dumpconfig | grep "RPCGasCap\|RPCTxFeeCap"
INFO [03-24|15:49:33.955] Maximum peer count                       ETH=50 LES=0 total=50
INFO [03-24|15:49:33.956] Set global gas cap                       cap=123
RPCGasCap = 123

gascap set to zero:

geth --rpc.gascap=0 --rpc.txfeecap=123 dumpconfig | grep "RPCGasCap\|RPCTxFeeCap"
INFO [03-24|15:50:52.762] Maximum peer count                       ETH=50 LES=0 total=50
INFO [03-24|15:50:52.763] Global gas cap disabled
RPCTxFeeCap = 1.23e+02

Both set to non-zero values:

geth --rpc.gascap=123 --rpc.txfeecap=456 dumpconfig | grep "RPCGasCap\|RPCTxFeeCap"
INFO [03-24|15:48:46.918] Maximum peer count                       ETH=50 LES=0 total=50
INFO [03-24|15:48:46.919] Set global gas cap                       cap=123
RPCGasCap = 123
RPCTxFeeCap = 4.56e+02

@MariusVanDerWijden MariusVanDerWijden self-assigned this Mar 25, 2021
@MariusVanDerWijden
Copy link
Member

Yeah, I can confirm that, will fix

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

No branches or pull requests

2 participants