Commit Graph

1075 Commits

Author SHA1 Message Date
dependabot[bot]
1baccfaee5
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>
2022-02-14 23:57:09 +01:00
yihuang
b51907a949
remove unused parameters from evm spec (#934) 2022-02-11 11:41:20 +01:00
crypto-facs
e16b7f8ab0
fix newPendingTransactions subscription deadlock issue (#933) 2022-02-10 03:10:37 +01:00
HaeSung
7b22a53556
fix: wrong comment in EthGasConsumeDecorator (#929) 2022-02-09 14:03:12 +00:00
Prajjwol Gautam
f32288b16d
ci: separate out rpc and integration tests (#931)
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-02-09 14:56:12 +01:00
dependabot[bot]
03a03b211a
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>
2022-02-07 12:28:25 +01:00
dependabot[bot]
4ccc17324b
build(deps): bump simple-get from 2.8.1 to 2.8.2 in /tests/solidity (#927) 2022-02-04 11:39:47 +01:00
dependabot[bot]
628a7fa18e
build(deps): bump github.com/cosmos/ibc-go/v3 (#925) 2022-02-04 11:34:52 +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
Federico Kunze Küllmer
fd3c803b44
ci: semgrep config (#917)
* ci: enable semgrep config

* fix config

* ignore grpc web
2022-01-24 15:35:02 +01:00
crypto-facs
04f595d3d5
Integration tests (#913) 2022-01-20 22:05:02 +00:00
Federico Kunze Küllmer
43c4d7c3fb
deps: bump Cosmos SDK version to v0.45.0 (#912)
* deps: bump SDK version to v0.45.0

* changelog

* deprecation fix

* deprecation fix 2
2022-01-18 22:02:10 +01:00
crypto-facs
0a01cead67
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>
2022-01-17 19:08:02 +01:00
yihuang
317f5b43b5
fix insufficient fee error message (#911) 2022-01-17 07:12:13 +01:00
yihuang
351e6d6eb3
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>
2022-01-16 15:36:19 +00:00
dependabot[bot]
0b92af406a
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>
2022-01-16 16:27:21 +01: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
aeb6aeb715
Problem: newPendingTransactions filter don't return ethereum tx hash (#900) 2022-01-13 13:12:57 +00:00
Federico Kunze Küllmer
cad7545f8a
deps: IBC v3 alpha2 (#892) 2022-01-07 14:15:44 +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
Federico Kunze Küllmer
8eaffe88a5
deps: IBC v3 alpha2 (#882) 2022-01-05 14:08:04 +01:00
dependabot[bot]
2a58069002
build(deps): bump technote-space/get-diff-action from 5 to 6.0.1 (#880) 2022-01-05 11:34:28 +01:00
Prajjwol Gautam
4ec794204c
fix: moving rpc tests to integration_test.go (#875)
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-01-05 08:41:36 +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
e9f1ab646c
fix: GetBlock rpc api reports wrong gasUsed (#878)
* GetBlock rpc api report wrong gasUsed

Closes: #877

Solution:
- workaround at rpc side, ignore the gasUsed in such cases.

* Update rpc/ethereum/backend/backend.go

* changelog
2022-01-05 08:26:59 +01:00
Federico Kunze Küllmer
03768c20cb
deps: update SDK to v0.45 release branch (#874)
* deps: update SDK to v0.45 release branch

* add modules

* fix modules

* fix modules
2022-01-04 17:00:37 +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
Federico Kunze Küllmer
d34aa09610
deps: IBC v3-alpha (#867)
* deps: IBC v3

* fix app.go
2022-01-03 17:30:28 +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
9f4828e5bb
fix: wrong gas limit is wrong when adjust base fee (#832)
Closes: #823

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-01-03 17:07:26 +01:00
Federico Kunze Küllmer
4cb2737647
ante: update ante handler internals (#866)
* update ante handler internals

* update options

* changelog
2022-01-02 23:44:46 +01:00
crypto-facs
42cd3f5a4d
Add criteria to filter (#865) 2021-12-31 18:08:08 +01:00
yihuang
ced5280571
fix: OOM when eth_getLogs response too large (#860)
* fix: OOM when eth_getLogs response too large

Closes: #858

- add limit to number of logs of filter response
- make block limit and log limit configurable

* return error if exceeds log limit

* Apply suggestions from code review

* parse from config

* read cli flags

* add to config template

* fix bloomFilter

* changelog

* add validation

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-12-29 22:47:25 +01:00
dependabot[bot]
fdfe3d9761
build(deps): bump actions/setup-node from 2.5.0 to 2.5.1 (#863)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.5.0 to 2.5.1.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2.5.0...v2.5.1)

---
updated-dependencies:
- dependency-name: actions/setup-node
  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>
2021-12-29 15:52:02 +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
yihuang
8bc3cc471b
fix: web3 client doesn't expect a nil baseFeePerGas (#854)
Closes: #853

Solution:
- only set baseFeePerGas when base fee is not nil.

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-12-23 16:12:05 +00: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
dependabot[bot]
bd2c7f2072
build(deps): bump github.com/rs/cors from 1.8.0 to 1.8.2 (#852) 2021-12-22 12:01:35 +01: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
e752d80e9f
feekeeper: remove redundant code (#815) 2021-12-16 23:24:53 +01:00