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

feat(cli): Add node CLI arg to set max block gas value #3110

Merged
merged 4 commits into from
Aug 19, 2023

Conversation

ekovalev
Copy link
Member

@ekovalev ekovalev commented Aug 19, 2023

Enables --max-gas command line argument to set a hard limit for the amount of gas a validator can spend in one block for the message queue processing.

Useful to reduce pressure on validators in case of the network congestion (DDoS attack or whatnot) to keep producing blocks at constant rate and not disable the queue processing completely.

Implementation wise, this value, if set, is propagated to the block authorship module in the client and then passed as a parameter to the Gear::run() extrinsic through a runtime-api, which will from now on take an Option<u64> as an argument.

@ekovalev ekovalev added A0-pleasereview PR is ready to be reviewed by the team D2-node Gear Node C1-feature Feature request labels Aug 19, 2023
@ekovalev ekovalev changed the title feat(cli) Add node CLI arg to set max block gas value feat(cli): Add node CLI arg to set max block gas value Aug 19, 2023
node/service/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Member

@breathx breathx left a comment

Choose a reason for hiding this comment

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

Add todo about considering previously discussed case with rerunning the same first from the queue message

node/cli/src/cli.rs Outdated Show resolved Hide resolved
@ekovalev ekovalev merged commit 626e760 into master Aug 19, 2023
7 checks passed
@ekovalev ekovalev deleted the ek-max-gas-node-cli-arg branch August 19, 2023 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0-pleasereview PR is ready to be reviewed by the team C1-feature Feature request D2-node Gear Node
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants