-
Notifications
You must be signed in to change notification settings - Fork 563
Fix GasMeter reset in AnteHandler - EthGasConsumeDecorator #964
Fix GasMeter reset in AnteHandler - EthGasConsumeDecorator #964
Conversation
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.
ACK, can you add a changelog.md entry under bug fixes? 🙏
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).
65fc882
to
8ee6faa
Compare
The gas meter is setup in |
@loredanacirstea tests are failing |
Codecov Report
@@ Coverage Diff @@
## main #964 +/- ##
==========================================
- Coverage 59.33% 59.09% -0.25%
==========================================
Files 78 79 +1
Lines 6468 6508 +40
==========================================
+ Hits 3838 3846 +8
- Misses 2412 2444 +32
Partials 218 218
|
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.
Sorry for the confusion from my comments, but we should do it for deliverTx too, but not for the msg handler, so we should remove the checkTx condition, but override with an infinite gas meter at the beginning of Keeper.EthereumTx method.
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.
tests are failing
The The rpc tests are failing with the same errors as before. I will take a look in the morning. |
in case it helps, i am also seeing failures due to some sort of gas metering issue, which i tried to write up here: this is coming from the state of ethermint with @loredanacirstea's first 4 commits (which was the state of this PR until this morning) edit: nvm, after pulling in the other 5 commits on this branch it no longer errors, nice |
I think it should not expect a panic, but a |
@yihuang , fixed the test here: 892fc66 RPC tests pass now: I moved the gas meter reset in the innermost EthAnteHandler. Previously it was failing because there was not enough gas for cosmos SDK operations (reading balances, creating accounts) that were done after the Note: First I tried adding another decorator after |
Do not merge yet. I just saw another problem, even though tests pass. |
@fedekunze , @yihuang (Resetting the gas meter in Keeper.EthereumTx did not work, because the original gas meter was probably used in another context which was causing the final gasUsed amount to be lower than reality). |
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.
ACK
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.
LGTM
* 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 <[email protected]>
* 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 <[email protected]>
- [Quick fix for eth_feeHistory when reward is nil](evmos/ethermint#975) - [Add buffer to eth_gasPrice response](evmos/ethermint#968) - [Fix GasMeter reset in AnteHandler, aka. return correct gasWanted to tendermint](evmos/ethermint#964) modified to only fix checkTx mode to avoid breaking consensus.
* Problem: recent bug fixes on ethermint not used - [Quick fix for eth_feeHistory when reward is nil](evmos/ethermint#975) - [Add buffer to eth_gasPrice response](evmos/ethermint#968) - [Fix GasMeter reset in AnteHandler, aka. return correct gasWanted to tendermint](evmos/ethermint#964) modified to only fix checkTx mode to avoid breaking consensus. * add returnValue message on tracing * changelog
* evm: add returnValue message on tracing (#962) * release: v0.10.0-alpha changelog (#891) * release: v0.10.0-alpha changelog * deps: IBC v3 alpha2 (#892) * release: v0.10.0-alpha2 (#923) * deps: IBC v3 alpha2 (#892) * Problem: newPendingTransactions filter don't return ethereum tx hash (#900) * impr: support batch eth txs (#901) * support batch eth tx Closes: 896 Allow multiple MsgEthereumTx in single tx * fix transaction receipt api * fix tx receipt api and accumulate tx gas used * fix lint * fix test * fix rpc test * cleanup * fix cumulativeGasUsed and gasUsed * fix lint * Update app/ante/eth.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * Update app/ante/eth.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * Update rpc/ethereum/backend/utils.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * pr suggestions * typo * fix lint Co-authored-by: Federico Kunze Küllmer <[email protected]> * build(deps): bump follow-redirects in /tests/solidity (#909) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.4 to 1.14.7. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.4...v1.14.7) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * rpc: make trace transaction api work with batch tx (#907) * make trace transaction api work with batch tx Closes: #906 fix linter * review suggestion Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix insufficient fee error message (#911) * server: add `api.enable` flag for Cosmos SDK API server (#908) * add api.enable flag for Cosmos SDK Rest server * update changelog Co-authored-by: Federico Kunze Küllmer <[email protected]> * deps: bump Cosmos SDK version to `v0.45.0` (#912) * deps: bump SDK version to v0.45.0 * changelog * deprecation fix * deprecation fix 2 * Integration tests (#913) * ci: semgrep config (#917) * ci: enable semgrep config * fix config * ignore grpc web * fix: default base fee state in genesis (#919) * fix defualt base fee state in genesis Closes: #918 Solution: - initialise the default base fee value in genesis * changelog * fix: minimal-gas-prices and baseFeePerGas conflicts (#916) * Problem: minimal-gas-prices and baseFeePerGas conflicts Closes: #915 Solution: - Don't check min-gas-price for evm tx if london hardfork and feemarket enabled. comments and cleanup changelog * fix zero fee coins Co-authored-by: Federico Kunze Küllmer <[email protected]> Co-authored-by: yihuang <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: crypto-facs <[email protected]> * release: v0.10.0-beta1 changelog (#941) * deps: IBC v3 alpha2 (#892) * Problem: newPendingTransactions filter don't return ethereum tx hash (#900) * impr: support batch eth txs (#901) * support batch eth tx Closes: 896 Allow multiple MsgEthereumTx in single tx * fix transaction receipt api * fix tx receipt api and accumulate tx gas used * fix lint * fix test * fix rpc test * cleanup * fix cumulativeGasUsed and gasUsed * fix lint * Update app/ante/eth.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * Update app/ante/eth.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * Update rpc/ethereum/backend/utils.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * pr suggestions * typo * fix lint Co-authored-by: Federico Kunze Küllmer <[email protected]> * build(deps): bump follow-redirects in /tests/solidity (#909) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.4 to 1.14.7. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.4...v1.14.7) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * rpc: make trace transaction api work with batch tx (#907) * make trace transaction api work with batch tx Closes: #906 fix linter * review suggestion Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix insufficient fee error message (#911) * server: add `api.enable` flag for Cosmos SDK API server (#908) * add api.enable flag for Cosmos SDK Rest server * update changelog Co-authored-by: Federico Kunze Küllmer <[email protected]> * deps: bump Cosmos SDK version to `v0.45.0` (#912) * deps: bump SDK version to v0.45.0 * changelog * deprecation fix * deprecation fix 2 * Integration tests (#913) * ci: semgrep config (#917) * ci: enable semgrep config * fix config * ignore grpc web * fix: default base fee state in genesis (#919) * fix defualt base fee state in genesis Closes: #918 Solution: - initialise the default base fee value in genesis * changelog * fix: minimal-gas-prices and baseFeePerGas conflicts (#916) * Problem: minimal-gas-prices and baseFeePerGas conflicts Closes: #915 Solution: - Don't check min-gas-price for evm tx if london hardfork and feemarket enabled. comments and cleanup changelog * fix zero fee coins Co-authored-by: Federico Kunze Küllmer <[email protected]> * build(deps): bump github.com/cosmos/ibc-go/v3 (#925) * build(deps): bump simple-get from 2.8.1 to 2.8.2 in /tests/solidity (#927) * build(deps): bump github.com/cosmos/cosmos-sdk from 0.45.0 to 0.45.1 (#926) Bumps [github.com/cosmos/cosmos-sdk](https://github.com/cosmos/cosmos-sdk) from 0.45.0 to 0.45.1. - [Release notes](https://github.com/cosmos/cosmos-sdk/releases) - [Changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.45.1/CHANGELOG.md) - [Commits](https://github.com/cosmos/cosmos-sdk/compare/v0.45.0...v0.45.1) --- updated-dependencies: - dependency-name: github.com/cosmos/cosmos-sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * ci: separate out rpc and integration tests (#931) Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix: wrong comment in EthGasConsumeDecorator (#929) * fix newPendingTransactions subscription deadlock issue (#933) * remove unused parameters from evm spec (#934) * build(deps): bump follow-redirects in /tests/solidity (#939) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * deps: upgrade geth to v1.10.15 (#935) * upgrade geth to v1.10.15 * fix lint * fix imports * revert makefile change * update changelog * Update CHANGELOG.md Co-authored-by: Guillermo Paoletti <[email protected]> * update chain config * add getblockvalue for chain config fork Co-authored-by: Guillermo Paoletti <[email protected]> Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix: base fee check logic in state transition (#932) * fix base fee check logic in state transition - should check london hardfork first, otherwise it panic if feemarket not registered. * fix lint Co-authored-by: Federico Kunze Küllmer <[email protected]> * add release v0.10.0-beta1 CHANGELOG Co-authored-by: Federico Kunze Küllmer <[email protected]> Co-authored-by: yihuang <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: crypto-facs <[email protected]> Co-authored-by: Prajjwol Gautam <[email protected]> Co-authored-by: HaeSung <[email protected]> Co-authored-by: Guillermo Paoletti <[email protected]> * release: v0.10.0 final (#959) * deps: IBC v3 alpha2 (#892) * Problem: newPendingTransactions filter don't return ethereum tx hash (#900) * impr: support batch eth txs (#901) * support batch eth tx Closes: 896 Allow multiple MsgEthereumTx in single tx * fix transaction receipt api * fix tx receipt api and accumulate tx gas used * fix lint * fix test * fix rpc test * cleanup * fix cumulativeGasUsed and gasUsed * fix lint * Update app/ante/eth.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * Update app/ante/eth.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * Update rpc/ethereum/backend/utils.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * pr suggestions * typo * fix lint Co-authored-by: Federico Kunze Küllmer <[email protected]> * build(deps): bump follow-redirects in /tests/solidity (#909) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.4 to 1.14.7. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.4...v1.14.7) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * rpc: make trace transaction api work with batch tx (#907) * make trace transaction api work with batch tx Closes: #906 fix linter * review suggestion Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix insufficient fee error message (#911) * server: add `api.enable` flag for Cosmos SDK API server (#908) * add api.enable flag for Cosmos SDK Rest server * update changelog Co-authored-by: Federico Kunze Küllmer <[email protected]> * deps: bump Cosmos SDK version to `v0.45.0` (#912) * deps: bump SDK version to v0.45.0 * changelog * deprecation fix * deprecation fix 2 * Integration tests (#913) * ci: semgrep config (#917) * ci: enable semgrep config * fix config * ignore grpc web * fix: default base fee state in genesis (#919) * fix defualt base fee state in genesis Closes: #918 Solution: - initialise the default base fee value in genesis * changelog * fix: minimal-gas-prices and baseFeePerGas conflicts (#916) * Problem: minimal-gas-prices and baseFeePerGas conflicts Closes: #915 Solution: - Don't check min-gas-price for evm tx if london hardfork and feemarket enabled. comments and cleanup changelog * fix zero fee coins Co-authored-by: Federico Kunze Küllmer <[email protected]> * build(deps): bump github.com/cosmos/ibc-go/v3 (#925) * build(deps): bump simple-get from 2.8.1 to 2.8.2 in /tests/solidity (#927) * build(deps): bump github.com/cosmos/cosmos-sdk from 0.45.0 to 0.45.1 (#926) Bumps [github.com/cosmos/cosmos-sdk](https://github.com/cosmos/cosmos-sdk) from 0.45.0 to 0.45.1. - [Release notes](https://github.com/cosmos/cosmos-sdk/releases) - [Changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.45.1/CHANGELOG.md) - [Commits](https://github.com/cosmos/cosmos-sdk/compare/v0.45.0...v0.45.1) --- updated-dependencies: - dependency-name: github.com/cosmos/cosmos-sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * ci: separate out rpc and integration tests (#931) Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix: wrong comment in EthGasConsumeDecorator (#929) * fix newPendingTransactions subscription deadlock issue (#933) * remove unused parameters from evm spec (#934) * build(deps): bump follow-redirects in /tests/solidity (#939) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * deps: upgrade geth to v1.10.15 (#935) * upgrade geth to v1.10.15 * fix lint * fix imports * revert makefile change * update changelog * Update CHANGELOG.md Co-authored-by: Guillermo Paoletti <[email protected]> * update chain config * add getblockvalue for chain config fork Co-authored-by: Guillermo Paoletti <[email protected]> Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix: base fee check logic in state transition (#932) * fix base fee check logic in state transition - should check london hardfork first, otherwise it panic if feemarket not registered. * fix lint Co-authored-by: Federico Kunze Küllmer <[email protected]> * danburck/release changelog (#942) * release: v0.10.0-alpha changelog (#891) * release: v0.10.0-alpha changelog * deps: IBC v3 alpha2 (#892) * release: v0.10.0-alpha2 (#923) * deps: IBC v3 alpha2 (#892) * Problem: newPendingTransactions filter don't return ethereum tx hash (#900) * impr: support batch eth txs (#901) * support batch eth tx Closes: 896 Allow multiple MsgEthereumTx in single tx * fix transaction receipt api * fix tx receipt api and accumulate tx gas used * fix lint * fix test * fix rpc test * cleanup * fix cumulativeGasUsed and gasUsed * fix lint * Update app/ante/eth.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * Update app/ante/eth.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * Update rpc/ethereum/backend/utils.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * pr suggestions * typo * fix lint Co-authored-by: Federico Kunze Küllmer <[email protected]> * build(deps): bump follow-redirects in /tests/solidity (#909) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.4 to 1.14.7. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.4...v1.14.7) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * rpc: make trace transaction api work with batch tx (#907) * make trace transaction api work with batch tx Closes: #906 fix linter * review suggestion Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix insufficient fee error message (#911) * server: add `api.enable` flag for Cosmos SDK API server (#908) * add api.enable flag for Cosmos SDK Rest server * update changelog Co-authored-by: Federico Kunze Küllmer <[email protected]> * deps: bump Cosmos SDK version to `v0.45.0` (#912) * deps: bump SDK version to v0.45.0 * changelog * deprecation fix * deprecation fix 2 * Integration tests (#913) * ci: semgrep config (#917) * ci: enable semgrep config * fix config * ignore grpc web * fix: default base fee state in genesis (#919) * fix defualt base fee state in genesis Closes: #918 Solution: - initialise the default base fee value in genesis * changelog * fix: minimal-gas-prices and baseFeePerGas conflicts (#916) * Problem: minimal-gas-prices and baseFeePerGas conflicts Closes: #915 Solution: - Don't check min-gas-price for evm tx if london hardfork and feemarket enabled. comments and cleanup changelog * fix zero fee coins Co-authored-by: Federico Kunze Küllmer <[email protected]> Co-authored-by: yihuang <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: crypto-facs <[email protected]> * release: v0.10.0-beta1 changelog (#941) * deps: IBC v3 alpha2 (#892) * Problem: newPendingTransactions filter don't return ethereum tx hash (#900) * impr: support batch eth txs (#901) * support batch eth tx Closes: 896 Allow multiple MsgEthereumTx in single tx * fix transaction receipt api * fix tx receipt api and accumulate tx gas used * fix lint * fix test * fix rpc test * cleanup * fix cumulativeGasUsed and gasUsed * fix lint * Update app/ante/eth.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * Update app/ante/eth.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * Update rpc/ethereum/backend/utils.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * pr suggestions * typo * fix lint Co-authored-by: Federico Kunze Küllmer <[email protected]> * build(deps): bump follow-redirects in /tests/solidity (#909) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.4 to 1.14.7. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.4...v1.14.7) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * rpc: make trace transaction api work with batch tx (#907) * make trace transaction api work with batch tx Closes: #906 fix linter * review suggestion Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix insufficient fee error message (#911) * server: add `api.enable` flag for Cosmos SDK API server (#908) * add api.enable flag for Cosmos SDK Rest server * update changelog Co-authored-by: Federico Kunze Küllmer <[email protected]> * deps: bump Cosmos SDK version to `v0.45.0` (#912) * deps: bump SDK version to v0.45.0 * changelog * deprecation fix * deprecation fix 2 * Integration tests (#913) * ci: semgrep config (#917) * ci: enable semgrep config * fix config * ignore grpc web * fix: default base fee state in genesis (#919) * fix defualt base fee state in genesis Closes: #918 Solution: - initialise the default base fee value in genesis * changelog * fix: minimal-gas-prices and baseFeePerGas conflicts (#916) * Problem: minimal-gas-prices and baseFeePerGas conflicts Closes: #915 Solution: - Don't check min-gas-price for evm tx if london hardfork and feemarket enabled. comments and cleanup changelog * fix zero fee coins Co-authored-by: Federico Kunze Küllmer <[email protected]> * build(deps): bump github.com/cosmos/ibc-go/v3 (#925) * build(deps): bump simple-get from 2.8.1 to 2.8.2 in /tests/solidity (#927) * build(deps): bump github.com/cosmos/cosmos-sdk from 0.45.0 to 0.45.1 (#926) Bumps [github.com/cosmos/cosmos-sdk](https://github.com/cosmos/cosmos-sdk) from 0.45.0 to 0.45.1. - [Release notes](https://github.com/cosmos/cosmos-sdk/releases) - [Changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.45.1/CHANGELOG.md) - [Commits](https://github.com/cosmos/cosmos-sdk/compare/v0.45.0...v0.45.1) --- updated-dependencies: - dependency-name: github.com/cosmos/cosmos-sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * ci: separate out rpc and integration tests (#931) Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix: wrong comment in EthGasConsumeDecorator (#929) * fix newPendingTransactions subscription deadlock issue (#933) * remove unused parameters from evm spec (#934) * build(deps): bump follow-redirects in /tests/solidity (#939) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * deps: upgrade geth to v1.10.15 (#935) * upgrade geth to v1.10.15 * fix lint * fix imports * revert makefile change * update changelog * Update CHANGELOG.md Co-authored-by: Guillermo Paoletti <[email protected]> * update chain config * add getblockvalue for chain config fork Co-authored-by: Guillermo Paoletti <[email protected]> Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix: base fee check logic in state transition (#932) * fix base fee check logic in state transition - should check london hardfork first, otherwise it panic if feemarket not registered. * fix lint Co-authored-by: Federico Kunze Küllmer <[email protected]> * add release v0.10.0-beta1 CHANGELOG Co-authored-by: Federico Kunze Küllmer <[email protected]> Co-authored-by: yihuang <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: crypto-facs <[email protected]> Co-authored-by: Prajjwol Gautam <[email protected]> Co-authored-by: HaeSung <[email protected]> Co-authored-by: Guillermo Paoletti <[email protected]> Co-authored-by: Federico Kunze Küllmer <[email protected]> Co-authored-by: yihuang <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: crypto-facs <[email protected]> Co-authored-by: Prajjwol Gautam <[email protected]> Co-authored-by: HaeSung <[email protected]> Co-authored-by: Guillermo Paoletti <[email protected]> * build(deps): bump github.com/gorilla/websocket from 1.4.2 to 1.5.0 (#944) Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.4.2 to 1.5.0. - [Release notes](https://github.com/gorilla/websocket/releases) - [Commits](https://github.com/gorilla/websocket/compare/v1.4.2...v1.5.0) --- updated-dependencies: - dependency-name: github.com/gorilla/websocket dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * deps: bump IBC v3-rc0 (#947) * deps: bump IBC v3-rc0 * rm strict * imp: redirect go-ethereum's logs to cosmos logger (#948) * redirect go-ethereum's logs to cosmos logger Closes: #862 Map go-ethereum's log levels to cosmos ones: trace -> debug debug -> debug info -> info warn -> info error -> error crit -> error * changelog * Apply suggestions from code review * Apply suggestions from code review * build(deps): bump github.com/ethereum/go-ethereum from 1.10.15 to 1.10.16 (#945) * build(deps): bump github.com/ethereum/go-ethereum Bumps [github.com/ethereum/go-ethereum](https://github.com/ethereum/go-ethereum) from 1.10.15 to 1.10.16. - [Release notes](https://github.com/ethereum/go-ethereum/releases) - [Commits](https://github.com/ethereum/go-ethereum/compare/v1.10.15...v1.10.16) --- updated-dependencies: - dependency-name: github.com/ethereum/go-ethereum dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * add extra param to config rules * update changelog * update comments Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Freddy Caceres <[email protected]> * feemarket: change basefee to be a module param (#943) * change basefee to a module params * add changelog and fix linter * change params type of basefee and remove default base fee * restaure event * clean code * fix proto * fix protos * fix logic * update rpc tests * fix comment Co-authored-by: Federico Kunze Küllmer <[email protected]> * build(deps): bump github.com/tendermint/tm-db from 0.6.4 to 0.6.7 (#949) Bumps [github.com/tendermint/tm-db](https://github.com/tendermint/tm-db) from 0.6.4 to 0.6.7. - [Release notes](https://github.com/tendermint/tm-db/releases) - [Changelog](https://github.com/tendermint/tm-db/blob/master/CHANGELOG.md) - [Commits](https://github.com/tendermint/tm-db/compare/v0.6.4...v0.6.7) --- updated-dependencies: - dependency-name: github.com/tendermint/tm-db dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs: add spec for feemarket module (#889) * add spec for feemarket * update spec from comments * update spec * update abstract * update with grpc query * add more content for tip section * update specs with latest behavior * cleanup unused store prefix * Update x/feemarket/spec/01_concepts.md * Apply suggestions from code review Co-authored-by: Federico Kunze Küllmer <[email protected]> * rpc: add support for `eth_signedTypedData` (#953) * add signTypedData api * fix typo * fix lint issues * add crypto recovery offset * Apply suggestions from code review * add changelog Co-authored-by: Federico Kunze Küllmer <[email protected]> * build(deps): bump actions/setup-node from 2.5.1 to 3 (#957) Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.5.1 to 3. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v2.5.1...v3) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: websocket client duplicated messages (#955) * Problem: websocket client get duplicated messages Closes: #954 Solution: - localize the subscription management within current connection * changelog * fix linter * fix test building Co-authored-by: Federico Kunze Küllmer <[email protected]> * ante: EIP712 support (#950) * code migrated * signed_data ported to avoid conficting dependency * correct payload * eip712 working with evmos.me * use geth TypedData types * fix linter * minor refactor * test first try * fix test * fix tests * enforce fee delegated eip712 * verify signature refactor * SignedTypedData api refactor * add AnteHandler test for EIP712 * remove comment * code clean up * return more detailed error messages * fix linter * remove unnecesary global vars * Update app/ante/eip712.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix pr comments * remove hardcoded value * add more tests * add changelog * use sdk errors * add MsgDelegate test Co-authored-by: Freddy Caceres <[email protected]> Co-authored-by: Federico Kunze Küllmer <[email protected]> Co-authored-by: Federico Kunze Küllmer <[email protected]> Co-authored-by: crypto-facs <[email protected]> Co-authored-by: yihuang <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: crypto-facs <[email protected]> Co-authored-by: Prajjwol Gautam <[email protected]> Co-authored-by: HaeSung <[email protected]> Co-authored-by: Guillermo Paoletti <[email protected]> Co-authored-by: Daniel Burckhardt <[email protected]> Co-authored-by: Freddy Caceres <[email protected]> Co-authored-by: Thomas Nguy <[email protected]> * add returnValue message on tracing * Update x/evm/keeper/grpc_query.go * changelog 2 Co-authored-by: Federico Kunze Küllmer <[email protected]> Co-authored-by: yihuang <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Daniel Burckhardt <[email protected]> Co-authored-by: Prajjwol Gautam <[email protected]> Co-authored-by: HaeSung <[email protected]> Co-authored-by: Guillermo Paoletti <[email protected]> Co-authored-by: Thomas Nguy <[email protected]> Co-authored-by: Federico Kunze Küllmer <[email protected]> * build(deps): bump actions/labeler from 3 to 4 (#966) Bumps [actions/labeler](https://github.com/actions/labeler) from 3 to 4. - [Release notes](https://github.com/actions/labeler/releases) - [Commits](https://github.com/actions/labeler/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/labeler dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump actions/checkout from 2.4.0 to 3 (#965) Bumps [actions/checkout](https://github.com/actions/checkout) from 2.4.0 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2.4.0...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: Metamask keeps failing sending transactions (#968) * Problem: Metamask keeps failing sending transactions Closes: #967 Solution: - add 1/8 buffer on top of base fee for default gas price * changelog * fix typo Co-authored-by: Freddy Caceres <[email protected]> Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix: `eth_feeHistory` reward values cannot be nil (#970) * eth_feeHistory reward values cannot be nil * removed reward when rewardPercentiles is not specified * fix lint * refactor and fix typos * add changelog Co-authored-by: Freddy Caceres <[email protected]> * Quick fix for eth_feeHistory when reward is nil (#975) * Quick fix for eth_feeHistory when reward is nil `RPC method eth_feeHistory crashed: runtime error: invalid memory address or nil pointer dereference` from https://github.com/tharsis/ethermint/blob/caa1c5a6c6b7ed8ba4aaf6e0b0848f6be5ba6668/rpc/ethereum/backend/feebackend.go#L29 * Update CHANGELOG.md * 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 <[email protected]> * docs: changelog fix (#976) * release: v0.10.0-alpha changelog (#891) * release: v0.10.0-alpha changelog * deps: IBC v3 alpha2 (#892) * release: v0.10.0-alpha2 (#923) * deps: IBC v3 alpha2 (#892) * Problem: newPendingTransactions filter don't return ethereum tx hash (#900) * impr: support batch eth txs (#901) * support batch eth tx Closes: 896 Allow multiple MsgEthereumTx in single tx * fix transaction receipt api * fix tx receipt api and accumulate tx gas used * fix lint * fix test * fix rpc test * cleanup * fix cumulativeGasUsed and gasUsed * fix lint * Update app/ante/eth.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * Update app/ante/eth.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * Update rpc/ethereum/backend/utils.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * pr suggestions * typo * fix lint Co-authored-by: Federico Kunze Küllmer <[email protected]> * build(deps): bump follow-redirects in /tests/solidity (#909) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.4 to 1.14.7. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.4...v1.14.7) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * rpc: make trace transaction api work with batch tx (#907) * make trace transaction api work with batch tx Closes: #906 fix linter * review suggestion Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix insufficient fee error message (#911) * server: add `api.enable` flag for Cosmos SDK API server (#908) * add api.enable flag for Cosmos SDK Rest server * update changelog Co-authored-by: Federico Kunze Küllmer <[email protected]> * deps: bump Cosmos SDK version to `v0.45.0` (#912) * deps: bump SDK version to v0.45.0 * changelog * deprecation fix * deprecation fix 2 * Integration tests (#913) * ci: semgrep config (#917) * ci: enable semgrep config * fix config * ignore grpc web * fix: default base fee state in genesis (#919) * fix defualt base fee state in genesis Closes: #918 Solution: - initialise the default base fee value in genesis * changelog * fix: minimal-gas-prices and baseFeePerGas conflicts (#916) * Problem: minimal-gas-prices and baseFeePerGas conflicts Closes: #915 Solution: - Don't check min-gas-price for evm tx if london hardfork and feemarket enabled. comments and cleanup changelog * fix zero fee coins Co-authored-by: Federico Kunze Küllmer <[email protected]> Co-authored-by: yihuang <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: crypto-facs <[email protected]> * release: v0.10.0-beta1 changelog (#941) * deps: IBC v3 alpha2 (#892) * Problem: newPendingTransactions filter don't return ethereum tx hash (#900) * impr: support batch eth txs (#901) * support batch eth tx Closes: 896 Allow multiple MsgEthereumTx in single tx * fix transaction receipt api * fix tx receipt api and accumulate tx gas used * fix lint * fix test * fix rpc test * cleanup * fix cumulativeGasUsed and gasUsed * fix lint * Update app/ante/eth.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * Update app/ante/eth.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * Update rpc/ethereum/backend/utils.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * pr suggestions * typo * fix lint Co-authored-by: Federico Kunze Küllmer <[email protected]> * build(deps): bump follow-redirects in /tests/solidity (#909) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.4 to 1.14.7. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.4...v1.14.7) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * rpc: make trace transaction api work with batch tx (#907) * make trace transaction api work with batch tx Closes: #906 fix linter * review suggestion Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix insufficient fee error message (#911) * server: add `api.enable` flag for Cosmos SDK API server (#908) * add api.enable flag for Cosmos SDK Rest server * update changelog Co-authored-by: Federico Kunze Küllmer <[email protected]> * deps: bump Cosmos SDK version to `v0.45.0` (#912) * deps: bump SDK version to v0.45.0 * changelog * deprecation fix * deprecation fix 2 * Integration tests (#913) * ci: semgrep config (#917) * ci: enable semgrep config * fix config * ignore grpc web * fix: default base fee state in genesis (#919) * fix defualt base fee state in genesis Closes: #918 Solution: - initialise the default base fee value in genesis * changelog * fix: minimal-gas-prices and baseFeePerGas conflicts (#916) * Problem: minimal-gas-prices and baseFeePerGas conflicts Closes: #915 Solution: - Don't check min-gas-price for evm tx if london hardfork and feemarket enabled. comments and cleanup changelog * fix zero fee coins Co-authored-by: Federico Kunze Küllmer <[email protected]> * build(deps): bump github.com/cosmos/ibc-go/v3 (#925) * build(deps): bump simple-get from 2.8.1 to 2.8.2 in /tests/solidity (#927) * build(deps): bump github.com/cosmos/cosmos-sdk from 0.45.0 to 0.45.1 (#926) Bumps [github.com/cosmos/cosmos-sdk](https://github.com/cosmos/cosmos-sdk) from 0.45.0 to 0.45.1. - [Release notes](https://github.com/cosmos/cosmos-sdk/releases) - [Changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.45.1/CHANGELOG.md) - [Commits](https://github.com/cosmos/cosmos-sdk/compare/v0.45.0...v0.45.1) --- updated-dependencies: - dependency-name: github.com/cosmos/cosmos-sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * ci: separate out rpc and integration tests (#931) Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix: wrong comment in EthGasConsumeDecorator (#929) * fix newPendingTransactions subscription deadlock issue (#933) * remove unused parameters from evm spec (#934) * build(deps): bump follow-redirects in /tests/solidity (#939) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * deps: upgrade geth to v1.10.15 (#935) * upgrade geth to v1.10.15 * fix lint * fix imports * revert makefile change * update changelog * Update CHANGELOG.md Co-authored-by: Guillermo Paoletti <[email protected]> * update chain config * add getblockvalue for chain config fork Co-authored-by: Guillermo Paoletti <[email protected]> Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix: base fee check logic in state transition (#932) * fix base fee check logic in state transition - should check london hardfork first, otherwise it panic if feemarket not registered. * fix lint Co-authored-by: Federico Kunze Küllmer <[email protected]> * add release v0.10.0-beta1 CHANGELOG Co-authored-by: Federico Kunze Küllmer <[email protected]> Co-authored-by: yihuang <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: crypto-facs <[email protected]> Co-authored-by: Prajjwol Gautam <[email protected]> Co-authored-by: HaeSung <[email protected]> Co-authored-by: Guillermo Paoletti <[email protected]> * release: v0.10.0 final (#959) * deps: IBC v3 alpha2 (#892) * Problem: newPendingTransactions filter don't return ethereum tx hash (#900) * impr: support batch eth txs (#901) * support batch eth tx Closes: 896 Allow multiple MsgEthereumTx in single tx * fix transaction receipt api * fix tx receipt api and accumulate tx gas used * fix lint * fix test * fix rpc test * cleanup * fix cumulativeGasUsed and gasUsed * fix lint * Update app/ante/eth.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * Update app/ante/eth.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * Update rpc/ethereum/backend/utils.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * pr suggestions * typo * fix lint Co-authored-by: Federico Kunze Küllmer <[email protected]> * build(deps): bump follow-redirects in /tests/solidity (#909) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.4 to 1.14.7. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.4...v1.14.7) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * rpc: make trace transaction api work with batch tx (#907) * make trace transaction api work with batch tx Closes: #906 fix linter * review suggestion Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix insufficient fee error message (#911) * server: add `api.enable` flag for Cosmos SDK API server (#908) * add api.enable flag for Cosmos SDK Rest server * update changelog Co-authored-by: Federico Kunze Küllmer <[email protected]> * deps: bump Cosmos SDK version to `v0.45.0` (#912) * deps: bump SDK version to v0.45.0 * changelog * deprecation fix * deprecation fix 2 * Integration tests (#913) * ci: semgrep config (#917) * ci: enable semgrep config * fix config * ignore grpc web * fix: default base fee state in genesis (#919) * fix defualt base fee state in genesis Closes: #918 Solution: - initialise the default base fee value in genesis * changelog * fix: minimal-gas-prices and baseFeePerGas conflicts (#916) * Problem: minimal-gas-prices and baseFeePerGas conflicts Closes: #915 Solution: - Don't check min-gas-price for evm tx if london hardfork and feemarket enabled. comments and cleanup changelog * fix zero fee coins Co-authored-by: Federico Kunze Küllmer <[email protected]> * build(deps): bump github.com/cosmos/ibc-go/v3 (#925) * build(deps): bump simple-get from 2.8.1 to 2.8.2 in /tests/solidity (#927) * build(deps): bump github.com/cosmos/cosmos-sdk from 0.45.0 to 0.45.1 (#926) Bumps [github.com/cosmos/cosmos-sdk](https://github.com/cosmos/cosmos-sdk) from 0.45.0 to 0.45.1. - [Release notes](https://github.com/cosmos/cosmos-sdk/releases) - [Changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.45.1/CHANGELOG.md) - [Commits](https://github.com/cosmos/cosmos-sdk/compare/v0.45.0...v0.45.1) --- updated-dependencies: - dependency-name: github.com/cosmos/cosmos-sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * ci: separate out rpc and integration tests (#931) Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix: wrong comment in EthGasConsumeDecorator (#929) * fix newPendingTransactions subscription deadlock issue (#933) * remove unused parameters from evm spec (#934) * build(deps): bump follow-redirects in /tests/solidity (#939) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * deps: upgrade geth to v1.10.15 (#935) * upgrade geth to v1.10.15 * fix lint * fix imports * revert makefile change * update changelog * Update CHANGELOG.md Co-authored-by: Guillermo Paoletti <[email protected]> * update chain config * add getblockvalue for chain config fork Co-authored-by: Guillermo Paoletti <[email protected]> Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix: base fee check logic in state transition (#932) * fix base fee check logic in state transition - should check london hardfork first, otherwise it panic if feemarket not registered. * fix lint Co-authored-by: Federico Kunze Küllmer <[email protected]> * danburck/release changelog (#942) * release: v0.10.0-alpha changelog (#891) * release: v0.10.0-alpha changelog * deps: IBC v3 alpha2 (#892) * release: v0.10.0-alpha2 (#923) * deps: IBC v3 alpha2 (#892) * Problem: newPendingTransactions filter don't return ethereum tx hash (#900) * impr: support batch eth txs (#901) * support batch eth tx Closes: 896 Allow multiple MsgEthereumTx in single tx * fix transaction receipt api * fix tx receipt api and accumulate tx gas used * fix lint * fix test * fix rpc test * cleanup * fix cumulativeGasUsed and gasUsed * fix lint * Update app/ante/eth.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * Update app/ante/eth.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * Update rpc/ethereum/backend/utils.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * pr suggestions * typo * fix lint Co-authored-by: Federico Kunze Küllmer <[email protected]> * build(deps): bump follow-redirects in /tests/solidity (#909) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.4 to 1.14.7. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.4...v1.14.7) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * rpc: make trace transaction api work with batch tx (#907) * make trace transaction api work with batch tx Closes: #906 fix linter * review suggestion Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix insufficient fee error message (#911) * server: add `api.enable` flag for Cosmos SDK API server (#908) * add api.enable flag for Cosmos SDK Rest server * update changelog Co-authored-by: Federico Kunze Küllmer <[email protected]> * deps: bump Cosmos SDK version to `v0.45.0` (#912) * deps: bump SDK version to v0.45.0 * changelog * deprecation fix * deprecation fix 2 * Integration tests (#913) * ci: semgrep config (#917) * ci: enable semgrep config * fix config * ignore grpc web * fix: default base fee state in genesis (#919) * fix defualt base fee state in genesis Closes: #918 Solution: - initialise the default base fee value in genesis * changelog * fix: minimal-gas-prices and baseFeePerGas conflicts (#916) * Problem: minimal-gas-prices and baseFeePerGas conflicts Closes: #915 Solution: - Don't check min-gas-price for evm tx if london hardfork and feemarket enabled. comments and cleanup changelog * fix zero fee coins Co-authored-by: Federico Kunze Küllmer <[email protected]> Co-authored-by: yihuang <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: crypto-facs <[email protected]> * release: v0.10.0-beta1 changelog (#941) * deps: IBC v3 alpha2 (#892) * Problem: newPendingTransactions filter don't return ethereum tx hash (#900) * impr: support batch eth txs (#901) * support batch eth tx Closes: 896 Allow multiple MsgEthereumTx in single tx * fix transaction receipt api * fix tx receipt api and accumulate tx gas used * fix lint * fix test * fix rpc test * cleanup * fix cumulativeGasUsed and gasUsed * fix lint * Update app/ante/eth.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * Update app/ante/eth.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * Update rpc/ethereum/backend/utils.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * pr suggestions * typo * fix lint Co-authored-by: Federico Kunze Küllmer <[email protected]> * build(deps): bump follow-redirects in /tests/solidity (#909) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.4 to 1.14.7. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.4...v1.14.7) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * rpc: make trace transaction api work with batch tx (#907) * make trace transaction api work with batch tx Closes: #906 fix linter * review suggestion Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix insufficient fee error message (#911) * server: add `api.enable` flag for Cosmos SDK API server (#908) * add api.enable flag for Cosmos SDK Rest server * update changelog Co-authored-by: Federico Kunze Küllmer <[email protected]> * deps: bump Cosmos SDK version to `v0.45.0` (#912) * deps: bump SDK version to v0.45.0 * changelog * deprecation fix * deprecation fix 2 * Integration tests (#913) * ci: semgrep config (#917) * ci: enable semgrep config * fix config * ignore grpc web * fix: default base fee state in genesis (#919) * fix defualt base fee state in genesis Closes: #918 Solution: - initialise the default base fee value in genesis * changelog * fix: minimal-gas-prices and baseFeePerGas conflicts (#916) * Problem: minimal-gas-prices and baseFeePerGas conflicts Closes: #915 Solution: - Don't check min-gas-price for evm tx if london hardfork and feemarket enabled. comments and cleanup changelog * fix zero fee coins Co-authored-by: Federico Kunze Küllmer <[email protected]> * build(deps): bump github.com/cosmos/ibc-go/v3 (#925) * build(deps): bump simple-get from 2.8.1 to 2.8.2 in /tests/solidity (#927) * build(deps): bump github.com/cosmos/cosmos-sdk from 0.45.0 to 0.45.1 (#926) Bumps [github.com/cosmos/cosmos-sdk](https://github.com/cosmos/cosmos-sdk) from 0.45.0 to 0.45.1. - [Release notes](https://github.com/cosmos/cosmos-sdk/releases) - [Changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.45.1/CHANGELOG.md) - [Commits](https://github.com/cosmos/cosmos-sdk/compare/v0.45.0...v0.45.1) --- updated-dependencies: - dependency-name: github.com/cosmos/cosmos-sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * ci: separate out rpc and integration tests (#931) Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix: wrong comment in EthGasConsumeDecorator (#929) * fix newPendingTransactions subscription deadlock issue (#933) * remove unused parameters from evm spec (#934) * build(deps): bump follow-redirects in /tests/solidity (#939) Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * deps: upgrade geth to v1.10.15 (#935) * upgrade geth to v1.10.15 * fix lint * fix imports * revert makefile change * update changelog * Update CHANGELOG.md Co-authored-by: Guillermo Paoletti <[email protected]> * update chain config * add getblockvalue for chain config fork Co-authored-by: Guillermo Paoletti <[email protected]> Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix: base fee check logic in state transition (#932) * fix base fee check logic in state transition - should check london hardfork first, otherwise it panic if feemarket not registered. * fix lint Co-authored-by: Federico Kunze Küllmer <[email protected]> * add release v0.10.0-beta1 CHANGELOG Co-authored-by: Federico Kunze Küllmer <[email protected]> Co-authored-by: yihuang <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: crypto-facs <[email protected]> Co-authored-by: Prajjwol Gautam <[email protected]> Co-authored-by: HaeSung <[email protected]> Co-authored-by: Guillermo Paoletti <[email protected]> Co-authored-by: Federico Kunze Küllmer <[email protected]> Co-authored-by: yihuang <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: crypto-facs <[email protected]> Co-authored-by: Prajjwol Gautam <[email protected]> Co-authored-by: HaeSung <[email protected]> Co-authored-by: Guillermo Paoletti <[email protected]> * build(deps): bump github.com/gorilla/websocket from 1.4.2 to 1.5.0 (#944) Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.4.2 to 1.5.0. - [Release notes](https://github.com/gorilla/websocket/releases) - [Commits](https://github.com/gorilla/websocket/compare/v1.4.2...v1.5.0) --- updated-dependencies: - dependency-name: github.com/gorilla/websocket dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * deps: bump IBC v3-rc0 (#947) * deps: bump IBC v3-rc0 * rm strict * imp: redirect go-ethereum's logs to cosmos logger (#948) * redirect go-ethereum's logs to cosmos logger Closes: #862 Map go-ethereum's log levels to cosmos ones: trace -> debug debug -> debug info -> info warn -> info error -> error crit -> error * changelog * Apply suggestions from code review * Apply suggestions from code review * build(deps): bump github.com/ethereum/go-ethereum from 1.10.15 to 1.10.16 (#945) * build(deps): bump github.com/ethereum/go-ethereum Bumps [github.com/ethereum/go-ethereum](https://github.com/ethereum/go-ethereum) from 1.10.15 to 1.10.16. - [Release notes](https://github.com/ethereum/go-ethereum/releases) - [Commits](https://github.com/ethereum/go-ethereum/compare/v1.10.15...v1.10.16) --- updated-dependencies: - dependency-name: github.com/ethereum/go-ethereum dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * add extra param to config rules * update changelog * update comments Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Freddy Caceres <[email protected]> * feemarket: change basefee to be a module param (#943) * change basefee to a module params * add changelog and fix linter * change params type of basefee and remove default base fee * restaure event * clean code * fix proto * fix protos * fix logic * update rpc tests * fix comment Co-authored-by: Federico Kunze Küllmer <[email protected]> * build(deps): bump github.com/tendermint/tm-db from 0.6.4 to 0.6.7 (#949) Bumps [github.com/tendermint/tm-db](https://github.com/tendermint/tm-db) from 0.6.4 to 0.6.7. - [Release notes](https://github.com/tendermint/tm-db/releases) - [Changelog](https://github.com/tendermint/tm-db/blob/master/CHANGELOG.md) - [Commits](https://github.com/tendermint/tm-db/compare/v0.6.4...v0.6.7) --- updated-dependencies: - dependency-name: github.com/tendermint/tm-db dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs: add spec for feemarket module (#889) * add spec for feemarket * update spec from comments * update spec * update abstract * update with grpc query * add more content for tip section * update specs with latest behavior * cleanup unused store prefix * Update x/feemarket/spec/01_concepts.md * Apply suggestions from code review Co-authored-by: Federico Kunze Küllmer <[email protected]> * rpc: add support for `eth_signedTypedData` (#953) * add signTypedData api * fix typo * fix lint issues * add crypto recovery offset * Apply suggestions from code review * add changelog Co-authored-by: Federico Kunze Küllmer <[email protected]> * build(deps): bump actions/setup-node from 2.5.1 to 3 (#957) Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.5.1 to 3. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v2.5.1...v3) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: websocket client duplicated messages (#955) * Problem: websocket client get duplicated messages Closes: #954 Solution: - localize the subscription management within current connection * changelog * fix linter * fix test building Co-authored-by: Federico Kunze Küllmer <[email protected]> * ante: EIP712 support (#950) * code migrated * signed_data ported to avoid conficting dependency * correct payload * eip712 working with evmos.me * use geth TypedData types * fix linter * minor refactor * test first try * fix test * fix tests * enforce fee delegated eip712 * verify signature refactor * SignedTypedData api refactor * add AnteHandler test for EIP712 * remove comment * code clean up * return more detailed error messages * fix linter * remove unnecesary global vars * Update app/ante/eip712.go Co-authored-by: Federico Kunze Küllmer <[email protected]> * fix pr comments * remove hardcoded value * add more tests * add changelog * use sdk errors * add MsgDelegate test Co-authored-by: Freddy Caceres <[email protected]> Co-authored-by: Federico Kunze Küllmer <[email protected]> Co-authored-by: Federico Kunze Küllmer <[email protected]> Co-authored-by: crypto-facs <[email protected]> Co-authored-by: yihuang <[email protected]> Co-authored-by: dependabot[bot] <496…
Conforming to the spec:
https://github.com/cosmos/cosmos-sdk/blob/e7066c4271ff3d33dc426dc6313c82a1201ae3c6/docs/basics/gas-fees.md#antehandler
Fixes evmos/evmos#311
Description
EthSetupContextDecorator
ante handler initializes the gas meter as an infinite gas meter (with gas limit 0) - https://github.com/tharsis/ethermint/blob/7b22a535569f558dc9083e0833915c745c68be43/app/ante/eth.go#L463This gas meter needs to be reset with the correct gas limit, which accounts for all messages in the transaction. Because then, this value is used to calculate the block's consumed gas, when it is prepared. See:
https://github.com/cosmos/cosmos-sdk/blob/2646b474c7beb0c93d4fafd395ef345f41afc251/baseapp/baseapp.go#L658-L659
https://github.com/tendermint/tendermint/blob/abdf717761e71dca53389a9d218fce8a84f43991/internal/mempool/mempool.go#L365
What was happening was
gasWanted
was always0
(infinite gas meter has a limit of 0), so the block that was proposed would contain all the transactions from the mempool found at that time. When the block was applied, at DeliverTx time, all transactions over the block gas limit were not applied (which is correct), but they would have no way to return to the mempool, because they were already processed. Trying to get a transaction receipt for them would just fail withtransaction not found
.See these logs: https://gist.github.com/loredanacirstea/a935737b2b1cf3cbc0e679efa1787cd0#file-evmos_logs2-txt-L1464
For contributor use:
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerFor admin use:
WIP
,R4R
,docs
, etc)