Loredana CirsteaandFederico Kunze Küllmer 77d9e29923 fix: GasMeter reset in AnteHandler EthGasConsumeDecorator (#964)
* Fix GasMeter reset in AnteHandler - EthGasConsumeDecorator

Conforming to the spec:
https://github.com/cosmos/cosmos-sdk/blob/e7066c4271ff3d33dc426dc6313c82a1201ae3c6/docs/basics/gas-fees.md
> Set newCtx.GasMeter to 0, with a limit of GasWanted.
> This step is extremely important, as it not only makes sure the transaction cannot consume infinite gas,
> but also that ctx.GasMeter is reset in-between each DeliverTx
> (ctx is set to newCtx after anteHandler is run, and the anteHandler is run each time DeliverTx is called).

* Compute gasWanted in ante handler based on msg gas

* Tests - check gas meter limit after EthGasConsumeDecorator ante handler runs

* Update CHANGELOG.md

* EthGasConsumeDecorator ante handler resets the gas meter only for CheckTx

* Reset the gas meter in Keeper.EthereumTx to an infinite gas meter

* Fix TestOutOfGasWhenDeployContract error check

* Move gas meter reset to the innermost EthAnteHandle

* add NewInfiniteGasMeterWithLimit for setting the user provided gas limit

Fixes block's consumed gas calculation in the block creation phase.

* Fix lint

* Fix lint

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-03-06 15:09:28 +01:00
2021-10-08 12:07:03 +00:00
2021-11-29 16:46:20 +01:00
2021-08-26 15:21:43 +00:00
2021-04-18 18:39:15 +02:00
2021-08-04 09:30:13 +00:00
2021-09-16 08:36:08 +00:00
2021-08-04 09:30:13 +00:00
2021-10-29 15:56:09 +02:00
2022-02-17 15:34:58 +01:00
2022-01-24 15:35:02 +01:00
2018-07-17 11:52:20 -04:00
2021-09-05 11:03:06 +00:00
2021-08-04 09:30:13 +00:00
2022-02-26 16:34:43 +00:00
2021-08-17 14:11:26 +00:00
2021-11-30 09:22:21 +01:00
2021-11-09 19:50:27 +00:00
2021-08-26 15:21:43 +00:00

Ethermint

banner

Ethermint is a scalable and interoperable Ethereum library, built on Proof-of-Stake with fast-finality using the Cosmos SDK which runs on top of Tendermint Core consensus engine.

Note: Requires Go 1.17+

Installation

For prerequisites and detailed build instructions please read the Evmos Installation instructions. Once the dependencies are installed, run:

make install

Or check out the latest release.

Quick Start

To learn how the Ethermint works from a high-level perspective, go to the Introduction section from the documentation. You can also check the instructions to Run a Node.

For an example on how Ethermint can be used on any Cosmos-SDK chain, please refer to Evmos.

Community

The following chat channels and forums are a great spot to ask questions about Ethermint:

Contributing

Looking for a good place to start contributing? Check out some good first issues.

For additional instructions, standards and style guides, please refer to the Contributing document.

Careers

See our open positions on Cosmos Jobs, Notion, or feel free to reach out via email.

S
Description
Laconic state machine
Readme
44 MiB
0 Stars 4 Watchers 0 Forks
Languages
Go 79.9%
Solidity 6.4%
Python 5.2%
JavaScript 4.8%
Shell 2.1%
Other 1.5%