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

rusk: Configurable block gas limit #2127

Merged
merged 5 commits into from
Aug 21, 2024
Merged

rusk: Configurable block gas limit #2127

merged 5 commits into from
Aug 21, 2024

Conversation

goshawk-3
Copy link
Contributor

@goshawk-3 goshawk-3 commented Aug 14, 2024

fixes #2121

TESTED:

  • If in config.toml chain.block_gas_limit is not provided then
"event": "gen_candidate","hash":"14ea732952109d88...505041c7d4c3c3c2","gas_limit":5000000000
  • If chain.block_gas_limit = 9000000000 in toml then
{ "event":"gen_candidate","hash":"d0fbd55c56bffc5c...2d4d5345c5827791","gas_limit":9000000000 

@goshawk-3 goshawk-3 marked this pull request as ready for review August 16, 2024 13:32
@goshawk-3 goshawk-3 marked this pull request as draft August 19, 2024 07:24
@goshawk-3 goshawk-3 marked this pull request as ready for review August 19, 2024 10:04
Copy link
Member

@herr-seppia herr-seppia left a comment

Choose a reason for hiding this comment

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

LGTM

PS: not related to this PR, but I believe we should have two different gas limit (GENERATOR_GAS_LIMIT and MAX_VALID_GAS_LIMIT)

One will be used while generating a new block, and the other one should be used to check that the incoming block has gas limit not greater than the maximum block gas limit.

What do you think about it? @goshawk-3 @fed-franz

Copy link
Contributor

@fed-franz fed-franz left a comment

Choose a reason for hiding this comment

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

I'm not familiar with this, but why do we use different values of this limit in tests and benches.
There's only one case where this is explained.

rusk/src/bin/config/chain.rs Show resolved Hide resolved
@fed-franz
Copy link
Contributor

LGTM

PS: not related to this PR, but I believe we should have two different gas limit (GENERATOR_GAS_LIMIT and MAX_VALID_GAS_LIMIT)

One will be used while generating a new block, and the other one should be used to check that the incoming block has gas limit not greater than the maximum block gas limit.

What do you think about it? @goshawk-3 @fed-franz

I agree. Also, the maximum value should be tied to the protocol version

@goshawk-3
Copy link
Contributor Author

LGTM
PS: not related to this PR, but I believe we should have two different gas limit (GENERATOR_GAS_LIMIT and MAX_VALID_GAS_LIMIT)
One will be used while generating a new block, and the other one should be used to check that the incoming block has gas limit not greater than the maximum block gas limit.
What do you think about it? @goshawk-3 @fed-franz

I agree. Also, the maximum value should be tied to the protocol version

Valid point! Let's file an issue for it.

@goshawk-3 goshawk-3 merged commit 266d9c9 into master Aug 21, 2024
16 checks passed
@goshawk-3 goshawk-3 deleted the fix-2121 branch August 21, 2024 07:53
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.

Configurable block gas limit
3 participants