Commit Graph

1116 Commits

Author SHA1 Message Date
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
Daniel Burckhardt
d23fb0c37d
specs(evm): Add concepts (#1095)
* specs(evm): Add concepts

* specs(evm): Add geth and bytecode concepts

* specs(evm): little fixes

* fix typo

* add CHANGELOG
2022-05-26 15:04:19 +00:00
crypto-facs
d5598932a7
imp(evm): add query params to CLI (#1091)
* add query params to evm

* update changelog

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-05-25 14:02:01 +00:00
crypto-facs
c4417713fa
imp(evm): define minimum GasUsed proportional to GasLimit (#1087)
* min gas denominator implementation

* update changelog

* modify MinGasDenominator type to sdk.Dec

* fix typo in comments

* add comments

* update comment

* refactor logic

* remove unnecesary test

* fix typo on proto

* rename param

* fix tests

* use truncate and run mod tidy

* comment to default value

* update changelog

* rename temporary gas used

* integration tests

* add migrations

* add default as var

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-05-25 13:52:34 +00:00
yihuang
f06df8c265
imp: clean up the block fetch logic in json-rpc (#1081)
* clean up the block fetch logic in json-rpc

deduplicate some codes

fix EthBlockFromTm

fix latest block height

* add bug fix changelog
2022-05-23 18:36:31 +02:00
dependabot[bot]
2cfa8730c9
build(deps): bump github.com/spf13/cast from 1.4.1 to 1.5.0 (#1080)
Bumps [github.com/spf13/cast](https://github.com/spf13/cast) from 1.4.1 to 1.5.0.
- [Release notes](https://github.com/spf13/cast/releases)
- [Commits](https://github.com/spf13/cast/compare/v1.4.1...v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cast
  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-20 15:04:18 +00:00
dependabot[bot]
f0290a3822
build(deps): bump cross-fetch from 2.2.5 to 2.2.6 in /tests/solidity (#1083)
Bumps [cross-fetch](https://github.com/lquixada/cross-fetch) from 2.2.5 to 2.2.6.
- [Release notes](https://github.com/lquixada/cross-fetch/releases)
- [Commits](https://github.com/lquixada/cross-fetch/compare/v2.2.5...v2.2.6)

---
updated-dependencies:
- dependency-name: cross-fetch
  dependency-type: indirect
...

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-20 14:57:42 +00:00
Thomas Nguy
9edc87d114
fix: append Log in tx post processing response (#1088)
* fix post processing log

* update changelog
2022-05-19 12:11:26 +02:00
yihuang
d359cbd9c9
fix: gas price value in eth_getTransaction JSON-RPC response (#1082)
Solution:
- pass the correct baseFee parameter

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-05-19 06:48:37 +00:00
yihuang
a313008afc
Add cli rollback command (#1086) 2022-05-18 07:28:44 +02:00
Daniel Burckhardt
e856bf57d5
release: merge release branch changes back to main (#1079)
* release: update CHANGELOG (#1078)

* add unreleased section to changelog
2022-05-09 13:40:12 +02:00
yihuang
93d15db4d0
ante: check EnableCreate/EnableCall in ante handler (#1060)
* Check EnableCreate/EnableCall in ante handler

WIP: #1045

Reject tx early in ante handler, avoid deduct user fee for vain.

* add unit tests

* update 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>
2022-05-03 19:51:02 +02:00
Federico Kunze Küllmer
6b1b936c64
ci: bump simulations timeout (#1073) 2022-05-03 12:25:17 +02:00
Nick DeLuca
a4b8816f4a
remove unused bank keeper dependency from account verification decorator (#1074)
The account verification decorator uses the evm keeper methods which
already use the bank keeper, leaving the dependency unused.

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-05-02 16:48:40 +00:00
Adu
4ea9b6dc6d
imp, ci: address pending issues from EVM simulation (#1063)
* add note

fix note

* add TestAppStateFn TestRandomAccounts

* marshal int slice to json

* add paramschange for enableCreate and enableCall

* AppStateFn -> StateFn

* add TestDecodeStore

* update github actions to run evm simulation

* add TestParamChanges

* add TestRandomizedGenState

* use go install for runsim

* resolve conflict

* use random gasCap to estimate gas

* use estimateGas to calculate max transferableAmount

* update godoc

* TestAppStateFn -> TestStateFn

* Update x/evm/simulation/genesis.go

* comment

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-05-02 15:27:43 +02:00
Federico Kunze Küllmer
c25669c761
rpc: refactor rpc packages and backend to support cosmos namespace (#1070)
* rpc: refactor rpc packages and backend to support cosmos namespace

* changelog

* typo
2022-05-02 06:26:24 +00:00
yihuang
556c2cc8a3
fix!: london hardfork check logic in json-rpc apis (#1068) 2022-04-30 18:11:28 +02:00
dependabot[bot]
fb13fd4835
build(deps): bump github.com/btcsuite/btcd from 0.22.0-beta to 0.22.1 (#1069) 2022-04-29 10:24:00 +00:00
Federico Kunze Küllmer
0f0996432a
fix: update BaseFee JSON-RPC (#1059)
* release: v0.14.0 changelog (#1057)

* fix: update BaseFee JSON-RPC

* typo

* changelog
2022-04-26 14:24:32 +00:00
dependabot[bot]
ead4208480
build(deps): bump github/codeql-action from 1 to 2 (#1064)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  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>
2022-04-26 11:03:36 +00:00
dependabot[bot]
825d3930c6
build(deps): bump github.com/cosmos/cosmos-sdk from 0.45.3 to 0.45.4 (#1065)
Bumps [github.com/cosmos/cosmos-sdk](https://github.com/cosmos/cosmos-sdk) from 0.45.3 to 0.45.4.
- [Release notes](https://github.com/cosmos/cosmos-sdk/releases)
- [Changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.45.4/CHANGELOG.md)
- [Commits](https://github.com/cosmos/cosmos-sdk/compare/v0.45.3...v0.45.4)

---
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-04-26 13:02:16 +02:00
Federico Kunze Küllmer
a121224dbc docs: update EVM spec 2022-04-22 14:57:48 +02:00
yihuang
0543a28941
rpc: make json-rpc API namespaces extensible (#1056)
* make jsonrpc api namespaces extensible

Closes: #1052, #1037

* Apply suggestions from code review

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-04-19 12:49:05 +00:00
Adu
eaca3e09e2
fix: simulations don't generate EVM transactions (#996)
* use SimAppChainId instead of the default cosmos-sdk simulation chainid

* implement custom RandomGenesisAccounts for auth module simulation

* use customized RandomGenesisAccounts

* generate random ethereum txs operations

* use sdk.DefaultBondDenom

* implement WeightedOperations

* fix self assignment

* use customized RandomAccounts to generate accounts with ethsecp256k1 private key

* RandomAccounts generate random accounts with ethsecp256k1 private key

* implement SimulateEthSimpleTransfer

* implement SimulateEthCreateContract

* refactor and implement operationSimulateEthCallContract as future operations of SimulateEthCreateContract

* Update app/app.go

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

* Update app/test_helpers.go

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

* Update x/evm/simulation/operations.go

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

* Update x/evm/simulation/operations.go

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

* Update app/test_helpers.go

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

* fix r.Read return only 1 result

* fix linter errors

* change SimulateContext to private

* return transferable amount immediately

* fix linter errors

* fix linter errors: append assign to different slice

* fix linter error: remove else block

* use gofumpt

* Update x/evm/simulation/operations.go

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

* Update x/evm/simulation/operations.go

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

* Update x/evm/simulation/operations.go

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

* Update x/evm/simulation/operations.go

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

* fix recipient typo

* add nosec comment to escape Potential hardcoded credentials check

* add comments

* use SimAppChainID as valid chainID

* do not specify genesis.json to create random genesis state for simulation

* sub estimateGas to avoid overflow

* correct RandomGenesisAccounts comments

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

* correct app/test_helpers.go comments

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

* remove NewTxConfig

* implement RegisterStoreDecoder

* remove WeightMsgEthCallContract and adjust weights

* use gofmt

* update godoc

* use types.DefaultEVMDenom in evm genesis params

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

* use types.DefaultEVMDenom

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

* update godoc

* Update x/evm/simulation/genesis.go

* replace evmdenom with bonddenom in AppStateFn

* fix AppStateFn

* fix lint error

* add ParamChanges for RandomizedParams

* rename app/test_helpers.go -> app/utils.go

* testing for RandomGenesisAccounts

* use cdc for marshaling

* lint

* changelog

* changelog 2

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: Freddy Caceres <freddy.caceres@crypto.com>
Co-authored-by: Federico Kunze Küllmer <federico.kunze94@gmail.com>
2022-04-19 09:50:00 +00:00
Snyk bot
e4abbe1bbc
fix: tests/solidity/suites/eip1559/package.json to reduce vulnerabilities (#1038)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-NODEFETCH-2342118

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-04-19 09:25:51 +00:00
Snyk bot
d96e2b70f6
fix: tests/solidity/suites/storage/package.json to reduce vulnerabilities (#1039)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-NODEFETCH-2342118

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-04-19 09:24:34 +00:00
Snyk bot
e7b6d925cb
fix: tests/solidity/package.json to reduce vulnerabilities (#1036)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-ANSIREGEX-1583908

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-04-19 09:23:27 +00:00
crypto-facs
7e359068d8
eth_getBlockByNumber fix on batch transactions (#1050) 2022-04-18 19:06:04 +02:00
crypto-facs
bc4b018b60
Context block height fix on TraceTx (#1051) 2022-04-16 19:31:30 +02:00
dependabot[bot]
75099039be
build(deps): bump github.com/spf13/viper from 1.10.1 to 1.11.0 (#1054) 2022-04-15 10:16:03 +00: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
Federico Kunze Küllmer
5ccd4c4c15
ci: cleanup (#1048) 2022-04-12 15:51:20 +02:00
Federico Kunze Küllmer
1e03c0c603
deps: bump SDK to v0.45.3 (#1046)
* release: v0.13.0 (#1030)

* release: v0.12.0 changelog

* changelog: v0.12.1 (#1019)

* evm: update empty hash check for storage state (#1016)

* v0.12.1: changelog

* changelog: v0.12.2 (#1022)

* changelog: v0.12.2

* fix

* fix

* update changelog

* deps: bump SDK to v0.45.3

* changelog

* fixes
2022-04-12 15:31:25 +02:00
dependabot[bot]
cb6715cffb
build(deps): bump actions/setup-go from 2 to 3 (#1040)
* build(deps): bump actions/setup-go from 2 to 3

Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* Apply suggestions from code review

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-04-11 10:36:53 +00:00
dependabot[bot]
f257709a27
build(deps): bump actions/stale from 4 to 5 (#1041)
Bumps [actions/stale](https://github.com/actions/stale) from 4 to 5.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/stale
  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>
2022-04-11 12:33:34 +02:00
Loredana Cirstea
e1512c52e9
types: add ValidateNonZeroAddress utility function (#1033)
* Add ValidateNonZeroAddress validation utility

* Update types/validation.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-04-07 10:51:28 +00:00
MalteHerrmann
c70701e785
tests: add more dynamic fee tx tests (#1032) 2022-04-06 19:54:41 +02:00
dependabot[bot]
4fdbcd7f4c
build(deps): bump codecov/codecov-action from 2.1.0 to 3 (#1031)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.1.0 to 3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v2.1.0...v3)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  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>
2022-04-06 12:49:36 +02:00
Nick DeLuca
ea3c16ed7a
fix: remove proto message registration from legacy v09 types to fix conflict (#1023)
with existing types

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-04-05 15:51:56 +00: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
yihuang
7d11c93992
deps: upgrade cosmos-sdk to v0.45.2 (#1029)
Closes: #946

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-04-05 17:32:48 +02: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
6abe84bde7
fix: update feemarket REST endpoints (#1026)
* fix: update feemarket REST endpoints

* changelog
2022-04-04 15:00:26 +02:00
Federico Kunze Küllmer
3c8a95b012
imp: migrate JSON for feemarket (#1021)
* imp: migrate JSON for feemarket

* migrate JSON

* types

* fix

* fix unmarshal JSON error

* changelog

* fix lint

* fix test
2022-03-30 19:10:54 +02:00
Federico Kunze Küllmer
285c7c47d7
evm: update empty hash check for storage state (#1016) 2022-03-29 12:57:52 +00:00