Commit Graph

1112 Commits

Author SHA1 Message Date
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
yihuang
70d52948da
fix: eth_newPendingTransactionFilter doesn't return ethereum tx hash (#1012)
* Problem: eth_newPendingTransactionFilter don't return correct tx hash

Closes: #1011
Solution:
- use eth tx hash rather than tendermint one

* changelog

* remove copied TODO comment and ignore err result of Notify

* add e2e test

* fix ws client in e2e test

* fix test

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-03-24 07:56:59 +00:00
dependabot[bot]
42b5e443da
build(deps): bump google.golang.org/protobuf from 1.27.1 to 1.28.0 (#1013)
Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.27.1 to 1.28.0.
- [Release notes](https://github.com/protocolbuffers/protobuf-go/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf-go/blob/master/release.bash)
- [Commits](https://github.com/protocolbuffers/protobuf-go/compare/v1.27.1...v1.28.0)

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  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-03-22 11:52:20 +01:00
yihuang
bde62e2d31
cleanup an unused const (#1009) 2022-03-22 10:24:26 +01:00
Snyk bot
9807d7c6de
fix: Dockerfile to reduce vulnerabilities (#1005)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-ALPINE315-OPENSSL-2426331
- https://snyk.io/vuln/SNYK-ALPINE315-OPENSSL-2426331

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-03-21 13:23:39 +00:00