From 74ce5f753061aebf3d6fcb449be38d7b082e2b80 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Fri, 6 Jan 2023 15:33:48 +0800 Subject: [PATCH 1/4] fix wrong block number in debug_traceTransaction --- x/evm/keeper/grpc_query.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index c825c76f34..54b31cce6c 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -403,7 +403,7 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ } // minus one to get the context of block beginning - contextHeight := req.BlockNumber - 1 + contextHeight := req.BlockNumber if contextHeight < 1 { // 0 is a special value in `ContextWithHeight` contextHeight = 1 @@ -480,7 +480,7 @@ func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest) } // minus one to get the context of block beginning - contextHeight := req.BlockNumber - 1 + contextHeight := req.BlockNumber if contextHeight < 1 { // 0 is a special value in `ContextWithHeight` contextHeight = 1 From 4c9c959ab2d31d989b733136a989b42a859a7225 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Fri, 6 Jan 2023 16:16:52 +0800 Subject: [PATCH 2/4] add change doc --- CHANGELOG.md | 1 + x/evm/keeper/grpc_query.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92cb73ce57..52dde29cbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -113,6 +113,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (rpc) [#1484](https://github.com/evmos/ethermint/pull/1484) Align empty account result for old blocks as ethereum instead of return account not found error. * (rpc) [#1503](https://github.com/evmos/ethermint/pull/1503) Fix block hashes returned on JSON-RPC filter `eth_newBlockFilter`. * (ante) [#1566](https://github.com/evmos/ethermint/pull/1566) Fix `gasWanted` on `EthGasConsumeDecorator` ante handler when running transaction in `ReCheckMode` +* (rpc) [#1591](https://github.com/evmos/ethermint/pull/1591) Fix block number returned in opcode for debug trace related api. ## [v0.19.3] - 2022-10-14 diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 54b31cce6c..59a3678714 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -402,7 +402,7 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ return nil, status.Errorf(codes.InvalidArgument, "output limit cannot be negative, got %d", req.TraceConfig.Limit) } - // minus one to get the context of block beginning + // get the context of block beginning contextHeight := req.BlockNumber if contextHeight < 1 { // 0 is a special value in `ContextWithHeight` @@ -479,7 +479,7 @@ func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest) return nil, status.Errorf(codes.InvalidArgument, "output limit cannot be negative, got %d", req.TraceConfig.Limit) } - // minus one to get the context of block beginning + // get the context of block beginning contextHeight := req.BlockNumber if contextHeight < 1 { // 0 is a special value in `ContextWithHeight` From 0aacd7ff44a4fb59875f7e8b805ed0e0e263501a Mon Sep 17 00:00:00 2001 From: mmsqe Date: Thu, 12 Jan 2023 09:11:48 +0800 Subject: [PATCH 3/4] update nix --- gomod2nix.toml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/gomod2nix.toml b/gomod2nix.toml index bc0d27ab68..21e2192e8d 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -112,7 +112,7 @@ schema = 3 hash = "sha256-EmpRZ48pjPFq/fIHneut9Vyo5QJATfb3ZO7KzWnqs9g=" [mod."github.com/cosmos/ibc-go/v6"] version = "v6.1.0" - hash = "sha256-Gfqhdz9ZKEgb7LCkHiXCwYZYUYluQ+vMew/GkssfVj8=" + hash = "sha256-mHYCqLedcveDjfm1EiO2EMMNJqLm9u4WHwQTy1muOoc=" [mod."github.com/cosmos/ledger-cosmos-go"] version = "v0.12.1" hash = "sha256-9+nr+/r4MyiogddS0JcXOuriPqXP4nxln8ts+mYQRcg=" @@ -358,8 +358,8 @@ schema = 3 version = "v0.0.5" hash = "sha256-/5i70IkH/qSW5KjGzv8aQNKh9tHoz98tqtL0K2DMFn4=" [mod."github.com/onsi/ginkgo/v2"] - version = "v2.6.1" - hash = "sha256-OEiWYKCGPCaqL3vzSrHquHGm+Q8URT2anpanAVK5hRo=" + version = "v2.7.0" + hash = "sha256-BKqQKCsPA73FaQwYpAY+QsWFHIncrG5jgRhC2IiNmCk=" [mod."github.com/onsi/gomega"] version = "v1.24.2" hash = "sha256-iascSzzBT1Uv/XybezSblIwwrq78BU4a9BVB5MvK6MM=" @@ -406,8 +406,8 @@ schema = 3 version = "v0.9.1" hash = "sha256-YLGNrHHM+mN4ElW/XWuylOnFrA/VjSY+eBuC4LN//5c=" [mod."github.com/rs/cors"] - version = "v1.8.2" - hash = "sha256-FxBbQVb8zIoDGGaAJKfsYV0+POkh1tyX7P6A/Lk5Vsc=" + version = "v1.8.3" + hash = "sha256-VgVB4HKAhPSjNg96mIEUN1bt5ZQng8Fi3ZABy3CDWQE=" [mod."github.com/rs/zerolog"] version = "v1.27.0" hash = "sha256-BxQtP2TROeSSpj9l1irocuSfxn55UL4ugzB/og7r8eE=" @@ -496,8 +496,8 @@ schema = 3 version = "v0.0.0-20220722155223-a9213eeb770e" hash = "sha256-kNgzydWRpjm0sZl4uXEs3LX5L0xjJtJRAFf/CTlYUN4=" [mod."golang.org/x/net"] - version = "v0.4.0" - hash = "sha256-7IwGZh/xg4mQz88cJio2Ov5d3jGRXKj1itlAja/EAbQ=" + version = "v0.5.0" + hash = "sha256-HpbIAiLs7S1+tVsaSSdbCPw1IK43A0bFFuSzPSyjLbo=" [mod."golang.org/x/oauth2"] version = "v0.0.0-20221014153046-6fdb5e3db783" hash = "sha256-IoygidVNqyAZmN+3macDeIefK8hhJToygpcqlwehdYQ=" @@ -505,14 +505,14 @@ schema = 3 version = "v0.1.0" hash = "sha256-Hygjq9euZ0qz6TvHYQwOZEjNiTbTh1nSLRAWZ6KFGR8=" [mod."golang.org/x/sys"] - version = "v0.3.0" - hash = "sha256-TIHhfYbZ99sCU1ZMikxwomXH5AEtD/lA1VMMW+UAhbU=" + version = "v0.4.0" + hash = "sha256-jchMzHCH5dg+IL/F+LqaX/fyAcB/nvHQpfBjqwaRJH0=" [mod."golang.org/x/term"] - version = "v0.3.0" - hash = "sha256-NKv2o8wz8DB/2W2h/muGEIHb+S06mBXZxhG254RpQ5s=" + version = "v0.4.0" + hash = "sha256-wQKxHV10TU4vCU8Re2/hFmAbur/jRWEOB8QXBzgTFNY=" [mod."golang.org/x/text"] - version = "v0.5.0" - hash = "sha256-ztH+xQyM/clOcQl+y/UEPcfNKbc3xApMbEPDDZ9up0o=" + version = "v0.6.0" + hash = "sha256-+bpeRWR3relKACdal6NPj+eP5dnWCplTViArSN7/qA4=" [mod."golang.org/x/xerrors"] version = "v0.0.0-20220907171357-04be3eba64a2" hash = "sha256-6+zueutgefIYmgXinOflz8qGDDDj0Zhv+2OkGhBTKno=" @@ -523,11 +523,11 @@ schema = 3 version = "v1.6.7" hash = "sha256-zIxGRHiq4QBvRqkrhMGMGCaVL4iM4TtlYpAi/hrivS4=" [mod."google.golang.org/genproto"] - version = "v0.0.0-20221116193143-41c2ba794472" - hash = "sha256-uQuxuOvWRsdMii5M5QresisVd1E+Ss8s2WfR2n7QSXk=" + version = "v0.0.0-20221118155620-16455021b5e6" + hash = "sha256-FFSliEzgr7AceO8B+ZoPAlZDFVPLeqAFg+25VQw6cFs=" [mod."google.golang.org/grpc"] - version = "v1.51.0" - hash = "sha256-RzH5DU13D/ulxxOouIKpdNt8eHdff7mrEnB+JUupbLU=" + version = "v1.52.0" + hash = "sha256-wYJ/ysugKxz1O9u6BxECTIGFJ3sv0XmxOfM+Y0jW3KQ=" [mod."google.golang.org/protobuf"] version = "v1.28.2-0.20220831092852-f930b1dc76e8" hash = "sha256-li5hXlXwTJ5LIZ8bVki1AZ6UFI2gXHl33JwdX1dOrtM=" From e67f579f9846a1aebab251e3e1b185cf12fed28a Mon Sep 17 00:00:00 2001 From: mmsqe Date: Fri, 20 Jan 2023 22:29:15 +0800 Subject: [PATCH 4/4] update nix --- gomod2nix.toml | 55 ++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 29 deletions(-) diff --git a/gomod2nix.toml b/gomod2nix.toml index d384d8916a..fc5411b740 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -5,14 +5,14 @@ schema = 3 version = "v0.105.0" hash = "sha256-2nYtHjuN9ghGcM6aPlOxyNNarHebHtj0Xec48sWwdaI=" [mod."cloud.google.com/go/compute"] - version = "v1.12.1" - hash = "sha256-mMsdL+6R1KuFeAFqEJv8oq/cmRc9hSluEisCpGP0GTc=" + version = "v1.14.0" + hash = "sha256-Ay0oTR0I/ROajIiBSuZ1LfVVio142f8mUa64tGwreG8=" [mod."cloud.google.com/go/compute/metadata"] - version = "v0.2.1" - hash = "sha256-gqjkb6y5POkTWXGQtCvgygvXqoLkESB+cykKp7Mp3jI=" + version = "v0.2.3" + hash = "sha256-kYB1FTQRdTDqCqJzSU/jJYbVUGyxbkASUKbEs36FUyU=" [mod."cloud.google.com/go/iam"] - version = "v0.7.0" - hash = "sha256-2UTJ/BbZ+YMGJhyo3HRPUYVDXW6+B5znFdqiutboYtA=" + version = "v0.8.0" + hash = "sha256-legngj53V4RLUbAzDFlzL7LYv5Ano8IW28Ia3Ar69BM=" [mod."cloud.google.com/go/storage"] version = "v1.27.0" hash = "sha256-V4B6A1Ms8cemB5Cs6nAtUe1N1ldaI9oqTdzGU2FUhrc=" @@ -226,11 +226,11 @@ schema = 3 version = "v1.3.0" hash = "sha256-QoR55eBtA94T2tBszyxfDtO7/pjZZSGb5vm7U0Xhs0Y=" [mod."github.com/googleapis/enterprise-certificate-proxy"] - version = "v0.2.0" - hash = "sha256-5gxsS5kDLqNFBkQ4eK6GS/sNn+aFknm6jjfteO+6jl4=" + version = "v0.2.1" + hash = "sha256-FN0dEdtJygo24AKwcHyy6pL+esTKfxSz9tXPX8FV1rE=" [mod."github.com/googleapis/gax-go/v2"] - version = "v2.6.0" - hash = "sha256-sSsncbJmv0n5jB3G7tHY1Zr2ucCusIeTrXZH4A8QqYI=" + version = "v2.7.0" + hash = "sha256-n/9o8RFFDwowqSTLUPvsTE1lp4KUJpq53j733nLYrWk=" [mod."github.com/gorilla/handlers"] version = "v1.5.1" hash = "sha256-GnBAARgOx1E+hDMQ63SI17hdhGtLQxb31lZOmn5j/pU=" @@ -316,8 +316,8 @@ schema = 3 version = "v0.1.0" hash = "sha256-wQqGTtRWsfR9n0O/SXHVgECebbnNmHddxJIbG63OJBQ=" [mod."github.com/magiconair/properties"] - version = "v1.8.6" - hash = "sha256-xToSfpuePctkTdhJtsuKIEkXwfMZbnkFT98ahIfd4wY=" + version = "v1.8.7" + hash = "sha256-XQ2bnc2s7/IH3WxEO4GishZurMyKwEclZy1DXg+2xXc=" [mod."github.com/manifoldco/promptui"] version = "v0.9.0" hash = "sha256-Fe2OPoyRExZejwtUBivKhfJAJW7o9b1eyYpgDlWQ1No=" @@ -363,12 +363,9 @@ schema = 3 [mod."github.com/onsi/gomega"] version = "v1.25.0" hash = "sha256-knaJppfBzKSMD4Gsqzx22SGrti7G5UyDBYrothAqsrs=" - [mod."github.com/pelletier/go-toml"] - version = "v1.9.5" - hash = "sha256-RJ9K1BTId0Mled7S66iGgxHkZ5JKEIsrrNaEfM8aImc=" [mod."github.com/pelletier/go-toml/v2"] - version = "v2.0.5" - hash = "sha256-YWdHmuCGliWfiH0tTHuf07AAn/zOJNoq7g+5fvqdnrQ=" + version = "v2.0.6" + hash = "sha256-BxAeApnn5H+OLlH3TXGvIbtC6LmbRnjwbcfT1qMZ4PE=" [mod."github.com/petermattis/goid"] version = "v0.0.0-20180202154549-b0b1615b78e5" hash = "sha256-TCyVuP7rAtrvlterVCapFtbf6UmIf72FXQvkQoDtDj4=" @@ -418,8 +415,8 @@ schema = 3 version = "v3.21.4-0.20210419000835-c7a38de76ee5+incompatible" hash = "sha256-oqIqyFquWabIE6DID6uTEc8oFEmM1rVu2ATn3toiCEg=" [mod."github.com/spf13/afero"] - version = "v1.9.2" - hash = "sha256-R1mir7Fu95QK+YL99U14RGbLJzxqWRH5rSFpssgJvzA=" + version = "v1.9.3" + hash = "sha256-8WqLcfhb9IasbUWLbxD3g48t/cWc8XbgHUZOm3ALNjA=" [mod."github.com/spf13/cast"] version = "v1.5.0" hash = "sha256-Pdp+wC5FWqyJKzyYHb7JCcV9BoJk/sxQw6nLyuLJvuQ=" @@ -433,8 +430,8 @@ schema = 3 version = "v1.0.5" hash = "sha256-w9LLYzxxP74WHT4ouBspH/iQZXjuAh2WQCHsuvyEjAw=" [mod."github.com/spf13/viper"] - version = "v1.14.0" - hash = "sha256-qn3VzD339HZIub5QP4aWVciSufAfVb9llbmQZ8pfDEs=" + version = "v1.15.0" + hash = "sha256-FvpbekXegcdWNbek/vs2zakgRsT5FROF8O8fhn5DNpI=" [mod."github.com/status-im/keycard-go"] version = "v0.0.0-20200402102358-957c09536969" hash = "sha256-yddXXuu6mEFEO2/K6c1tWymeBKzOcvLQnNsFGRjtfXk=" @@ -445,8 +442,8 @@ schema = 3 version = "v1.8.1" hash = "sha256-3e0vOJLgCMAan+GfaGN8RGZdarh5iCavM6flf6YMNPk=" [mod."github.com/subosito/gotenv"] - version = "v1.4.1" - hash = "sha256-aHAUs8Gh+BREUulljWr7vBZQg1BLu/M/8UfNK8CWSn8=" + version = "v1.4.2" + hash = "sha256-LnrDR1k/AoCFWBMcU7vQsoQLkZ65evT2hoQHLDudTsg=" [mod."github.com/syndtr/goleveldb"] version = "v1.0.1-0.20210819022825-2ae1ddf74ef7" hash = "sha256-36a4hgVQfwtS2zhylKpQuFhrjdc/Y8pF0dxc26jcZIU=" @@ -487,8 +484,8 @@ schema = 3 version = "v1.3.6" hash = "sha256-DenVAmyN22xUiivk6fdJp4C9ZnUJXCMDUf8E0goRRV4=" [mod."go.opencensus.io"] - version = "v0.23.0" - hash = "sha256-R3O9GyNtv6j0ic7s+2xkLLaLzbJEop0Otj1nJDFBjsg=" + version = "v0.24.0" + hash = "sha256-4H+mGZgG2c9I1y0m8avF4qmt8LUKxxVsTqR8mKgP4yo=" [mod."golang.org/x/crypto"] version = "v0.3.0" hash = "sha256-Un9wPqz8u/xpV98T4IqE6RMXIPhGCIm2prsNkHP3cjg=" @@ -517,14 +514,14 @@ schema = 3 version = "v0.0.0-20220907171357-04be3eba64a2" hash = "sha256-6+zueutgefIYmgXinOflz8qGDDDj0Zhv+2OkGhBTKno=" [mod."google.golang.org/api"] - version = "v0.102.0" - hash = "sha256-q8t08Wu0qzOQOmhY4GSoUrhqLTW/TeXiKhio+5ONfe4=" + version = "v0.107.0" + hash = "sha256-jDYEv25KOU/k8fnS31DXl0a8lob0LmFxj88qV+P9NiU=" [mod."google.golang.org/appengine"] version = "v1.6.7" hash = "sha256-zIxGRHiq4QBvRqkrhMGMGCaVL4iM4TtlYpAi/hrivS4=" [mod."google.golang.org/genproto"] - version = "v0.0.0-20221118155620-16455021b5e6" - hash = "sha256-FFSliEzgr7AceO8B+ZoPAlZDFVPLeqAFg+25VQw6cFs=" + version = "v0.0.0-20221227171554-f9683d7f8bef" + hash = "sha256-vvYjJcG73odJwPUb3sZIz4MSHnzK1Jj2uo0CwZ8S8rQ=" [mod."google.golang.org/grpc"] version = "v1.52.0" hash = "sha256-wYJ/ysugKxz1O9u6BxECTIGFJ3sv0XmxOfM+Y0jW3KQ="