-
Notifications
You must be signed in to change notification settings - Fork 902
fix(consensus): fix the problem when setting the genesis.json file consensus_params.block.max_gas=-1 #1740
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
Conversation
…nsensus_params.block.max_gas=-1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @luchenqun!
Left a comment
@luchenqun Please add a changelog entry |
Codecov Report
@@ Coverage Diff @@
## main #1740 +/- ##
==========================================
- Coverage 70.34% 70.32% -0.02%
==========================================
Files 297 297
Lines 22283 22289 +6
==========================================
Hits 15675 15675
- Misses 5841 5847 +6
Partials 767 767
|
changelog entry has been added |
Co-authored-by: Tom <54514587+GAtom22@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @luchenqun! 🙏
https://github.com/Mergifyio backport release/v15.0.x |
✅ Backports have been created
|
…nsensus_params.block.max_gas=-1 (#1740) * fix(consensus): fix the problem when setting the genesis.json file consensus_params.block.max_gas=-1 * chore: update changelog * Update types/block.go Co-authored-by: Tom <54514587+GAtom22@users.noreply.github.com> * Update CHANGELOG.md --------- Co-authored-by: Tom <54514587+GAtom22@users.noreply.github.com> Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> (cherry picked from commit 2425653) # Conflicts: # CHANGELOG.md
…nsensus_params.block.max_gas=-1 (backport #1740) (#1890) * fix(consensus): fix the problem when setting the genesis.json file consensus_params.block.max_gas=-1 (#1740) * fix(consensus): fix the problem when setting the genesis.json file consensus_params.block.max_gas=-1 * chore: update changelog * Update types/block.go Co-authored-by: Tom <54514587+GAtom22@users.noreply.github.com> * Update CHANGELOG.md --------- Co-authored-by: Tom <54514587+GAtom22@users.noreply.github.com> Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> (cherry picked from commit 2425653) # Conflicts: # CHANGELOG.md * fix conflicts --------- Co-authored-by: Chenqun Lu <luchenqun@qq.com> Co-authored-by: Tom <54514587+GAtom22@users.noreply.github.com> Co-authored-by: tom <tomasguerraalda@hotmail.com>
Description
Setting max_gas to -1 in cometbft means there is no limit on the maximum gas consumption for transactions.
Currently, when initializing a local node using the command
evmosd testnet init-files --v 1
, the default setting for max_gas in cometbft is -1. However, when sending an EVM or Cosmos type transaction to the node, an errortx gas (4200000) exceeds block gas limit (0): out of gas: out of gas
occurs. The reason is that the special value -1 was not considered when calculating BlockGasLimit.Closes #XXX