Commit Graph

53 Commits

Author SHA1 Message Date
Sai Kumar
1c023f7b5d fix: fix the keys migrate 2022-06-24 20:17:40 +05:30
Sai Kumar
fc06fbfb48 refactor: updated to ante handlers support 2022-06-07 08:56:18 -05:00
92295c3061 clean up, rm unused 2022-05-18 16:08:56 +08:00
Sai Kumar
cf0be98f9b Merge branch 'main' into sai/upgrade_cosmos_v0.46 2022-04-23 21:23:06 +05:30
Sai Kumar
9d7333d4fb fix : fix the chain start 2022-04-23 20:07:00 +05:30
Sai Kumar
a0e2858d4f WIP: upgrade cosmos-sdk from 0.45 to SMT 0.46 2022-04-11 13:39:39 +05:30
Sai Kumar
e90b21bc8e migrate: add dxns module
1. add bond,auction, nameserivce module
2. update to v0.12.2 ethermint version
3. fix the test cases
4. add gql server
2022-04-05 12:39:27 +05:30
yihuang
8bcdb2c0e5
make MaxTxGasWanted configurable (#1004) 2022-03-21 10:01:21 +01:00
crypto-facs
5360730d42
add enable unsafe cors flag (#995) 2022-03-15 20:59:31 +01:00
yihuang
49afc0f90d
fix: server should always use local rpc client (#988)
Closes: #987
Solution:
- use local rpc clint if json-rpc is enabled.

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2022-03-15 11:28:14 +01:00
yihuang
dbe9f705cd
rpc: add configurable timeouts to http server (#979)
* Add configurable timeouts to http server

Closes: #963

* add flags

* changelog

* fix toml
2022-03-09 08:31:51 +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
dcd2891b73
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
2022-02-19 01:49:34 +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
aeb6aeb715
Problem: newPendingTransactions filter don't return ethereum tx hash (#900) 2022-01-13 13:12:57 +00: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
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
Federico Kunze Küllmer
5a491537ca
tests: geth client wrapper (#774) 2021-11-30 10:16:40 +01:00
Daniel Burckhardt
2d8be4e85b
fix: gosec issues (#779)
* remove gosec warnigs with medium severity

* Improvement(Ethermint): Fix gosec vulnerabilities

* Improvement(Evmos): address pr comments

* Improvement(Ethermint): Fix flags test by using PersistentFlags() instead of Flags()

* Improvement(Ethermint): Fix return of defer function

* Improvement(Ethermint): Replace PersistentFlags with Flags

* Apply suggestions from code review

* Improvement(Ethermint): Use persisentFlags again and remove required attribute for chain id

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-11-25 15:12:57 +00: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
crypto-facs
d4621f3e82
fix: set EVM debug based on tracer config (#746)
* set debug based on tracer

* fix tests

* set default tracer

* remove debug from keeper

* remove unnecesary param

* remove unnecesary param

* Update x/evm/keeper/state_transition.go

* 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-16 08:57:03 +00:00
dependabot[bot]
23a3362475
build(deps): bump github.com/ethereum/go-ethereum from 1.10.9 to 1.10.11 (#676)
* build(deps): bump github.com/ethereum/go-ethereum from 1.10.9 to 1.10.10

Bumps [github.com/ethereum/go-ethereum](https://github.com/ethereum/go-ethereum) from 1.10.9 to 1.10.10.
- [Release notes](https://github.com/ethereum/go-ethereum/releases)
- [Commits](https://github.com/ethereum/go-ethereum/compare/v1.10.9...v1.10.10)

---
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>

* build(deps): bump github.com/ethereum/go-ethereum from 1.10.9 to 1.10.10

Bumps [github.com/ethereum/go-ethereum](https://github.com/ethereum/go-ethereum) from 1.10.9 to 1.10.10.
- [Release notes](https://github.com/ethereum/go-ethereum/releases)
- [Commits](https://github.com/ethereum/go-ethereum/compare/v1.10.9...v1.10.10)

---
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>

* build(deps): bump github.com/ethereum/go-ethereum from 1.10.9 to 1.10.10

Bumps [github.com/ethereum/go-ethereum](https://github.com/ethereum/go-ethereum) from 1.10.9 to 1.10.10.
- [Release notes](https://github.com/ethereum/go-ethereum/releases)
- [Commits](https://github.com/ethereum/go-ethereum/compare/v1.10.9...v1.10.10)

---
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>

* fix

* rpc: RLP apis

* tx fee cap fix

* fix config

* fix test

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
2021-10-25 15:01:04 +00:00
Jongwhan Lee
f70e4c1253
rpc: eth_resend (#684)
* Problem: missing json rpc for eth_resend #675

add unit test

restore

Update server/start.go

thanks~

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

tidy up checkTxFee

change comments

* fix lint

* Apply suggestions from code review

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-10-20 19:14:39 +00:00
Devashish Dixit
c7a2fb97c7
fix: limit total number of filters that can be created (#661)
* Problem: No way to limit total number of filters that can be created

Solution: Add a config parameter to set the total number of filters that can be created

* Add defer statement for releasing locks

* Change default value for filter cap to 200

* Changed data type of filter cap to int32

* Add changelog entry

* Update CHANGELOG.md

* Fix struct alignment

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-10-13 11:03:49 +00:00
Tomas Tauber
8e12d94359
rpc: fix ExpandHome restrictions bypass (#667)
`go-home` seems to be using environment variables first
2021-10-13 10:52:05 +00:00
davcrypto
e79a6ed6b2
rpc: support personal apis with different keyring backends (#591)
* UPDATE Unlock keyring on start

* ADD comment

* ADD validation

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-10-06 11:41:42 +00:00
Daniel Burckhardt
34c2593e43
rpc: restructure JSON-RPC directory and rename server config (#612)
* Restructure ethermint/rpc repo structure and change import statements

* Add #400 to changelog

* fix filepath in util and json_rpc

* Move #400  to unreleased section
2021-10-01 14:49:22 +00:00
Federico Kunze Küllmer
05d9b290a7
rpc, server: add TLS certificate for websocket (#600)
* rpc, server: add TLS certificate for websocket

* changelog
2021-09-28 13:33:54 +02:00
Ramiro Carlucho
ec7d8a37fd
fix: homedir consistency (#561)
* fix export homedir

* Changelog updated

Co-authored-by: Hanchon <guillermo.paoletti@gmail.com>
2021-09-15 05:27:37 -03:00
davcrypto
5d6c4517f6
client, server: default keyring-backend os (#552) 2021-09-13 10:36:21 +00:00
Cuong Manh Le
397e862a1e
server: add missing db.Close calls before returning (#541)
It's better to always close the db before exit, so we will be noticed
when any error happens. Otherwise, serious errors can silently happen,
e.g, corrupted db, pending write missing ...

Fixes #538
2021-09-09 05:05:26 -03:00
Federico Kunze Küllmer
26c5eabb18
all: linter (#532)
* add additional linters

* fixes

* rm action
2021-09-05 11:03:06 +00:00
Federico Kunze Küllmer
9ea2ce4b8f
server: remove cors config fron JSON-RPC (#465) 2021-08-20 10:58:03 +00:00
Federico Kunze Küllmer
d068f5b331
server: logger handler (#343)
* Problem: verbose logs display with FATAL option (fix #320)
add my script

increase amount for metamask

add run

amount ok

hide log

show info

my logger

hook log

revive eth log

tidy up

use suplog

log replace ok

removed suplog

tidy up

tidy up

fix compile

remove sh

tidy up

tidy up

* logger handler

* fix

* fix eth log override (#371)

remove redundant log

tidy up

* log test

* c++

Co-authored-by: jongwhan lee <jonghwan@crypto.com>
Co-authored-by: Jongwhan Lee <51560997+leejw51crypto@users.noreply.github.com>
2021-08-19 16:55:13 +00:00
Federico Kunze Küllmer
83c838330f
rpc: configure gas cap (#457)
* rpc: configure gas cap

* c++

* rm old const

* docs
2021-08-18 14:11:51 +00:00
Federico Kunze Küllmer
cc3b2ff8e9
evm, server: configurable tracer (#434)
* server: update server and enable configurable tracer

* config validation

* fix import cycle

* fix start

* update fields

* c++

* c++
2021-08-16 09:45:10 +00:00
crypto-facs
2bd107ee79
fix: set eth, web3 and net namespaces as default (#391) 2021-08-03 12:35:04 -04:00
Thomas Nguy
bc13b1b4d2
server: fix viper parse app.toml (#385) 2021-08-02 04:30:00 -04:00
Federico Kunze Küllmer
09746c6a51
feat: import ethermint without forking (#378)
* cmd: cleanup

* update gh action

* lint

* more cleanup

* update config

* register denom
2021-07-28 05:47:29 -04:00
crypto-facs
d1212725f8
feat: configurable JSON-RPC APIs (#349)
* fix confusing name

* feat: Enable configurable grpc apis

* docs: Update docs and changelog

* Organized flags order

* fix linter

* fix linter

* fix maligned struct

* fix typo in docs

* fix unnecesary duplicate

* Update cmd/ethermintd/config/config.go

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

* Update cmd/ethermintd/config/config.go

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

* Update cmd/ethermintd/config/config.go

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

* Update docs/basics/json_rpc.md

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

* fix eth to be manage as default

* Update init.sh

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

* Update tests/solidity/init-test-node.sh

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

* add default case

* add default enable api namespaces

* update changelog

* fix namespaces array  handler

* remove duplicated changelog

* fix typo

* remove duplicates namespaces and fix eth namespace issue

* fix variable name

* break line in docs

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-07-26 11:15:55 +00:00
yihuang
e61594e10a
server: sync start command with cosmos-sdk v0.43-rc2 (#341)
* sync start command with cosmos-sdk 0.43

Closes #340

- add grpc web and rosetta server
- add tx/tm services
- add standalone mode
- update cosmos-sdk to 0.43.0-rc2, which fixed a bug in service startup
- add EnableUnsafeCORS option to evm rpc server

* set keyring options in root cmd and use viper prefix

* fix linter and pr suggestions

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-07-23 12:31:59 +00:00
Guillermo Paoletti
282eb13a6f
rpc: implement internal debug_ API namespace functions (#313)
* API Hello World

* Added all the debug functions + more data to try implementing the GC functions

* Getting transactions information

* Added cpu profile first approach functions

* new struct for cpuprofile and read filename from params

* cpuprofile, gcstats and memstats

* added comment

* All endpoints returns error instead of string

* Code cleanup

* Changed errors messages to match go-eth returns

* Removed activated flag and just using the file to check if it's running

* Added new endpoints to the json_rpc.md file

* GoTrace debug endpoints added

* Block profile endpoint added

* missing goeth calls

* added debug logs

* divide debug and internal api

* Using ExpandHome on server configuration

* Added rpc changes to changelog

* Logging go trace status

* Removed logger functions and moved logger errors to debug

* Added more logs to go trace

* Added more datailed changelog

* Removed trace debug api interface

* added comments

* cleanup

* Updated changelog

* disable lint on cpuprofile rename

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

* return error in StopCpuProfile

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

* return error in StopGoTrace

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

* implement suggested changes

Co-authored-by: ramacarlucho <ramirocarlucho@gmail.com>
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-07-20 12:50:17 +00:00
yihuang
14b38af8bc
rpc, evm: use binary search to estimate gas (#272)
* do binary search to estimate gas

Closes #268

- Also refactor ApplyMessage to be more reuseable

move binary search to rpc api side to have a clean context each try

remove EstimateGas grpc api

* extract BinSearch function and add unit test

* do estimateGas in grpc query

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
2021-07-19 15:19:23 +00:00
Federico Kunze Küllmer
74b7eaf431
rpc: fix inconsistent logging levels (#265)
* rpc: fix incosistent logging levels

* minor changes
2021-07-12 18:39:35 +00:00
Federico Kunze Küllmer
dcc9585595
all: bump SDK to v0.43.0-rc0 (#194)
* all: bump SDK to v0.43.0-rc0

* more updates

* keys

* accounting

* update account

* ante changes

* readonly

* readonly build

* minor changes from self review

* fixes

* evm debug

* custom config & rosetta

* fix
2021-06-29 13:02:21 -04:00
Federico Kunze
459a290951
tests: add testutils for integration testing (#132)
* tests: add testutils for integration testing

* update util

* fix config

* more updates

* rand chain-id

* add rpc client integration test example

* makefile

* rename

* updates to makefile
2021-06-25 05:18:37 -04:00
Federico Kunze
6f7470c2e0
build 2021-04-18 19:23:26 +02:00
Federico Kunze
5a3d514ba0
conflicts 2021-04-17 12:00:07 +02:00
David Ansermino
284c2a0333
Enable RPC Server (#75)
- Introduces rpc command to cli (rest-server)
- Moves server/rpc to rpc/
- Enables module selection (eg. "web3" or "eth" or "web3,eth"), however there is no CLI flag to configure these (See #74)
- Adds CLI context to eth API
2019-07-15 10:13:59 -04:00
Aleksandr Bezobchuk
85ca203972 Upgrade geth and cleanup 2018-09-28 17:40:58 -04:00