8000 fix(consensus): fix the problem when setting the genesis.json file consensus_params.block.max_gas=-1 by luchenqun · Pull Request #1740 · evmos/evmos · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

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

Merged
merged 7 commits into from
Sep 5, 2023

Conversation

luchenqun
Copy link
Contributor

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 error tx 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

@luchenqun luchenqun requested a review from a team as a code owner September 1, 2023 13:59
@luchenqun luchenqun requested review from MalteHerrmann and 0xstepit and removed request for a team September 1, 2023 13:59
@luchenqun luchenqun changed the title fix the problem when setting the genesis.json file consensus_params.block.max_gas=-1 fix(consensus): fix the problem when setting the genesis.json file consensus_params.block.max_gas=-1 Sep 1, 2023
Copy link
Contributor
@GAtom22 GAtom22 left a 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

@GAtom22
Copy link
Contributor
GAtom22 commented Sep 1, 2023

@luchenqun Please add a changelog entry

@codecov
Copy link
codecov bot commented Sep 1, 2023

Codecov Report

Merging #1740 (e502845) into main (6045170) will decrease coverage by 0.02%.
Report is 4 commits behind head on main.
The diff coverage is 0.00%.

Impacted file tree graph

@@            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              
Files Changed Coverage
types/block.go 0.00%

@luchenqun
Copy link
Contributor Author

@luchenqun Please add a changelog entry

changelog entry has been added

luchenqun and others added 2 commits September 2, 2023 09:33
Co-authored-by: Tom <54514587+GAtom22@users.noreply.github.com>
@CLAassistant
Copy link
CLAassistant commented Sep 5, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor
@MalteHerrmann MalteHerrmann left a comment

Choose a reason for hiding this comment

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

Thanks @luchenqun! 🙏

@GAtom22 GAtom22 merged commit 2425653 into evmos:main Sep 5, 2023
@GAtom22
Copy link
Contributor
GAtom22 commented Oct 16, 2023

https://github.com/Mergifyio backport release/v15.0.x

@mergify
Copy link
Contributor
mergify bot commented Oct 16, 2023

backport release/v15.0.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Oct 16, 2023
…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
GAtom22 added a commit that referenced this pull request Oct 16, 2023
…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>
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.

4 participants
0