crypto-facs
bc4b018b60
Context block height fix on TraceTx
( #1051 )
2022-04-16 19:31:30 +02:00
MalteHerrmann
4d63238ab0
tests: Increase coverage for msg.go and access_list_tx.go ( #1044 )
...
* tests: Add tests for MsgEthereumTx getter methods
* tests: Add nil data test for MsgEthereumTx buildTx
* tests: Removed unnecessary sdk>big.Int conversions
in MsgEthereumTx ValidateBasic test
* tests: Replace deprecated ethtypes.NewTransaction
* tests: Add AccessListTx tests
* tests: Fix dropped LegacyTx coverage
* Address PR comments
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-04-12 23:08:14 +02:00
MalteHerrmann
c70701e785
tests: add more dynamic fee tx tests ( #1032 )
2022-04-06 19:54:41 +02:00
Thomas Nguy
56c4a31f10
evm: allow to append logs after a post processing hook ( #1025 )
...
* add log after tx post processing hook
add changelog
fix tests
rename variable
minimum change version
* Update x/evm/keeper/state_transition.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-04-05 15:38:18 +00:00
Thomas Nguy
8202a097f2
fix: lint workflow ( #1028 )
...
* fix lint workflow
* fix comment
* remove format
* change checkout with setup-go
* update comment
* add checkout
* add lint issue
* revert lint error
2022-04-05 15:00:54 +02:00
Loredana Cirstea
cc37ed283a
evm: PostTxProcessing hook - include the full message data ( #1027 )
...
* x/evm - PostTxProcessing use message as callback input
* Update CHANGELOG.md
* Use core.Message for the PostTxProcessing hook (PR review)
2022-04-04 20:11:46 +02:00
Federico Kunze Küllmer
285c7c47d7
evm: update empty hash check for storage state ( #1016 )
2022-03-29 12:57:52 +00:00
Loredana Cirstea
77d9e29923
fix: GasMeter reset in AnteHandler EthGasConsumeDecorator
( #964 )
...
* Fix GasMeter reset in AnteHandler - EthGasConsumeDecorator
Conforming to the spec:
e7066c4271/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
crypto-facs
4aa5d0b26a
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 <31522760+fedekunze@users.noreply.github.com>
* Update app/ante/eth.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* Update rpc/ethereum/backend/utils.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* pr suggestions
* typo
* fix lint
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* 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] <support@github.com>
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 <31522760+fedekunze@users.noreply.github.com>
* 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 <31522760+fedekunze@users.noreply.github.com>
* 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 <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: crypto-facs <84574577+crypto-facs@users.noreply.github.com>
* 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 <31522760+fedekunze@users.noreply.github.com>
* Update app/ante/eth.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* Update rpc/ethereum/backend/utils.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* pr suggestions
* typo
* fix lint
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* 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] <support@github.com>
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 <31522760+fedekunze@users.noreply.github.com>
* 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 <31522760+fedekunze@users.noreply.github.com>
* 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 <31522760+fedekunze@users.noreply.github.com>
* 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] <support@github.com>
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 <31522760+fedekunze@users.noreply.github.com>
* 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] <support@github.com>
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 <guillermo.paoletti@gmail.com>
* update chain config
* add getblockvalue for chain config fork
Co-authored-by: Guillermo Paoletti <guillermo.paoletti@gmail.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* 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 <31522760+fedekunze@users.noreply.github.com>
* add release v0.10.0-beta1 CHANGELOG
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: crypto-facs <84574577+crypto-facs@users.noreply.github.com>
Co-authored-by: Prajjwol Gautam <not@acyb.org>
Co-authored-by: HaeSung <hea9549.github@gmail.com>
Co-authored-by: Guillermo Paoletti <guillermo.paoletti@gmail.com>
* 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 <31522760+fedekunze@users.noreply.github.com>
* Update app/ante/eth.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* Update rpc/ethereum/backend/utils.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* pr suggestions
* typo
* fix lint
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* 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] <support@github.com>
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 <31522760+fedekunze@users.noreply.github.com>
* 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 <31522760+fedekunze@users.noreply.github.com>
* 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 <31522760+fedekunze@users.noreply.github.com>
* 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] <support@github.com>
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 <31522760+fedekunze@users.noreply.github.com>
* 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] <support@github.com>
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 <guillermo.paoletti@gmail.com>
* update chain config
* add getblockvalue for chain config fork
Co-authored-by: Guillermo Paoletti <guillermo.paoletti@gmail.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* 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 <31522760+fedekunze@users.noreply.github.com>
* 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 <31522760+fedekunze@users.noreply.github.com>
* Update app/ante/eth.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* Update rpc/ethereum/backend/utils.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* pr suggestions
* typo
* fix lint
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* 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] <support@github.com>
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 <31522760+fedekunze@users.noreply.github.com>
* 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 <31522760+fedekunze@users.noreply.github.com>
* 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 <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: crypto-facs <84574577+crypto-facs@users.noreply.github.com>
* 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 <31522760+fedekunze@users.noreply.github.com>
* Update app/ante/eth.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* Update rpc/ethereum/backend/utils.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* pr suggestions
* typo
* fix lint
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* 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] <support@github.com>
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 <31522760+fedekunze@users.noreply.github.com>
* 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 <31522760+fedekunze@users.noreply.github.com>
* 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 <31522760+fedekunze@users.noreply.github.com>
* 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] <support@github.com>
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 <31522760+fedekunze@users.noreply.github.com>
* 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] <support@github.com>
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 <guillermo.paoletti@gmail.com>
* update chain config
* add getblockvalue for chain config fork
Co-authored-by: Guillermo Paoletti <guillermo.paoletti@gmail.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* 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 <31522760+fedekunze@users.noreply.github.com>
* add release v0.10.0-beta1 CHANGELOG
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: crypto-facs <84574577+crypto-facs@users.noreply.github.com>
Co-authored-by: Prajjwol Gautam <not@acyb.org>
Co-authored-by: HaeSung <hea9549.github@gmail.com>
Co-authored-by: Guillermo Paoletti <guillermo.paoletti@gmail.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: crypto-facs <84574577+crypto-facs@users.noreply.github.com>
Co-authored-by: Prajjwol Gautam <not@acyb.org>
Co-authored-by: HaeSung <hea9549.github@gmail.com>
Co-authored-by: Guillermo Paoletti <guillermo.paoletti@gmail.com>
* 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] <support@github.com>
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] <support@github.com>
* 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 <freddy.caceres@crypto.com>
* 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 <31522760+fedekunze@users.noreply.github.com>
* 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] <support@github.com>
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 <31522760+fedekunze@users.noreply.github.com>
* 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 <31522760+fedekunze@users.noreply.github.com>
* 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] <support@github.com>
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 <31522760+fedekunze@users.noreply.github.com>
* 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 <31522760+fedekunze@users.noreply.github.com>
* fix pr comments
* remove hardcoded value
* add more tests
* add changelog
* use sdk errors
* add MsgDelegate test
Co-authored-by: Freddy Caceres <freddy.caceres@crypto.com>
Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: crypto-facs <84574577+crypto-facs@users.noreply.github.com>
Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: crypto-facs <84574577+crypto-facs@users.noreply.github.com>
Co-authored-by: Prajjwol Gautam <not@acyb.org>
Co-authored-by: HaeSung <hea9549.github@gmail.com>
Co-authored-by: Guillermo Paoletti <guillermo.paoletti@gmail.com>
Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com>
Co-authored-by: Freddy Caceres <freddy.caceres@crypto.com>
Co-authored-by: Thomas Nguy <81727899+thomas-nguy@users.noreply.github.com>
* add returnValue message on tracing
* Update x/evm/keeper/grpc_query.go
* changelog 2
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com>
Co-authored-by: Prajjwol Gautam <not@acyb.org>
Co-authored-by: HaeSung <hea9549.github@gmail.com>
Co-authored-by: Guillermo Paoletti <guillermo.paoletti@gmail.com>
Co-authored-by: Thomas Nguy <81727899+thomas-nguy@users.noreply.github.com>
Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.com>
2022-03-02 02:14:21 +00:00
Thomas Nguy
bf54193669
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 <31522760+fedekunze@users.noreply.github.com>
2022-02-23 19:48:44 +01:00
dependabot[bot]
f21592ebfe
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] <support@github.com>
* 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 <freddy.caceres@crypto.com>
2022-02-19 00:57:43 +00:00
yihuang
f7009b0e94
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 <31522760+fedekunze@users.noreply.github.com>
2022-02-15 12:01:30 +01:00
crypto-facs
aeedef9b4b
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 <guillermo.paoletti@gmail.com>
* update chain config
* add getblockvalue for chain config fork
Co-authored-by: Guillermo Paoletti <guillermo.paoletti@gmail.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-02-14 23:08:41 +00:00
yihuang
b51907a949
remove unused parameters from evm spec ( #934 )
2022-02-11 11:41:20 +01:00
yihuang
724a06632b
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 <31522760+fedekunze@users.noreply.github.com>
2022-01-26 10:44:41 +00:00
yihuang
e39a74998e
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
2022-01-26 11:36:07 +01:00
crypto-facs
04f595d3d5
Integration tests ( #913 )
2022-01-20 22:05:02 +00:00
yihuang
7d8664043e
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 <31522760+fedekunze@users.noreply.github.com>
* Update app/ante/eth.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* Update rpc/ethereum/backend/utils.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* pr suggestions
* typo
* fix lint
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-01-14 10:37:33 +01:00
yihuang
5e15c64d02
fix: make gas estimation test reproducible ( #890 )
...
Closes : #536
Solution: Use a fixed test account.
The source of non-deterministic is tx's intrinsic gas is different according to different number of zeros in input data,
so to make sure the gas number is reproducible, and the randomly generated test address is included in that.
2022-01-07 14:04:16 +01:00
yihuang
e6c9b7723b
evm: improve test coverage of statedb
package ( #888 )
...
Closes : #876
- coverage: 99.3% of statements
2022-01-06 18:10:51 +01:00
yihuang
f5b61e914e
docs: update evm spec to cover statedb refactoring changes ( #885 )
...
* update evm spec to cover statedb refactoring changes
Closes : #879
* Update x/evm/spec/02_state.md
Co-authored-by: yihuang <huang@crypto.com>
* Update x/evm/spec/02_state.md
Co-authored-by: yihuang <huang@crypto.com>
Co-authored-by: Daniel Burckhardt <daniel.m.burckhardt@gmail.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-01-06 10:58:10 +01:00
Federico Kunze Küllmer
4320f46fc8
types, evm: refactor accounts ( #884 )
...
* types,evm: refactor accounts
* fix
* fix panic
* changelog
* fix
* lint, rm dbErr
2022-01-05 19:18:02 +01:00
Federico Kunze Küllmer
eea80d50c3
evm: improve error message for invalid account ( #883 )
...
* evm: improve error message for invalid account
* fix
2022-01-05 15:08:31 +01:00
yihuang
ade84319e6
evm: refactor statedb implementation ( #729 )
...
* initial statedb module
unit tests
unit tests
keeper implementation
extract TxConfig
remove unused code
* keeper integration
* fix unit tests
* Apply suggestions from code review
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* fixup! initial statedb module
* changelog
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-01-05 08:28:27 +01:00
yihuang
8e4ff5aae2
evm: validate code hash in GenesisAccount
( #873 )
...
* Validate code hash in GenesisAccount
Closes : #872
* changelog
2022-01-04 15:21:32 +01:00
yihuang
7c53e32c78
fix: several issues with the passing receipt to hooks change ( #869 )
...
Closes : #868
Solution:
- contract address in receipt should only be the newly created contract
- fix the order of operations in state transition
- compute contract address in `ApplyTransaction` on the fly
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-01-04 12:02:41 +01:00
yihuang
7ec5e5fdef
fix: set correct nonce in EthCall/EstimateGas ( #871 )
...
* fix: set correct nonce in EthCall/EstimateGas
Closes : #870
* Update CHANGELOG.md
* unit test
2022-01-04 11:55:30 +01:00
Ramiro Carlucho
b9804505a3
evm: change Hook
to use tx Receipt
( #849 )
...
* Change evm_hook to use Transaction Receipt
* use ethtypes.Receipt
* wip changes
* fix receipt creation
* receipt fixes
* check for contract addr
* changelog
* test
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.com>
2022-01-03 17:18:13 +01:00
yihuang
eb17366dcc
fix: consistent BaseFee check logic ( #855 )
...
Closes : #755
```
if not london_hardfork {
# reject DynamicFeeTx
# no `baseFeePerGas` field in block response
# baseFee = nil
} else {
# allow DynamicFeeTx
# add `baseFeePerGas` field in block response
if feemarketParams.NoBaseFee or height < feemarketParams.EnableHeight {
# baseFee = 0
} else {
# init baseFee to initBaseFee and adjust in later blocks
}
}
```
Update x/evm/keeper/keeper.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
add unit tests
Update app/ante/utils_test.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
changelog
2021-12-28 07:59:28 +00:00
yihuang
d822fee5c1
fix: contract address in contract creation receipt ( #851 )
...
* Problem: contract address in contract creation receipt is wrong
Closes : #850
- decrease nonce before evm.create
- add unit tests and rpc tests
* add changelog
2021-12-28 08:55:40 +01:00
Prajjwol Gautam
0777d0b670
Merge pull request from GHSA-mx3r-7hpq-fr4g
...
* reject invalid `MsgEthereumTx` wrapping tx
Update CHANGELOG.md
* added a unit test
* reject invalid `MsgEthereumTx` wrapping tx in a non-breaking way
Update CHANGELOG.md
* delete code and state on suicide
* fix suicide tests
* update changelog
* update changelog
* delete code hash on suicide
* simplifies delete code
* Apply suggestions from code review
* Update app/ante/ante.go
Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com>
Co-authored-by: Freddy Caceres <freddy.caceres@crypto.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-12-23 08:07:23 -08:00
Daniel Burckhardt
fd338cbf6b
docs(evm): Clean up remaining intrarelayer text on docs ( #846 )
...
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-12-16 23:41:25 +01:00
yihuang
e437c4331d
fix: increase nonce in ante handler for contract creation tx ( #809 )
...
Closes : #808
Solution:
- move nonce increment to ante handler
- revert nonce increment in apply message
build(deps): bump github.com/spf13/viper from 1.9.0 to 1.10.0 (#833 )
Bumps [github.com/spf13/viper](https://github.com/spf13/viper ) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/spf13/viper/releases )
- [Commits](https://github.com/spf13/viper/compare/v1.9.0...v1.10.0 )
---
updated-dependencies:
- dependency-name: github.com/spf13/viper
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
fix: remove unused code (#834 )
Co-authored-by: Marko Baricevic <markobaricevic3778@gmail.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
rm
rm pkg
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-12-16 22:35:28 +00:00
yihuang
514785bd89
rpc: optimize tx index lookup ( #810 )
...
Closes : #760
Solution:
- emit tx index to cosmos events
- rpc side try to use the events, but fallback to heavier approach when fails.
Update rpc/ethereum/namespaces/eth/api.go
changelog
fix lint
fix TxIndexFromEvents
fix
Update rpc/ethereum/backend/backend.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-12-16 22:30:22 +00:00
yihuang
845bef6dab
fix broken tracer unit test ( #847 )
2021-12-16 01:21:06 +00:00
Emmanuel T Odeke
66292080e4
x/evm/types: properly split in 32 chunks trace.Memory ( #838 )
...
This change fixes an insidious bug that unfortunately
tried to split values in multiples of 32, but unfortunately
due to the loop conditions, if the length of trace.Memory
was less than 32, nothing would be added; if the value wasn't
a multiple of 32, the ends wouldn't be added in.
Fixes #837
2021-12-15 02:29:49 +00:00
yihuang
ccc6f5b53d
fix: use EffectiveGasPrice
in ante handler for dynamic fee tx ( #817 )
...
* Use effectiveGasPrice in ante handler for dynamic fee tx
Closes : #814
Solution:
- use effectiveGasPrice when check minimal-gas-prices, and deduct fee in ante handler
- implement an EthMempoolFeeDecorator
* add effectiveGasPrice to tx receipt
* changelog
* fix unit test
* fix comments
* add comments
* Apply suggestions from code review
Co-authored-by: Thomas Nguy <81727899+thomas-nguy@users.noreply.github.com>
* review suggestions
Co-authored-by: Thomas Nguy <81727899+thomas-nguy@users.noreply.github.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-12-15 02:17:03 +00:00
Emmanuel T Odeke
5d237a5ee4
fix: remove duplicated gasPrice derivation ( #836 )
...
Noticed in an audit, this change removes a duplicated gasPrice
conversion that was first made in:
423944bf79/x/evm/types/tx_args.go (L76-L78)
as well as in
423944bf79/x/evm/types/tx_args.go (L88-L90)
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-12-15 03:05:11 +01:00
yihuang
924232f02e
fix: empty log topics shouldn't be encoded as nil ( #840 )
...
* Problem: empty topics shouldn't be encoded as nil
Closes : #839
Solution:
- encode it as empty array
* fix unit tests
* changelog
2021-12-14 15:52:22 +01:00
Emmanuel T Odeke
423944bf79
x/evm/types: use ethtypes.Transaction.To for cheaper retrieval ( #835 )
...
Following suit with PR #828 , this change cuts down the expenses
from using .To doubly; yet using the Go in-condition variable idiom.
Updates #826
2021-12-13 17:28:02 -08:00
Emmanuel T Odeke
a2f246c2a6
x/evm/keeper: use the fastest slice making idiom for Keeper.EthereumTx.Logs ( #827 )
...
Uses the fastest slice making idiom of creating the well known
size of a slice using
make([]sdk.Attribute, len(response.Logs))
for i, log := range response.Logs {
txLogAttrs[i] = ...
}
instead of
make([]sdk.Attribute, 0)
for _, log := range response.Logs {
txLogAttrs = append(txLogAttrs, ...)
}
which had a few problems:
1. Using 0 for size then appending is quite slow yet we know the exact size
2. Using append instead of indexing is slower
If we examine the advisory at https://bencher.orijtech.com/perfclinic/sliceupdate/
and the verdict at https://bencher.orijtech.com/perfclinic/sliceupdate/#verdict
this new scheme shows a massive improvement in that call site.
Fixes #825
2021-12-14 00:05:12 +00:00
Emmanuel T Odeke
8333765b27
x/evm/keeper: save 24B with Go in-condition variable idiom ( #828 )
...
* x/evm/keeper: save 24B with Go in-condition variable idiom
The prior code doubly invoked (*ethereum/go-ethereum/core/types.Transaction).To()
which is quite expensive, and firstly copies 20 bytes each time, then
that gets rounded up to the proper size class/pointer alignment so on
64-bit machines 20B -> 24B.
Isolating a benchmark for this code per issue #826 shows this saves
quite a bit of bytes and some nano seconds which all count up towards
the transactions per seconds being processed:
```shell
$ benchstat before.txt after.txt
name old time/op new time/op delta
CopyAddr-8 38.4ns ± 3% 19.3ns ± 3% -49.66% (p=0.000 n=10+10)
name old alloc/op new alloc/op delta
CopyAddr-8 48.0B ± 0% 24.0B ± 0% -50.00% (p=0.000 n=10+10)
name old allocs/op new allocs/op delta
CopyAddr-8 2.00 ± 0% 1.00 ± 0% -50.00% (p=0.000 n=10+10)
```
Fixes #826
* changelog
* lint
* Revert stray changes that were used in testing
* rm log
Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.com>
2021-12-14 00:51:36 +01:00
Daniel Burckhardt
54fa882ab8
docs: update EVM spec ( #824 )
2021-12-10 20:15:17 +01:00
Federico Kunze Küllmer
705893c0ac
tests: eth_sendRawTx ( #804 )
...
* tests: eth_sendRawTx
* update tests
* rm println
2021-12-01 09:38:59 +01:00
yihuang
3b0fa63832
evm: clear access list for each transaction ( #802 )
...
* Clear access list for each transaction
Closes : #801
* changelog
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-11-30 12:36:10 +01:00
yihuang
e6d0eff957
evm: ForEachStorage
semantic not compatible with go-ethereum ( #798 )
...
* Problem: ForEachStorage sematic not compatible with go-ethereum
Solution:
- reversed the semantic of return value of the callback function.
* changelog
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-11-30 10:34:33 +00:00
Federico Kunze Küllmer
841c93cd65
feat: store migration setup ( #794 )
...
* feat: store migration setup
* comment
* changelog
2021-11-29 16:46:20 +01:00
yihuang
c8d4d3f9a3
fix: improve error message in SendTransaction
json-rpc api ( #786 )
...
* fix error message in `SendTransaction` json-rpc api
Closes : #785
Solution:
- Remove `stacktrace.Propagate`s, and recover error message in jsonrpc server
changelog
fix error messages
* Update x/evm/keeper/msg_server.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-11-26 15:19:28 +01:00
Jongwhan Lee
392d1dd8cf
rpc: eth_feeHistory
( #734 )
...
* Problem: missing json rpc of eth_feeHistory #685
add oracle backend
space ready
structure ok
refactoring
return feehistory
data flow ok
basefee
set gas used ratio
computing reward
add testing
add gas used
prepare data
fill reward
increase coin
fixing api
add mac
add launch
gas used ratio ok
print element
reward workes
reward working
fix panic
value correct
remove debugging log
tidy up
tidy up
remove oracle
tidy up
fix handler crash
add unit test
tidy up
add limit check
reformat
fix lint
fix lint
fix lint
fix lint
Update rpc/ethereum/backend/feebackend.go
thanks
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Update rpc/ethereum/backend/feebackend.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Update rpc/ethereum/backend/feebackend.go
thanks
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Update rpc/ethereum/backend/feebackend.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
fix compile error
split lines
remove temporary string conversion
return error if gaslimit is 0
move OneFeeHistory to types
add comment
only err check
Update rpc/ethereum/backend/feebackend.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Update rpc/ethereum/backend/feebackend.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
tidy up
add feehistory-cap
* Apply suggestions from code review
* changelog
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.com>
2021-11-17 11:58:52 +00:00
yihuang
b7e8dd8216
fix: don't revert gas refund logic when transaction reverted ( #751 )
...
* fix gas consumption when reverted
Apply suggestions from code review
changelog
* comments
* Update x/evm/keeper/state_transition.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-11-16 14:49:59 +00:00