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

cmd/geth: add flag --dev.gaslimit for dev mode #23686

Merged
merged 2 commits into from Nov 16, 2021

Conversation

jessetane
Copy link
Contributor

I was trying to tinker with some large gas limits to speed up some contract tests and while --miner.gaslimit does work, it takes a long time to reach if the initial gas limit is much lower.

@jwasinger
Copy link
Contributor

jwasinger commented Oct 6, 2021

Might it be sufficient to use --dev.period=1 (which will cause the miner to seal 1 block / second)? This would allow to bump up the gas limit more quickly.

@jessetane
Copy link
Contributor Author

Just tried - the gas limit does not seem to come up faster? Maybe I'm missing something else. Also the 1s pause between each block slows everything else down so even if it did I'm not sure it would be a net gain.

I assume the recommended approach here is to roll my own genesis file? I guess that's not too bad but dev mode is otherwise pretty convenient..

Maybe an alternate take on this could be to initialize dev mode at --miner.gaslimit if it's set?

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

LGTM

@karalabe
Copy link
Member

Should we just bump the default gas limit to 30M in dev mode?

@holiman
Copy link
Contributor

holiman commented Oct 19, 2021

Should we just bump the default gas limit to 30M in dev mode?

We could do that, but I can see some value in being able to test arbitrarily gigantic blocks in devmode. I don't have a strong opinion though

@jessetane
Copy link
Contributor Author

Just for some additional detail, I wanted to generate a large / complex fixture in eth state to run my test against and used this flag with a limit of 1B to complete the setup quickly.

@holiman holiman added this to the 1.10.13 milestone Nov 16, 2021
@holiman holiman changed the title cmd, core: add flag --dev.gaslimit to allow configuring initial block gas limit in dev mode cmd/geth: add flag --dev.gaslimit for dev mode Nov 16, 2021
@holiman holiman merged commit 33f2813 into ethereum:master Nov 16, 2021
sidhujag pushed a commit to syscoin/go-ethereum that referenced this pull request Nov 16, 2021
* cmd, core: add flag --dev.gaslimit to allow configuring initial block gas limit in dev mode

* core: use provided gaslimit

Co-authored-by: Martin Holst Swende <martin@swende.se>
yongjun925 pushed a commit to DODOEX/go-ethereum that referenced this pull request Dec 3, 2022
* cmd, core: add flag --dev.gaslimit to allow configuring initial block gas limit in dev mode

* core: use provided gaslimit

Co-authored-by: Martin Holst Swende <martin@swende.se>
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.

None yet

5 participants