Commit Graph

1161 Commits

Author SHA1 Message Date
Federico Kunze Küllmer
73c9ea218e
fix(rpc): fix panic on breaking EVM and feemarket params (#1188)
* release: v0.17.0 changelog (#1153)

* release: v0.17.0 changelog

* rm newline

* update link

* fix(rpc): fix panic on breaking EVM and feemarket params

* changelog

* fix gosec
2022-07-19 17:00:43 +02:00
yihuang
ea81e15d04
imp: NewAnteHandler returns error if input not valid (#1173)
make NewAnteHandler safer too use, and closer to cosmos-sdk api.
extracted from https://github.com/evmos/ethermint/pull/1168
2022-07-19 06:50:31 +02:00
Daniel Burckhardt
969794c5b4
impr(evm): add check msg.Validate check to prevent 0 gas txs (#1174)
* impr(evm): add check msg.Validate check to prevent 0 gas txs

* add changelog

* impr(evm): add integration tests for zero gas txs

* go mod tidy and proto swagger

* fix comment

* move changelog to state machine breaking

* add ReadHeaderTimeout`

* revert ReadHeaderTimeout config change

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-07-18 22:21:04 +02:00
yihuang
b74b37f5f0
fix: traceTransaction returns zero gas used (#1179)
* Problem: traceTransaction returns zero gas used

Solution:
- call CaptureTxStart and CaptureTxEnd

* fix trace unit tests

* add overflow check

* add comment

* check gas used is positive

* Update x/evm/keeper/state_transition.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-07-18 22:16:28 +02:00
crypto-facs
da8fcc3ae2
fix(rpc): optimize eth_getBalance endpoint (#1169)
* optimize get balance endpoint

* add comment

* add changelog

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-07-11 15:04:45 +00:00
yihuang
9ae73b670b
deps: upgrade ibc-go to v4-rc (#1167)
changelog

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-07-11 13:18:03 +00:00
yihuang
b7c85beba3
imp(all): setup a validator in the test genesis (#1171)
It's disabled in cosmos-sdk 0.46's InitGenesis to have zero validators,
prepare for the upgrade of cosmos-sdk 0.46.
2022-07-11 14:42:59 +02:00
adu-crypto
3d2f72a153
fix: TestAppStateDeterminism could fail owing to non-determinism in cosmos-sdk simulation (#1166)
* update cosmos-sdk to latest commit to fix simulation failure

* fix typo: 'staking genesis' -> 'evm genesis'

Co-authored-by: Adu <foriteration@gmail.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-07-08 11:13:34 +00:00
crypto-facs
4a6f4fd6e0
imp(deps): Geth upgrade v1.10.19 (#1159)
* upgrade geth and fix build

* add support for

* update EIPs

* fix keeper tests

* update traceTx function with latest geth changes

* remove unnecessary comments

* fix tests

* update proto

* add migrations

* update module version

* fix grpc test

* fix lint

* fix lint

* update changelog

* fix typo

* remove unnecessary format logs

* Update proto/ethermint/evm/v1/evm.proto

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* remove debug true on default

* update comments

* fixing ante tests

* fixed cycle imports on migrate_test

* fix wrong naming

* update comment

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-07-08 10:58:04 +00:00
Daniel Burckhardt
4a66ff95d9
feemarket(specs): add hint on different gas terminology for gas in Cosmos and Ethereum (#1165) 2022-07-01 13:55:19 +02:00
dependabot[bot]
31c3660951
build(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0 (#1163)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.5 to 1.8.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.5...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  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>
2022-06-30 15:41:32 +02:00
Daniel Burckhardt
b7878fd6f1
fix goreleaser (#1160)
* impr(init.sh): remove increase block time

* bug(goreleaser): update docker image
2022-06-29 19:08:28 +02:00
Aditya Saravanan
de21773842
fix(ci): fix semgrep issue (#1157) 2022-06-27 19:50:24 +02:00
Federico Kunze Küllmer
ccf66cf36e
release: backport v0.17.0 changelog (#1155)
* release: v0.17.0 changelog (#1153)

* release: v0.17.0 changelog

* rm newline

* update link

* update mergify
2022-06-27 12:56:29 +02:00
Federico Kunze Küllmer
3ac8b93a1c
evm: cleanup, remove atlas/ (#1152)
* evm: cleanup, remove atlas/

* rm tparse action

* fix lint issue

* use cases.NoLower

* tidy
2022-06-27 11:58:44 +02:00
Federico Kunze Küllmer
27ade5d731
deps: Go 1.18 (#1147)
* deps: Go 1.18

* changelog

* update
2022-06-24 18:16:19 +02:00
dependabot[bot]
4a9bf0e91e
build(deps): bump github.com/stretchr/testify from 1.7.4 to 1.7.5 (#1148) 2022-06-24 13:33:21 +02:00
yihuang
2ce168526a
fix!: fix json-rpc failures for pruned nodes (#1126)
* fix json-rpc failures for pruned nodes

Closes: #1123
Solution:
- try to parse base fee from events if grpc query failed
- use a `nil` base fee if failed to parse base fee from events
- use zero address if query validator address failed
- optimize some json-rpc apis by the way.

* changelog

* fix lint

* use GetTendermintBlockResultByNumber

* refactor

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-06-22 13:26:20 +02:00
Daniel Burckhardt
d3333418c5
bug(feemarket): set lower bound of base fee to min gas price param (#1135)
* bug(feemarket): set lower bound of base fee to min gas price param)

* fix

* bug(feemarket): flag necessary improvement to integration tests, as the baseFee changes for every test

* bug(feemarket): add unit tests for CalculateBaseFee

* bug(feemarket): move integration test setup out of Describe block

* wip fix tests

* bug(feemarket): fix integration tests

* bug(feemarket): wip improve specs

* bug(feemarket): add spec concepts

* bug(feemarket): remove todo

* bug(feemarket): remove changes used for debugging in params

* bug(feemarket): remove todo in integration test

* add changelog

* address PR comments

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-06-22 12:57:16 +02:00
Federico Kunze Küllmer
8e2c65295f
imp(evm): rename RejectUnprotectedTx to AllowUnprotectedTxs (#1142)
* imp(evm): rename RejectUnprotectedTx to AllowUnprotectedTxs

* changelog
2022-06-22 12:51:14 +02:00
Federico Kunze Küllmer
3b852f723e
imp(rpc): restrict unprotected txs on the node RPC (#1143)
* imp(rpc): restrict unprotected txs on the node RPC

* lint

* send raw transaction

* c++
2022-06-22 12:50:36 +02:00
dependabot[bot]
8817e8052a
build(deps): bump bufbuild/buf-setup-action from 1.5.0 to 1.6.0 (#1145)
Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](https://github.com/bufbuild/buf-setup-action/compare/v1.5.0...v1.6.0)

---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
  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>
2022-06-22 12:43:13 +02:00
Aditya Saravanan
8eb8e51894
fix(ci): buf makefile dependency, update semgrep workflow (#1144) 2022-06-22 10:28:23 +02:00
yihuang
6cf2b9fdd3
fix(evm): clear logs if tx failed in post processing hooks (#1128)
* Problem: clear logs if tx failed in post processing hooks

* Update x/evm/keeper/state_transition.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-06-21 13:21:52 +02:00
dependabot[bot]
5e55e5c444
build(deps): bump github.com/stretchr/testify from 1.7.2 to 1.7.4 (#1141)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.2 to 1.7.4.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.2...v1.7.4)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  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-06-21 13:18:53 +02:00
crypto-facs
494d646539
fix(rpc): Fix GasPrice calculation with relation to MinGasPrice (#1138)
* fix gasPrice minGasPrice comparison

* update changelog

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-06-21 13:13:13 +02:00
dependabot[bot]
667940d890
build(deps): bump github.com/spf13/cobra from 1.4.0 to 1.5.0 (#1140)
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.4.0...v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  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>
2022-06-21 13:11:23 +02:00
dependabot[bot]
47ac4f99ff
build(deps): bump technote-space/get-diff-action from 6.0.1 to 6.1.0 (#1139)
Bumps [technote-space/get-diff-action](https://github.com/technote-space/get-diff-action) from 6.0.1 to 6.1.0.
- [Release notes](https://github.com/technote-space/get-diff-action/releases)
- [Changelog](https://github.com/technote-space/get-diff-action/blob/main/.releasegarc)
- [Commits](https://github.com/technote-space/get-diff-action/compare/v6.0.1...v6.1.0)

---
updated-dependencies:
- dependency-name: technote-space/get-diff-action
  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>
2022-06-21 12:53:00 +02:00
Federico Kunze Küllmer
ec8e93b319
all: rename go module to evmos/ethermint (#1137) 2022-06-19 11:43:41 +02:00
crypto-facs
a8d3805ddf
rpc: add ws log on read loop break (#1127)
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-06-16 11:25:22 +02:00
dependabot[bot]
20f9b04006
build(deps): bump github.com/cosmos/ibc-go/v3 from 3.0.0 to 3.1.0 (#1129)
Bumps [github.com/cosmos/ibc-go/v3](https://github.com/cosmos/ibc-go) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/cosmos/ibc-go/releases)
- [Changelog](https://github.com/cosmos/ibc-go/blob/v3.1.0/CHANGELOG.md)
- [Commits](https://github.com/cosmos/ibc-go/compare/v3.0.0...v3.1.0)

---
updated-dependencies:
- dependency-name: github.com/cosmos/ibc-go/v3
  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>
2022-06-16 11:21:26 +02:00
yihuang
8f932ddc6a
!feat(evm): Reject not replay-protected tx to prevent replay attack (#1124)
* Reject not replay-protected tx to prevent replay attack

Closes: #1122

- reject such txs in ante handler

* add reject unprotected parameter

* Update CHANGELOG.md

* Apply suggestions from code review

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* pr suggestions

* add unit test case

* Reject not replay-protected tx to prevent replay attack

Closes: #1122

- reject such txs in ante handler

add reject unprotected parameter

Update CHANGELOG.md

Apply suggestions from code review

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

pr suggestions

add unit test case

use var

* add migrations

* Apply suggestions from code review

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* rename

* update comments

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-06-13 09:41:53 +00:00
yihuang
82835307c7
imp(feemarket): min-gas-multiplier parameter should accept zero value (#1120)
* min-gas-multiplier parameter should accept zero value

update min-gas-multiplier validation logic

* fix unit test

* changelog

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-06-09 11:20:50 +02:00
crypto-facs
b3fa23e6cb
fix(types): account type method (#1118)
* fix account type method

* update changelog
2022-06-08 17:53:07 +02:00
Federico Kunze Küllmer
b567624d6a
tests: update consensus params (#1117)
* tests: update consensus params

* fix
2022-06-08 15:21:51 +02:00
dependabot[bot]
55373e0084
build(deps): bump github.com/stretchr/testify from 1.7.1 to 1.7.2 (#1115)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.1...v1.7.2)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  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-06-06 19:36:34 +02:00
Federico Kunze Küllmer
23f88315e8
ante: refactor (#1113) 2022-06-06 10:15:10 +02:00
mmsqe
707b49d0fb
fix(types): avoid invalid account error on create vesting account (#1112)
* avoid invalid account error on create vesting account

* this change is related to https://github.com/cosmos/cosmos-sdk/pull/12154/files
* for more info see https://github.com/crypto-org-chain/cronos/issues/471

* add change doc

* add comment

* change under unreleased
2022-06-06 09:26:09 +02:00
crypto-facs
620f6a6770
imp(feemarket): update BaseFee based on GasWanted (#1105)
* add gasWanted transient store keys

* add gasWanted transient store keeper functions

* add gasWanted transient store tracker

* add comment

* remove unncesary comment

* remove unnecesary function

* fix tests

* fix bad comment

* remove unnecesary comment

* update comment

* update changelog

* Update CHANGELOG.md

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* add GasWantedDecorator

* remove unnecesary comments

* gasWanted decorator test

* fix tests

* fix tests and build

* fix lint

* updated end block event

* Update app/ante/fee_market.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* fix undeclared variable

* Update app/ante/fee_market_test.go

* remove unnecesary line

* migrate MinGasMultiplier to FeeMarket module

* set limited gas wanted

* remove old newKeeper param

* update proto comment

* fix test

* update comments

* Update x/feemarket/keeper/abci.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* address comments from review

* tidy

* tests

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-06-05 09:22:33 +00:00
crypto-facs
8155e1f319
Move CanTransfer decorator before GasConsume (#1111) 2022-06-04 20:32:04 +02:00
crypto-facs
da99f11be3
rpc: Update GetGasPrice RPC endpoint with global MinGasPrice (#1108)
* return MinGasPrice as minium on GetGasPrice api

* update logic

* update changelog

* globalmingsprice comment

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-06-03 13:31:57 +00:00
dependabot[bot]
72444a676c
build(deps): bump protobufjs from 6.11.2 to 6.11.3 in /tests/solidity (#1107)
Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 6.11.2 to 6.11.3.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/v6.11.3/CHANGELOG.md)
- [Commits](https://github.com/protobufjs/protobuf.js/compare/v6.11.2...v6.11.3)

---
updated-dependencies:
- dependency-name: protobufjs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-03 10:55:14 +02:00
Daniel Burckhardt
cad7ff66b0
analytics(app): update telemetry to Ethermint modules (#1106)
* analytics(evm): replace telemetry gauges with counters and add gasUsed counter

* analytics(feemarket): add telemetry gauges for base fee and block gas

* analytics(feemarket): add telemetry gauges for gas_used per gas_limit

* analytics(feemarket): remove refund telemetry

* analytics(app): update CHANGELOG

* remove unwanted change

* address PR comments

* update comment
2022-06-02 15:04:33 +02:00
Loredana Cirstea
046cd00174
feemarket: global MinGasPrice parameter (#1104)
* Add min_gas_price to feemarket params

* Add MinGasPriceDecorators

* feemarket integration tests for MinGasPrice

* Restructure integration tests

* Simplify integration tests context

We use DeliverTx context to set up the app, otherwise not all settings are initialized.
We test CheckTx with `s.app.BaseApp.CheckTx(req)`, which uses the `CheckTx` mode and context.

* Update MinGasPrice spec in feemarket module

* reorder ethermint module order for initializing genesis

* feemarket migrations for adding MinGasPrice param

* update changelog

* Additional unit tests for MinGasPrice = 0, tx gas price > 0 (PR review)

https://github.com/tharsis/ethermint/pull/1104#discussion_r884991661

* Use 0 MinGasPrice for transaction simulations

* Fix duplicate registration of feemarket GenesisState and Params (PR review)

https://github.com/tharsis/ethermint/pull/1104#issuecomment-1141893712
2022-05-31 18:28:46 +02:00
yihuang
5533beed71
fix(rpc, ante): Emit Ethereum tx hash in AnteHandler to support query failed transactions (#1062)
* Emit eth tx hash in ante handler to support query failed transactions

WIP: #1045
Solution:
- emit eth tx hash in ante handler
- modify rpc to use it

fix ante handler

support failed tx in receipt

add unit tests

need to patch cosmos-sdk to work

update cosmos-sdk to v0.45.x release branch

fix failed status

fix unit tests

add unit test cases

cleanup dead code

Apply suggestions from code review

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

fix lint

fix review suggestions

fix build

fix gas used of failed tx

add back the redundant events

* fix get tx by index

* add unit tests for events

* Update rpc/types/events.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

* update comments

* refactoring

* Update rpc/namespaces/ethereum/eth/api.go

* fix lint

* Apply suggestions from code review

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-05-31 10:26:40 +00:00
mmsqe
afc09f9d59
fix(rpc): avoid sleep with pending txs tests(#1098)
* avoid pending tx get confirmed when sleep

* fix install-tparse which need go >= 1.18

* fix strings.Cut in https://github.com/tharsis/ethermint/runs/6611646254?check_suite_focus=true
* for more info, https://dev.to/hgsgtk/go-118-new-function-cut-added-to-stringsbytes-package-5c2f

* Revert "fix install-tparse which need go >= 1.18"

This reverts commit 5e39c2d7351ebbd6b789df214f2396e6c5dfb28e.

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-05-31 07:04:14 +02:00
dependabot[bot]
39214c69a9
build(deps): bump github.com/armon/go-metrics from 0.3.10 to 0.4.0 (#1103)
Bumps [github.com/armon/go-metrics](https://github.com/armon/go-metrics) from 0.3.10 to 0.4.0.
- [Release notes](https://github.com/armon/go-metrics/releases)
- [Commits](https://github.com/armon/go-metrics/compare/v0.3.10...v0.4.0)

---
updated-dependencies:
- dependency-name: github.com/armon/go-metrics
  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>
2022-05-30 10:22:29 +00:00
dependabot[bot]
8f5cd77e0b
build(deps): bump github.com/spf13/viper from 1.11.0 to 1.12.0 (#1100)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.11.0...v1.12.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>
2022-05-30 09:54:55 +00:00
dependabot[bot]
164f41c056
build(deps): bump alpine from 3.15 to 3.16.0 (#1094)
Bumps alpine from 3.15 to 3.16.0.

---
updated-dependencies:
- dependency-name: alpine
  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>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-05-30 09:48:21 +00:00
Daniel Burckhardt
928e018aa9
impr(evm): add tx_type, gas and counter telemetry for ethereum txs (#1101)
* impr(evm): add tx_type, gas and counter telemetry for ethereum txs

* impr(evm): Add CHANGELOG
2022-05-30 10:24:29 +02:00