From 34c2593e43df058185544b40d4131ef4f2d953fb Mon Sep 17 00:00:00 2001 From: Daniel Burckhardt Date: Fri, 1 Oct 2021 16:49:22 +0200 Subject: [PATCH] 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 --- CHANGELOG.md | 13 ++++++++---- go.sum | 18 +++++++++++++++++ {ethereum/rpc => rpc}/apis.go | 20 +++++++++---------- {ethereum/rpc => rpc}/doc.go | 0 .../rpc => rpc/ethereum}/backend/backend.go | 4 ++-- .../rpc => rpc/ethereum}/backend/utils.go | 2 +- .../ethereum}/namespaces/debug/api.go | 4 ++-- .../ethereum}/namespaces/debug/trace.go | 0 .../namespaces/debug/trace_fallback.go | 0 .../ethereum}/namespaces/debug/utils.go | 0 .../ethereum}/namespaces/eth/api.go | 4 ++-- .../ethereum}/namespaces/eth/filters/api.go | 2 +- .../namespaces/eth/filters/filter_system.go | 2 +- .../namespaces/eth/filters/filters.go | 2 +- .../namespaces/eth/filters/subscription.go | 0 .../ethereum}/namespaces/eth/filters/utils.go | 0 .../ethereum}/namespaces/miner/api.go | 4 ++-- .../ethereum}/namespaces/miner/unsupported.go | 0 .../ethereum}/namespaces/net/api.go | 0 .../ethereum}/namespaces/personal/api.go | 4 ++-- .../ethereum}/namespaces/txpool/api.go | 2 +- .../ethereum}/namespaces/web3/api.go | 0 .../rpc => rpc/ethereum}/pubsub/pubsub.go | 0 .../ethereum}/pubsub/pubsub_test.go | 0 .../rpc => rpc/ethereum}/types/addrlock.go | 0 {ethereum/rpc => rpc/ethereum}/types/block.go | 0 .../rpc => rpc/ethereum}/types/block_test.go | 0 .../ethereum}/types/query_client.go | 0 {ethereum/rpc => rpc/ethereum}/types/types.go | 0 {ethereum/rpc => rpc/ethereum}/types/utils.go | 0 {ethereum/rpc => rpc}/websockets.go | 4 ++-- server/json_rpc.go | 2 +- server/start.go | 2 +- tests/rpc/rpc_pending_test.go | 2 +- tests/rpc/rpc_test.go | 2 +- testutil/network/util.go | 2 +- x/evm/client/cli/query.go | 2 +- x/evm/client/rest/rest.go | 2 +- 38 files changed, 61 insertions(+), 38 deletions(-) rename {ethereum/rpc => rpc}/apis.go (83%) rename {ethereum/rpc => rpc}/doc.go (100%) rename {ethereum/rpc => rpc/ethereum}/backend/backend.go (99%) rename {ethereum/rpc => rpc/ethereum}/backend/utils.go (98%) rename {ethereum/rpc => rpc/ethereum}/namespaces/debug/api.go (99%) rename {ethereum/rpc => rpc/ethereum}/namespaces/debug/trace.go (100%) rename {ethereum/rpc => rpc/ethereum}/namespaces/debug/trace_fallback.go (100%) rename {ethereum/rpc => rpc/ethereum}/namespaces/debug/utils.go (100%) rename {ethereum/rpc => rpc/ethereum}/namespaces/eth/api.go (99%) rename {ethereum/rpc => rpc/ethereum}/namespaces/eth/filters/api.go (99%) rename {ethereum/rpc => rpc/ethereum}/namespaces/eth/filters/filter_system.go (99%) rename {ethereum/rpc => rpc/ethereum}/namespaces/eth/filters/filters.go (99%) rename {ethereum/rpc => rpc/ethereum}/namespaces/eth/filters/subscription.go (100%) rename {ethereum/rpc => rpc/ethereum}/namespaces/eth/filters/utils.go (100%) rename {ethereum/rpc => rpc/ethereum}/namespaces/miner/api.go (98%) rename {ethereum/rpc => rpc/ethereum}/namespaces/miner/unsupported.go (100%) rename {ethereum/rpc => rpc/ethereum}/namespaces/net/api.go (100%) rename {ethereum/rpc => rpc/ethereum}/namespaces/personal/api.go (98%) rename {ethereum/rpc => rpc/ethereum}/namespaces/txpool/api.go (97%) rename {ethereum/rpc => rpc/ethereum}/namespaces/web3/api.go (100%) rename {ethereum/rpc => rpc/ethereum}/pubsub/pubsub.go (100%) rename {ethereum/rpc => rpc/ethereum}/pubsub/pubsub_test.go (100%) rename {ethereum/rpc => rpc/ethereum}/types/addrlock.go (100%) rename {ethereum/rpc => rpc/ethereum}/types/block.go (100%) rename {ethereum/rpc => rpc/ethereum}/types/block_test.go (100%) rename {ethereum/rpc => rpc/ethereum}/types/query_client.go (100%) rename {ethereum/rpc => rpc/ethereum}/types/types.go (100%) rename {ethereum/rpc => rpc/ethereum}/types/utils.go (100%) rename {ethereum/rpc => rpc}/websockets.go (99%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f634230..a9c5e29a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## Unreleased +### API Breaking + +* (rpc) [tharsis#400](https://github.com/tharsis/ethermint/issues/400) Restructure JSON-RPC directory and rename server config + ### Improvements * (deps) [tharsis#610](https://github.com/tharsis/ethermint/pull/610) Bump Cosmos SDK to [v0.44.1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.44.1). @@ -82,6 +86,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (rpc, evm) [tharsis#587](https://github.com/tharsis/ethermint/pull/587) Apply bloom filter when query ethlogs with range of blocks * (evm) [tharsis#586](https://github.com/tharsis/ethermint/pull/586) Benchmark evm keeper + ## [v0.5.0] - 2021-08-20 ### State Machine Breaking @@ -158,12 +163,12 @@ the Tracer type used to collect execution traces from the EVM transaction execut * (evm) [\#767](https://github.com/cosmos/ethermint/issues/767) Fix error of timeout when using Truffle to deploy contract. * (evm) [\#751](https://github.com/cosmos/ethermint/issues/751) Fix misused method to calculate block hash in evm related function. * (evm) [\#721](https://github.com/cosmos/ethermint/issues/721) Fix mismatch block hash in rpc response when use eht.getBlock. -* (evm) [\#730](https://github.com/cosmos/ethermint/issues/730) Fix 'EIP2028' not open when Istanbul version has been enabled. +* (evm) [\#730](https://github.com/cosmos/ethermint/issues/730) Fix 'EIP2028' not open when Istanbul version has been enabled. * (evm) [\#749](https://github.com/cosmos/ethermint/issues/749) Fix panic in `AnteHandler` when gas price larger than 100000 * (evm) [\#747](https://github.com/cosmos/ethermint/issues/747) Fix format errors in String() of QueryETHLogs -* (evm) [\#742](https://github.com/cosmos/ethermint/issues/742) Add parameter check for evm query func. -* (evm) [\#687](https://github.com/cosmos/ethermint/issues/687) Fix nonce check to explicitly check for the correct nonce, rather than a simple 'greater than' comparison. -* (api) [\#687](https://github.com/cosmos/ethermint/issues/687) Returns error for a transaction with an incorrect nonce. +* (evm) [\#742](https://github.com/cosmos/ethermint/issues/742) Add parameter check for evm query func. +* (evm) [\#687](https://github.com/cosmos/ethermint/issues/687) Fix nonce check to explicitly check for the correct nonce, rather than a simple 'greater than' comparison. +* (api) [\#687](https://github.com/cosmos/ethermint/issues/687) Returns error for a transaction with an incorrect nonce. * (evm) [\#674](https://github.com/cosmos/ethermint/issues/674) Reset all cache after account data has been committed in `EndBlock` to make sure every node state consistent. * (evm) [\#672](https://github.com/cosmos/ethermint/issues/672) Fix panic of `wrong Block.Header.AppHash` when restart a node with snapshot. * (evm) [\#775](https://github.com/cosmos/ethermint/issues/775) MisUse of headHash as blockHash when create EVM context. diff --git a/go.sum b/go.sum index 06e3d5c0..8c304519 100644 --- a/go.sum +++ b/go.sum @@ -228,6 +228,7 @@ github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:z github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coinbase/rosetta-sdk-go v0.6.10 h1:rgHD/nHjxLh0lMEdfGDqpTtlvtSBwULqrrZ2qPdNaCM= github.com/coinbase/rosetta-sdk-go v0.6.10/go.mod h1:J/JFMsfcePrjJZkwQFLh+hJErkAmdm9Iyy3D5Y0LfXo= +github.com/confio/ics23/go v0.0.0-20200817220745-f173e6211efb/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= github.com/confio/ics23/go v0.6.3/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= github.com/confio/ics23/go v0.6.6 h1:pkOy18YxxJ/r0XFDCnrl4Bjv6h4LkBSpLS6F38mrKL8= github.com/confio/ics23/go v0.6.6/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= @@ -258,6 +259,10 @@ github.com/cosmos/cosmos-sdk v0.44.1/go.mod h1:fwQJdw+aECatpTvQTo1tSfHEsxACdZYU8 github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= +github.com/cosmos/iavl v0.15.0-rc3.0.20201009144442-230e9bdf52cd/go.mod h1:3xOIaNNX19p0QrX0VqWa6voPRoJRGGYtny+DH8NEPvE= +github.com/cosmos/iavl v0.15.0-rc5/go.mod h1:WqoPL9yPTQ85QBMT45OOUzPxG/U/JcJoN7uMjgxke/I= +github.com/cosmos/iavl v0.15.3/go.mod h1:OLjQiAQ4fGD2KDZooyJG9yz+p2ao2IAYSbke8mVvSA4= +github.com/cosmos/iavl v0.16.0/go.mod h1:2A8O/Jz9YwtjqXMO0CjnnbTYEEaovE8jWcwrakH3PoE= github.com/cosmos/iavl v0.17.1 h1:b/Cl8h1PRMvsu24+TYNlKchIu7W6tmxIBGe6E9u2Ybw= github.com/cosmos/iavl v0.17.1/go.mod h1:7aisPZK8yCpQdy3PMvKeO+bhq1NwDjUwjzxwwROUxFk= github.com/cosmos/ibc-go v1.2.0 h1:0RgxmKzCzIH9SwDp4ckL5VrzlO1KJ5hO0AsOAzOiWE4= @@ -289,6 +294,7 @@ github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0 github.com/denis-tingajkin/go-header v0.4.2/go.mod h1:eLRHAVXzE5atsKAnNRDB90WHCFFnBUn4RN0nRcs1LJA= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= +github.com/dgraph-io/badger/v2 v2.2007.1/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= github.com/dgraph-io/badger/v2 v2.2007.2 h1:EjjK0KqwaFMlPin1ajhP943VPENHJdEz1KLIegjaI3k= github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= @@ -577,6 +583,7 @@ github.com/graph-gophers/graphql-go v0.0.0-20201113091052-beb923fada29/go.mod h1 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.2.1/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= @@ -585,6 +592,7 @@ github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= +github.com/grpc-ecosystem/grpc-gateway v1.14.7/go.mod h1:oYZKL012gGh6LMyg/xA7Q2yq6j8bu0wa+9w14EEthWU= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= @@ -1072,6 +1080,7 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb github.com/sagikazarmark/crypt v0.1.0/go.mod h1:B/mN0msZuINBtQ1zZLEQcegFJJf9vnYIR88KRMEuODE= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= +github.com/sasha-s/go-deadlock v0.2.0/go.mod h1:StQn567HiB1fF2yJ44N9au7wOhrPS3iZqiDbRupzT10= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= @@ -1177,9 +1186,15 @@ github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RM github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= +github.com/tendermint/tendermint v0.34.0-rc4/go.mod h1:yotsojf2C1QBOw4dZrTcxbyxmPUrT4hNuOQWX9XUwB4= +github.com/tendermint/tendermint v0.34.0-rc6/go.mod h1:ugzyZO5foutZImv0Iyx/gOFCX6mjJTgbLHTwi17VDVg= +github.com/tendermint/tendermint v0.34.0/go.mod h1:Aj3PIipBFSNO21r+Lq3TtzQ+uKESxkbA3yo/INM4QwQ= +github.com/tendermint/tendermint v0.34.10/go.mod h1:aeHL7alPh4uTBIJQ8mgFEE8VwJLXI1VD3rVOmH2Mcy0= github.com/tendermint/tendermint v0.34.12/go.mod h1:aeHL7alPh4uTBIJQ8mgFEE8VwJLXI1VD3rVOmH2Mcy0= github.com/tendermint/tendermint v0.34.13 h1:fu+tsHudbOr5PvepjH0q47Jae59hQAvn3IqAHv2EbC8= github.com/tendermint/tendermint v0.34.13/go.mod h1:6RVVRBqwtKhA+H59APKumO+B7Nye4QXSFc6+TYxAxCI= +github.com/tendermint/tm-db v0.6.2/go.mod h1:GYtQ67SUvATOcoY8/+x6ylk8Qo02BQyLrAs+yAcLvGI= +github.com/tendermint/tm-db v0.6.3/go.mod h1:lfA1dL9/Y/Y8wwyPp2NMLyn5P5Ptr/gvDFNWtrCWSf8= github.com/tendermint/tm-db v0.6.4 h1:3N2jlnYQkXNQclQwd/eKV/NzlqPlfK21cpRRIx80XXQ= github.com/tendermint/tm-db v0.6.4/go.mod h1:dptYhIpJ2M5kUuenLr+Yyf3zQOv1SgBZcl8/BmWlMBw= github.com/tetafro/godot v1.4.9/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= @@ -1307,6 +1322,7 @@ golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= @@ -1756,6 +1772,7 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201111145450-ac7456db90a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1805,6 +1822,7 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= diff --git a/ethereum/rpc/apis.go b/rpc/apis.go similarity index 83% rename from ethereum/rpc/apis.go rename to rpc/apis.go index 2f4ca69f..7519e5c8 100644 --- a/ethereum/rpc/apis.go +++ b/rpc/apis.go @@ -8,16 +8,16 @@ import ( "github.com/ethereum/go-ethereum/rpc" - "github.com/tharsis/ethermint/ethereum/rpc/backend" - "github.com/tharsis/ethermint/ethereum/rpc/namespaces/debug" - "github.com/tharsis/ethermint/ethereum/rpc/namespaces/eth" - "github.com/tharsis/ethermint/ethereum/rpc/namespaces/eth/filters" - "github.com/tharsis/ethermint/ethereum/rpc/namespaces/miner" - "github.com/tharsis/ethermint/ethereum/rpc/namespaces/net" - "github.com/tharsis/ethermint/ethereum/rpc/namespaces/personal" - "github.com/tharsis/ethermint/ethereum/rpc/namespaces/txpool" - "github.com/tharsis/ethermint/ethereum/rpc/namespaces/web3" - "github.com/tharsis/ethermint/ethereum/rpc/types" + "github.com/tharsis/ethermint/rpc/ethereum/backend" + "github.com/tharsis/ethermint/rpc/ethereum/namespaces/debug" + "github.com/tharsis/ethermint/rpc/ethereum/namespaces/eth" + "github.com/tharsis/ethermint/rpc/ethereum/namespaces/eth/filters" + "github.com/tharsis/ethermint/rpc/ethereum/namespaces/miner" + "github.com/tharsis/ethermint/rpc/ethereum/namespaces/net" + "github.com/tharsis/ethermint/rpc/ethereum/namespaces/personal" + "github.com/tharsis/ethermint/rpc/ethereum/namespaces/txpool" + "github.com/tharsis/ethermint/rpc/ethereum/namespaces/web3" + "github.com/tharsis/ethermint/rpc/ethereum/types" rpcclient "github.com/tendermint/tendermint/rpc/jsonrpc/client" ) diff --git a/ethereum/rpc/doc.go b/rpc/doc.go similarity index 100% rename from ethereum/rpc/doc.go rename to rpc/doc.go diff --git a/ethereum/rpc/backend/backend.go b/rpc/ethereum/backend/backend.go similarity index 99% rename from ethereum/rpc/backend/backend.go rename to rpc/ethereum/backend/backend.go index 2383cdc4..67e3ce80 100644 --- a/ethereum/rpc/backend/backend.go +++ b/rpc/ethereum/backend/backend.go @@ -30,8 +30,8 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/tharsis/ethermint/ethereum/rpc/namespaces/eth/filters" - "github.com/tharsis/ethermint/ethereum/rpc/types" + "github.com/tharsis/ethermint/rpc/ethereum/namespaces/eth/filters" + "github.com/tharsis/ethermint/rpc/ethereum/types" "github.com/tharsis/ethermint/server/config" ethermint "github.com/tharsis/ethermint/types" evmtypes "github.com/tharsis/ethermint/x/evm/types" diff --git a/ethereum/rpc/backend/utils.go b/rpc/ethereum/backend/utils.go similarity index 98% rename from ethereum/rpc/backend/utils.go rename to rpc/ethereum/backend/utils.go index 192a5899..9453e87b 100644 --- a/ethereum/rpc/backend/utils.go +++ b/rpc/ethereum/backend/utils.go @@ -14,7 +14,7 @@ import ( "github.com/tendermint/tendermint/libs/log" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/tharsis/ethermint/ethereum/rpc/types" + "github.com/tharsis/ethermint/rpc/ethereum/types" evmtypes "github.com/tharsis/ethermint/x/evm/types" ) diff --git a/ethereum/rpc/namespaces/debug/api.go b/rpc/ethereum/namespaces/debug/api.go similarity index 99% rename from ethereum/rpc/namespaces/debug/api.go rename to rpc/ethereum/namespaces/debug/api.go index 1ca5465c..d6846161 100644 --- a/ethereum/rpc/namespaces/debug/api.go +++ b/rpc/ethereum/namespaces/debug/api.go @@ -22,8 +22,8 @@ import ( "github.com/cosmos/cosmos-sdk/server" "github.com/ethereum/go-ethereum/common" "github.com/tendermint/tendermint/libs/log" - "github.com/tharsis/ethermint/ethereum/rpc/backend" - rpctypes "github.com/tharsis/ethermint/ethereum/rpc/types" + "github.com/tharsis/ethermint/rpc/ethereum/backend" + rpctypes "github.com/tharsis/ethermint/rpc/ethereum/types" ) // HandlerT keeps track of the cpu profiler and trace execution diff --git a/ethereum/rpc/namespaces/debug/trace.go b/rpc/ethereum/namespaces/debug/trace.go similarity index 100% rename from ethereum/rpc/namespaces/debug/trace.go rename to rpc/ethereum/namespaces/debug/trace.go diff --git a/ethereum/rpc/namespaces/debug/trace_fallback.go b/rpc/ethereum/namespaces/debug/trace_fallback.go similarity index 100% rename from ethereum/rpc/namespaces/debug/trace_fallback.go rename to rpc/ethereum/namespaces/debug/trace_fallback.go diff --git a/ethereum/rpc/namespaces/debug/utils.go b/rpc/ethereum/namespaces/debug/utils.go similarity index 100% rename from ethereum/rpc/namespaces/debug/utils.go rename to rpc/ethereum/namespaces/debug/utils.go diff --git a/ethereum/rpc/namespaces/eth/api.go b/rpc/ethereum/namespaces/eth/api.go similarity index 99% rename from ethereum/rpc/namespaces/eth/api.go rename to rpc/ethereum/namespaces/eth/api.go index 00bc5da1..698a3616 100644 --- a/ethereum/rpc/namespaces/eth/api.go +++ b/rpc/ethereum/namespaces/eth/api.go @@ -30,8 +30,8 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/tharsis/ethermint/crypto/hd" - "github.com/tharsis/ethermint/ethereum/rpc/backend" - rpctypes "github.com/tharsis/ethermint/ethereum/rpc/types" + "github.com/tharsis/ethermint/rpc/ethereum/backend" + rpctypes "github.com/tharsis/ethermint/rpc/ethereum/types" ethermint "github.com/tharsis/ethermint/types" evmtypes "github.com/tharsis/ethermint/x/evm/types" ) diff --git a/ethereum/rpc/namespaces/eth/filters/api.go b/rpc/ethereum/namespaces/eth/filters/api.go similarity index 99% rename from ethereum/rpc/namespaces/eth/filters/api.go rename to rpc/ethereum/namespaces/eth/filters/api.go index 3d40cb94..99cf61b9 100644 --- a/ethereum/rpc/namespaces/eth/filters/api.go +++ b/rpc/ethereum/namespaces/eth/filters/api.go @@ -6,7 +6,7 @@ import ( "sync" "time" - "github.com/tharsis/ethermint/ethereum/rpc/types" + "github.com/tharsis/ethermint/rpc/ethereum/types" "github.com/tendermint/tendermint/libs/log" diff --git a/ethereum/rpc/namespaces/eth/filters/filter_system.go b/rpc/ethereum/namespaces/eth/filters/filter_system.go similarity index 99% rename from ethereum/rpc/namespaces/eth/filters/filter_system.go rename to rpc/ethereum/namespaces/eth/filters/filter_system.go index e1821fda..51b88b38 100644 --- a/ethereum/rpc/namespaces/eth/filters/filter_system.go +++ b/rpc/ethereum/namespaces/eth/filters/filter_system.go @@ -22,7 +22,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/tharsis/ethermint/ethereum/rpc/pubsub" + "github.com/tharsis/ethermint/rpc/ethereum/pubsub" evmtypes "github.com/tharsis/ethermint/x/evm/types" ) diff --git a/ethereum/rpc/namespaces/eth/filters/filters.go b/rpc/ethereum/namespaces/eth/filters/filters.go similarity index 99% rename from ethereum/rpc/namespaces/eth/filters/filters.go rename to rpc/ethereum/namespaces/eth/filters/filters.go index aa82a7ad..6e0e1bca 100644 --- a/ethereum/rpc/namespaces/eth/filters/filters.go +++ b/rpc/ethereum/namespaces/eth/filters/filters.go @@ -5,7 +5,7 @@ import ( "encoding/binary" "math/big" - "github.com/tharsis/ethermint/ethereum/rpc/types" + "github.com/tharsis/ethermint/rpc/ethereum/types" "github.com/pkg/errors" "github.com/tendermint/tendermint/libs/log" diff --git a/ethereum/rpc/namespaces/eth/filters/subscription.go b/rpc/ethereum/namespaces/eth/filters/subscription.go similarity index 100% rename from ethereum/rpc/namespaces/eth/filters/subscription.go rename to rpc/ethereum/namespaces/eth/filters/subscription.go diff --git a/ethereum/rpc/namespaces/eth/filters/utils.go b/rpc/ethereum/namespaces/eth/filters/utils.go similarity index 100% rename from ethereum/rpc/namespaces/eth/filters/utils.go rename to rpc/ethereum/namespaces/eth/filters/utils.go diff --git a/ethereum/rpc/namespaces/miner/api.go b/rpc/ethereum/namespaces/miner/api.go similarity index 98% rename from ethereum/rpc/namespaces/miner/api.go rename to rpc/ethereum/namespaces/miner/api.go index 396d1b67..0ae4e6e9 100644 --- a/ethereum/rpc/namespaces/miner/api.go +++ b/rpc/ethereum/namespaces/miner/api.go @@ -21,8 +21,8 @@ import ( "github.com/tendermint/tendermint/libs/log" tmtypes "github.com/tendermint/tendermint/types" - "github.com/tharsis/ethermint/ethereum/rpc/backend" - rpctypes "github.com/tharsis/ethermint/ethereum/rpc/types" + "github.com/tharsis/ethermint/rpc/ethereum/backend" + rpctypes "github.com/tharsis/ethermint/rpc/ethereum/types" "github.com/tharsis/ethermint/server/config" ) diff --git a/ethereum/rpc/namespaces/miner/unsupported.go b/rpc/ethereum/namespaces/miner/unsupported.go similarity index 100% rename from ethereum/rpc/namespaces/miner/unsupported.go rename to rpc/ethereum/namespaces/miner/unsupported.go diff --git a/ethereum/rpc/namespaces/net/api.go b/rpc/ethereum/namespaces/net/api.go similarity index 100% rename from ethereum/rpc/namespaces/net/api.go rename to rpc/ethereum/namespaces/net/api.go diff --git a/ethereum/rpc/namespaces/personal/api.go b/rpc/ethereum/namespaces/personal/api.go similarity index 98% rename from ethereum/rpc/namespaces/personal/api.go rename to rpc/ethereum/namespaces/personal/api.go index 14cf918f..5eecc8e2 100644 --- a/ethereum/rpc/namespaces/personal/api.go +++ b/rpc/ethereum/namespaces/personal/api.go @@ -6,7 +6,7 @@ import ( "os" "time" - "github.com/tharsis/ethermint/ethereum/rpc/backend" + "github.com/tharsis/ethermint/rpc/ethereum/backend" "github.com/cosmos/cosmos-sdk/client" @@ -25,7 +25,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/tharsis/ethermint/crypto/ethsecp256k1" - rpctypes "github.com/tharsis/ethermint/ethereum/rpc/types" + rpctypes "github.com/tharsis/ethermint/rpc/ethereum/types" ) // PrivateAccountAPI is the personal_ prefixed set of APIs in the Web3 JSON-RPC spec. diff --git a/ethereum/rpc/namespaces/txpool/api.go b/rpc/ethereum/namespaces/txpool/api.go similarity index 97% rename from ethereum/rpc/namespaces/txpool/api.go rename to rpc/ethereum/namespaces/txpool/api.go index 4e60cd18..bfc501d6 100644 --- a/ethereum/rpc/namespaces/txpool/api.go +++ b/rpc/ethereum/namespaces/txpool/api.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/tharsis/ethermint/ethereum/rpc/types" + "github.com/tharsis/ethermint/rpc/ethereum/types" ) // PublicAPI offers and API for the transaction pool. It only operates on data that is non-confidential. diff --git a/ethereum/rpc/namespaces/web3/api.go b/rpc/ethereum/namespaces/web3/api.go similarity index 100% rename from ethereum/rpc/namespaces/web3/api.go rename to rpc/ethereum/namespaces/web3/api.go diff --git a/ethereum/rpc/pubsub/pubsub.go b/rpc/ethereum/pubsub/pubsub.go similarity index 100% rename from ethereum/rpc/pubsub/pubsub.go rename to rpc/ethereum/pubsub/pubsub.go diff --git a/ethereum/rpc/pubsub/pubsub_test.go b/rpc/ethereum/pubsub/pubsub_test.go similarity index 100% rename from ethereum/rpc/pubsub/pubsub_test.go rename to rpc/ethereum/pubsub/pubsub_test.go diff --git a/ethereum/rpc/types/addrlock.go b/rpc/ethereum/types/addrlock.go similarity index 100% rename from ethereum/rpc/types/addrlock.go rename to rpc/ethereum/types/addrlock.go diff --git a/ethereum/rpc/types/block.go b/rpc/ethereum/types/block.go similarity index 100% rename from ethereum/rpc/types/block.go rename to rpc/ethereum/types/block.go diff --git a/ethereum/rpc/types/block_test.go b/rpc/ethereum/types/block_test.go similarity index 100% rename from ethereum/rpc/types/block_test.go rename to rpc/ethereum/types/block_test.go diff --git a/ethereum/rpc/types/query_client.go b/rpc/ethereum/types/query_client.go similarity index 100% rename from ethereum/rpc/types/query_client.go rename to rpc/ethereum/types/query_client.go diff --git a/ethereum/rpc/types/types.go b/rpc/ethereum/types/types.go similarity index 100% rename from ethereum/rpc/types/types.go rename to rpc/ethereum/types/types.go diff --git a/ethereum/rpc/types/utils.go b/rpc/ethereum/types/utils.go similarity index 100% rename from ethereum/rpc/types/utils.go rename to rpc/ethereum/types/utils.go diff --git a/ethereum/rpc/websockets.go b/rpc/websockets.go similarity index 99% rename from ethereum/rpc/websockets.go rename to rpc/websockets.go index 488a33cf..1be2a729 100644 --- a/ethereum/rpc/websockets.go +++ b/rpc/websockets.go @@ -24,8 +24,8 @@ import ( rpcclient "github.com/tendermint/tendermint/rpc/jsonrpc/client" tmtypes "github.com/tendermint/tendermint/types" - rpcfilters "github.com/tharsis/ethermint/ethereum/rpc/namespaces/eth/filters" - "github.com/tharsis/ethermint/ethereum/rpc/types" + rpcfilters "github.com/tharsis/ethermint/rpc/ethereum/namespaces/eth/filters" + "github.com/tharsis/ethermint/rpc/ethereum/types" "github.com/tharsis/ethermint/server/config" evmtypes "github.com/tharsis/ethermint/x/evm/types" ) diff --git a/server/json_rpc.go b/server/json_rpc.go index 9090de24..204427fc 100644 --- a/server/json_rpc.go +++ b/server/json_rpc.go @@ -11,7 +11,7 @@ import ( "github.com/cosmos/cosmos-sdk/server" "github.com/cosmos/cosmos-sdk/server/types" ethrpc "github.com/ethereum/go-ethereum/rpc" - "github.com/tharsis/ethermint/ethereum/rpc" + "github.com/tharsis/ethermint/rpc" "github.com/tharsis/ethermint/server/config" ) diff --git a/server/start.go b/server/start.go index 245b0c7c..328f3763 100644 --- a/server/start.go +++ b/server/start.go @@ -41,8 +41,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ethlog "github.com/ethereum/go-ethereum/log" - ethdebug "github.com/tharsis/ethermint/ethereum/rpc/namespaces/debug" "github.com/tharsis/ethermint/log" + ethdebug "github.com/tharsis/ethermint/rpc/ethereum/namespaces/debug" "github.com/tharsis/ethermint/server/config" srvflags "github.com/tharsis/ethermint/server/flags" ) diff --git a/tests/rpc/rpc_pending_test.go b/tests/rpc/rpc_pending_test.go index 76e9fba5..69664440 100644 --- a/tests/rpc/rpc_pending_test.go +++ b/tests/rpc/rpc_pending_test.go @@ -15,7 +15,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/stretchr/testify/require" - rpctypes "github.com/tharsis/ethermint/ethereum/rpc/types" + rpctypes "github.com/tharsis/ethermint/rpc/ethereum/types" ) // func TestMain(m *testing.M) { diff --git a/tests/rpc/rpc_test.go b/tests/rpc/rpc_test.go index 1e57b831..dd2f6073 100644 --- a/tests/rpc/rpc_test.go +++ b/tests/rpc/rpc_test.go @@ -19,7 +19,7 @@ import ( "github.com/stretchr/testify/require" - rpctypes "github.com/tharsis/ethermint/ethereum/rpc/types" + rpctypes "github.com/tharsis/ethermint/rpc/ethereum/types" ethermint "github.com/tharsis/ethermint/types" evmtypes "github.com/tharsis/ethermint/x/evm/types" diff --git a/testutil/network/util.go b/testutil/network/util.go index 1ed8c994..97f65937 100644 --- a/testutil/network/util.go +++ b/testutil/network/util.go @@ -30,7 +30,7 @@ import ( genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/tharsis/ethermint/ethereum/rpc" + "github.com/tharsis/ethermint/rpc" ethsrv "github.com/tharsis/ethermint/server" ethermint "github.com/tharsis/ethermint/types" ) diff --git a/x/evm/client/cli/query.go b/x/evm/client/cli/query.go index 85be37f0..72bda4ac 100644 --- a/x/evm/client/cli/query.go +++ b/x/evm/client/cli/query.go @@ -2,7 +2,7 @@ package cli import ( "github.com/spf13/cobra" - rpctypes "github.com/tharsis/ethermint/ethereum/rpc/types" + rpctypes "github.com/tharsis/ethermint/rpc/ethereum/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" diff --git a/x/evm/client/rest/rest.go b/x/evm/client/rest/rest.go index 7906e689..b40155bc 100644 --- a/x/evm/client/rest/rest.go +++ b/x/evm/client/rest/rest.go @@ -14,7 +14,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/rest" authrest "github.com/cosmos/cosmos-sdk/x/auth/client/rest" - rpctypes "github.com/tharsis/ethermint/ethereum/rpc/types" + rpctypes "github.com/tharsis/ethermint/rpc/ethereum/types" "github.com/ethereum/go-ethereum/common" )