From f624189941c23a4cd7e35c99f88d85682dc88a2c Mon Sep 17 00:00:00 2001 From: 0XTFM <140174482+0xTFM@users.noreply.github.com> Date: Thu, 23 Nov 2023 12:37:38 +0300 Subject: [PATCH] update(gravity): v1.11.1 --- .github/dependabot.yml | 2 +- go.mod | 14 ++-- go.sum | 23 +++---- pkg/codec/protobuf_codec.go | 25 +------ pkg/cosmos_sdk/block/parsing/msg_parsing.go | 18 ++--- .../block/parsing/msg_parsing_test.go | 65 +++++++++++++------ 6 files changed, 76 insertions(+), 71 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9b701b5b..185d7d03 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -320,7 +320,7 @@ updates: - "wolthrax" - "Raumo0" allow: - - dependency-name: "github.com/Gravity-Bridge/Gravity-Bridge/module" + - dependency-name: "github.com/Gravity-Bridge/Gravity-Bridge" - package-ecosystem: "gomod" directory: "/" diff --git a/go.mod b/go.mod index 62dc1d8d..69430dc6 100644 --- a/go.mod +++ b/go.mod @@ -3,18 +3,18 @@ module github.com/mapofzones/cosmos-watcher go 1.19 replace ( - github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.45.15 - github.com/evmos/ethermint => github.com/evmos/ethermint v0.19.3 + github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.45.16 + github.com/evmos/ethermint => github.com/althea-net/ethermint v0.19.8 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 github.com/tendermint/tendermint => github.com/cometbft/cometbft v0.34.27 google.golang.org/grpc => google.golang.org/grpc v1.33.2 ) require ( - github.com/Gravity-Bridge/Gravity-Bridge/module v1.4.2-0.20230502173705-38360b0ca7b9 - github.com/cosmos/cosmos-sdk v0.45.15 - github.com/cosmos/ibc-go/v3 v3.4.0 - github.com/evmos/ethermint v0.19.3 + github.com/Gravity-Bridge/Gravity-Bridge/module v1.4.2-0.20231114005316-d8f348d6035d + github.com/cosmos/cosmos-sdk v0.45.16 + github.com/cosmos/ibc-go/v4 v4.3.1 + github.com/evmos/ethermint v0.19.8 github.com/gogo/protobuf v1.3.3 github.com/streadway/amqp v1.0.0 github.com/stretchr/testify v1.8.1 @@ -34,7 +34,7 @@ require ( github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/VictoriaMetrics/fastcache v1.6.0 // indirect - github.com/althea-net/bech32-ibc v0.4.2 // indirect + github.com/althea-net/bech32-ibc v0.4.5 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect diff --git a/go.sum b/go.sum index e0a58d89..976d62db 100644 --- a/go.sum +++ b/go.sum @@ -60,8 +60,8 @@ github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3 github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/DataDog/zstd v1.5.0 h1:+K/VEwIAaPcHiMtQvpLD4lqW7f0Gk3xdYZmI1hD+CXo= github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/Gravity-Bridge/Gravity-Bridge/module v1.4.2-0.20230502173705-38360b0ca7b9 h1:SJKWXp4ue3UKywLPuKbMjkd9iy19UGd8yUmnwLJgSc4= -github.com/Gravity-Bridge/Gravity-Bridge/module v1.4.2-0.20230502173705-38360b0ca7b9/go.mod h1:uJJcCJxcrdYRRJh4fO5afLhk15ASCWTK43RVWIWvNvA= +github.com/Gravity-Bridge/Gravity-Bridge/module v1.4.2-0.20231114005316-d8f348d6035d h1:sKwcVc8P1Pe+AgRuoOQgbC+YoS1wt593OYiYRV6a8rE= +github.com/Gravity-Bridge/Gravity-Bridge/module v1.4.2-0.20231114005316-d8f348d6035d/go.mod h1:lV80l3jokwQpN+ek0VV6iZn5D716j1DtcwUxmXFE9Pw= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= @@ -86,8 +86,10 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/althea-net/bech32-ibc v0.4.2 h1:ilIgAbCmw8RBPrysBvLEI93oXFtdKzAul3LuCu9WUJo= -github.com/althea-net/bech32-ibc v0.4.2/go.mod h1:QLv8oeJYempEl67DioKxIdtcIR9lsTsvmePyBZxGZLE= +github.com/althea-net/bech32-ibc v0.4.5 h1:eSa/SXETkXPCZJGCkAVj/shKtHnPCs3dHFBx3XzU+G4= +github.com/althea-net/bech32-ibc v0.4.5/go.mod h1:K6tei/HzcT93nj910sM1dlFSl2cRucf/WCMkLERvmqE= +github.com/althea-net/ethermint v0.19.8 h1:/plZS0n7t5M1d1wXgG96LbRytUurQLeDHLqmZUazAMk= +github.com/althea-net/ethermint v0.19.8/go.mod h1:D1Jfhqtrb0q12IQLLB6w0jfjcSl/EMRCR3VKJVVPXSM= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= @@ -100,6 +102,7 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/btcsuite/btcd v0.22.2 h1:vBZ+lGGd1XubpOWO67ITJpAEsICWhA0YzqkcpkgNBfo= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= @@ -159,8 +162,8 @@ github.com/cosmos/cosmos-db v0.0.0-20221226095112-f3c38ecb5e32 h1:zlCp9n3uwQieEL github.com/cosmos/cosmos-db v0.0.0-20221226095112-f3c38ecb5e32/go.mod h1:kwMlEC4wWvB48zAShGKVqboJL6w4zCLesaNQ3YLU2BQ= github.com/cosmos/cosmos-proto v1.0.0-beta.1 h1:iDL5qh++NoXxG8hSy93FdYJut4XfgbShIocllGaXx/0= github.com/cosmos/cosmos-proto v1.0.0-beta.1/go.mod h1:8k2GNZghi5sDRFw/scPL8gMSowT1vDA+5ouxL8GjaUE= -github.com/cosmos/cosmos-sdk v0.45.15 h1:yyLZ9PylnR1DADf9FYGxnn8t3+Y5K2mMUXNUN38MI5A= -github.com/cosmos/cosmos-sdk v0.45.15/go.mod h1:bScuNwWAP0TZJpUf+SHXRU3xGoUPp+X9nAzfeIXts40= +github.com/cosmos/cosmos-sdk v0.45.16 h1:5ba/Bh5/LE55IwHQuCU4fiG4eXeDKtSWzehXRpaKDcw= +github.com/cosmos/cosmos-sdk v0.45.16/go.mod h1:bScuNwWAP0TZJpUf+SHXRU3xGoUPp+X9nAzfeIXts40= 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= @@ -168,8 +171,8 @@ github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4 github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= github.com/cosmos/iavl v0.19.5 h1:rGA3hOrgNxgRM5wYcSCxgQBap7fW82WZgY78V9po/iY= github.com/cosmos/iavl v0.19.5/go.mod h1:X9PKD3J0iFxdmgNLa7b2LYWdsGd90ToV5cAONApkEPw= -github.com/cosmos/ibc-go/v3 v3.4.0 h1:ha3cqEG36pqMWqA1D+kxDWBTZXpeFMd/aZIQF7I0xro= -github.com/cosmos/ibc-go/v3 v3.4.0/go.mod h1:VwB/vWu4ysT5DN2aF78d17LYmx3omSAdq6gpKvM7XRA= +github.com/cosmos/ibc-go/v4 v4.3.1 h1:xbg0CaCdxK3lvgGvSaI91ROOLd7s30UqEcexH6Ba4Ys= +github.com/cosmos/ibc-go/v4 v4.3.1/go.mod h1:89E+K9CxpkS/etLEcG026jPM/RSnVMcfesvRYp/0aKI= github.com/cosmos/ledger-cosmos-go v0.12.2 h1:/XYaBlE2BJxtvpkHiBm97gFGSGmYGKunKyF3nNqAXZA= github.com/cosmos/ledger-cosmos-go v0.12.2/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= @@ -219,8 +222,6 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7 github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/go-ethereum v1.10.19 h1:EOR5JbL4MD5yeOqv8W2iC1s4NximrTjqFccUz8lyBRA= github.com/ethereum/go-ethereum v1.10.19/go.mod h1:IJBNMtzKcNHPtllYihy6BL2IgK1u+32JriaTbdt4v+w= -github.com/evmos/ethermint v0.19.3 h1:Tc2tIiEK9b+rp1a0aWfzzggRDgecLa8gOHyXT3tH/1A= -github.com/evmos/ethermint v0.19.3/go.mod h1:2A25AF6mes32UL6j+r0wT0FnbzN7tzGYp2URxy+ZNmY= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= @@ -482,7 +483,7 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g= github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= -github.com/lib/pq v1.10.6 h1:jbk+ZieJ0D7EVGJYpL9QTz7/YW6UHbmdnZWYyK5cdBs= +github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/linxGnu/grocksdb v1.7.10 h1:dz7RY7GnFUA+GJO6jodyxgkUeGMEkPp3ikt9hAcNGEw= diff --git a/pkg/codec/protobuf_codec.go b/pkg/codec/protobuf_codec.go index 8ad200a8..3ea669dc 100644 --- a/pkg/codec/protobuf_codec.go +++ b/pkg/codec/protobuf_codec.go @@ -10,42 +10,21 @@ import ( cosmoscryptosecp "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cosmoscryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" cosmostypes "github.com/cosmos/cosmos-sdk/types" - ibcexported "github.com/cosmos/ibc-go/v3/modules/core/exported" - ibcclients "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint/types" + ibcexported "github.com/cosmos/ibc-go/v4/modules/core/exported" + ibcclients "github.com/cosmos/ibc-go/v4/modules/light-clients/07-tendermint/types" etherapp "github.com/evmos/ethermint/app" ethercodec "github.com/evmos/ethermint/crypto/codec" ethertypes "github.com/evmos/ethermint/types" ) -const ( - AccountAddressPrefix = "gravity" -) - -var ( - AccountPubKeyPrefix = AccountAddressPrefix + "pub" - ValidatorAddressPrefix = AccountAddressPrefix + "valoper" - ValidatorPubKeyPrefix = AccountAddressPrefix + "valoperpub" - ConsNodeAddressPrefix = AccountAddressPrefix + "valcons" - ConsNodePubKeyPrefix = AccountAddressPrefix + "valconspub" -) - func RegisterInterfacesAndImpls(interfaceRegistry cosmoscodectypes.InterfaceRegistry) { - SetConfig() impls := getMessageImplementations() interfaceRegistry.RegisterImplementations((*cosmostypes.Msg)(nil), impls...) gravityRegisterInterfaces(interfaceRegistry) registerTypes(interfaceRegistry) } -func SetConfig() { - config := cosmostypes.GetConfig() - config.SetBech32PrefixForAccount(AccountAddressPrefix, AccountPubKeyPrefix) - config.SetBech32PrefixForValidator(ValidatorAddressPrefix, ValidatorPubKeyPrefix) - config.SetBech32PrefixForConsensusNode(ConsNodeAddressPrefix, ConsNodePubKeyPrefix) - config.Seal() -} - func gravityRegisterInterfaces(interfaceRegistry cosmoscodectypes.InterfaceRegistry) { gravityapp.ModuleBasics.RegisterInterfaces(interfaceRegistry) ethercodec.RegisterInterfaces(interfaceRegistry) diff --git a/pkg/cosmos_sdk/block/parsing/msg_parsing.go b/pkg/cosmos_sdk/block/parsing/msg_parsing.go index f84805b1..5364489a 100644 --- a/pkg/cosmos_sdk/block/parsing/msg_parsing.go +++ b/pkg/cosmos_sdk/block/parsing/msg_parsing.go @@ -3,19 +3,21 @@ package cosmos import ( "encoding/json" "errors" - types6 "github.com/tendermint/tendermint/abci/types" "math/big" + types6 "github.com/tendermint/tendermint/abci/types" + + "log" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/bank/types" - transfer "github.com/cosmos/ibc-go/v3/modules/apps/transfer/types" - clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" - channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" - solomachine "github.com/cosmos/ibc-go/v3/modules/light-clients/06-solomachine/types" - types7 "github.com/cosmos/ibc-go/v3/modules/light-clients/07-tendermint/types" + transfer "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" + clienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types" + connectiontypes "github.com/cosmos/ibc-go/v4/modules/core/03-connection/types" + channeltypes "github.com/cosmos/ibc-go/v4/modules/core/04-channel/types" + solomachine "github.com/cosmos/ibc-go/v4/modules/light-clients/06-solomachine/types" + types7 "github.com/cosmos/ibc-go/v4/modules/light-clients/07-tendermint/types" watcher "github.com/mapofzones/cosmos-watcher/pkg/types" - "log" ) type attributeFiler struct { diff --git a/pkg/cosmos_sdk/block/parsing/msg_parsing_test.go b/pkg/cosmos_sdk/block/parsing/msg_parsing_test.go index d38a4b92..969965f2 100644 --- a/pkg/cosmos_sdk/block/parsing/msg_parsing_test.go +++ b/pkg/cosmos_sdk/block/parsing/msg_parsing_test.go @@ -1,10 +1,11 @@ package cosmos import ( - connectiontypes "github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" + "testing" + + connectiontypes "github.com/cosmos/ibc-go/v4/modules/core/03-connection/types" "github.com/stretchr/testify/assert" types6 "github.com/tendermint/tendermint/abci/types" - "testing" ) func TestParseIDsFromResults(t *testing.T) { @@ -40,10 +41,16 @@ func TestParseIDsFromResults(t *testing.T) { { "single_result_id", args{ - &types6.ResponseDeliverTx{Events: []types6.Event{{ - connectiontypes.EventTypeConnectionOpenInit, - []types6.EventAttribute{{[]byte(connectiontypes.AttributeKeyConnectionID), []byte("myConnectionID"), true}}, - }}}, + &types6.ResponseDeliverTx{ + Events: []types6.Event{{ + Type: connectiontypes.EventTypeConnectionOpenInit, + Attributes: []types6.EventAttribute{{ + Key: []byte(connectiontypes.AttributeKeyConnectionID), + Value: []byte("myConnectionID"), + Index: true, + }}, + }}, + }, []string{connectiontypes.EventTypeConnectionOpenInit}, []string{connectiontypes.AttributeKeyConnectionID}, }, @@ -52,24 +59,40 @@ func TestParseIDsFromResults(t *testing.T) { { "multiple_result_id", args{ - &types6.ResponseDeliverTx{Events: []types6.Event{ - { - connectiontypes.EventTypeConnectionOpenInit, - []types6.EventAttribute{ - {[]byte(connectiontypes.AttributeKeyConnectionID), []byte("myConnectionID"), true}, - {[]byte(connectiontypes.AttributeKeyClientID), []byte("myClientID"), true}, + &types6.ResponseDeliverTx{ + Events: []types6.Event{ + { + Type: connectiontypes.EventTypeConnectionOpenInit, + Attributes: []types6.EventAttribute{ + { + Key: []byte(connectiontypes.AttributeKeyConnectionID), + Value: []byte("myConnectionID"), + Index: true, + }, + { + Key: []byte(connectiontypes.AttributeKeyClientID), + Value: []byte("myClientID"), + Index: true, + }, + }, }, - }, - { - connectiontypes.EventTypeConnectionOpenTry, - []types6.EventAttribute{ - {[]byte(connectiontypes.AttributeKeyCounterpartyClientID), []byte("myCounterpartyClientID"), true}, - {[]byte(connectiontypes.AttributeKeyCounterpartyConnectionID), []byte("myCounterpartyConnectionID"), true}, + { + Type: connectiontypes.EventTypeConnectionOpenTry, + Attributes: []types6.EventAttribute{ + { + Key: []byte(connectiontypes.AttributeKeyCounterpartyClientID), + Value: []byte("myCounterpartyClientID"), + Index: true, + }, + { + Key: []byte(connectiontypes.AttributeKeyCounterpartyConnectionID), + Value: []byte("myCounterpartyConnectionID"), + Index: true, + }, + }, }, }, - }}, - []string{connectiontypes.EventTypeConnectionOpenInit, connectiontypes.EventTypeConnectionOpenTry}, - []string{connectiontypes.AttributeKeyConnectionID, connectiontypes.AttributeKeyCounterpartyConnectionID}, + }, []string{connectiontypes.EventTypeConnectionOpenInit, connectiontypes.EventTypeConnectionOpenTry}, []string{connectiontypes.AttributeKeyConnectionID, connectiontypes.AttributeKeyCounterpartyConnectionID}, }, []string{"myConnectionID", "myCounterpartyConnectionID"}, },