diff --git a/CHANGELOG.md b/CHANGELOG.md index 93f9f9358..72817983c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ * [\#1221](https://github.com/cosmos/relayer/pull/1221) Update cometbft to v0.37.2 and ibc-go to v7.2.0. * [\#1226](https://github.com/cosmos/relayer/pull/1226) Avoid invalid Bech32 prefix error in parallel tests when sdk Config get overwritten by each other in single process. * [\#1231](https://github.com/cosmos/relayer/pull/1231) Reduce get bech32 prefix when get signer. +* [\#1225](https://github.com/cosmos/relayer/pull/1225) Support build EVM messages to allow signing Ethereum transactions. ## v0.9.3 diff --git a/cregistry/chain_info.go b/cregistry/chain_info.go index 7309296e2..b6ff2c588 100644 --- a/cregistry/chain_info.go +++ b/cregistry/chain_info.go @@ -84,9 +84,10 @@ type ChainInfo struct { Provider string `json:"provider"` } `json:"rest"` } `json:"apis"` - MaxGasAmount uint64 `json:"max_gas_amount"` - ExtraCodecs []string `json:"extra_codecs"` - ExtensionOptions []provider.ExtensionOption `json:"extension_options"` + MaxGasAmount uint64 `json:"max_gas_amount"` + ExtraCodecs []string `json:"extra_codecs"` + ExtensionOptions []provider.ExtensionOption `json:"extension_options"` + PrecompiledContractAddress string `json:"precompiled_contract_address"` } // NewChainInfo returns a ChainInfo that is uninitialized other than the provided zap.Logger. @@ -256,22 +257,23 @@ func (c ChainInfo) GetChainConfig(ctx context.Context, name string) (*cosmos.Cos } return &cosmos.CosmosProviderConfig{ - Key: "default", - ChainID: c.ChainID, - RPCAddr: rpc, - AccountPrefix: c.Bech32Prefix, - KeyringBackend: "test", - GasAdjustment: 1.2, - GasPrices: gasPrices, - KeyDirectory: home, - Debug: debug, - Timeout: "20s", - OutputFormat: "json", - SignModeStr: "direct", - Slip44: c.Slip44, - SigningAlgorithm: c.SigningAlgorithm, - ExtraCodecs: c.ExtraCodecs, - MaxGasAmount: c.MaxGasAmount, - ExtensionOptions: c.ExtensionOptions, + Key: "default", + ChainID: c.ChainID, + RPCAddr: rpc, + AccountPrefix: c.Bech32Prefix, + KeyringBackend: "test", + GasAdjustment: 1.2, + GasPrices: gasPrices, + KeyDirectory: home, + Debug: debug, + Timeout: "20s", + OutputFormat: "json", + SignModeStr: "direct", + Slip44: c.Slip44, + SigningAlgorithm: c.SigningAlgorithm, + ExtraCodecs: c.ExtraCodecs, + MaxGasAmount: c.MaxGasAmount, + ExtensionOptions: c.ExtensionOptions, + PrecompiledContractAddress: c.PrecompiledContractAddress, }, nil } diff --git a/go.mod b/go.mod index e1d9828f2..becc9412e 100644 --- a/go.mod +++ b/go.mod @@ -18,6 +18,7 @@ require ( github.com/cosmos/ibc-go/v7 v7.3.0 github.com/cosmos/ics23/go v0.10.0 github.com/ethereum/go-ethereum v1.10.26 + github.com/evmos/ethermint v0.0.0-00010101000000-000000000000 github.com/gofrs/flock v0.8.1 github.com/google/go-cmp v0.5.9 github.com/google/go-github/v43 v43.0.0 @@ -51,7 +52,9 @@ require ( filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect - github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect + github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect + github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect + github.com/VictoriaMetrics/fastcache v1.6.0 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/aws/aws-sdk-go v1.44.203 // indirect github.com/benbjohnson/clock v1.3.0 // indirect @@ -78,6 +81,7 @@ require ( github.com/creachadair/taskgroup v0.4.2 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/deckarep/golang-set v1.8.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect @@ -91,6 +95,7 @@ require ( github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-stack/stack v1.8.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect @@ -122,7 +127,8 @@ require ( github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect - github.com/holiman/uint256 v1.2.0 // indirect + github.com/holiman/bloomfilter/v2 v2.0.3 // indirect + github.com/holiman/uint256 v1.2.1 // indirect github.com/huandu/skiplist v1.2.0 // indirect github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect @@ -133,7 +139,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.7.16 // indirect + github.com/linxGnu/grocksdb v1.8.0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect @@ -146,6 +152,7 @@ require ( github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect + github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect github.com/pkg/errors v0.9.1 // indirect @@ -153,12 +160,15 @@ require ( github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect + github.com/prometheus/tsdb v0.7.1 // indirect github.com/rakyll/statik v0.1.7 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect + github.com/rivo/uniseg v0.2.0 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/rs/cors v1.8.3 // indirect github.com/rs/zerolog v1.30.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect + github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect github.com/spf13/afero v1.9.5 // indirect github.com/spf13/cast v1.5.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect @@ -167,6 +177,7 @@ require ( github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tidwall/btree v1.6.0 // indirect + github.com/tklauser/go-sysconf v0.3.10 // indirect github.com/tklauser/numcpus v0.4.0 // indirect github.com/ulikunitz/xz v0.5.11 // indirect github.com/zondax/hid v0.9.1 // indirect @@ -188,7 +199,13 @@ require ( google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect nhooyr.io/websocket v1.8.6 // indirect pgregory.net/rapid v0.5.5 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) + +replace ( + github.com/ChainSafe/go-schnorrkel => github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d + github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.0.0-20230801014829-2df053357655 +) diff --git a/go.sum b/go.sum index 4ed2f7f64..5c1fc5df2 100644 --- a/go.sum +++ b/go.sum @@ -199,6 +199,7 @@ cosmossdk.io/log v1.2.1 h1:Xc1GgTCicniwmMiKwDxUjO4eLhPxoVdI9vtMW8Ti/uk= cosmossdk.io/log v1.2.1/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4= cosmossdk.io/math v1.1.2 h1:ORZetZCTyWkI5GlZ6CZS28fMHi83ZYf+A2vVnHNzZBM= cosmossdk.io/math v1.1.2/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= +cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d h1:E/8y0oG3u9hBR8l4F9MtC0LdZIamPCUwUoLlrHrX86I= cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -222,7 +223,9 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= +github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= @@ -233,6 +236,8 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= @@ -380,12 +385,16 @@ github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJF github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/crypto-org-chain/ethermint v0.0.0-20230801014829-2df053357655 h1:4nh2bIphsrQDSz29DKuWXlh45A0lany42+SsgxkVTQg= +github.com/crypto-org-chain/ethermint v0.0.0-20230801014829-2df053357655/go.mod h1:kuQycq4ke7s+VmuUNavP9gwFUkMyhDmxqS9s8N745H8= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= +github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= @@ -403,8 +412,11 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91 h1:Izz0+t1Z5nI16/II7vuEo/nHjodOg0p7+OiDpjX5t1E= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf h1:Yt+4K30SdjOkRoRRm3vYNQgR+/ZIy0RmeUDZo7Y8zeQ= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= @@ -414,6 +426,7 @@ github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -441,6 +454,7 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -464,7 +478,8 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-ole/go-ole v1.2.1 h1:2lOsA72HgjxAuMlKpFiCbHTvu44PIVkZ5hqm3RSdI/E= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= @@ -472,6 +487,7 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+ github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= +github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -684,14 +700,16 @@ github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/J github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= -github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= -github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= +github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= +github.com/holiman/uint256 v1.2.1 h1:XRtyuda/zw2l+Bq/38n5XUoEF72aSOu/77Thd9pPp2o= +github.com/holiman/uint256 v1.2.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= @@ -700,6 +718,7 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= @@ -756,8 +775,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.7.16 h1:Q2co1xrpdkr5Hx3Fp+f+f7fRGhQFQhvi/+226dtLmA8= -github.com/linxGnu/grocksdb v1.7.16/go.mod h1:JkS7pl5qWpGpuVb3bPqTz8nC12X3YtPZT+Xq7+QfQo4= +github.com/linxGnu/grocksdb v1.8.0 h1:H4L/LhP7GOMf1j17oQAElHgVlbEje2h14A8Tz9cM2BE= +github.com/linxGnu/grocksdb v1.8.0/go.mod h1:09CeBborffXhXdNpEcOeZrLKEnRtrZFEpFdPNI9Zjjg= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= @@ -777,6 +796,7 @@ github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APP github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -826,8 +846,10 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= @@ -842,7 +864,7 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= +github.com/onsi/gomega v1.26.0 h1:03cDLK28U6hWvCAns6NeydX3zIm4SF3ci69ulidS32Q= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= @@ -897,6 +919,7 @@ github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6T github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= @@ -914,6 +937,7 @@ github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -921,6 +945,7 @@ github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5X github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -942,6 +967,7 @@ github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71e github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= +github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -975,6 +1001,7 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.16.0 h1:rGGH0XDZhdUOryiDWjmIvUSWpbNqisK8Wk0Vyefw8hc= github.com/spf13/viper v1.16.0/go.mod h1:yg78JgCJcbrQOvV9YLXgkLaZqUidkY9K+Dd1FofRzQg= +github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969 h1:Oo2KZNP70KE0+IUJSidPj/BFS/RXNHmKIJOdckzml2E= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -1005,7 +1032,12 @@ github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2l github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= -github.com/tklauser/go-sysconf v0.3.5 h1:uu3Xl4nkLzQfXNsWn15rPc/HQCJKObbt1dKJeWp3vU4= +github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM= +github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= +github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= +github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= +github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= +github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -1255,6 +1287,7 @@ golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1294,6 +1327,7 @@ golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1677,6 +1711,8 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= diff --git a/relayer/chains/cosmos/provider.go b/relayer/chains/cosmos/provider.go index c33743faf..4406c973f 100644 --- a/relayer/chains/cosmos/provider.go +++ b/relayer/chains/cosmos/provider.go @@ -61,6 +61,8 @@ type CosmosProviderConfig struct { //If FeeGrantConfiguration is set, TXs submitted by the ChainClient will be signed by the FeeGrantees in a round-robin fashion by default. FeeGrants *FeeGrantConfiguration `json:"feegrants" yaml:"feegrants"` + + PrecompiledContractAddress string `json:"precompiled-contract-address" yaml:"precompiled-contract-address"` } // By default, TXs will be signed by the feegrantees 'ManagedGrantees' keys in a round robin fashion. diff --git a/relayer/chains/cosmos/tx.go b/relayer/chains/cosmos/tx.go index 44e002889..391084efa 100644 --- a/relayer/chains/cosmos/tx.go +++ b/relayer/chains/cosmos/tx.go @@ -2,17 +2,21 @@ package cosmos import ( "context" + "encoding/binary" "errors" "fmt" "math" "math/big" "math/rand" + "reflect" "regexp" "strconv" "strings" "sync" "time" + errorsmod "cosmossdk.io/errors" + sdkmath "cosmossdk.io/math" "github.com/avast/retry-go/v4" abci "github.com/cometbft/cometbft/abci/types" "github.com/cometbft/cometbft/libs/bytes" @@ -31,6 +35,8 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/types/tx/signing" + authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" + "github.com/cosmos/gogoproto/proto" feetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" @@ -42,8 +48,13 @@ import ( tmclient "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" localhost "github.com/cosmos/ibc-go/v7/modules/light-clients/09-localhost" strideicqtypes "github.com/cosmos/relayer/v2/relayer/chains/cosmos/stride" - "github.com/cosmos/relayer/v2/relayer/ethermint" + ethermintcodecs "github.com/cosmos/relayer/v2/relayer/codecs/ethermint" "github.com/cosmos/relayer/v2/relayer/provider" + "github.com/ethereum/go-ethereum/common" + ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/params" + etherminttypes "github.com/evmos/ethermint/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" "go.uber.org/zap" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -170,7 +181,20 @@ func (cc *CosmosProvider) SendMessagesToMempool( sequenceGuard.Mu.Lock() defer sequenceGuard.Mu.Unlock() - txBytes, sequence, fees, err := cc.buildMessages(ctx, msgs, memo, 0, txSignerKey, feegranterKey, sequenceGuard) + txf, txb, err := cc.getTxFactoryAndBuilder(ctx, msgs, memo, 0, txSignerKey, feegranterKey, sequenceGuard) + if err != nil { + return err + } + done := cc.SetSDKContext() + var txBytes []byte + var sequence uint64 + var fees sdk.Coins + if len(cc.PCfg.PrecompiledContractAddress) > 0 { + txBytes, sequence, fees, err = cc.buildEvmMessages(ctx, txf, txb) + } else { + txBytes, sequence, fees, err = cc.buildMessages(ctx, txf, txb, txSignerKey) + } + done() if err != nil { // Account sequence mismatch errors can happen on the simulated transaction also. if strings.Contains(err.Error(), sdkerrors.ErrWrongSequence.Error()) { @@ -187,7 +211,6 @@ func (cc *CosmosProvider) SendMessagesToMempool( return err } - // we had a successful tx broadcast with this sequence, so update it to the next cc.updateNextAccountSequence(sequenceGuard, sequence+1) return nil @@ -588,7 +611,7 @@ func (cc *CosmosProvider) buildSignerConfig(msgs []provider.RelayerMessage) ( return } -func (cc *CosmosProvider) buildMessages( +func (cc *CosmosProvider) getTxFactoryAndBuilder( ctx context.Context, msgs []provider.RelayerMessage, memo string, @@ -596,27 +619,23 @@ func (cc *CosmosProvider) buildMessages( txSignerKey string, feegranterKey string, sequenceGuard *WalletState, -) ( - txBytes []byte, - sequence uint64, - fees sdk.Coins, - err error, -) { +) (*tx.Factory, client.TxBuilder, error) { done := cc.SetSDKContext() defer done() cMsgs := CosmosMsgs(msgs...) txf, err := cc.PrepareFactory(cc.TxFactory(), txSignerKey) + if err != nil { - return nil, 0, sdk.Coins{}, err + return nil, nil, err } - - if memo != "" { + cc.log.Info("memo", zap.String("origin", memo)) + if len(cc.PCfg.PrecompiledContractAddress) == 0 && memo != "" { txf = txf.WithMemo(memo) } - sequence = txf.Sequence() + sequence := txf.Sequence() cc.updateNextAccountSequence(sequenceGuard, sequence) if sequence < sequenceGuard.NextAccountSequence { sequence = sequenceGuard.NextAccountSequence @@ -629,7 +648,7 @@ func (cc *CosmosProvider) buildMessages( _, adjusted, err = cc.CalculateGas(ctx, txf, txSignerKey, cMsgs...) if err != nil { - return nil, 0, sdk.Coins{}, err + return nil, nil, err } } @@ -637,7 +656,7 @@ func (cc *CosmosProvider) buildMessages( if txSignerKey != feegranterKey && feegranterKey != "" { granterAddr, err := cc.GetKeyAddressForKey(feegranterKey) if err != nil { - return nil, 0, sdk.Coins{}, err + return nil, nil, err } txf = txf.WithFeeGranter(granterAddr) @@ -649,22 +668,241 @@ func (cc *CosmosProvider) buildMessages( // Build the transaction builder txb, err := txf.BuildUnsignedTx(cMsgs...) if err != nil { - return nil, 0, sdk.Coins{}, err + return nil, nil, err } + return &txf, txb, nil +} - if err = tx.Sign(txf, txSignerKey, txb, false); err != nil { - return nil, 0, sdk.Coins{}, err +func convertAddress(addrString string) (*common.Address, error) { + cfg := sdk.GetConfig() + var addr []byte + // try hex, then bech32 + switch { + case common.IsHexAddress(addrString): + addr = common.HexToAddress(addrString).Bytes() + case strings.HasPrefix(addrString, cfg.GetBech32ValidatorAddrPrefix()): + addr, _ = sdk.ValAddressFromBech32(addrString) + case strings.HasPrefix(addrString, cfg.GetBech32AccountAddrPrefix()): + addr, _ = sdk.AccAddressFromBech32(addrString) + default: + return nil, fmt.Errorf("expected a valid hex or bech32 address (acc prefix %s), got '%s'", cfg.GetBech32AccountAddrPrefix(), addrString) + } + to := common.BytesToAddress(addr) + return &to, nil +} + +func convertCoins(prices string) (sdk.Coins, error) { + coins, err := sdk.ParseCoinsNormalized(prices) + if err != nil { + return nil, errorsmod.Wrapf(err, "failed to parse coins") } + return coins, nil +} +func (cc *CosmosProvider) buildMessages( + ctx context.Context, + txf *tx.Factory, + txb client.TxBuilder, + txSignerKey string, +) ([]byte, uint64, sdk.Coins, error) { + if err := tx.Sign(*txf, txSignerKey, txb, false); err != nil { + return nil, 0, sdk.Coins{}, err + } tx := txb.GetTx() - fees = tx.GetFee() + txBytes, err := cc.Cdc.TxConfig.TxEncoder()(tx) + if err != nil { + return nil, 0, sdk.Coins{}, err + } - // Generate the transaction bytes - txBytes, err = cc.Cdc.TxConfig.TxEncoder()(tx) + return txBytes, txf.Sequence(), tx.GetFee(), nil +} + +func getChainConfig(chainID *big.Int) *params.ChainConfig { + homesteadBlock := new(big.Int) + daoForkBlock := new(big.Int) + eip150Block := new(big.Int) + eip155Block := new(big.Int) + eip158Block := new(big.Int) + byzantiumBlock := new(big.Int) + constantinopleBlock := new(big.Int) + petersburgBlock := new(big.Int) + istanbulBlock := new(big.Int) + muirGlacierBlock := new(big.Int) + berlinBlock := new(big.Int) + londonBlock := new(big.Int) + arrowGlacierBlock := new(big.Int) + grayGlacierBlock := new(big.Int) + mergeNetsplitBlock := new(big.Int) + shanghaiBlock := new(big.Int) + cancunBlock := new(big.Int) + + return ¶ms.ChainConfig{ + ChainID: chainID, + HomesteadBlock: homesteadBlock, + DAOForkBlock: daoForkBlock, + DAOForkSupport: true, + EIP150Block: eip150Block, + EIP155Block: eip155Block, + EIP158Block: eip158Block, + ByzantiumBlock: byzantiumBlock, + ConstantinopleBlock: constantinopleBlock, + PetersburgBlock: petersburgBlock, + IstanbulBlock: istanbulBlock, + MuirGlacierBlock: muirGlacierBlock, + BerlinBlock: berlinBlock, + LondonBlock: londonBlock, + ArrowGlacierBlock: arrowGlacierBlock, + GrayGlacierBlock: grayGlacierBlock, + MergeNetsplitBlock: mergeNetsplitBlock, + ShanghaiBlock: shanghaiBlock, + CancunBlock: cancunBlock, + } +} + +// prefix bytes for the relayer msg type +const ( + prefixSize4Bytes = 4 + // Client + prefixCreateClient = iota + 1 + prefixUpdateClient + prefixUpgradeClient + prefixSubmitMisbehaviour + // Connection + prefixConnectionOpenInit + prefixConnectionOpenTry + prefixConnectionOpenAck + prefixConnectionOpenConfirm + // Channel + prefixChannelOpenInit + prefixChannelOpenTry + prefixChannelOpenAck + prefixChannelOpenConfirm + prefixChannelCloseInit + prefixChannelCloseConfirm + prefixRecvPacket + prefixAcknowledgement + prefixTimeout + prefixTimeoutOnClose +) + +var messageMap = map[reflect.Type]int{ + reflect.TypeOf((*clienttypes.MsgCreateClient)(nil)): prefixCreateClient, + reflect.TypeOf((*clienttypes.MsgUpdateClient)(nil)): prefixUpdateClient, + reflect.TypeOf((*clienttypes.MsgUpgradeClient)(nil)): prefixUpgradeClient, + reflect.TypeOf((*clienttypes.MsgSubmitMisbehaviour)(nil)): prefixSubmitMisbehaviour, + reflect.TypeOf((*conntypes.MsgConnectionOpenInit)(nil)): prefixConnectionOpenInit, + reflect.TypeOf((*conntypes.MsgConnectionOpenTry)(nil)): prefixConnectionOpenTry, + reflect.TypeOf((*conntypes.MsgConnectionOpenAck)(nil)): prefixConnectionOpenAck, + reflect.TypeOf((*conntypes.MsgConnectionOpenConfirm)(nil)): prefixConnectionOpenConfirm, + reflect.TypeOf((*chantypes.MsgChannelOpenInit)(nil)): prefixChannelOpenInit, + reflect.TypeOf((*chantypes.MsgChannelOpenTry)(nil)): prefixChannelOpenTry, + reflect.TypeOf((*chantypes.MsgChannelOpenAck)(nil)): prefixChannelOpenAck, + reflect.TypeOf((*chantypes.MsgChannelOpenConfirm)(nil)): prefixChannelOpenConfirm, + reflect.TypeOf((*chantypes.MsgChannelCloseInit)(nil)): prefixChannelCloseInit, + reflect.TypeOf((*chantypes.MsgChannelCloseConfirm)(nil)): prefixChannelCloseConfirm, + reflect.TypeOf((*chantypes.MsgRecvPacket)(nil)): prefixRecvPacket, + reflect.TypeOf((*chantypes.MsgAcknowledgement)(nil)): prefixAcknowledgement, + reflect.TypeOf((*chantypes.MsgTimeout)(nil)): prefixTimeout, + reflect.TypeOf((*chantypes.MsgTimeoutOnClose)(nil)): prefixTimeoutOnClose, +} + +func addLengthPrefix(prefix int, input []byte) []byte { + prefixBytes := make([]byte, prefixSize4Bytes) + binary.LittleEndian.PutUint32(prefixBytes, uint32(prefix)) + return append(prefixBytes, input...) +} + +func (cc *CosmosProvider) buildEvmMessages( + ctx context.Context, + txf *tx.Factory, + txb client.TxBuilder, +) ([]byte, uint64, sdk.Coins, error) { + chainID, err := ethermintcodecs.ParseChainID(cc.PCfg.ChainID) if err != nil { return nil, 0, sdk.Coins{}, err } + gasLimit := txf.Gas() + gasPrices, err := convertCoins(cc.PCfg.GasPrices) + if err != nil { + return nil, 0, sdk.Coins{}, err + } + gasPriceCoin := gasPrices[0] + gasPrice := gasPriceCoin.Amount.BigInt() + gasFeeCap := gasPrice + var gasTipCap *big.Int + if len(cc.PCfg.ExtensionOptions) > 0 { + var ok bool + gasTipCap, ok = new(big.Int).SetString(cc.PCfg.ExtensionOptions[0].Value, 10) + if !ok { + return nil, 0, sdk.Coins{}, errors.New("unsupported extOption") + } + } + txs := make([]sdk.Msg, 0, len(txb.GetTx().GetMsgs())) + fees := make(sdk.Coins, 0) + var txGasLimit uint64 = 0 + contractAddress := common.HexToAddress(cc.PCfg.PrecompiledContractAddress) + blockNumber := new(big.Int) + for i, m := range txb.GetTx().GetMsgs() { + prefix, ok := messageMap[reflect.TypeOf(m)] + if !ok { + return nil, 0, sdk.Coins{}, errorsmod.Wrapf(sdkerrors.ErrUnknownRequest, "invalid message type %T", m) + } + signers := m.GetSigners() + if len(signers) != 1 { + return nil, 0, sdk.Coins{}, errorsmod.Wrapf(sdkerrors.ErrUnknownRequest, "invalid signers length %d", len(signers)) + } + from, err := convertAddress(signers[0].String()) + if err != nil { + return nil, 0, sdk.Coins{}, err + } + input, err := proto.Marshal(m) + if err != nil { + return nil, 0, sdk.Coins{}, err + } + nonce := txf.Sequence() + uint64(i) + amount := big.NewInt(0) + input = addLengthPrefix(prefix, input) + tx := evmtypes.NewTx(chainID, nonce, &contractAddress, amount, gasLimit, gasFeeCap, gasPrice, gasTipCap, input, ðtypes.AccessList{}) + tx.From = from.String() + if err := tx.ValidateBasic(); err != nil { + cc.log.Info("tx failed basic validation", zap.Error(err)) + return nil, 0, sdk.Coins{}, err + } + if err := retry.Do(func() error { + signer := ethtypes.MakeSigner(getChainConfig(chainID), blockNumber) + if err := tx.Sign(signer, cc.Keybase); err != nil { + return err + } + return nil + }, retry.Context(ctx), rtyAtt, rtyDel, rtyErr); err != nil { + return nil, 0, sdk.Coins{}, err + } + if feeAmt := sdkmath.NewIntFromBigInt(tx.GetFee()); feeAmt.Sign() > 0 { + fees = fees.Add(sdk.NewCoin(gasPriceCoin.Denom, feeAmt)) + } + txGasLimit += tx.GetGas() + tx.From = "" + cc.log.Info("append", zap.String("hash", tx.Hash)) + txs = append(txs, tx) + } + builder, ok := txb.(authtx.ExtensionOptionsTxBuilder) + if !ok { + return nil, 0, sdk.Coins{}, errors.New("unsupported builder") + } + + option, err := types.NewAnyWithValue(new(evmtypes.ExtensionOptionsEthereumTx)) + if err != nil { + return nil, 0, sdk.Coins{}, err + } + builder.SetExtensionOptions(option) + builder.SetMsgs(txs...) + builder.SetFeeAmount(fees) + builder.SetGasLimit(txGasLimit) + txBytes, err := cc.Cdc.TxConfig.TxEncoder()(builder.GetTx()) + if err != nil { + return nil, 0, sdk.Coins{}, err + } return txBytes, txf.Sequence(), fees, nil } @@ -1708,7 +1946,7 @@ func (cc *CosmosProvider) SetWithExtensionOptions(txf tx.Factory) (tx.Factory, e if !ok { return txf, fmt.Errorf("invalid opt value") } - extensionOption := ethermint.ExtensionOptionDynamicFeeTx{ + extensionOption := etherminttypes.ExtensionOptionDynamicFeeTx{ MaxPriorityPrice: max, } extBytes, err := extensionOption.Marshal() diff --git a/relayer/chains/cosmos/tx_test.go b/relayer/chains/cosmos/tx_test.go index 25bb02dd2..609ed0ed9 100644 --- a/relayer/chains/cosmos/tx_test.go +++ b/relayer/chains/cosmos/tx_test.go @@ -10,8 +10,8 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx" - "github.com/cosmos/relayer/v2/relayer/ethermint" "github.com/cosmos/relayer/v2/relayer/provider" + etherminttypes "github.com/evmos/ethermint/types" "github.com/stretchr/testify/require" ) @@ -137,7 +137,7 @@ func TestSetWithExtensionOptions(t *testing.T) { expectedTypeURL := "/ethermint.types.v1.ExtensionOptionDynamicFeeTx" max, ok := sdk.NewIntFromString(opt.Value) require.True(t, ok) - expectedValue, err := (ðermint.ExtensionOptionDynamicFeeTx{ + expectedValue, err := (ðerminttypes.ExtensionOptionDynamicFeeTx{ MaxPriorityPrice: max, }).Marshal() require.NoError(t, err) diff --git a/relayer/codecs/ethermint/account.pb.go b/relayer/codecs/ethermint/account.pb.go deleted file mode 100644 index de39dc307..000000000 --- a/relayer/codecs/ethermint/account.pb.go +++ /dev/null @@ -1,374 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ethermint/types/v1/account.proto - -package ethermint - -import ( - fmt "fmt" - types "github.com/cosmos/cosmos-sdk/x/auth/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// EthAccount implements the authtypes.AccountI interface and embeds an -// authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. -type EthAccount struct { - // base_account is an authtypes.BaseAccount - *types.BaseAccount `protobuf:"bytes,1,opt,name=base_account,json=baseAccount,proto3,embedded=base_account" json:"base_account,omitempty" yaml:"base_account"` - // code_hash is the hash calculated from the code contents - CodeHash string `protobuf:"bytes,2,opt,name=code_hash,json=codeHash,proto3" json:"code_hash,omitempty" yaml:"code_hash"` -} - -func (m *EthAccount) Reset() { *m = EthAccount{} } -func (*EthAccount) ProtoMessage() {} -func (*EthAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_4edc057d42a619ef, []int{0} -} -func (m *EthAccount) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EthAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EthAccount.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EthAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_EthAccount.Merge(m, src) -} -func (m *EthAccount) XXX_Size() int { - return m.Size() -} -func (m *EthAccount) XXX_DiscardUnknown() { - xxx_messageInfo_EthAccount.DiscardUnknown(m) -} - -var xxx_messageInfo_EthAccount proto.InternalMessageInfo - -func init() { - proto.RegisterType((*EthAccount)(nil), "ethermint.types.v1.EthAccount") -} - -func init() { proto.RegisterFile("ethermint/types/v1/account.proto", fileDescriptor_4edc057d42a619ef) } - -var fileDescriptor_4edc057d42a619ef = []byte{ - // 294 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0xb1, 0x4a, 0xc4, 0x30, - 0x00, 0x86, 0x13, 0x07, 0xf1, 0x7a, 0x37, 0x48, 0xbd, 0xe1, 0x38, 0x21, 0x29, 0x9d, 0x6e, 0x4a, - 0xe8, 0x89, 0xcb, 0x6d, 0x16, 0x04, 0x37, 0xe1, 0x46, 0x97, 0x33, 0x8d, 0xe1, 0x72, 0x70, 0xbd, - 0x1c, 0x4d, 0x5a, 0xe8, 0x1b, 0x38, 0x3a, 0x3a, 0xf6, 0x0d, 0x7c, 0x0d, 0xc7, 0x8e, 0x4e, 0x45, - 0xda, 0xc5, 0xf9, 0x9e, 0x40, 0xda, 0x94, 0xea, 0xf6, 0x25, 0xf9, 0xff, 0x2f, 0xf0, 0x3b, 0x9e, - 0x30, 0x52, 0x24, 0xf1, 0xee, 0x60, 0xa8, 0xc9, 0x8f, 0x42, 0xd3, 0x2c, 0xa0, 0x8c, 0x73, 0x95, - 0x1e, 0x0c, 0x39, 0x26, 0xca, 0x28, 0xd7, 0x1d, 0x12, 0xa4, 0x4b, 0x90, 0x2c, 0x98, 0x23, 0xae, - 0x74, 0xac, 0x34, 0x65, 0xa9, 0x91, 0x34, 0x0b, 0x22, 0x61, 0x58, 0xd0, 0x1d, 0x6c, 0x67, 0x3e, - 0xdd, 0xaa, 0xad, 0xea, 0x90, 0xb6, 0x64, 0x6f, 0xfd, 0x0f, 0xe8, 0x38, 0xf7, 0x46, 0xde, 0x59, - 0xbd, 0xfb, 0xec, 0x4c, 0x22, 0xa6, 0xc5, 0xa6, 0xff, 0x6e, 0x06, 0x3d, 0xb8, 0x18, 0x2f, 0x3d, - 0x62, 0xdd, 0xa4, 0xd3, 0xf5, 0x6e, 0x12, 0x32, 0x2d, 0xfa, 0x5e, 0x78, 0x5d, 0x56, 0x18, 0x9e, - 0x2a, 0x7c, 0x95, 0xb3, 0x78, 0xbf, 0xf2, 0xff, 0x3b, 0xfc, 0xf5, 0x38, 0xfa, 0x4b, 0xba, 0x81, - 0x33, 0xe2, 0xea, 0x45, 0x6c, 0x24, 0xd3, 0x72, 0x76, 0xe6, 0xc1, 0xc5, 0x28, 0x9c, 0x9e, 0x2a, - 0x7c, 0x69, 0x8b, 0xc3, 0x93, 0xbf, 0xbe, 0x68, 0xf9, 0x81, 0x69, 0xb9, 0x9a, 0xbc, 0x16, 0x18, - 0xbc, 0x17, 0x18, 0xfc, 0x14, 0x18, 0x84, 0x8f, 0x9f, 0x35, 0x82, 0x65, 0x8d, 0xe0, 0x77, 0x8d, - 0xe0, 0x5b, 0x83, 0x40, 0xd9, 0x20, 0xf0, 0xd5, 0x20, 0xf0, 0x74, 0xbb, 0xdd, 0x19, 0x99, 0x46, - 0x84, 0xab, 0x98, 0xf6, 0x63, 0x24, 0x62, 0xcf, 0x72, 0x91, 0xd0, 0x6c, 0x39, 0x60, 0xab, 0xe5, - 0x9a, 0x0e, 0x0b, 0x46, 0xe7, 0xdd, 0x12, 0x37, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x55, 0xf7, - 0xb9, 0x24, 0x77, 0x01, 0x00, 0x00, -} - -func (m *EthAccount) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EthAccount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EthAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.CodeHash) > 0 { - i -= len(m.CodeHash) - copy(dAtA[i:], m.CodeHash) - i = encodeVarintAccount(dAtA, i, uint64(len(m.CodeHash))) - i-- - dAtA[i] = 0x12 - } - if m.BaseAccount != nil { - { - size, err := m.BaseAccount.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAccount(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintAccount(dAtA []byte, offset int, v uint64) int { - offset -= sovAccount(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *EthAccount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BaseAccount != nil { - l = m.BaseAccount.Size() - n += 1 + l + sovAccount(uint64(l)) - } - l = len(m.CodeHash) - if l > 0 { - n += 1 + l + sovAccount(uint64(l)) - } - return n -} - -func sovAccount(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozAccount(x uint64) (n int) { - return sovAccount(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *EthAccount) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EthAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EthAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BaseAccount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BaseAccount == nil { - m.BaseAccount = &types.BaseAccount{} - } - if err := m.BaseAccount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CodeHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAccount - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAccount - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAccount - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CodeHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAccount - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipAccount(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAccount - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAccount - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAccount - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthAccount - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupAccount - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthAccount - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthAccount = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAccount = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupAccount = fmt.Errorf("proto: unexpected end of group") -) diff --git a/relayer/codecs/ethermint/codec.go b/relayer/codecs/ethermint/codec.go index 65f4df8b9..8fbc388f8 100644 --- a/relayer/codecs/ethermint/codec.go +++ b/relayer/codecs/ethermint/codec.go @@ -3,9 +3,11 @@ package ethermint import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/relayer/v2/relayer/ethermint" + etherminttypes "github.com/evmos/ethermint/types" + evmtypes "github.com/evmos/ethermint/x/evm/types" ) // RegisterInterfaces register the Ethermint key concrete types. @@ -15,15 +17,28 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterImplementations( (*authtypes.AccountI)(nil), - &EthAccount{}, + ðerminttypes.EthAccount{}, ) registry.RegisterImplementations( (*authtypes.GenesisAccount)(nil), - &EthAccount{}, + ðerminttypes.EthAccount{}, ) registry.RegisterImplementations( (*tx.TxExtensionOptionI)(nil), - &ExtensionOptionsWeb3Tx{}, - ðermint.ExtensionOptionDynamicFeeTx{}, + ðerminttypes.ExtensionOptionsWeb3Tx{}, + ðerminttypes.ExtensionOptionDynamicFeeTx{}, + &evmtypes.ExtensionOptionsEthereumTx{}, + ) + registry.RegisterImplementations( + (*sdk.Msg)(nil), + &evmtypes.MsgEthereumTx{}, + &evmtypes.MsgUpdateParams{}, + ) + registry.RegisterInterface( + "ethermint.evm.v1.TxData", + (*evmtypes.TxData)(nil), + &evmtypes.DynamicFeeTx{}, + &evmtypes.AccessListTx{}, + &evmtypes.LegacyTx{}, ) } diff --git a/relayer/codecs/ethermint/web3.pb.go b/relayer/codecs/ethermint/web3.pb.go deleted file mode 100644 index 3a083d048..000000000 --- a/relayer/codecs/ethermint/web3.pb.go +++ /dev/null @@ -1,399 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ethermint/types/v1/web3.proto - -package ethermint - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// ExtensionOptionsWeb3Tx is an extension option that specifies the typed chain id, -// the fee payer as well as its signature data. -type ExtensionOptionsWeb3Tx struct { - // typed_data_chain_id is used only in EIP712 Domain and should match - // Ethereum network ID in a Web3 provider (e.g. Metamask). - TypedDataChainID uint64 `protobuf:"varint,1,opt,name=typed_data_chain_id,json=typedDataChainId,proto3" json:"typedDataChainID,omitempty"` - // fee_payer is an account address for the fee payer. It will be validated - // during EIP712 signature checking. - FeePayer string `protobuf:"bytes,2,opt,name=fee_payer,json=feePayer,proto3" json:"feePayer,omitempty"` - // fee_payer_sig is a signature data from the fee paying account, - // allows to perform fee delegation when using EIP712 Domain. - FeePayerSig []byte `protobuf:"bytes,3,opt,name=fee_payer_sig,json=feePayerSig,proto3" json:"feePayerSig,omitempty"` -} - -func (m *ExtensionOptionsWeb3Tx) Reset() { *m = ExtensionOptionsWeb3Tx{} } -func (m *ExtensionOptionsWeb3Tx) String() string { return proto.CompactTextString(m) } -func (*ExtensionOptionsWeb3Tx) ProtoMessage() {} -func (*ExtensionOptionsWeb3Tx) Descriptor() ([]byte, []int) { - return fileDescriptor_9eb7cd56e3c92bc3, []int{0} -} -func (m *ExtensionOptionsWeb3Tx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExtensionOptionsWeb3Tx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExtensionOptionsWeb3Tx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExtensionOptionsWeb3Tx) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExtensionOptionsWeb3Tx.Merge(m, src) -} -func (m *ExtensionOptionsWeb3Tx) XXX_Size() int { - return m.Size() -} -func (m *ExtensionOptionsWeb3Tx) XXX_DiscardUnknown() { - xxx_messageInfo_ExtensionOptionsWeb3Tx.DiscardUnknown(m) -} - -var xxx_messageInfo_ExtensionOptionsWeb3Tx proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ExtensionOptionsWeb3Tx)(nil), "ethermint.types.v1.ExtensionOptionsWeb3Tx") -} - -func init() { proto.RegisterFile("ethermint/types/v1/web3.proto", fileDescriptor_9eb7cd56e3c92bc3) } - -var fileDescriptor_9eb7cd56e3c92bc3 = []byte{ - // 300 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0x31, 0x4b, 0xc3, 0x40, - 0x14, 0xc7, 0x73, 0x5a, 0xc4, 0x46, 0x85, 0x72, 0x6a, 0xa9, 0x05, 0x2f, 0xc1, 0xa9, 0x83, 0xe4, - 0xa8, 0xd9, 0x0a, 0x2e, 0xb1, 0x0e, 0x4e, 0x8a, 0x16, 0x04, 0x97, 0x70, 0x69, 0x5e, 0xd3, 0x1b, - 0x92, 0x0b, 0xcd, 0xb3, 0xb6, 0xdf, 0xc0, 0xd1, 0x8f, 0xe0, 0xc7, 0x71, 0xec, 0xe8, 0x14, 0x24, - 0xdd, 0xb2, 0xbb, 0x4b, 0x22, 0x2d, 0x21, 0xdb, 0xe3, 0xf7, 0x7b, 0xbf, 0xe5, 0xaf, 0x9f, 0x03, - 0x4e, 0x61, 0x16, 0xca, 0x08, 0x39, 0x2e, 0x63, 0x48, 0xf8, 0xbc, 0xcf, 0xdf, 0xc0, 0xb3, 0xad, - 0x78, 0xa6, 0x50, 0x51, 0xba, 0xd5, 0x56, 0xa9, 0xad, 0x79, 0xbf, 0x7b, 0x12, 0xa8, 0x40, 0x95, - 0x9a, 0x17, 0xd7, 0xff, 0xe7, 0xc5, 0x2f, 0xd1, 0xdb, 0xb7, 0x0b, 0x84, 0x28, 0x91, 0x2a, 0xba, - 0x8f, 0x51, 0xaa, 0x28, 0x79, 0x06, 0xcf, 0x1e, 0x2d, 0xa8, 0xd0, 0x8f, 0x8b, 0xd8, 0x77, 0x7d, - 0x81, 0xc2, 0x1d, 0x4f, 0x85, 0x8c, 0x5c, 0xe9, 0x77, 0x88, 0x49, 0x7a, 0x0d, 0xe7, 0x2a, 0x4b, - 0x8d, 0xd6, 0xa8, 0xd0, 0x43, 0x81, 0xe2, 0xa6, 0x90, 0x77, 0xc3, 0x3c, 0x35, 0xba, 0x58, 0x63, - 0x97, 0x2a, 0x94, 0x08, 0x61, 0x8c, 0xcb, 0xc7, 0x56, 0xcd, 0xf9, 0xd4, 0xd6, 0x9b, 0x13, 0x00, - 0x37, 0x16, 0x4b, 0x98, 0x75, 0x76, 0x4c, 0xd2, 0x6b, 0x3a, 0xed, 0x3c, 0x35, 0xe8, 0x04, 0xe0, - 0xa1, 0x60, 0x95, 0x78, 0x7f, 0xc3, 0xe8, 0xb5, 0x7e, 0xb4, 0x8d, 0xdc, 0x44, 0x06, 0x9d, 0x5d, - 0x93, 0xf4, 0x0e, 0x9d, 0xb3, 0x3c, 0x35, 0x4e, 0x37, 0x4f, 0x4f, 0x32, 0xa8, 0xb4, 0x07, 0x15, - 0x3c, 0x68, 0xbc, 0x7f, 0x1a, 0x9a, 0x33, 0xf8, 0xca, 0x18, 0x59, 0x65, 0x8c, 0xfc, 0x64, 0x8c, - 0x7c, 0xac, 0x99, 0xb6, 0x5a, 0x33, 0xed, 0x7b, 0xcd, 0xb4, 0x17, 0x33, 0x90, 0x38, 0x7d, 0xf5, - 0xac, 0xb1, 0x0a, 0x39, 0xcc, 0x43, 0x95, 0xf0, 0xda, 0xd6, 0xde, 0x5e, 0x39, 0x9d, 0xfd, 0x17, - 0x00, 0x00, 0xff, 0xff, 0x52, 0x19, 0x20, 0x73, 0x85, 0x01, 0x00, 0x00, -} - -func (m *ExtensionOptionsWeb3Tx) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExtensionOptionsWeb3Tx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExtensionOptionsWeb3Tx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FeePayerSig) > 0 { - i -= len(m.FeePayerSig) - copy(dAtA[i:], m.FeePayerSig) - i = encodeVarintWeb3(dAtA, i, uint64(len(m.FeePayerSig))) - i-- - dAtA[i] = 0x1a - } - if len(m.FeePayer) > 0 { - i -= len(m.FeePayer) - copy(dAtA[i:], m.FeePayer) - i = encodeVarintWeb3(dAtA, i, uint64(len(m.FeePayer))) - i-- - dAtA[i] = 0x12 - } - if m.TypedDataChainID != 0 { - i = encodeVarintWeb3(dAtA, i, uint64(m.TypedDataChainID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintWeb3(dAtA []byte, offset int, v uint64) int { - offset -= sovWeb3(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ExtensionOptionsWeb3Tx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TypedDataChainID != 0 { - n += 1 + sovWeb3(uint64(m.TypedDataChainID)) - } - l = len(m.FeePayer) - if l > 0 { - n += 1 + l + sovWeb3(uint64(l)) - } - l = len(m.FeePayerSig) - if l > 0 { - n += 1 + l + sovWeb3(uint64(l)) - } - return n -} - -func sovWeb3(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozWeb3(x uint64) (n int) { - return sovWeb3(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ExtensionOptionsWeb3Tx) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWeb3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExtensionOptionsWeb3Tx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExtensionOptionsWeb3Tx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TypedDataChainID", wireType) - } - m.TypedDataChainID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWeb3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TypedDataChainID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeePayer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWeb3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthWeb3 - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthWeb3 - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FeePayer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeePayerSig", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWeb3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthWeb3 - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthWeb3 - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FeePayerSig = append(m.FeePayerSig[:0], dAtA[iNdEx:postIndex]...) - if m.FeePayerSig == nil { - m.FeePayerSig = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipWeb3(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthWeb3 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipWeb3(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowWeb3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowWeb3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowWeb3 - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthWeb3 - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupWeb3 - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthWeb3 - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthWeb3 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowWeb3 = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupWeb3 = fmt.Errorf("proto: unexpected end of group") -) diff --git a/relayer/ethermint/dynamic_fee.pb.go b/relayer/ethermint/dynamic_fee.pb.go deleted file mode 100644 index 3238cd863..000000000 --- a/relayer/ethermint/dynamic_fee.pb.go +++ /dev/null @@ -1,323 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: ethermint/types/v1/dynamic_fee.proto - -package ethermint - -import ( - fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// ExtensionOptionDynamicFeeTx is an extension option that specifies the -// maxPrioPrice for cosmos tx -type ExtensionOptionDynamicFeeTx struct { - // max_priority_price is the same as `max_priority_fee_per_gas` in eip-1559 - // spec - MaxPriorityPrice github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=max_priority_price,json=maxPriorityPrice,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"max_priority_price"` -} - -func (m *ExtensionOptionDynamicFeeTx) Reset() { *m = ExtensionOptionDynamicFeeTx{} } -func (m *ExtensionOptionDynamicFeeTx) String() string { return proto.CompactTextString(m) } -func (*ExtensionOptionDynamicFeeTx) ProtoMessage() {} -func (*ExtensionOptionDynamicFeeTx) Descriptor() ([]byte, []int) { - return fileDescriptor_9d7cf05c9992c480, []int{0} -} -func (m *ExtensionOptionDynamicFeeTx) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExtensionOptionDynamicFeeTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExtensionOptionDynamicFeeTx.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExtensionOptionDynamicFeeTx) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExtensionOptionDynamicFeeTx.Merge(m, src) -} -func (m *ExtensionOptionDynamicFeeTx) XXX_Size() int { - return m.Size() -} -func (m *ExtensionOptionDynamicFeeTx) XXX_DiscardUnknown() { - xxx_messageInfo_ExtensionOptionDynamicFeeTx.DiscardUnknown(m) -} - -var xxx_messageInfo_ExtensionOptionDynamicFeeTx proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ExtensionOptionDynamicFeeTx)(nil), "ethermint.types.v1.ExtensionOptionDynamicFeeTx") -} - -func init() { - proto.RegisterFile("ethermint/types/v1/dynamic_fee.proto", fileDescriptor_9d7cf05c9992c480) -} - -var fileDescriptor_9d7cf05c9992c480 = []byte{ - // 239 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0x2d, 0xc9, 0x48, - 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x33, 0xd4, 0x4f, - 0xa9, 0xcc, 0x4b, 0xcc, 0xcd, 0x4c, 0x8e, 0x4f, 0x4b, 0x4d, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, - 0x17, 0x12, 0x82, 0xab, 0xd2, 0x03, 0xab, 0xd2, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, - 0x07, 0x4b, 0xeb, 0x83, 0x58, 0x10, 0x95, 0x4a, 0xd5, 0x5c, 0xd2, 0xae, 0x15, 0x25, 0xa9, 0x79, - 0xc5, 0x99, 0xf9, 0x79, 0xfe, 0x05, 0x25, 0x99, 0xf9, 0x79, 0x2e, 0x10, 0xd3, 0xdc, 0x52, 0x53, - 0x43, 0x2a, 0x84, 0x62, 0xb8, 0x84, 0x72, 0x13, 0x2b, 0xe2, 0x0b, 0x8a, 0x32, 0xf3, 0x8b, 0x32, - 0x4b, 0x2a, 0x41, 0x8c, 0xe4, 0x54, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x4e, 0x27, 0xbd, 0x13, 0xf7, - 0xe4, 0x19, 0x6e, 0xdd, 0x93, 0x57, 0x4b, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, - 0xd5, 0x4f, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0x86, 0x52, 0xba, 0xc5, 0x29, 0xd9, 0x10, 0x57, 0xea, - 0x79, 0xe6, 0x95, 0x04, 0x09, 0xe4, 0x26, 0x56, 0x04, 0x40, 0x0d, 0x0a, 0x00, 0x99, 0xe3, 0xe4, - 0x71, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, - 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x7a, 0x98, 0x66, 0x16, 0xa5, - 0xe6, 0x24, 0x56, 0xa6, 0x16, 0xe9, 0x97, 0x19, 0xc1, 0x99, 0x70, 0x5f, 0x26, 0xb1, 0x81, 0x7d, - 0x63, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x84, 0x4e, 0x20, 0x90, 0x1f, 0x01, 0x00, 0x00, -} - -func (m *ExtensionOptionDynamicFeeTx) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExtensionOptionDynamicFeeTx) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExtensionOptionDynamicFeeTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.MaxPriorityPrice.Size() - i -= size - if _, err := m.MaxPriorityPrice.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintDynamicFee(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintDynamicFee(dAtA []byte, offset int, v uint64) int { - offset -= sovDynamicFee(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ExtensionOptionDynamicFeeTx) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.MaxPriorityPrice.Size() - n += 1 + l + sovDynamicFee(uint64(l)) - return n -} - -func sovDynamicFee(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozDynamicFee(x uint64) (n int) { - return sovDynamicFee(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ExtensionOptionDynamicFeeTx) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDynamicFee - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExtensionOptionDynamicFeeTx: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExtensionOptionDynamicFeeTx: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxPriorityPrice", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDynamicFee - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthDynamicFee - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthDynamicFee - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MaxPriorityPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipDynamicFee(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDynamicFee - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipDynamicFee(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDynamicFee - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDynamicFee - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDynamicFee - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthDynamicFee - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupDynamicFee - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthDynamicFee - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthDynamicFee = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDynamicFee = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupDynamicFee = fmt.Errorf("proto: unexpected end of group") -)