diff --git a/.protolin.yml b/.protolin.yml new file mode 100644 index 0000000000..bb2b728839 --- /dev/null +++ b/.protolin.yml @@ -0,0 +1,174 @@ +--- +# Lint directives. +lint: + # # Linter files to ignore. + # ignores: + # - id: MESSAGE_NAMES_UPPER_CAMEL_CASE + # files: + # # NOTE: UNIX paths will be properly accepted by both UNIX and Windows. + # - _example/proto/simple.proto + # - id: ENUM_NAMES_UPPER_CAMEL_CASE + # files: + # - path/to/foo.proto + + # # Linter files to walk. + # files: + # # The specific files to exclude. + # exclude: + # # NOTE: UNIX paths will be properly accepted by both UNIX and Windows. + # - path/to/file + + # # Linter directories to walk. + # directories: + # # The specific directories to exclude. + # exclude: + # # NOTE: UNIX paths will be properly accepted by both UNIX and Windows. + # - path/to/dir + + # Linter rules. + # Run `protolint list` to see all available rules. + rules: + # Determines whether or not to include the default set of linters. + no_default: true + + # Set the default to all linters. This option works the other way around as no_default does. + # If you want to enable this option, delete the comment out below and no_default. + # all_default: true + + # The specific linters to add. + add: + - FIELD_NAMES_LOWER_SNAKE_CASE + - MESSAGE_NAMES_UPPER_CAMEL_CASE + - MAX_LINE_LENGTH + - INDENT + # - SERVICE_NAMES_END_WITH + - FIELD_NAMES_EXCLUDE_PREPOSITIONS + - MESSAGE_NAMES_EXCLUDE_PREPOSITIONS + - FILE_NAMES_LOWER_SNAKE_CASE + - IMPORTS_SORTED + - PACKAGE_NAME_LOWER_CASE + - ORDER + - MESSAGES_HAVE_COMMENT + - SERVICES_HAVE_COMMENT + - RPCS_HAVE_COMMENT + - FIELDS_HAVE_COMMENT + - PROTO3_FIELDS_AVOID_REQUIRED + - PROTO3_GROUPS_AVOID + # - REPEATED_FIELD_NAMES_PLURALIZED + - ENUMS_HAVE_COMMENT + - ENUM_FIELDS_HAVE_COMMENT + - SYNTAX_CONSISTENT + - RPC_NAMES_UPPER_CAMEL_CASE + # - FILE_HAS_COMMENT + - QUOTE_CONSISTENT + + # # The specific linters to remove. + # remove: + # - RPC_NAMES_UPPER_CAMEL_CASE + + # Linter rules option. + rules_option: + # MAX_LINE_LENGTH rule option. + max_line_length: + # Enforces a maximum line length + max_chars: 120 + # Specifies the character count for tab characters + tab_chars: 2 + + # INDENT rule option. + indent: + # Available styles are 4(4-spaces), 2(2-spaces) or tab. + style: 2 + # Specifies if it should stop considering and inserting new lines at the appropriate positions + # when the inner elements are on the same line. Default is false. + not_insert_newline: true + + # # FILE_NAMES_LOWER_SNAKE_CASE rule option. + # file_names_lower_snake_case: + # excludes: + # - ../proto/invalidFileName.proto + + # QUOTE_CONSISTENT rule option. + quote_consistent: + # Available quote are "double" or "single". + quote: double + + # ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH rule option. + enum_field_names_zero_value_end_with: + suffix: INVALID + + # # SERVICE_NAMES_END_WITH rule option. + # service_names_end_with: + # text: Service + + # FIELD_NAMES_EXCLUDE_PREPOSITIONS rule option. + field_names_exclude_prepositions: + # The specific prepositions to determine if the field name includes. + prepositions: + - for + - at + - of + # The specific keywords including prepositions to ignore. E.g. end_of_support is a term you would like to use, and skip checking. + excludes: + - duration_of_decay + + # # REPEATED_FIELD_NAMES_PLURALIZED rule option. + # ## The spec for each rules follows the implementation of https://github.com/gertd/go-pluralize. + # ## Plus, you can refer to this rule's test code. + # repeated_field_names_pluralized: + # uncountable_rules: + # - paper + # irregular_rules: + # Irregular: Regular + + # MESSAGE_NAMES_EXCLUDE_PREPOSITIONS rule option. + message_names_exclude_prepositions: + # The specific prepositions to determine if the message name includes. + prepositions: + - With + - For + - Of + # # The specific keywords including prepositions to ignore. E.g. EndOfSupport is a term you would like to use, and skip checking. + # excludes: + # - EndOfSupport + + # # RPC_NAMES_CASE rule option. + # rpc_names_case: + # # The specific convention the name should conforms to. + # ## Available conventions are "lower_camel_case", "upper_snake_case", or "lower_snake_case". + # convention: upper_snake_case + + # MESSAGES_HAVE_COMMENT rule option. + messages_have_comment: + # Comments need to begin with the name of the thing being described. default is false. + should_follow_golang_style: true + + # SERVICES_HAVE_COMMENT rule option. + services_have_comment: + # Comments need to begin with the name of the thing being described. default is false. + should_follow_golang_style: true + + # RPCS_HAVE_COMMENT rule option. + rpcs_have_comment: + # Comments need to begin with the name of the thing being described. default is false. + should_follow_golang_style: true + + # FIELDS_HAVE_COMMENT rule option. + fields_have_comment: + # Comments need to begin with the name of the thing being described. default is false. + should_follow_golang_style: true + + # ENUMS_HAVE_COMMENT rule option. + enums_have_comment: + # Comments need to begin with the name of the thing being described. default is false. + should_follow_golang_style: true + + # ENUM_FIELDS_HAVE_COMMENT rule option. + enum_fields_have_comment: + # Comments need to begin with the name of the thing being described. default is false. + should_follow_golang_style: true + + # # SYNTAX_CONSISTENT rule option. + # syntax_consistent: + # # Default is proto3. + # version: proto2 diff --git a/Makefile b/Makefile index e319bf0c1e..c258ee465b 100755 --- a/Makefile +++ b/Makefile @@ -414,74 +414,57 @@ format-fix: ### Protobuf ### ############################################################################### -protoVer=v0.2 +protoVer=v0.7 protoImageName=tendermintdev/sdk-proto-gen:$(protoVer) -containerProtoGen=$(PROJECT_NAME)-proto-gen-$(protoVer) -containerProtoGenAny=$(PROJECT_NAME)-proto-gen-any-$(protoVer) -containerProtoGenSwagger=$(PROJECT_NAME)-proto-gen-swagger-$(protoVer) -containerProtoFmt=$(PROJECT_NAME)-proto-fmt-$(protoVer) +protoImage=$(DOCKER) run --network host --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) +# ------ +# NOTE: cosmos/proto-builder image is needed because clang-format is not installed +# on the tendermintdev/sdk-proto-gen docker image. +# Link to the cosmos/proto-builder docker images: +# https://github.com/cosmos/cosmos-sdk/pkgs/container/proto-builder +# +protoCosmosVer=0.11.2 +protoCosmosName=ghcr.io/cosmos/proto-builder:$(protoCosmosVer) +protoCosmosImage=$(DOCKER) run --network host --rm -v $(CURDIR):/workspace --workdir /workspace $(protoCosmosName) +# ------ +# NOTE: Link to the yoheimuta/protolint docker images: +# https://hub.docker.com/r/yoheimuta/protolint/tags +# +protolintVer=0.42.2 +protolintName=yoheimuta/protolint:$(protolintVer) +protolintImage=$(DOCKER) run --network host --rm -v $(CURDIR):/workspace --workdir /workspace $(protolintName) -proto-all: proto-format proto-lint proto-gen + +# ------ +# NOTE: If you are experiencing problems running these commands, try deleting +# the docker images and execute the desired command again. +# +proto-all: proto-format proto-gen # proto-lint makes an error, so disable it. (solve it later) proto-gen: @echo "Generating Protobuf files" - @if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGen}$$"; then docker start -a $(containerProtoGen); else docker run --name $(containerProtoGen) -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) \ - sh ./scripts/protocgen.sh; fi + $(protoImage) sh ./scripts/protocgen.sh + -proto-swagger-gen: - @echo "Generating Protobuf Swagger" - @./scripts/proto-tools-installer.sh - @./scripts/protoc-swagger-gen.sh +# TODO: Rethink API docs generation +# proto-swagger-gen: +# @echo "Generating Protobuf Swagger" +# $(protoImage) sh ./scripts/protoc-swagger-gen.sh proto-format: @echo "Formatting Protobuf files" - @if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoFmt}$$"; then docker start -a $(containerProtoFmt); else docker run --name $(containerProtoFmt) -v $(CURDIR):/workspace --workdir /workspace tendermintdev/docker-build-proto \ - find ./ -not -path "./third_party/*" -name "*.proto" -exec clang-format -i {} \; ; fi + $(protoCosmosImage) find ./ -name *.proto -exec clang-format -i {} \; +# NOTE: The linter configuration lives in .protolint.yaml proto-lint: - @$(DOCKER_BUF) lint --error-format=json + @echo "Linting Protobuf files" + $(protolintImage) lint ./proto proto-check-breaking: - @$(DOCKER_BUF) breaking --against $(HTTPS_GIT)#branch=main - - -TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.12/proto/tendermint -GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos -COSMOS_SDK_URL = https://raw.githubusercontent.com/cosmos/cosmos-sdk/v0.43.0 -COSMOS_PROTO_URL = https://raw.githubusercontent.com/regen-network/cosmos-proto/master - -TM_CRYPTO_TYPES = third_party/proto/tendermint/crypto -TM_ABCI_TYPES = third_party/proto/tendermint/abci -TM_TYPES = third_party/proto/tendermint/types - -GOGO_PROTO_TYPES = third_party/proto/gogoproto - -COSMOS_PROTO_TYPES = third_party/proto/cosmos_proto - -proto-update-deps: - @mkdir -p $(GOGO_PROTO_TYPES) - @curl -sSL $(GOGO_PROTO_URL)/gogoproto/gogo.proto > $(GOGO_PROTO_TYPES)/gogo.proto - - @mkdir -p $(COSMOS_PROTO_TYPES) - @curl -sSL $(COSMOS_PROTO_URL)/cosmos.proto > $(COSMOS_PROTO_TYPES)/cosmos.proto - -## Importing of tendermint protobuf definitions currently requires the -## use of `sed` in order to build properly with cosmos-sdk's proto file layout -## (which is the standard Buf.build FILE_LAYOUT) -## Issue link: https://github.com/tendermint/tendermint/issues/5021 - @mkdir -p $(TM_ABCI_TYPES) - @curl -sSL $(TM_URL)/abci/types.proto > $(TM_ABCI_TYPES)/types.proto - - @mkdir -p $(TM_TYPES) - @curl -sSL $(TM_URL)/types/types.proto > $(TM_TYPES)/types.proto - - @mkdir -p $(TM_CRYPTO_TYPES) - @curl -sSL $(TM_URL)/crypto/proof.proto > $(TM_CRYPTO_TYPES)/proof.proto - @curl -sSL $(TM_URL)/crypto/keys.proto > $(TM_CRYPTO_TYPES)/keys.proto - - + @echo "Checking Protobuf files for breaking changes" + $(protoImage) buf breaking --against $(HTTPS_GIT)#branch=main -.PHONY: proto-all proto-gen proto-gen-any proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps +.PHONY: proto-all proto-gen proto-gen-any proto-format proto-lint proto-check-breaking ############################################################################### ### Localnet ### diff --git a/buf.work.yaml b/buf.work.yaml index 494296bfae..1878b341be 100644 --- a/buf.work.yaml +++ b/buf.work.yaml @@ -1,4 +1,3 @@ version: v1 directories: - proto - - third_party/proto diff --git a/crypto/ethsecp256k1/keys.pb.go b/crypto/ethsecp256k1/keys.pb.go index 7b3fb6e384..552ea46e77 100644 --- a/crypto/ethsecp256k1/keys.pb.go +++ b/crypto/ethsecp256k1/keys.pb.go @@ -5,7 +5,7 @@ package ethsecp256k1 import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" diff --git a/docs/api/proto-docs.md b/docs/api/proto-docs.md index bd3520eb08..d18f1b1eaf 100644 --- a/docs/api/proto-docs.md +++ b/docs/api/proto-docs.md @@ -559,6 +559,7 @@ EthCallRequest defines EthCall request | ----- | ---- | ----- | ----------- | | `args` | [bytes](#bytes) | | same json format as the json rpc api. | | `gas_cap` | [uint64](#uint64) | | the default gas cap to be used | +| `proposer_address` | [bytes](#bytes) | | the proposer of the requested block | @@ -788,6 +789,7 @@ QueryTraceBlockRequest defines TraceTx request | `block_number` | [int64](#int64) | | block number | | `block_hash` | [string](#string) | | block hex hash | | `block_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | block time | +| `proposer_address` | [bytes](#bytes) | | the proposer of the requested block | @@ -823,6 +825,7 @@ QueryTraceTxRequest defines TraceTx request | `block_number` | [int64](#int64) | | block number of requested transaction | | `block_hash` | [string](#string) | | block hex hash of requested transaction | | `block_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | block time of requested transaction | +| `proposer_address` | [bytes](#bytes) | | the proposer of the requested block | diff --git a/go.mod b/go.mod index e59b69b099..8fa1a716de 100644 --- a/go.mod +++ b/go.mod @@ -7,13 +7,15 @@ require ( github.com/armon/go-metrics v0.4.0 github.com/btcsuite/btcd v0.22.1 github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce + github.com/cosmos/cosmos-proto v1.0.0-beta.3 github.com/cosmos/cosmos-sdk v0.45.9 github.com/cosmos/go-bip39 v1.0.0 + github.com/cosmos/gogoproto v1.4.11 github.com/cosmos/ibc-go/v3 v3.2.0 github.com/davecgh/go-spew v1.1.1 github.com/ethereum/go-ethereum v1.10.19 github.com/gogo/protobuf v1.3.3 - github.com/golang/protobuf v1.5.2 + github.com/golang/protobuf v1.5.3 github.com/gorilla/mux v1.8.0 github.com/gorilla/websocket v1.5.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 @@ -23,21 +25,19 @@ require ( github.com/onsi/gomega v1.19.0 github.com/pkg/errors v0.9.1 github.com/rakyll/statik v0.1.7 - github.com/regen-network/cosmos-proto v0.3.1 github.com/rs/cors v1.8.2 github.com/spf13/cast v1.5.0 github.com/spf13/cobra v1.5.0 github.com/spf13/viper v1.12.0 github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969 - github.com/stretchr/testify v1.8.0 + github.com/stretchr/testify v1.8.2 github.com/tendermint/tendermint v0.34.21 github.com/tendermint/tm-db v0.6.7 github.com/tyler-smith/go-bip39 v1.1.0 - golang.org/x/net v0.0.0-20220726230323-06994584191e - golang.org/x/text v0.3.7 + golang.org/x/net v0.14.0 + golang.org/x/text v0.12.0 google.golang.org/genproto v0.0.0-20220810155839-1856144b1d9c - google.golang.org/grpc v1.48.0 - google.golang.org/protobuf v1.28.1 + google.golang.org/grpc v1.57.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -89,6 +89,7 @@ require ( github.com/gogo/gateway v1.1.0 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.0.0 // indirect + github.com/google/go-cmp v0.5.9 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/google/uuid v1.3.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect @@ -130,6 +131,7 @@ require ( github.com/prometheus/procfs v0.7.3 // indirect github.com/prometheus/tsdb v0.7.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect + github.com/regen-network/cosmos-proto v0.3.1 // indirect github.com/rjeczalik/notify v0.9.1 // indirect github.com/rs/zerolog v1.27.0 // indirect github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect @@ -137,7 +139,7 @@ require ( github.com/spf13/afero v1.8.2 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/stretchr/objx v0.4.0 // indirect + github.com/stretchr/objx v0.5.0 // indirect github.com/subosito/gotenv v1.4.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/tendermint/btcd v0.1.1 // indirect @@ -147,11 +149,12 @@ require ( github.com/tklauser/numcpus v0.2.2 // indirect github.com/zondax/hid v0.9.0 // indirect go.etcd.io/bbolt v1.3.6 // indirect - golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect + golang.org/x/crypto v0.12.0 // indirect + golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb // indirect golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect - golang.org/x/sys v0.0.0-20220727055044-e65921a090b8 // indirect - golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/term v0.11.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/ini.v1 v1.66.6 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index fc896b975a..00729ea6dd 100644 --- a/go.sum +++ b/go.sum @@ -192,6 +192,8 @@ github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1 github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44= github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= +github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= +github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= github.com/cosmos/cosmos-sdk v0.45.9 h1:Z4s1EZL/mfM8uSSZr8WmyEbWp4hqbWVI5sAIFR432KY= github.com/cosmos/cosmos-sdk v0.45.9/go.mod h1:Z5M4TX7PsHNHlF/1XanI2DIpORQ+Q/st7oaeufEjnvU= github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 h1:iKclrn3YEOwk4jQHT2ulgzuXyxmzmPczUalMwW4XH9k= @@ -199,6 +201,8 @@ github.com/cosmos/cosmos-sdk/ics23/go v0.8.0/go.mod h1:2a4dBq88TUoqoWAU5eu0lGvpF github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= +github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= +github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= github.com/cosmos/gorocksdb v1.2.0 h1:d0l3jJG8M4hBouIZq0mDUHZ+zjOx044J3nGRskwTb4Y= github.com/cosmos/gorocksdb v1.2.0/go.mod h1:aaKvKItm514hKfNJpUJXnnOWeBnk2GL4+Qw9NHizILw= github.com/cosmos/iavl v0.19.3 h1:cESO0OwTTxQm5rmyESKW+zESheDUYI7CcZDWWDwnuxg= @@ -380,8 +384,9 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -402,7 +407,8 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa h1:Q75Upo5UN4JbPFURXZ8nLKYUvF85dyFRop/vQ0Rv+64= @@ -857,8 +863,9 @@ github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5J github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -868,8 +875,9 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.4.0 h1:yAzM1+SmVcz5R4tXGsNMu1jUl2aOJXoiWUCEwwnGrvs= github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7vWWGaGo= github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= @@ -966,8 +974,8 @@ golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -983,8 +991,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= +golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA= +golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -1060,8 +1068,8 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220726230323-06994584191e h1:wOQNKh1uuDGRnmgF0jDxh7ctgGy/3P4rYWQRVJD4/Yg= -golang.org/x/net v0.0.0-20220726230323-06994584191e/go.mod h1:AaygXjzTFtRAg2ttMY5RMuhpJ3cNnI0XpyFJD1iQRSM= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1160,12 +1168,12 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220727055044-e65921a090b8 h1:dyU22nBWzrmTQxtNrr4dzVOvaw35nUYE279vF9UmsI8= -golang.org/x/sys v0.0.0-20220727055044-e65921a090b8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 h1:Q5284mrmYTpACcm+eAKjKJH48BBwSyfJqmmGDTtT8Vc= -golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1173,8 +1181,9 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1335,8 +1344,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/proto/buf.gen.gogo.yaml b/proto/buf.gen.gogo.yaml new file mode 100644 index 0000000000..20addccb65 --- /dev/null +++ b/proto/buf.gen.gogo.yaml @@ -0,0 +1,8 @@ +version: v1 +plugins: + - name: gocosmos + out: . + opt: plugins=grpc,Mgoogle/protobuf/duration.proto=Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types,Mcosmos/orm/v1alpha1/orm.proto=github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1alpha1 + - name: grpc-gateway + out: . + opt: logtostderr=true,allow_colon_final_segments=true \ No newline at end of file diff --git a/proto/buf.gen.swagger.yaml b/proto/buf.gen.swagger.yaml new file mode 100644 index 0000000000..29e4ebb1e8 --- /dev/null +++ b/proto/buf.gen.swagger.yaml @@ -0,0 +1,15 @@ +version: v1 +plugins: + - name: gocosmos + out: . + opt: plugins=grpc,Mgoogle/protobuf/duration.proto=Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types,Mcosmos/orm/v1alpha1/orm.proto=github.com/cosmos/cosmos-sdk/api/cosmos/orm/v1alpha1 + - name: grpc-gateway + out: . + opt: logtostderr=true + - name: swagger + out: ./tmp-swagger-gen + opt: + - logtostderr=true + - fqn_for_swagger_name=true + - simple_operation_ids=true + strategy: all \ No newline at end of file diff --git a/proto/buf.lock b/proto/buf.lock new file mode 100644 index 0000000000..face468fbe --- /dev/null +++ b/proto/buf.lock @@ -0,0 +1,19 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: cosmos + repository: cosmos-proto + commit: 1935555c206d4afb9e94615dfd0fad31 + - remote: buf.build + owner: cosmos + repository: cosmos-sdk + commit: 508e19f5f37549e3a471a2a59b903c00 + - remote: buf.build + owner: cosmos + repository: gogo-proto + commit: 34d970b699f84aa382f3c29773a60836 + - remote: buf.build + owner: googleapis + repository: googleapis + commit: 783e4b5374fa488ab068d08af9658438 diff --git a/proto/buf.yaml b/proto/buf.yaml index bda80539e3..fed6998177 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -1,4 +1,10 @@ version: v1 +name: buf.build/evmos/ethermint +deps: + - buf.build/cosmos/cosmos-sdk + - buf.build/cosmos/cosmos-proto + - buf.build/cosmos/gogo-proto + - buf.build/googleapis/googleapis lint: use: - DEFAULT diff --git a/proto/ethermint/crypto/v1/ethsecp256k1/keys.proto b/proto/ethermint/crypto/v1/ethsecp256k1/keys.proto index 4bde4739bc..cbf3619827 100644 --- a/proto/ethermint/crypto/v1/ethsecp256k1/keys.proto +++ b/proto/ethermint/crypto/v1/ethsecp256k1/keys.proto @@ -16,4 +16,6 @@ message PubKey { // PrivKey defines a type alias for an ecdsa.PrivateKey that implements // Tendermint's PrivateKey interface. -message PrivKey { bytes key = 1; } +message PrivKey { + bytes key = 1; +} diff --git a/proto/ethermint/evm/v1/evm.proto b/proto/ethermint/evm/v1/evm.proto index eb9be5fe59..a66af799f1 100644 --- a/proto/ethermint/evm/v1/evm.proto +++ b/proto/ethermint/evm/v1/evm.proto @@ -9,22 +9,16 @@ option go_package = "github.com/evmos/ethermint/x/evm/types"; message Params { // evm denom represents the token denomination used to run the EVM state // transitions. - string evm_denom = 1 [ (gogoproto.moretags) = "yaml:\"evm_denom\"" ]; + string evm_denom = 1 [(gogoproto.moretags) = "yaml:\"evm_denom\""]; // enable create toggles state transitions that use the vm.Create function - bool enable_create = 2 [ (gogoproto.moretags) = "yaml:\"enable_create\"" ]; + bool enable_create = 2 [(gogoproto.moretags) = "yaml:\"enable_create\""]; // enable call toggles state transitions that use the vm.Call function - bool enable_call = 3 [ (gogoproto.moretags) = "yaml:\"enable_call\"" ]; + bool enable_call = 3 [(gogoproto.moretags) = "yaml:\"enable_call\""]; // extra eips defines the additional EIPs for the vm.Config - repeated int64 extra_eips = 4 [ - (gogoproto.customname) = "ExtraEIPs", - (gogoproto.moretags) = "yaml:\"extra_eips\"" - ]; + repeated int64 extra_eips = 4 [(gogoproto.customname) = "ExtraEIPs", (gogoproto.moretags) = "yaml:\"extra_eips\""]; // chain config defines the EVM chain configuration parameters - ChainConfig chain_config = 5 [ - (gogoproto.moretags) = "yaml:\"chain_config\"", - (gogoproto.nullable) = false - ]; - // Allow unprotected transactions defines if replay-protected (i.e non EIP155 + ChainConfig chain_config = 5 [(gogoproto.moretags) = "yaml:\"chain_config\"", (gogoproto.nullable) = false]; + // Allow unprotected transactions defines if replay-protected (i.e non EIP155 // signed) transactions can be executed on the state machine. bool allow_unprotected_txs = 6; } @@ -35,72 +29,67 @@ message ChainConfig { // Homestead switch block (nil no fork, 0 = already homestead) string homestead_block = 1 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"homestead_block\"" + (gogoproto.moretags) = "yaml:\"homestead_block\"" ]; // TheDAO hard-fork switch block (nil no fork) string dao_fork_block = 2 [ (gogoproto.customname) = "DAOForkBlock", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"dao_fork_block\"" + (gogoproto.moretags) = "yaml:\"dao_fork_block\"" ]; // Whether the nodes supports or opposes the DAO hard-fork - bool dao_fork_support = 3 [ - (gogoproto.customname) = "DAOForkSupport", - (gogoproto.moretags) = "yaml:\"dao_fork_support\"" - ]; + bool dao_fork_support = 3 + [(gogoproto.customname) = "DAOForkSupport", (gogoproto.moretags) = "yaml:\"dao_fork_support\""]; // EIP150 implements the Gas price changes // (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork) string eip150_block = 4 [ (gogoproto.customname) = "EIP150Block", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"eip150_block\"" + (gogoproto.moretags) = "yaml:\"eip150_block\"" ]; // EIP150 HF hash (needed for header only clients as only gas pricing changed) - string eip150_hash = 5 [ - (gogoproto.customname) = "EIP150Hash", - (gogoproto.moretags) = "yaml:\"byzantium_block\"" - ]; + string eip150_hash = 5 [(gogoproto.customname) = "EIP150Hash", (gogoproto.moretags) = "yaml:\"byzantium_block\""]; // EIP155Block HF block string eip155_block = 6 [ (gogoproto.customname) = "EIP155Block", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"eip155_block\"" + (gogoproto.moretags) = "yaml:\"eip155_block\"" ]; // EIP158 HF block string eip158_block = 7 [ (gogoproto.customname) = "EIP158Block", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"eip158_block\"" + (gogoproto.moretags) = "yaml:\"eip158_block\"" ]; // Byzantium switch block (nil no fork, 0 = already on byzantium) string byzantium_block = 8 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"byzantium_block\"" + (gogoproto.moretags) = "yaml:\"byzantium_block\"" ]; // Constantinople switch block (nil no fork, 0 = already activated) string constantinople_block = 9 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"constantinople_block\"" + (gogoproto.moretags) = "yaml:\"constantinople_block\"" ]; // Petersburg switch block (nil same as Constantinople) string petersburg_block = 10 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"petersburg_block\"" + (gogoproto.moretags) = "yaml:\"petersburg_block\"" ]; // Istanbul switch block (nil no fork, 0 = already on istanbul) string istanbul_block = 11 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"istanbul_block\"" + (gogoproto.moretags) = "yaml:\"istanbul_block\"" ]; // Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated) string muir_glacier_block = 12 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"muir_glacier_block\"" + (gogoproto.moretags) = "yaml:\"muir_glacier_block\"" ]; // Berlin switch block (nil = no fork, 0 = already on berlin) string berlin_block = 13 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"berlin_block\"" + (gogoproto.moretags) = "yaml:\"berlin_block\"" ]; // DEPRECATED: EWASM, YOLOV3 and Catalyst block have been deprecated reserved 14, 15, 16; @@ -108,12 +97,12 @@ message ChainConfig { // London switch block (nil = no fork, 0 = already on london) string london_block = 17 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"london_block\"" + (gogoproto.moretags) = "yaml:\"london_block\"" ]; // Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) string arrow_glacier_block = 18 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"arrow_glacier_block\"" + (gogoproto.moretags) = "yaml:\"arrow_glacier_block\"" ]; // DEPRECATED: merge fork block was deprecated: https://github.com/ethereum/go-ethereum/pull/24904 reserved 19; @@ -121,19 +110,18 @@ message ChainConfig { // EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already activated) string gray_glacier_block = 20 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"gray_glacier_block\"" + (gogoproto.moretags) = "yaml:\"gray_glacier_block\"" ]; // Virtual fork after The Merge to use as a network splitter string merge_netsplit_block = 21 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"merge_netsplit_block\"" + (gogoproto.moretags) = "yaml:\"merge_netsplit_block\"" ]; - } // State represents a single Storage key value pair item. message State { - string key = 1; + string key = 1; string value = 2; } @@ -141,7 +129,7 @@ message State { // with a given hash. It it used for import/export data as transactions are not // persisted on blockchain state after an upgrade. message TransactionLogs { - string hash = 1; + string hash = 1; repeated Log logs = 2; } @@ -162,15 +150,15 @@ message Log { // but not secured by consensus. // block in which the transaction was included - uint64 block_number = 4 [ (gogoproto.jsontag) = "blockNumber" ]; + uint64 block_number = 4 [(gogoproto.jsontag) = "blockNumber"]; // hash of the transaction - string tx_hash = 5 [ (gogoproto.jsontag) = "transactionHash" ]; + string tx_hash = 5 [(gogoproto.jsontag) = "transactionHash"]; // index of the transaction in the block - uint64 tx_index = 6 [ (gogoproto.jsontag) = "transactionIndex" ]; + uint64 tx_index = 6 [(gogoproto.jsontag) = "transactionIndex"]; // hash of the block in which the transaction was included - string block_hash = 7 [ (gogoproto.jsontag) = "blockHash" ]; + string block_hash = 7 [(gogoproto.jsontag) = "blockHash"]; // index of the log in the block - uint64 index = 8 [ (gogoproto.jsontag) = "logIndex" ]; + uint64 index = 8 [(gogoproto.jsontag) = "logIndex"]; // The Removed field is true if this log was reverted due to a chain // reorganisation. You must pay attention to this field if you receive logs @@ -185,16 +173,12 @@ message TxResult { // contract_address contains the ethereum address of the created contract (if // any). If the state transition is an evm.Call, the contract address will be // empty. - string contract_address = 1 - [ (gogoproto.moretags) = "yaml:\"contract_address\"" ]; + string contract_address = 1 [(gogoproto.moretags) = "yaml:\"contract_address\""]; // bloom represents the bloom filter bytes bytes bloom = 2; // tx_logs contains the transaction hash and the proto-compatible ethereum // logs. - TransactionLogs tx_logs = 3 [ - (gogoproto.moretags) = "yaml:\"tx_logs\"", - (gogoproto.nullable) = false - ]; + TransactionLogs tx_logs = 3 [(gogoproto.moretags) = "yaml:\"tx_logs\"", (gogoproto.nullable) = false]; // ret defines the bytes from the execution. bytes ret = 4; // reverted flag is set to true when the call has been reverted @@ -210,7 +194,7 @@ message AccessTuple { // hex formatted ethereum address string address = 1; // hex formatted hashes of the storage keys - repeated string storage_keys = 2 [ (gogoproto.jsontag) = "storageKeys" ]; + repeated string storage_keys = 2 [(gogoproto.jsontag) = "storageKeys"]; } // TraceConfig holds extra parameters to trace functions. @@ -228,9 +212,9 @@ message TraceConfig { // number of blocks the tracer is willing to go back uint64 reexec = 3; // disable stack capture - bool disable_stack = 5 [ (gogoproto.jsontag) = "disableStack" ]; + bool disable_stack = 5 [(gogoproto.jsontag) = "disableStack"]; // disable storage capture - bool disable_storage = 6 [ (gogoproto.jsontag) = "disableStorage" ]; + bool disable_storage = 6 [(gogoproto.jsontag) = "disableStorage"]; // print output during capture end bool debug = 8; // maximum length of output, but zero means unlimited @@ -238,7 +222,7 @@ message TraceConfig { // Chain overrides, can be used to execute a trace using future fork rules ChainConfig overrides = 10; // enable memory capture - bool enable_memory = 11 [ (gogoproto.jsontag) = "enableMemory" ]; + bool enable_memory = 11 [(gogoproto.jsontag) = "enableMemory"]; // enable return data capture - bool enable_return_data = 12 [ (gogoproto.jsontag) = "enableReturnData" ]; + bool enable_return_data = 12 [(gogoproto.jsontag) = "enableReturnData"]; } diff --git a/proto/ethermint/evm/v1/genesis.proto b/proto/ethermint/evm/v1/genesis.proto index 196bbd23a9..2a243a8a3c 100644 --- a/proto/ethermint/evm/v1/genesis.proto +++ b/proto/ethermint/evm/v1/genesis.proto @@ -9,9 +9,9 @@ option go_package = "github.com/evmos/ethermint/x/evm/types"; // GenesisState defines the evm module's genesis state. message GenesisState { // accounts is an array containing the ethereum genesis accounts. - repeated GenesisAccount accounts = 1 [ (gogoproto.nullable) = false ]; + repeated GenesisAccount accounts = 1 [(gogoproto.nullable) = false]; // params defines all the parameters of the module. - Params params = 2 [ (gogoproto.nullable) = false ]; + Params params = 2 [(gogoproto.nullable) = false]; } // GenesisAccount defines an account to be initialized in the genesis state. @@ -23,6 +23,5 @@ message GenesisAccount { // code defines the hex bytes of the account code. string code = 2; // storage defines the set of state key values for the account. - repeated State storage = 3 - [ (gogoproto.nullable) = false, (gogoproto.castrepeated) = "Storage" ]; + repeated State storage = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "Storage"]; } diff --git a/proto/ethermint/evm/v1/query.proto b/proto/ethermint/evm/v1/query.proto index 537bc7cf63..45d2ab0024 100644 --- a/proto/ethermint/evm/v1/query.proto +++ b/proto/ethermint/evm/v1/query.proto @@ -18,17 +18,14 @@ service Query { } // CosmosAccount queries an Ethereum account's Cosmos Address. - rpc CosmosAccount(QueryCosmosAccountRequest) - returns (QueryCosmosAccountResponse) { + rpc CosmosAccount(QueryCosmosAccountRequest) returns (QueryCosmosAccountResponse) { option (google.api.http).get = "/ethermint/evm/v1/cosmos_account/{address}"; } // ValidatorAccount queries an Ethereum account's from a validator consensus // Address. - rpc ValidatorAccount(QueryValidatorAccountRequest) - returns (QueryValidatorAccountResponse) { - option (google.api.http).get = - "/ethermint/evm/v1/validator_account/{cons_address}"; + rpc ValidatorAccount(QueryValidatorAccountRequest) returns (QueryValidatorAccountResponse) { + option (google.api.http).get = "/ethermint/evm/v1/validator_account/{cons_address}"; } // Balance queries the balance of a the EVM denomination for a single @@ -77,12 +74,11 @@ service Query { rpc BaseFee(QueryBaseFeeRequest) returns (QueryBaseFeeResponse) { option (google.api.http).get = "/ethermint/evm/v1/base_fee"; } - } // QueryAccountRequest is the request type for the Query/Account RPC method. message QueryAccountRequest { - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; // address is the ethereum hex address to query the account for. @@ -102,7 +98,7 @@ message QueryAccountResponse { // QueryCosmosAccountRequest is the request type for the Query/CosmosAccount RPC // method. message QueryCosmosAccountRequest { - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; // address is the ethereum hex address to query the account for. @@ -123,7 +119,7 @@ message QueryCosmosAccountResponse { // QueryValidatorAccountRequest is the request type for the // Query/ValidatorAccount RPC method. message QueryValidatorAccountRequest { - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; // cons_address is the validator cons address to query the account for. @@ -143,7 +139,7 @@ message QueryValidatorAccountResponse { // QueryBalanceRequest is the request type for the Query/Balance RPC method. message QueryBalanceRequest { - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; // address is the ethereum hex address to query the balance for. @@ -158,7 +154,7 @@ message QueryBalanceResponse { // QueryStorageRequest is the request type for the Query/Storage RPC method. message QueryStorageRequest { - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; /// address is the ethereum hex address to query the storage state for. @@ -177,7 +173,7 @@ message QueryStorageResponse { // QueryCodeRequest is the request type for the Query/Code RPC method. message QueryCodeRequest { - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; // address is the ethereum hex address to query the code for. @@ -193,7 +189,7 @@ message QueryCodeResponse { // QueryTxLogsRequest is the request type for the Query/TxLogs RPC method. message QueryTxLogsRequest { - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; // hash is the ethereum transaction hex hash to query the logs for. @@ -216,7 +212,7 @@ message QueryParamsRequest {} // QueryParamsResponse defines the response type for querying x/evm parameters. message QueryParamsResponse { // params define the evm module parameters. - Params params = 1 [ (gogoproto.nullable) = false ]; + Params params = 1 [(gogoproto.nullable) = false]; } // EthCallRequest defines EthCall request @@ -225,6 +221,8 @@ message EthCallRequest { bytes args = 1; // the default gas cap to be used uint64 gas_cap = 2; + // the proposer of the requested block + bytes proposer_address = 3 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ConsAddress"]; } // EstimateGasResponse defines EstimateGas response @@ -251,6 +249,8 @@ message QueryTraceTxRequest { string block_hash = 6; // block time of requested transaction google.protobuf.Timestamp block_time = 7 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + // the proposer of the requested block + bytes proposer_address = 8 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ConsAddress"]; } // QueryTraceTxResponse defines TraceTx response @@ -271,6 +271,8 @@ message QueryTraceBlockRequest { string block_hash = 6; // block time google.protobuf.Timestamp block_time = 7 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + // the proposer of the requested block + bytes proposer_address = 8 [(gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.ConsAddress"]; } // QueryTraceBlockResponse defines TraceBlock response @@ -284,6 +286,5 @@ message QueryBaseFeeRequest {} // BaseFeeResponse returns the EIP1559 base fee. message QueryBaseFeeResponse { - string base_fee = 1 - [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; + string base_fee = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; } diff --git a/proto/ethermint/evm/v1/tx.proto b/proto/ethermint/evm/v1/tx.proto index 0898f8e0ac..8206b04db6 100644 --- a/proto/ethermint/evm/v1/tx.proto +++ b/proto/ethermint/evm/v1/tx.proto @@ -26,9 +26,9 @@ message MsgEthereumTx { // caches // DEPRECATED: encoded storage size of the transaction - double size = 2 [ (gogoproto.jsontag) = "-" ]; + double size = 2 [(gogoproto.jsontag) = "-"]; // transaction hash in hex format - string hash = 3 [ (gogoproto.moretags) = "rlp:\"-\"" ]; + string hash = 3 [(gogoproto.moretags) = "rlp:\"-\""]; // ethereum signer address in hex format. This address value is checked // against the address derived from the signature (V, R, S) using the // secp256k1 elliptic curve @@ -37,25 +37,22 @@ message MsgEthereumTx { // LegacyTx is the transaction data of regular Ethereum transactions. // NOTE: All non-protected transactions (i.e non EIP155 signed) will fail if the -// AllowUnprotectedTxs parameter is disabled. +// AllowUnprotectedTxs parameter is disabled. message LegacyTx { - option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_getters) = false; option (cosmos_proto.implements_interface) = "TxData"; // nonce corresponds to the account nonce (transaction sequence). uint64 nonce = 1; // gas price defines the value for each gas unit - string gas_price = 2 - [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; + string gas_price = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; // gas defines the gas limit defined for the transaction. - uint64 gas = 3 [ (gogoproto.customname) = "GasLimit" ]; + uint64 gas = 3 [(gogoproto.customname) = "GasLimit"]; // hex formatted address of the recipient string to = 4; // value defines the unsigned integer value of the transaction amount. - string value = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.customname) = "Amount" - ]; + string value = 5 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customname) = "Amount"]; // input defines the data payload bytes of the transaction. bytes data = 6; // v defines the signature value @@ -68,36 +65,30 @@ message LegacyTx { // AccessListTx is the data of EIP-2930 access list transactions. message AccessListTx { - option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_getters) = false; option (cosmos_proto.implements_interface) = "TxData"; // destination EVM chain ID string chain_id = 1 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customname) = "ChainID", - (gogoproto.jsontag) = "chainID" + (gogoproto.jsontag) = "chainID" ]; // nonce corresponds to the account nonce (transaction sequence). uint64 nonce = 2; // gas price defines the value for each gas unit - string gas_price = 3 - [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; + string gas_price = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; // gas defines the gas limit defined for the transaction. - uint64 gas = 4 [ (gogoproto.customname) = "GasLimit" ]; + uint64 gas = 4 [(gogoproto.customname) = "GasLimit"]; // hex formatted address of the recipient string to = 5; // value defines the unsigned integer value of the transaction amount. - string value = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.customname) = "Amount" - ]; + string value = 6 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customname) = "Amount"]; // input defines the data payload bytes of the transaction. - bytes data = 7; - repeated AccessTuple accesses = 8 [ - (gogoproto.castrepeated) = "AccessList", - (gogoproto.jsontag) = "accessList", - (gogoproto.nullable) = false - ]; + bytes data = 7; + repeated AccessTuple accesses = 8 + [(gogoproto.castrepeated) = "AccessList", (gogoproto.jsontag) = "accessList", (gogoproto.nullable) = false]; // v defines the signature value bytes v = 9; // r defines the signature value @@ -108,39 +99,32 @@ message AccessListTx { // DynamicFeeTx is the data of EIP-1559 dinamic fee transactions. message DynamicFeeTx { - option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_getters) = false; option (cosmos_proto.implements_interface) = "TxData"; // destination EVM chain ID string chain_id = 1 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customname) = "ChainID", - (gogoproto.jsontag) = "chainID" + (gogoproto.jsontag) = "chainID" ]; // nonce corresponds to the account nonce (transaction sequence). uint64 nonce = 2; // gas tip cap defines the max value for the gas tip - string gas_tip_cap = 3 - [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; + string gas_tip_cap = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; // gas fee cap defines the max value for the gas fee - string gas_fee_cap = 4 - [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; + string gas_fee_cap = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; // gas defines the gas limit defined for the transaction. - uint64 gas = 5 [ (gogoproto.customname) = "GasLimit" ]; + uint64 gas = 5 [(gogoproto.customname) = "GasLimit"]; // hex formatted address of the recipient string to = 6; // value defines the the transaction amount. - string value = 7 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.customname) = "Amount" - ]; + string value = 7 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customname) = "Amount"]; // input defines the data payload bytes of the transaction. - bytes data = 8; - repeated AccessTuple accesses = 9 [ - (gogoproto.castrepeated) = "AccessList", - (gogoproto.jsontag) = "accessList", - (gogoproto.nullable) = false - ]; + bytes data = 8; + repeated AccessTuple accesses = 9 + [(gogoproto.castrepeated) = "AccessList", (gogoproto.jsontag) = "accessList", (gogoproto.nullable) = false]; // v defines the signature value bytes v = 10; // r defines the signature value diff --git a/proto/ethermint/feemarket/v1/feemarket.proto b/proto/ethermint/feemarket/v1/feemarket.proto index 8508ec715f..7072ced2b3 100644 --- a/proto/ethermint/feemarket/v1/feemarket.proto +++ b/proto/ethermint/feemarket/v1/feemarket.proto @@ -16,24 +16,17 @@ message Params { // have. uint32 elasticity_multiplier = 3; // DEPRECATED: initial base fee for EIP-1559 blocks. - reserved 4; + reserved 4; reserved "initial_base_fee"; // height at which the base fee calculation is enabled. int64 enable_height = 5; // base fee for EIP-1559 blocks. - string base_fee = 6 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; + string base_fee = 6 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; // min_gas_price defines the minimum gas price value for cosmos and eth transactions - string min_gas_price = 7 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; + string min_gas_price = 7 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; // min gas denominator bounds the minimum gasUsed to be charged // to senders based on GasLimit - string min_gas_multiplier = 8 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; + string min_gas_multiplier = 8 + [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; } diff --git a/proto/ethermint/feemarket/v1/genesis.proto b/proto/ethermint/feemarket/v1/genesis.proto index e3307844fb..25d96cef0d 100644 --- a/proto/ethermint/feemarket/v1/genesis.proto +++ b/proto/ethermint/feemarket/v1/genesis.proto @@ -9,7 +9,7 @@ option go_package = "github.com/evmos/ethermint/x/feemarket/types"; // GenesisState defines the feemarket module's genesis state. message GenesisState { // params defines all the paramaters of the module. - Params params = 1 [ (gogoproto.nullable) = false ]; + Params params = 1 [(gogoproto.nullable) = false]; // DEPRECATED: base fee is the exported value from previous software version. // Zero by default. reserved 2; diff --git a/proto/ethermint/feemarket/v1/query.proto b/proto/ethermint/feemarket/v1/query.proto index f8b672b026..2775abc753 100644 --- a/proto/ethermint/feemarket/v1/query.proto +++ b/proto/ethermint/feemarket/v1/query.proto @@ -32,7 +32,7 @@ message QueryParamsRequest {} // QueryParamsResponse defines the response type for querying x/evm parameters. message QueryParamsResponse { // params define the evm module parameters. - Params params = 1 [ (gogoproto.nullable) = false ]; + Params params = 1 [(gogoproto.nullable) = false]; } // QueryBaseFeeRequest defines the request type for querying the EIP1559 base @@ -41,8 +41,7 @@ message QueryBaseFeeRequest {} // BaseFeeResponse returns the EIP1559 base fee. message QueryBaseFeeResponse { - string base_fee = 1 - [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; + string base_fee = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; } // QueryBlockGasRequest defines the request type for querying the EIP1559 base @@ -50,4 +49,6 @@ message QueryBaseFeeResponse { message QueryBlockGasRequest {} // QueryBlockGasResponse returns block gas used for a given height. -message QueryBlockGasResponse { int64 gas = 1; } \ No newline at end of file +message QueryBlockGasResponse { + int64 gas = 1; +} \ No newline at end of file diff --git a/proto/ethermint/types/v1/account.proto b/proto/ethermint/types/v1/account.proto index 4a3a5d5d78..9b19149cbd 100644 --- a/proto/ethermint/types/v1/account.proto +++ b/proto/ethermint/types/v1/account.proto @@ -10,16 +10,13 @@ option go_package = "github.com/evmos/ethermint/types"; // EthAccount implements the authtypes.AccountI interface and embeds an // authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. message EthAccount { - option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_stringer) = false; - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; - option (cosmos_proto.implements_interface) = - "github.com/cosmos/cosmos-sdk/x/auth/types.AccountI"; + option (cosmos_proto.implements_interface) = "github.com/cosmos/cosmos-sdk/x/auth/types.AccountI"; - cosmos.auth.v1beta1.BaseAccount base_account = 1 [ - (gogoproto.embed) = true, - (gogoproto.moretags) = "yaml:\"base_account\"" - ]; - string code_hash = 2 [ (gogoproto.moretags) = "yaml:\"code_hash\"" ]; + cosmos.auth.v1beta1.BaseAccount base_account = 1 + [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""]; + string code_hash = 2 [(gogoproto.moretags) = "yaml:\"code_hash\""]; } diff --git a/proto/ethermint/types/v1/indexer.proto b/proto/ethermint/types/v1/indexer.proto index e1d0be03c9..0bada07065 100644 --- a/proto/ethermint/types/v1/indexer.proto +++ b/proto/ethermint/types/v1/indexer.proto @@ -7,23 +7,23 @@ option go_package = "github.com/evmos/ethermint/types"; // TxResult is the value stored in eth tx indexer message TxResult { - option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_getters) = false; - // the block height - int64 height = 1; - // cosmos tx index - uint32 tx_index = 2; - // the msg index in a batch tx - uint32 msg_index = 3; + // the block height + int64 height = 1; + // cosmos tx index + uint32 tx_index = 2; + // the msg index in a batch tx + uint32 msg_index = 3; - // eth tx index, the index in the list of valid eth tx in the block, - // aka. the transaction list returned by eth_getBlock api. - int32 eth_tx_index = 4; - // if the eth tx is failed - bool failed = 5; - // gas used by tx, if exceeds block gas limit, - // it's set to gas limit which is what's actually deducted by ante handler. - uint64 gas_used = 6; - // the cumulative gas used within current batch tx - uint64 cumulative_gas_used = 7; + // eth tx index, the index in the list of valid eth tx in the block, + // aka. the transaction list returned by eth_getBlock api. + int32 eth_tx_index = 4; + // if the eth tx is failed + bool failed = 5; + // gas used by tx, if exceeds block gas limit, + // it's set to gas limit which is what's actually deducted by ante handler. + uint64 gas_used = 6; + // the cumulative gas used within current batch tx + uint64 cumulative_gas_used = 7; } diff --git a/proto/ethermint/types/v1/web3.proto b/proto/ethermint/types/v1/web3.proto index df6bf65b22..6c16270b5a 100644 --- a/proto/ethermint/types/v1/web3.proto +++ b/proto/ethermint/types/v1/web3.proto @@ -10,16 +10,14 @@ message ExtensionOptionsWeb3Tx { // typed data chain id used only in EIP712 Domain and should match // Ethereum network ID in a Web3 provider (e.g. Metamask). - uint64 typed_data_chain_id = 1 [ - (gogoproto.jsontag) = "typedDataChainID,omitempty", - (gogoproto.customname) = "TypedDataChainID" - ]; + uint64 typed_data_chain_id = 1 + [(gogoproto.jsontag) = "typedDataChainID,omitempty", (gogoproto.customname) = "TypedDataChainID"]; // fee payer is an account address for the fee payer. It will be validated // during EIP712 signature checking. - string fee_payer = 2 [ (gogoproto.jsontag) = "feePayer,omitempty" ]; + string fee_payer = 2 [(gogoproto.jsontag) = "feePayer,omitempty"]; // fee payer sig is a signature data from the fee paying account, // allows to perform fee delegation when using EIP712 Domain. - bytes fee_payer_sig = 3 [ (gogoproto.jsontag) = "feePayerSig,omitempty" ]; + bytes fee_payer_sig = 3 [(gogoproto.jsontag) = "feePayerSig,omitempty"]; } diff --git a/rpc/backend/call_tx.go b/rpc/backend/call_tx.go index b572f5e5da..1e96250078 100644 --- a/rpc/backend/call_tx.go +++ b/rpc/backend/call_tx.go @@ -8,6 +8,7 @@ import ( "math/big" "github.com/cosmos/cosmos-sdk/client/flags" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" @@ -196,7 +197,6 @@ func (b *Backend) SetTxDefaults(args evmtypes.TransactionArgs) (evmtypes.Transac if args.MaxFeePerGas.ToInt().Cmp(args.MaxPriorityFeePerGas.ToInt()) < 0 { return args, fmt.Errorf("maxFeePerGas (%v) < maxPriorityFeePerGas (%v)", args.MaxFeePerGas, args.MaxPriorityFeePerGas) } - } else { if args.MaxFeePerGas != nil || args.MaxPriorityFeePerGas != nil { return args, errors.New("maxFeePerGas or maxPriorityFeePerGas specified but london is not active yet") @@ -299,9 +299,16 @@ func (b *Backend) EstimateGas(args evmtypes.TransactionArgs, blockNrOptional *rp return 0, err } + header, err := b.GetTendermintBlockByNumber(blockNr) + if err != nil { + // the error message imitates geth behavior + return 0, errors.New("header not found") + } + req := evmtypes.EthCallRequest{ - Args: bz, - GasCap: b.RPCGasCap(), + Args: bz, + GasCap: b.RPCGasCap(), + ProposerAddress: sdk.ConsAddress(header.Block.ProposerAddress), } // From ContextWithHeight: if the provided height is 0, @@ -323,10 +330,15 @@ func (b *Backend) DoCall( if err != nil { return nil, err } - + header, err := b.GetTendermintBlockByNumber(blockNr) + if err != nil { + // the error message imitates geth behavior + return nil, errors.New("header not found") + } req := evmtypes.EthCallRequest{ - Args: bz, - GasCap: b.RPCGasCap(), + Args: bz, + GasCap: b.RPCGasCap(), + ProposerAddress: sdk.ConsAddress(header.Block.ProposerAddress), } // From ContextWithHeight: if the provided height is 0, diff --git a/rpc/backend/tracing.go b/rpc/backend/tracing.go index 37fa2003f2..df0a04a413 100644 --- a/rpc/backend/tracing.go +++ b/rpc/backend/tracing.go @@ -4,6 +4,7 @@ import ( "encoding/json" "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" rpctypes "github.com/evmos/ethermint/rpc/types" evmtypes "github.com/evmos/ethermint/x/evm/types" @@ -77,11 +78,12 @@ func (b *Backend) TraceTransaction(hash common.Hash, config *evmtypes.TraceConfi } traceTxRequest := evmtypes.QueryTraceTxRequest{ - Msg: ethMessage, - Predecessors: predecessors, - BlockNumber: blk.Block.Height, - BlockTime: blk.Block.Time, - BlockHash: common.Bytes2Hex(blk.BlockID.Hash), + Msg: ethMessage, + Predecessors: predecessors, + BlockNumber: blk.Block.Height, + BlockTime: blk.Block.Time, + BlockHash: common.Bytes2Hex(blk.BlockID.Hash), + ProposerAddress: sdk.ConsAddress(blk.Block.ProposerAddress), } if config != nil { @@ -151,11 +153,12 @@ func (b *Backend) TraceBlock(height rpctypes.BlockNumber, config *evmtypes.Trace ctxWithHeight := rpctypes.ContextWithHeight(int64(contextHeight)) traceBlockRequest := &evmtypes.QueryTraceBlockRequest{ - Txs: txsMessages, - TraceConfig: config, - BlockNumber: block.Block.Height, - BlockTime: block.Block.Time, - BlockHash: common.Bytes2Hex(block.BlockID.Hash), + Txs: txsMessages, + TraceConfig: config, + BlockNumber: block.Block.Height, + BlockTime: block.Block.Time, + BlockHash: common.Bytes2Hex(block.BlockID.Hash), + ProposerAddress: sdk.ConsAddress(block.Block.ProposerAddress), } res, err := b.queryClient.TraceBlock(ctxWithHeight, traceBlockRequest) diff --git a/scripts/proto-tools-installer.sh b/scripts/proto-tools-installer.sh index 2b97923a04..ef396f04a4 100755 --- a/scripts/proto-tools-installer.sh +++ b/scripts/proto-tools-installer.sh @@ -86,7 +86,7 @@ f_install_buf() { f_install_protoc_gen_gocosmos() { f_print_installing_with_padding protoc-gen-gocosmos - if ! grep "github.com/gogo/protobuf => github.com/regen-network/protobuf" go.mod &>/dev/null ; then + if ! grep "github.com/cosmos/gogoproto => github.com/regen-network/protobuf" go.mod &>/dev/null ; then echo -e "\tPlease run this command from somewhere inside the ethermint folder." return 1 fi diff --git a/scripts/protoc-swagger-gen.sh b/scripts/protoc-swagger-gen.sh index 96f8d57b40..28cf93874f 100755 --- a/scripts/protoc-swagger-gen.sh +++ b/scripts/protoc-swagger-gen.sh @@ -2,20 +2,20 @@ set -eo pipefail +# install statik on the docker image +go install github.com/rakyll/statik + +# create temporary folder to store intermediate results from `buf generate` mkdir -p ./tmp-swagger-gen -proto_dirs=$(find ./proto ./third_party/proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) + +# create swagger files on an individual basis w/ `buf generate` (needed for `swagger-combine`) +proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) for dir in $proto_dirs; do - - # generate swagger files (filter query files) - query_file=$(find "${dir}" -maxdepth 1 \( -name 'query.proto' -o -name 'service.proto' \)) - if [[ ! -z "$query_file" ]]; then - protoc \ - -I "proto" \ - -I "third_party/proto" \ - "$query_file" \ - --swagger_out ./tmp-swagger-gen \ - --swagger_opt logtostderr=true --swagger_opt fqn_for_swagger_name=true --swagger_opt simple_operation_ids=true - fi + # generate swagger files (filter query files) + query_file=$(find "${dir}" -maxdepth 1 \( -name 'query.proto' -o -name 'service.proto' \)) + if [[ ! -z "$query_file" ]]; then + buf generate --template proto/buf.gen.swagger.yaml $query_file + fi done # combine swagger files @@ -26,5 +26,5 @@ swagger-combine ./client/docs/config.json -o ./client/docs/swagger-ui/swagger.ya # clean swagger files rm -rf ./tmp-swagger-gen -# generate binary for static server -statik -src=./client/docs/swagger-ui -dest=./client/docs +# generate binary for static server (use -f flag to replace current binary) +statik -f -src=./client/docs/swagger-ui -dest=./client/docs diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index cba0247da2..7dd799f205 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -1,43 +1,24 @@ #!/usr/bin/env bash +# -------------- +# Commands to run locally +# docker run --network host --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen:v0.7 sh ./protocgen.sh +# set -eo pipefail -protoc_gen_gocosmos() { - if ! grep "github.com/gogo/protobuf => github.com/regen-network/protobuf" go.mod &>/dev/null ; then - echo -e "\tPlease run this command from somewhere inside the sommelier folder." - return 1 - fi - - go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos 2>/dev/null -} - -protoc_gen_doc() { - go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc 2>/dev/null -} - -protoc_gen_gocosmos -protoc_gen_doc - +echo "Generating gogo proto code" proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) for dir in $proto_dirs; do - buf protoc \ - -I "proto" \ - -I "third_party/proto" \ - --gocosmos_out=plugins=interfacetype+grpc,\ -Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. \ - --grpc-gateway_out=logtostderr=true:. \ - $(find "${dir}" -maxdepth 1 -name '*.proto') - + proto_files=$(find "${dir}" -maxdepth 1 -name '*.proto') + for file in $proto_files; do + # Check if the go_package in the file is pointing to evmos + if grep -q "option go_package.*ethermint" "$file"; then + buf generate --template proto/buf.gen.gogo.yaml "$file" + fi + done done -# command to generate docs using protoc-gen-doc -buf protoc \ --I "proto" \ --I "third_party/proto" \ ---doc_out=./docs/api \ ---doc_opt=./docs/protodoc-markdown.tmpl,proto-docs.md \ -$(find "$(pwd)/proto" -maxdepth 5 -name '*.proto') -# go mod tidy +# TODO: command to generate docs using protoc-gen-doc was deleted here # move proto files to the right places cp -r github.com/evmos/ethermint/* ./ diff --git a/third_party/proto/cosmos_proto/cosmos.proto b/third_party/proto/cosmos_proto/cosmos.proto index 167b170757..15e190dfc0 100644 --- a/third_party/proto/cosmos_proto/cosmos.proto +++ b/third_party/proto/cosmos_proto/cosmos.proto @@ -6,11 +6,11 @@ import "google/protobuf/descriptor.proto"; option go_package = "github.com/regen-network/cosmos-proto"; extend google.protobuf.MessageOptions { - string interface_type = 93001; + string interface_type = 93001; - string implements_interface = 93002; + string implements_interface = 93002; } extend google.protobuf.FieldOptions { - string accepts_interface = 93001; + string accepts_interface = 93001; } diff --git a/third_party/proto/gogoproto/gogo.proto b/third_party/proto/gogoproto/gogo.proto index 49e78f99fe..6342ee9fcc 100644 --- a/third_party/proto/gogoproto/gogo.proto +++ b/third_party/proto/gogoproto/gogo.proto @@ -31,115 +31,115 @@ package gogoproto; import "google/protobuf/descriptor.proto"; -option java_package = "com.google.protobuf"; +option java_package = "com.google.protobuf"; option java_outer_classname = "GoGoProtos"; -option go_package = "github.com/gogo/protobuf/gogoproto"; +option go_package = "github.com/gogo/protobuf/gogoproto"; extend google.protobuf.EnumOptions { - optional bool goproto_enum_prefix = 62001; - optional bool goproto_enum_stringer = 62021; - optional bool enum_stringer = 62022; - optional string enum_customname = 62023; - optional bool enumdecl = 62024; + optional bool goproto_enum_prefix = 62001; + optional bool goproto_enum_stringer = 62021; + optional bool enum_stringer = 62022; + optional string enum_customname = 62023; + optional bool enumdecl = 62024; } extend google.protobuf.EnumValueOptions { - optional string enumvalue_customname = 66001; + optional string enumvalue_customname = 66001; } extend google.protobuf.FileOptions { - optional bool goproto_getters_all = 63001; - optional bool goproto_enum_prefix_all = 63002; - optional bool goproto_stringer_all = 63003; - optional bool verbose_equal_all = 63004; - optional bool face_all = 63005; - optional bool gostring_all = 63006; - optional bool populate_all = 63007; - optional bool stringer_all = 63008; - optional bool onlyone_all = 63009; - - optional bool equal_all = 63013; - optional bool description_all = 63014; - optional bool testgen_all = 63015; - optional bool benchgen_all = 63016; - optional bool marshaler_all = 63017; - optional bool unmarshaler_all = 63018; - optional bool stable_marshaler_all = 63019; - - optional bool sizer_all = 63020; - - optional bool goproto_enum_stringer_all = 63021; - optional bool enum_stringer_all = 63022; - - optional bool unsafe_marshaler_all = 63023; - optional bool unsafe_unmarshaler_all = 63024; - - optional bool goproto_extensions_map_all = 63025; - optional bool goproto_unrecognized_all = 63026; - optional bool gogoproto_import = 63027; - optional bool protosizer_all = 63028; - optional bool compare_all = 63029; - optional bool typedecl_all = 63030; - optional bool enumdecl_all = 63031; - - optional bool goproto_registration = 63032; - optional bool messagename_all = 63033; - - optional bool goproto_sizecache_all = 63034; - optional bool goproto_unkeyed_all = 63035; + optional bool goproto_getters_all = 63001; + optional bool goproto_enum_prefix_all = 63002; + optional bool goproto_stringer_all = 63003; + optional bool verbose_equal_all = 63004; + optional bool face_all = 63005; + optional bool gostring_all = 63006; + optional bool populate_all = 63007; + optional bool stringer_all = 63008; + optional bool onlyone_all = 63009; + + optional bool equal_all = 63013; + optional bool description_all = 63014; + optional bool testgen_all = 63015; + optional bool benchgen_all = 63016; + optional bool marshaler_all = 63017; + optional bool unmarshaler_all = 63018; + optional bool stable_marshaler_all = 63019; + + optional bool sizer_all = 63020; + + optional bool goproto_enum_stringer_all = 63021; + optional bool enum_stringer_all = 63022; + + optional bool unsafe_marshaler_all = 63023; + optional bool unsafe_unmarshaler_all = 63024; + + optional bool goproto_extensions_map_all = 63025; + optional bool goproto_unrecognized_all = 63026; + optional bool gogoproto_import = 63027; + optional bool protosizer_all = 63028; + optional bool compare_all = 63029; + optional bool typedecl_all = 63030; + optional bool enumdecl_all = 63031; + + optional bool goproto_registration = 63032; + optional bool messagename_all = 63033; + + optional bool goproto_sizecache_all = 63034; + optional bool goproto_unkeyed_all = 63035; } extend google.protobuf.MessageOptions { - optional bool goproto_getters = 64001; - optional bool goproto_stringer = 64003; - optional bool verbose_equal = 64004; - optional bool face = 64005; - optional bool gostring = 64006; - optional bool populate = 64007; - optional bool stringer = 67008; - optional bool onlyone = 64009; + optional bool goproto_getters = 64001; + optional bool goproto_stringer = 64003; + optional bool verbose_equal = 64004; + optional bool face = 64005; + optional bool gostring = 64006; + optional bool populate = 64007; + optional bool stringer = 67008; + optional bool onlyone = 64009; - optional bool equal = 64013; - optional bool description = 64014; - optional bool testgen = 64015; - optional bool benchgen = 64016; - optional bool marshaler = 64017; - optional bool unmarshaler = 64018; - optional bool stable_marshaler = 64019; + optional bool equal = 64013; + optional bool description = 64014; + optional bool testgen = 64015; + optional bool benchgen = 64016; + optional bool marshaler = 64017; + optional bool unmarshaler = 64018; + optional bool stable_marshaler = 64019; - optional bool sizer = 64020; + optional bool sizer = 64020; - optional bool unsafe_marshaler = 64023; - optional bool unsafe_unmarshaler = 64024; + optional bool unsafe_marshaler = 64023; + optional bool unsafe_unmarshaler = 64024; - optional bool goproto_extensions_map = 64025; - optional bool goproto_unrecognized = 64026; + optional bool goproto_extensions_map = 64025; + optional bool goproto_unrecognized = 64026; - optional bool protosizer = 64028; - optional bool compare = 64029; + optional bool protosizer = 64028; + optional bool compare = 64029; - optional bool typedecl = 64030; + optional bool typedecl = 64030; - optional bool messagename = 64033; + optional bool messagename = 64033; - optional bool goproto_sizecache = 64034; - optional bool goproto_unkeyed = 64035; + optional bool goproto_sizecache = 64034; + optional bool goproto_unkeyed = 64035; } extend google.protobuf.FieldOptions { - optional bool nullable = 65001; - optional bool embed = 65002; - optional string customtype = 65003; - optional string customname = 65004; - optional string jsontag = 65005; - optional string moretags = 65006; - optional string casttype = 65007; - optional string castkey = 65008; - optional string castvalue = 65009; - - optional bool stdtime = 65010; - optional bool stdduration = 65011; - optional bool wktpointer = 65012; - - optional string castrepeated = 65013; + optional bool nullable = 65001; + optional bool embed = 65002; + optional string customtype = 65003; + optional string customname = 65004; + optional string jsontag = 65005; + optional string moretags = 65006; + optional string casttype = 65007; + optional string castkey = 65008; + optional string castvalue = 65009; + + optional bool stdtime = 65010; + optional bool stdduration = 65011; + optional bool wktpointer = 65012; + + optional string castrepeated = 65013; } diff --git a/third_party/proto/tendermint/abci/types.proto b/third_party/proto/tendermint/abci/types.proto index 8e3a909363..e13117b7aa 100644 --- a/third_party/proto/tendermint/abci/types.proto +++ b/third_party/proto/tendermint/abci/types.proto @@ -58,13 +58,12 @@ message RequestSetOption { } message RequestInitChain { - google.protobuf.Timestamp time = 1 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - string chain_id = 2; - ConsensusParams consensus_params = 3; - repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false]; - bytes app_state_bytes = 5; - int64 initial_height = 6; + google.protobuf.Timestamp time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + string chain_id = 2; + ConsensusParams consensus_params = 3; + repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false]; + bytes app_state_bytes = 5; + int64 initial_height = 6; } message RequestQuery { @@ -102,13 +101,12 @@ message RequestEndBlock { message RequestCommit {} // lists available snapshots -message RequestListSnapshots { -} +message RequestListSnapshots {} // offers a snapshot to the application message RequestOfferSnapshot { - Snapshot snapshot = 1; // snapshot offered by peers - bytes app_hash = 2; // light client-verified app hash for snapshot height + Snapshot snapshot = 1; // snapshot offered by peers + bytes app_hash = 2; // light client-verified app hash for snapshot height } // loads a snapshot chunk @@ -187,8 +185,8 @@ message ResponseInitChain { message ResponseQuery { uint32 code = 1; // bytes data = 2; // use "value" instead. - string log = 3; // nondeterministic - string info = 4; // nondeterministic + string log = 3; // nondeterministic + string info = 4; // nondeterministic int64 index = 5; bytes key = 6; bytes value = 7; @@ -198,27 +196,25 @@ message ResponseQuery { } message ResponseBeginBlock { - repeated Event events = 1 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + repeated Event events = 1 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; } message ResponseCheckTx { uint32 code = 1; bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic + string log = 3; // nondeterministic + string info = 4; // nondeterministic int64 gas_wanted = 5 [json_name = "gas_wanted"]; int64 gas_used = 6 [json_name = "gas_used"]; - repeated Event events = 7 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; - string codespace = 8; + repeated Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + string codespace = 8; } message ResponseDeliverTx { uint32 code = 1; bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic + string log = 3; // nondeterministic + string info = 4; // nondeterministic int64 gas_wanted = 5 [json_name = "gas_wanted"]; int64 gas_used = 6 [json_name = "gas_used"]; repeated Event events = 7 @@ -227,11 +223,9 @@ message ResponseDeliverTx { } message ResponseEndBlock { - repeated ValidatorUpdate validator_updates = 1 - [(gogoproto.nullable) = false]; - ConsensusParams consensus_param_updates = 2; - repeated Event events = 3 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false]; + ConsensusParams consensus_param_updates = 2; + repeated Event events = 3 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; } message ResponseCommit { @@ -248,12 +242,12 @@ message ResponseOfferSnapshot { Result result = 1; enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Snapshot accepted, apply chunks - ABORT = 2; // Abort all snapshot restoration - REJECT = 3; // Reject this specific snapshot, try others - REJECT_FORMAT = 4; // Reject all snapshots of this format, try others - REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others + UNKNOWN = 0; // Unknown result, abort all snapshot restoration + ACCEPT = 1; // Snapshot accepted, apply chunks + ABORT = 2; // Abort all snapshot restoration + REJECT = 3; // Reject this specific snapshot, try others + REJECT_FORMAT = 4; // Reject all snapshots of this format, try others + REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others } } @@ -263,16 +257,16 @@ message ResponseLoadSnapshotChunk { message ResponseApplySnapshotChunk { Result result = 1; - repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply - repeated string reject_senders = 3; // Chunk senders to reject and ban + repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply + repeated string reject_senders = 3; // Chunk senders to reject and ban enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Chunk successfully accepted - ABORT = 2; // Abort all snapshot restoration - RETRY = 3; // Retry chunk (combine with refetch and reject) - RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject) - REJECT_SNAPSHOT = 5; // Reject this snapshot, try others + UNKNOWN = 0; // Unknown result, abort all snapshot restoration + ACCEPT = 1; // Chunk successfully accepted + ABORT = 2; // Abort all snapshot restoration + RETRY = 3; // Retry chunk (combine with refetch and reject) + RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject) + REJECT_SNAPSHOT = 5; // Reject this snapshot, try others } } @@ -306,17 +300,14 @@ message LastCommitInfo { // Later, transactions may be queried using these events. message Event { string type = 1; - repeated EventAttribute attributes = 2 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "attributes,omitempty" - ]; + repeated EventAttribute attributes = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes,omitempty"]; } // EventAttribute is a single key-value pair, associated with an event. message EventAttribute { bytes key = 1; bytes value = 2; - bool index = 3; // nondeterministic + bool index = 3; // nondeterministic } // TxResult contains results of executing the transaction. @@ -334,9 +325,9 @@ message TxResult { // Validator message Validator { - bytes address = 1; // The first 20 bytes of SHA256(public key) + bytes address = 1; // The first 20 bytes of SHA256(public key) // PubKey pub_key = 2 [(gogoproto.nullable)=false]; - int64 power = 3; // The voting power + int64 power = 3; // The voting power } // ValidatorUpdate @@ -364,10 +355,7 @@ message Evidence { // The height when the offense occurred int64 height = 3; // The corresponding time where the offense occurred - google.protobuf.Timestamp time = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; + google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; // Total voting power of the validator set in case the ABCI application does // not store historical validators. // https://github.com/tendermint/tendermint/issues/4581 @@ -378,11 +366,11 @@ message Evidence { // State Sync Types message Snapshot { - uint64 height = 1; // The height at which the snapshot was taken - uint32 format = 2; // The application-specific snapshot format - uint32 chunks = 3; // Number of chunks in the snapshot - bytes hash = 4; // Arbitrary snapshot hash, equal only if identical - bytes metadata = 5; // Arbitrary application metadata + uint64 height = 1; // The height at which the snapshot was taken + uint32 format = 2; // The application-specific snapshot format + uint32 chunks = 3; // Number of chunks in the snapshot + bytes hash = 4; // Arbitrary snapshot hash, equal only if identical + bytes metadata = 5; // Arbitrary application metadata } //---------------------------------------- diff --git a/third_party/proto/tendermint/types/evidence.proto b/third_party/proto/tendermint/types/evidence.proto index 3b234571ba..d9548a4302 100644 --- a/third_party/proto/tendermint/types/evidence.proto +++ b/third_party/proto/tendermint/types/evidence.proto @@ -17,19 +17,19 @@ message Evidence { // DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. message DuplicateVoteEvidence { - tendermint.types.Vote vote_a = 1; - tendermint.types.Vote vote_b = 2; - int64 total_voting_power = 3; - int64 validator_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + tendermint.types.Vote vote_a = 1; + tendermint.types.Vote vote_b = 2; + int64 total_voting_power = 3; + int64 validator_power = 4; + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } // LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. message LightClientAttackEvidence { - tendermint.types.LightBlock conflicting_block = 1; - int64 common_height = 2; + tendermint.types.LightBlock conflicting_block = 1; + int64 common_height = 2; repeated tendermint.types.Validator byzantine_validators = 3; - int64 total_voting_power = 4; + int64 total_voting_power = 4; google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } diff --git a/third_party/proto/tendermint/types/params.proto b/third_party/proto/tendermint/types/params.proto index 0de7d846fb..70789222a5 100644 --- a/third_party/proto/tendermint/types/params.proto +++ b/third_party/proto/tendermint/types/params.proto @@ -45,8 +45,7 @@ message EvidenceParams { // It should correspond with an app's "unbonding period" or other similar // mechanism for handling [Nothing-At-Stake // attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - google.protobuf.Duration max_age_duration = 2 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; + google.protobuf.Duration max_age_duration = 2 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; // This sets the maximum size of total evidence in bytes that can be committed in a single block. // and should fall comfortably under the max block bytes. diff --git a/third_party/proto/tendermint/types/types.proto b/third_party/proto/tendermint/types/types.proto index 7f7ea74cac..57efc33c5b 100644 --- a/third_party/proto/tendermint/types/types.proto +++ b/third_party/proto/tendermint/types/types.proto @@ -66,19 +66,19 @@ message Header { BlockID last_block_id = 5 [(gogoproto.nullable) = false]; // hashes of block data - bytes last_commit_hash = 6; // commit from validators from the last block - bytes data_hash = 7; // transactions + bytes last_commit_hash = 6; // commit from validators from the last block + bytes data_hash = 7; // transactions // hashes from the app output from the prev block - bytes validators_hash = 8; // validators for the current block - bytes next_validators_hash = 9; // validators for the next block - bytes consensus_hash = 10; // consensus params for current block - bytes app_hash = 11; // state after txs from the previous block - bytes last_results_hash = 12; // root hash of all results from the txs from the previous block + bytes validators_hash = 8; // validators for the current block + bytes next_validators_hash = 9; // validators for the next block + bytes consensus_hash = 10; // consensus params for current block + bytes app_hash = 11; // state after txs from the previous block + bytes last_results_hash = 12; // root hash of all results from the txs from the previous block // consensus info - bytes evidence_hash = 13; // evidence included in the block - bytes proposer_address = 14; // original proposer of the block + bytes evidence_hash = 13; // evidence included in the block + bytes proposer_address = 14; // original proposer of the block } // Data contains the set of transactions included in the block @@ -95,30 +95,27 @@ message Vote { SignedMsgType type = 1; int64 height = 2; int32 round = 3; - BlockID block_id = 4 - [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. - google.protobuf.Timestamp timestamp = 5 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes validator_address = 6; - int32 validator_index = 7; - bytes signature = 8; + BlockID block_id = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes validator_address = 6; + int32 validator_index = 7; + bytes signature = 8; } // Commit contains the evidence that a block was committed by a set of validators. message Commit { - int64 height = 1; - int32 round = 2; - BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; - repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; + int64 height = 1; + int32 round = 2; + BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; + repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; } // CommitSig is a part of the Vote included in a Commit. message CommitSig { BlockIDFlag block_id_flag = 1; bytes validator_address = 2; - google.protobuf.Timestamp timestamp = 3 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 4; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes signature = 4; } message Proposal { @@ -127,9 +124,8 @@ message Proposal { int32 round = 3; int32 pol_round = 4; BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - google.protobuf.Timestamp timestamp = 6 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 7; + google.protobuf.Timestamp timestamp = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes signature = 7; } message SignedHeader { diff --git a/types/account.pb.go b/types/account.pb.go index 7c711fe6a3..b050b3c381 100644 --- a/types/account.pb.go +++ b/types/account.pb.go @@ -5,10 +5,10 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/x/auth/types" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" - _ "github.com/regen-network/cosmos-proto" io "io" math "math" math_bits "math/bits" @@ -85,13 +85,13 @@ var fileDescriptor_4edc057d42a619ef = []byte{ 0x58, 0x29, 0x21, 0x9b, 0xa1, 0x14, 0xc4, 0x9d, 0x84, 0x50, 0x29, 0x64, 0xc8, 0xc5, 0x99, 0x9c, 0x9f, 0x92, 0x1a, 0x9f, 0x91, 0x58, 0x9c, 0x21, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0xe9, 0x24, 0xf2, 0xe9, 0x9e, 0xbc, 0x00, 0x44, 0x23, 0x5c, 0x4a, 0x29, 0x88, 0x03, 0xc4, 0xf6, 0x48, 0x2c, 0xce, - 0xb0, 0x72, 0xea, 0x58, 0x20, 0xcf, 0x30, 0x63, 0x81, 0x3c, 0xc3, 0x8b, 0x05, 0xf2, 0x0c, 0x97, + 0xb0, 0x72, 0xea, 0x58, 0x20, 0xcf, 0x30, 0x63, 0x81, 0x3c, 0xc3, 0x8b, 0x05, 0xf2, 0x0c, 0xa7, 0xb6, 0xe8, 0x1a, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0x42, 0xbd, 0x08, 0xa5, 0x74, 0x8b, 0x53, 0xb2, 0xf5, 0x2b, 0x20, 0x81, 0x03, 0x09, 0x32, 0xa8, 0xad, 0x9e, 0x4e, 0x56, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0xa5, 0x80, 0x64, 0x5a, 0x6a, 0x19, 0xc8, 0x30, 0xb4, 0x98, 0x49, 0x62, 0x03, 0x07, 0x95, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, - 0x1d, 0xef, 0xb5, 0x9a, 0xb3, 0x01, 0x00, 0x00, + 0x87, 0x95, 0x79, 0x08, 0xb3, 0x01, 0x00, 0x00, } func (m *EthAccount) Marshal() (dAtA []byte, err error) { diff --git a/types/indexer.pb.go b/types/indexer.pb.go index 2e15c18545..a638faf63c 100644 --- a/types/indexer.pb.go +++ b/types/indexer.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" diff --git a/types/web3.pb.go b/types/web3.pb.go index ee3a24703a..f657f1849e 100644 --- a/types/web3.pb.go +++ b/types/web3.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index 1610077947..78cea23c23 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -223,7 +223,7 @@ func (k Keeper) EthCall(c context.Context, req *types.EthCallRequest) (*types.Ms return nil, status.Error(codes.InvalidArgument, err.Error()) } - cfg, err := k.EVMConfig(ctx) + cfg, err := k.EVMConfig(ctx, GetProposerAddress(ctx, req.ProposerAddress)) if err != nil { return nil, status.Error(codes.Internal, err.Error()) } @@ -293,8 +293,7 @@ func (k Keeper) EstimateGas(c context.Context, req *types.EthCallRequest) (*type hi = req.GasCap } cap = hi - - cfg, err := k.EVMConfig(ctx) + cfg, err := k.EVMConfig(ctx, GetProposerAddress(ctx, req.ProposerAddress)) if err != nil { return nil, status.Error(codes.Internal, "failed to load evm config") } @@ -374,8 +373,7 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ ctx = ctx.WithBlockHeight(contextHeight) ctx = ctx.WithBlockTime(req.BlockTime) ctx = ctx.WithHeaderHash(common.Hex2Bytes(req.BlockHash)) - - cfg, err := k.EVMConfig(ctx) + cfg, err := k.EVMConfig(ctx, GetProposerAddress(ctx, req.ProposerAddress)) if err != nil { return nil, status.Errorf(codes.Internal, "failed to load evm config: %s", err.Error()) } @@ -442,8 +440,7 @@ func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest) ctx = ctx.WithBlockHeight(contextHeight) ctx = ctx.WithBlockTime(req.BlockTime) ctx = ctx.WithHeaderHash(common.Hex2Bytes(req.BlockHash)) - - cfg, err := k.EVMConfig(ctx) + cfg, err := k.EVMConfig(ctx, GetProposerAddress(ctx, req.ProposerAddress)) if err != nil { return nil, status.Error(codes.Internal, "failed to load evm config") } diff --git a/x/evm/keeper/grpc_query_test.go b/x/evm/keeper/grpc_query_test.go index 367a431419..595bf572e7 100644 --- a/x/evm/keeper/grpc_query_test.go +++ b/x/evm/keeper/grpc_query_test.go @@ -586,8 +586,9 @@ func (suite *KeeperTestSuite) TestEstimateGas() { args, err := json.Marshal(&args) suite.Require().NoError(err) req := types.EthCallRequest{ - Args: args, - GasCap: gasCap, + Args: args, + GasCap: gasCap, + ProposerAddress: suite.ctx.BlockHeader().ProposerAddress, } rsp, err := suite.queryClient.EstimateGas(sdk.WrapSDKContext(suite.ctx), &req) @@ -893,16 +894,18 @@ func (suite *KeeperTestSuite) TestNonceInQuery() { Data: (*hexutil.Bytes)(&data), }) suite.Require().NoError(err) - + proposerAddress := suite.ctx.BlockHeader().ProposerAddress _, err = suite.queryClient.EstimateGas(sdk.WrapSDKContext(suite.ctx), &types.EthCallRequest{ - Args: args, - GasCap: uint64(config.DefaultGasCap), + Args: args, + GasCap: uint64(config.DefaultGasCap), + ProposerAddress: proposerAddress, }) suite.Require().NoError(err) _, err = suite.queryClient.EthCall(sdk.WrapSDKContext(suite.ctx), &types.EthCallRequest{ - Args: args, - GasCap: uint64(config.DefaultGasCap), + Args: args, + GasCap: uint64(config.DefaultGasCap), + ProposerAddress: proposerAddress, }) suite.Require().NoError(err) } diff --git a/x/evm/keeper/keeper_test.go b/x/evm/keeper/keeper_test.go index c88bb05001..2adab7fd9c 100644 --- a/x/evm/keeper/keeper_test.go +++ b/x/evm/keeper/keeper_test.go @@ -92,7 +92,7 @@ func (suite *KeeperTestSuite) SetupTest() { suite.SetupApp(checkTx) } -/// SetupApp setup test environment, it uses`require.TestingT` to support both `testing.T` and `testing.B`. +// / SetupApp setup test environment, it uses`require.TestingT` to support both `testing.T` and `testing.B`. func (suite *KeeperTestSuite) SetupApp(checkTx bool) { t := suite.T() // account key, use a constant account to keep unit test deterministic. @@ -254,10 +254,10 @@ func (suite *KeeperTestSuite) DeployTestContract(t require.TestingT, owner commo Data: (*hexutil.Bytes)(&data), }) require.NoError(t, err) - res, err := suite.queryClient.EstimateGas(ctx, &types.EthCallRequest{ - Args: args, - GasCap: uint64(config.DefaultGasCap), + Args: args, + GasCap: uint64(config.DefaultGasCap), + ProposerAddress: suite.ctx.BlockHeader().ProposerAddress, }) require.NoError(t, err) @@ -305,8 +305,9 @@ func (suite *KeeperTestSuite) TransferERC20Token(t require.TestingT, contractAdd args, err := json.Marshal(&types.TransactionArgs{To: &contractAddr, From: &from, Data: (*hexutil.Bytes)(&transferData)}) require.NoError(t, err) res, err := suite.queryClient.EstimateGas(ctx, &types.EthCallRequest{ - Args: args, - GasCap: 25_000_000, + Args: args, + GasCap: 25_000_000, + ProposerAddress: suite.ctx.BlockHeader().ProposerAddress, }) require.NoError(t, err) @@ -362,8 +363,9 @@ func (suite *KeeperTestSuite) DeployTestMessageCall(t require.TestingT) common.A require.NoError(t, err) res, err := suite.queryClient.EstimateGas(ctx, &types.EthCallRequest{ - Args: args, - GasCap: uint64(config.DefaultGasCap), + Args: args, + GasCap: uint64(config.DefaultGasCap), + ProposerAddress: suite.ctx.BlockHeader().ProposerAddress, }) require.NoError(t, err) diff --git a/x/evm/keeper/state_transition.go b/x/evm/keeper/state_transition.go index ec79aefc8b..19472563f5 100644 --- a/x/evm/keeper/state_transition.go +++ b/x/evm/keeper/state_transition.go @@ -36,12 +36,12 @@ func GasToRefund(availableRefund, gasConsumed, refundQuotient uint64) uint64 { } // EVMConfig creates the EVMConfig based on current state -func (k *Keeper) EVMConfig(ctx sdk.Context) (*types.EVMConfig, error) { +func (k *Keeper) EVMConfig(ctx sdk.Context, proposerAddress sdk.ConsAddress) (*types.EVMConfig, error) { params := k.GetParams(ctx) ethCfg := params.ChainConfig.EthereumConfig(k.eip155ChainID) // get the coinbase address from the block proposer - coinbase, err := k.GetCoinbaseAddress(ctx) + coinbase, err := k.GetCoinbaseAddress(ctx, proposerAddress) if err != nil { return nil, sdkerrors.Wrap(err, "failed to obtain coinbase address") } @@ -196,7 +196,7 @@ func (k *Keeper) ApplyTransaction(ctx sdk.Context, tx *ethtypes.Transaction) (*t bloomReceipt ethtypes.Bloom ) - cfg, err := k.EVMConfig(ctx) + cfg, err := k.EVMConfig(ctx, sdk.ConsAddress(ctx.BlockHeader().ProposerAddress)) if err != nil { return nil, sdkerrors.Wrap(err, "failed to load evm config") } @@ -453,7 +453,7 @@ func (k *Keeper) ApplyMessageWithConfig(ctx sdk.Context, msg core.Message, trace // ApplyMessage calls ApplyMessageWithConfig with default EVMConfig func (k *Keeper) ApplyMessage(ctx sdk.Context, msg core.Message, tracer vm.EVMLogger, commit bool) (*types.MsgEthereumTxResponse, error) { - cfg, err := k.EVMConfig(ctx) + cfg, err := k.EVMConfig(ctx, sdk.ConsAddress(ctx.BlockHeader().ProposerAddress)) if err != nil { return nil, sdkerrors.Wrap(err, "failed to load evm config") } @@ -508,15 +508,22 @@ func (k *Keeper) ResetGasMeterAndConsumeGas(ctx sdk.Context, gasUsed uint64) { ctx.GasMeter().ConsumeGas(gasUsed, "apply evm transaction") } +// GetProposerAddress returns current block proposer's address when provided proposer address is empty. +func GetProposerAddress(ctx sdk.Context, proposerAddress sdk.ConsAddress) sdk.ConsAddress { + if len(proposerAddress) == 0 { + proposerAddress = ctx.BlockHeader().ProposerAddress + } + return proposerAddress +} + // GetCoinbaseAddress returns the block proposer's validator operator address. -func (k Keeper) GetCoinbaseAddress(ctx sdk.Context) (common.Address, error) { - consAddr := sdk.ConsAddress(ctx.BlockHeader().ProposerAddress) - validator, found := k.stakingKeeper.GetValidatorByConsAddr(ctx, consAddr) +func (k Keeper) GetCoinbaseAddress(ctx sdk.Context, proposerAddress sdk.ConsAddress) (common.Address, error) { + validator, found := k.stakingKeeper.GetValidatorByConsAddr(ctx, GetProposerAddress(ctx, proposerAddress)) if !found { return common.Address{}, sdkerrors.Wrapf( stakingtypes.ErrNoValidatorFound, "failed to retrieve validator from block proposer address %s", - consAddr.String(), + proposerAddress.String(), ) } diff --git a/x/evm/keeper/state_transition_test.go b/x/evm/keeper/state_transition_test.go index 914db7d9b1..feaba21c7f 100644 --- a/x/evm/keeper/state_transition_test.go +++ b/x/evm/keeper/state_transition_test.go @@ -9,10 +9,12 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" "github.com/evmos/ethermint/tests" "github.com/evmos/ethermint/x/evm/keeper" + "github.com/evmos/ethermint/x/evm/statedb" "github.com/evmos/ethermint/x/evm/types" "github.com/tendermint/tendermint/crypto/tmhash" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" @@ -157,8 +159,8 @@ func (suite *KeeperTestSuite) TestGetCoinbaseAddress() { suite.SetupTest() // reset tc.malleate() - - coinbase, err := suite.app.EvmKeeper.GetCoinbaseAddress(suite.ctx) + proposerAddress := suite.ctx.BlockHeader().ProposerAddress + coinbase, err := suite.app.EvmKeeper.GetCoinbaseAddress(suite.ctx, sdk.ConsAddress(proposerAddress)) if tc.expPass { suite.Require().NoError(err) suite.Require().Equal(valOpAddr, coinbase) @@ -346,40 +348,63 @@ func (suite *KeeperTestSuite) TestGasToRefund() { } func (suite *KeeperTestSuite) TestRefundGas() { + var ( + m core.Message + err error + ) + testCases := []struct { name string leftoverGas uint64 refundQuotient uint64 noError bool expGasRefund uint64 + malleate func() }{ { - "leftoverGas more than tx gas limit", - params.TxGas + 1, - params.RefundQuotient, - false, - params.TxGas + 1, + name: "leftoverGas more than tx gas limit", + leftoverGas: params.TxGas + 1, + refundQuotient: params.RefundQuotient, + noError: false, + expGasRefund: params.TxGas + 1, }, { - "leftoverGas equal to tx gas limit, insufficient fee collector account", - params.TxGas, - params.RefundQuotient, - true, - 0, + name: "leftoverGas equal to tx gas limit, insufficient fee collector account", + leftoverGas: params.TxGas, + refundQuotient: params.RefundQuotient, + noError: true, + expGasRefund: 0, }, { - "leftoverGas less than to tx gas limit", - params.TxGas - 1, - params.RefundQuotient, - true, - 0, + name: "leftoverGas less than to tx gas limit", + leftoverGas: params.TxGas - 1, + refundQuotient: params.RefundQuotient, + noError: true, + expGasRefund: 0, }, { - "no leftoverGas, refund half used gas ", - 0, - params.RefundQuotient, - true, - params.TxGas / params.RefundQuotient, + name: "no leftoverGas, refund half used gas ", + leftoverGas: 0, + refundQuotient: params.RefundQuotient, + noError: true, + expGasRefund: params.TxGas / params.RefundQuotient, + }, + { + name: "invalid Gas value in msg", + leftoverGas: 0, + refundQuotient: params.RefundQuotient, + noError: false, + expGasRefund: params.TxGas, + malleate: func() { + keeperParams := suite.app.EvmKeeper.GetParams(suite.ctx) + m, err = suite.createContractGethMsg( + suite.StateDB().GetNonce(suite.address), + ethtypes.LatestSignerForChainID(suite.app.EvmKeeper.ChainID()), + keeperParams.ChainConfig.EthereumConfig(suite.app.EvmKeeper.ChainID()), + big.NewInt(-100), + ) + suite.Require().NoError(err) + }, }, } @@ -393,7 +418,7 @@ func (suite *KeeperTestSuite) TestRefundGas() { signer := ethtypes.LatestSignerForChainID(suite.app.EvmKeeper.ChainID()) vmdb := suite.StateDB() - m, err := newNativeMessage( + m, err = newNativeMessage( vmdb.GetNonce(suite.address), suite.ctx.BlockHeight(), suite.address, @@ -411,6 +436,11 @@ func (suite *KeeperTestSuite) TestRefundGas() { if tc.leftoverGas > m.Gas() { return } + + if tc.malleate != nil { + tc.malleate() + } + gasUsed := m.Gas() - tc.leftoverGas refund := keeper.GasToRefund(vmdb.GetRefund(), gasUsed, tc.refundQuotient) suite.Require().Equal(tc.expGasRefund, refund) @@ -486,8 +516,8 @@ func (suite *KeeperTestSuite) TestResetGasMeterAndConsumeGas() { } func (suite *KeeperTestSuite) TestEVMConfig() { - suite.SetupTest() - cfg, err := suite.app.EvmKeeper.EVMConfig(suite.ctx) + proposerAddress := suite.ctx.BlockHeader().ProposerAddress + cfg, err := suite.app.EvmKeeper.EVMConfig(suite.ctx, proposerAddress) suite.Require().NoError(err) suite.Require().Equal(types.DefaultParams(), cfg.Params) // london hardfork is enabled by default @@ -497,8 +527,199 @@ func (suite *KeeperTestSuite) TestEVMConfig() { } func (suite *KeeperTestSuite) TestContractDeployment() { - suite.SetupTest() contractAddress := suite.DeployTestContract(suite.T(), suite.address, big.NewInt(10000000000000)) db := suite.StateDB() suite.Require().Greater(db.GetCodeSize(contractAddress), 0) } + +func (suite *KeeperTestSuite) TestApplyMessage() { + expectedGasUsed := params.TxGas + var msg core.Message + + proposerAddress := suite.ctx.BlockHeader().ProposerAddress + config, err := suite.app.EvmKeeper.EVMConfig(suite.ctx, proposerAddress) + suite.Require().NoError(err) + + keeperParams := suite.app.EvmKeeper.GetParams(suite.ctx) + chainCfg := keeperParams.ChainConfig.EthereumConfig(suite.app.EvmKeeper.ChainID()) + signer := ethtypes.LatestSignerForChainID(suite.app.EvmKeeper.ChainID()) + tracer := suite.app.EvmKeeper.Tracer(suite.ctx, msg, config.ChainConfig) + vmdb := suite.StateDB() + + msg, err = newNativeMessage( + vmdb.GetNonce(suite.address), + suite.ctx.BlockHeight(), + suite.address, + chainCfg, + suite.signer, + signer, + ethtypes.AccessListTxType, + nil, + nil, + ) + suite.Require().NoError(err) + + res, err := suite.app.EvmKeeper.ApplyMessage(suite.ctx, msg, tracer, true) + + suite.Require().NoError(err) + suite.Require().Equal(expectedGasUsed, res.GasUsed) + suite.Require().False(res.Failed()) +} + +func (suite *KeeperTestSuite) TestApplyMessageWithConfig() { + var ( + msg core.Message + err error + expectedGasUsed uint64 + config *types.EVMConfig + keeperParams types.Params + signer ethtypes.Signer + vmdb *statedb.StateDB + txConfig statedb.TxConfig + chainCfg *params.ChainConfig + ) + + testCases := []struct { + name string + malleate func() + expErr bool + }{ + { + "messsage applied ok", + func() { + msg, err = newNativeMessage( + vmdb.GetNonce(suite.address), + suite.ctx.BlockHeight(), + suite.address, + chainCfg, + suite.signer, + signer, + ethtypes.AccessListTxType, + nil, + nil, + ) + suite.Require().NoError(err) + }, + false, + }, + { + "call contract tx with config param EnableCall = false", + func() { + config.Params.EnableCall = false + msg, err = newNativeMessage( + vmdb.GetNonce(suite.address), + suite.ctx.BlockHeight(), + suite.address, + chainCfg, + suite.signer, + signer, + ethtypes.AccessListTxType, + nil, + nil, + ) + suite.Require().NoError(err) + }, + true, + }, + { + "create contract tx with config param EnableCreate = false", + func() { + msg, err = suite.createContractGethMsg(vmdb.GetNonce(suite.address), signer, chainCfg, big.NewInt(1)) + suite.Require().NoError(err) + config.Params.EnableCreate = false + }, + true, + }, + } + + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.name), func() { + suite.SetupTest() + expectedGasUsed = params.TxGas + + proposerAddress := suite.ctx.BlockHeader().ProposerAddress + config, err = suite.app.EvmKeeper.EVMConfig(suite.ctx, proposerAddress) + suite.Require().NoError(err) + + keeperParams = suite.app.EvmKeeper.GetParams(suite.ctx) + chainCfg = keeperParams.ChainConfig.EthereumConfig(suite.app.EvmKeeper.ChainID()) + signer = ethtypes.LatestSignerForChainID(suite.app.EvmKeeper.ChainID()) + vmdb = suite.StateDB() + txConfig = suite.app.EvmKeeper.TxConfig(suite.ctx, common.Hash{}) + + tc.malleate() + res, err := suite.app.EvmKeeper.ApplyMessageWithConfig(suite.ctx, msg, nil, true, config, txConfig) + + if tc.expErr { + suite.Require().Error(err) + return + } + + suite.Require().NoError(err) + suite.Require().False(res.Failed()) + suite.Require().Equal(expectedGasUsed, res.GasUsed) + }) + } + +} + +func (suite *KeeperTestSuite) createContractGethMsg(nonce uint64, signer ethtypes.Signer, cfg *params.ChainConfig, gasPrice *big.Int) (core.Message, error) { + + ethMsg, err := suite.createContractMsgTx(nonce, signer, cfg, gasPrice) + + if err != nil { + return nil, err + } + + msgSigner := ethtypes.MakeSigner(cfg, big.NewInt(suite.ctx.BlockHeight())) + return ethMsg.AsMessage(msgSigner, nil) +} + +func (suite *KeeperTestSuite) createContractMsgTx(nonce uint64, signer ethtypes.Signer, cfg *params.ChainConfig, gasPrice *big.Int) (*types.MsgEthereumTx, error) { + + contractCreateTx := ðtypes.AccessListTx{ + GasPrice: gasPrice, + Gas: params.TxGasContractCreation, + To: nil, + Data: []byte("contract_data"), + Nonce: nonce, + } + ethTx := ethtypes.NewTx(contractCreateTx) + ethMsg := &types.MsgEthereumTx{} + ethMsg.FromEthereumTx(ethTx) + ethMsg.From = suite.address.Hex() + + return ethMsg, ethMsg.Sign(signer, suite.signer) +} + +func (suite *KeeperTestSuite) TestGetProposerAddress() { + var a sdk.ConsAddress + address := sdk.ConsAddress(suite.address.Bytes()) + proposerAddress := sdk.ConsAddress(suite.ctx.BlockHeader().ProposerAddress) + testCases := []struct { + msg string + adr sdk.ConsAddress + expAdr sdk.ConsAddress + }{ + { + "proposer address provided", + address, + address, + }, + { + "nil proposer address provided", + nil, + proposerAddress, + }, + { + "typed nil proposer address provided", + a, + proposerAddress, + }, + } + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.msg), func() { + suite.Require().Equal(tc.expAdr, keeper.GetProposerAddress(suite.ctx, tc.adr)) + }) + } +} diff --git a/x/evm/types/evm.pb.go b/x/evm/types/evm.pb.go index 42580f92ce..751624d7a5 100644 --- a/x/evm/types/evm.pb.go +++ b/x/evm/types/evm.pb.go @@ -6,7 +6,7 @@ package types import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" diff --git a/x/evm/types/genesis.pb.go b/x/evm/types/genesis.pb.go index 8185421060..69c5fc5103 100644 --- a/x/evm/types/genesis.pb.go +++ b/x/evm/types/genesis.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" diff --git a/x/evm/types/query.pb.go b/x/evm/types/query.pb.go index 9e05c73e22..e4786ff205 100644 --- a/x/evm/types/query.pb.go +++ b/x/evm/types/query.pb.go @@ -8,15 +8,15 @@ import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" + _ "github.com/gogo/protobuf/types" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - _ "google.golang.org/protobuf/types/known/timestamppb" io "io" math "math" math_bits "math/bits" @@ -792,6 +792,8 @@ type EthCallRequest struct { Args []byte `protobuf:"bytes,1,opt,name=args,proto3" json:"args,omitempty"` // the default gas cap to be used GasCap uint64 `protobuf:"varint,2,opt,name=gas_cap,json=gasCap,proto3" json:"gas_cap,omitempty"` + // the proposer of the requested block + ProposerAddress github_com_cosmos_cosmos_sdk_types.ConsAddress `protobuf:"bytes,3,opt,name=proposer_address,json=proposerAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"proposer_address,omitempty"` } func (m *EthCallRequest) Reset() { *m = EthCallRequest{} } @@ -841,6 +843,13 @@ func (m *EthCallRequest) GetGasCap() uint64 { return 0 } +func (m *EthCallRequest) GetProposerAddress() github_com_cosmos_cosmos_sdk_types.ConsAddress { + if m != nil { + return m.ProposerAddress + } + return nil +} + // EstimateGasResponse defines EstimateGas response type EstimateGasResponse struct { // the estimated gas @@ -902,6 +911,8 @@ type QueryTraceTxRequest struct { BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // block time of requested transaction BlockTime time.Time `protobuf:"bytes,7,opt,name=block_time,json=blockTime,proto3,stdtime" json:"block_time"` + // the proposer of the requested block + ProposerAddress github_com_cosmos_cosmos_sdk_types.ConsAddress `protobuf:"bytes,8,opt,name=proposer_address,json=proposerAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"proposer_address,omitempty"` } func (m *QueryTraceTxRequest) Reset() { *m = QueryTraceTxRequest{} } @@ -979,6 +990,13 @@ func (m *QueryTraceTxRequest) GetBlockTime() time.Time { return time.Time{} } +func (m *QueryTraceTxRequest) GetProposerAddress() github_com_cosmos_cosmos_sdk_types.ConsAddress { + if m != nil { + return m.ProposerAddress + } + return nil +} + // QueryTraceTxResponse defines TraceTx response type QueryTraceTxResponse struct { // response serialized in bytes @@ -1037,6 +1055,8 @@ type QueryTraceBlockRequest struct { BlockHash string `protobuf:"bytes,6,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"` // block time BlockTime time.Time `protobuf:"bytes,7,opt,name=block_time,json=blockTime,proto3,stdtime" json:"block_time"` + // the proposer of the requested block + ProposerAddress github_com_cosmos_cosmos_sdk_types.ConsAddress `protobuf:"bytes,8,opt,name=proposer_address,json=proposerAddress,proto3,casttype=github.com/cosmos/cosmos-sdk/types.ConsAddress" json:"proposer_address,omitempty"` } func (m *QueryTraceBlockRequest) Reset() { *m = QueryTraceBlockRequest{} } @@ -1107,6 +1127,13 @@ func (m *QueryTraceBlockRequest) GetBlockTime() time.Time { return time.Time{} } +func (m *QueryTraceBlockRequest) GetProposerAddress() github_com_cosmos_cosmos_sdk_types.ConsAddress { + if m != nil { + return m.ProposerAddress + } + return nil +} + // QueryTraceBlockResponse defines TraceBlock response type QueryTraceBlockResponse struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` @@ -1258,93 +1285,96 @@ func init() { func init() { proto.RegisterFile("ethermint/evm/v1/query.proto", fileDescriptor_e15a877459347994) } var fileDescriptor_e15a877459347994 = []byte{ - // 1371 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0x4d, 0x6f, 0x1b, 0x55, - 0x17, 0xce, 0xc4, 0x4e, 0xec, 0x1e, 0xa7, 0x7d, 0xf3, 0xde, 0xa6, 0xd4, 0x1d, 0x12, 0x3b, 0x9d, - 0x36, 0x9f, 0x4d, 0x67, 0x88, 0x41, 0x95, 0xa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, 0x2f, 0x73, 0xda, 0xf3, 0x97, 0x39, 0xed, 0xf7, 0x97, 0x39, 0xed, 0xc9, 0x61, - 0x6e, 0xea, 0xf9, 0x61, 0x6e, 0xea, 0x97, 0xc3, 0xdc, 0xd4, 0xe7, 0x41, 0xf1, 0x22, 0x5d, 0xae, - 0x5d, 0x03, 0x2f, 0x3d, 0xe1, 0x47, 0x08, 0x58, 0x65, 0x56, 0x28, 0xf0, 0xdb, 0xff, 0x04, 0x00, - 0x00, 0xff, 0xff, 0x7d, 0x85, 0x8e, 0xb2, 0x58, 0x10, 0x00, 0x00, + // 1415 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x56, 0xcd, 0x6f, 0x13, 0x47, + 0x1b, 0xcf, 0xc6, 0x4e, 0x6c, 0xc6, 0x01, 0xfc, 0x0e, 0xe1, 0xc5, 0xec, 0x9b, 0xd8, 0x61, 0x21, + 0x9f, 0x84, 0xdd, 0x37, 0x6e, 0x85, 0x54, 0x2e, 0x05, 0x5b, 0x81, 0xb6, 0x40, 0x45, 0xb7, 0x51, + 0x0f, 0x95, 0x90, 0x35, 0x5e, 0x0f, 0x6b, 0x2b, 0xf6, 0x8e, 0xd9, 0x19, 0xbb, 0x0e, 0x94, 0x1e, + 0x2a, 0x15, 0x51, 0x71, 0x41, 0xea, 0xb5, 0xaa, 0xf8, 0x0f, 0xfa, 0x57, 0x54, 0xe2, 0x88, 0xd4, + 0x4b, 0xd5, 0x03, 0xad, 0xa0, 0x87, 0xde, 0x7a, 0xe8, 0xad, 0xa7, 0x6a, 0x3e, 0xd6, 0x5e, 0x7b, + 0xbd, 0x76, 0xa8, 0xb8, 0xf5, 0xb4, 0x3b, 0x33, 0xcf, 0x3c, 0xcf, 0xef, 0xf9, 0x98, 0xe7, 0xf9, + 0x81, 0x25, 0xcc, 0xea, 0xd8, 0x6f, 0x35, 0x3c, 0x66, 0xe1, 0x6e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d, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xcd, + 0x1e, 0xee, 0xb9, 0x76, 0x11, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2419,6 +2449,13 @@ func (m *EthCallRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.ProposerAddress) > 0 { + i -= len(m.ProposerAddress) + copy(dAtA[i:], m.ProposerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ProposerAddress))) + i-- + dAtA[i] = 0x1a + } if m.GasCap != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.GasCap)) i-- @@ -2482,6 +2519,13 @@ func (m *QueryTraceTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.ProposerAddress) > 0 { + i -= len(m.ProposerAddress) + copy(dAtA[i:], m.ProposerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ProposerAddress))) + i-- + dAtA[i] = 0x42 + } n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.BlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.BlockTime):]) if err4 != nil { return 0, err4 @@ -2593,6 +2637,13 @@ func (m *QueryTraceBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) _ = i var l int _ = l + if len(m.ProposerAddress) > 0 { + i -= len(m.ProposerAddress) + copy(dAtA[i:], m.ProposerAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ProposerAddress))) + i-- + dAtA[i] = 0x42 + } n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.BlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.BlockTime):]) if err7 != nil { return 0, err7 @@ -2989,6 +3040,10 @@ func (m *EthCallRequest) Size() (n int) { if m.GasCap != 0 { n += 1 + sovQuery(uint64(m.GasCap)) } + l = len(m.ProposerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -3033,6 +3088,10 @@ func (m *QueryTraceTxRequest) Size() (n int) { } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.BlockTime) n += 1 + l + sovQuery(uint64(l)) + l = len(m.ProposerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -3074,6 +3133,10 @@ func (m *QueryTraceBlockRequest) Size() (n int) { } l = github_com_gogo_protobuf_types.SizeOfStdTime(m.BlockTime) n += 1 + l + sovQuery(uint64(l)) + l = len(m.ProposerAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } return n } @@ -4716,6 +4779,40 @@ func (m *EthCallRequest) Unmarshal(dAtA []byte) error { break } } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ProposerAddress == nil { + m.ProposerAddress = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -5025,6 +5122,40 @@ func (m *QueryTraceTxRequest) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ProposerAddress == nil { + m.ProposerAddress = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -5313,6 +5444,40 @@ func (m *QueryTraceBlockRequest) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ProposerAddress == nil { + m.ProposerAddress = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) diff --git a/x/evm/types/query.pb.gw.go b/x/evm/types/query.pb.gw.go index e7ba285896..c2e3b7f1b3 100644 --- a/x/evm/types/query.pb.gw.go +++ b/x/evm/types/query.pb.gw.go @@ -20,6 +20,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -30,6 +31,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join func request_Query_Account_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryAccountRequest @@ -560,12 +562,14 @@ func local_request_Query_BaseFee_0(ctx context.Context, marshaler runtime.Marsha // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Account_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -573,6 +577,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Account_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -586,6 +591,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_CosmosAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -593,6 +600,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_CosmosAccount_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -606,6 +614,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_ValidatorAccount_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -613,6 +623,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ValidatorAccount_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -626,6 +637,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Balance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -633,6 +646,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Balance_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -646,6 +660,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Storage_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -653,6 +669,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Storage_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -666,6 +683,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Code_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -673,6 +692,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Code_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -686,6 +706,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -693,6 +715,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -706,6 +729,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_EthCall_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -713,6 +738,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_EthCall_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -726,6 +752,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_EstimateGas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -733,6 +761,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_EstimateGas_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -746,6 +775,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_TraceTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -753,6 +784,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_TraceTx_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -766,6 +798,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_TraceBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -773,6 +807,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_TraceBlock_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -786,6 +821,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_BaseFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -793,6 +830,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_BaseFee_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -1088,29 +1126,29 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Account_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "evm", "v1", "account", "address"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Account_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "evm", "v1", "account", "address"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_CosmosAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "evm", "v1", "cosmos_account", "address"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_CosmosAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "evm", "v1", "cosmos_account", "address"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ValidatorAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "evm", "v1", "validator_account", "cons_address"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ValidatorAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "evm", "v1", "validator_account", "cons_address"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Balance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "evm", "v1", "balances", "address"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Balance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "evm", "v1", "balances", "address"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Storage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"ethermint", "evm", "v1", "storage", "address", "key"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Storage_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"ethermint", "evm", "v1", "storage", "address", "key"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Code_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "evm", "v1", "codes", "address"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Code_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ethermint", "evm", "v1", "codes", "address"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "params"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_EthCall_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "eth_call"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_EthCall_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "eth_call"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_EstimateGas_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "estimate_gas"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_EstimateGas_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "estimate_gas"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_TraceTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "trace_tx"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_TraceTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "trace_tx"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_TraceBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "trace_block"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_TraceBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "trace_block"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_BaseFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "base_fee"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_BaseFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "base_fee"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/evm/types/tx.pb.go b/x/evm/types/tx.pb.go index 883fa0013b..05a0ad975b 100644 --- a/x/evm/types/tx.pb.go +++ b/x/evm/types/tx.pb.go @@ -7,12 +7,12 @@ import ( context "context" encoding_binary "encoding/binary" fmt "fmt" + _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" - _ "github.com/regen-network/cosmos-proto" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -354,61 +354,61 @@ func init() { func init() { proto.RegisterFile("ethermint/evm/v1/tx.proto", fileDescriptor_f75ac0a12d075f21) } var fileDescriptor_f75ac0a12d075f21 = []byte{ - // 851 bytes of a gzipped FileDescriptorProto + // 852 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0x4f, 0x6f, 0xe3, 0x44, 0x14, 0xcf, 0x24, 0x4e, 0xec, 0x4c, 0xc2, 0x6a, 0x65, 0x75, 0x25, 0x27, 0x62, 0xe3, 0xc8, 0x12, 0x10, 0x90, 0x62, 0x6b, 0x0b, 0xa7, 0x9e, 0xb6, 0xd9, 0xfe, 0x51, 0xab, 0x54, 0x20, 0x2b, 0x5c, 0xe8, 0x21, 0x9a, 0x3a, 0x53, 0xc7, 0x22, 0xf6, 0x58, 0x9e, 0x89, 0xe5, 0x20, 0x71, 0x41, 0x1c, - 0xb8, 0x81, 0xc4, 0x17, 0xe0, 0xc0, 0x89, 0x2b, 0x7c, 0x00, 0x8e, 0x3d, 0x56, 0x70, 0x41, 0x1c, - 0x0c, 0x4a, 0x39, 0xf5, 0x06, 0x9f, 0x00, 0xcd, 0xd8, 0x69, 0x1a, 0xa2, 0x14, 0x28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 0xb9, 0x9c, 0x96, 0x81, 0x12, 0x11, 0x4a, 0x68, 0xea, - 0xac, 0x22, 0x56, 0xed, 0xdb, 0x7f, 0x06, 0x00, 0x00, 0xff, 0xff, 0x9e, 0x31, 0x9d, 0x29, 0x4e, - 0x08, 0x00, 0x00, + 0xb8, 0x81, 0xc4, 0x17, 0xe0, 0xc0, 0x89, 0x2b, 0x7c, 0x00, 0x8e, 0x15, 0xa7, 0x4a, 0x5c, 0x10, + 0x07, 0x83, 0x52, 0x4e, 0xbd, 0xc1, 0x27, 0x40, 0x33, 0x76, 0x9a, 0x86, 0x28, 0x05, 0x4a, 0xd1, + 0x9e, 0x32, 0xcf, 0xbf, 0x37, 0x6f, 0xde, 0x7b, 0xbf, 0x5f, 0xde, 0x83, 0x0d, 0xcc, 0xc6, 0x38, + 0xf2, 0xbd, 0x80, 0x59, 0x38, 0xf6, 0xad, 0xf8, 0x99, 0xc5, 0x12, 0x33, 0x8c, 0x08, 0x23, 0xea, + 0xe3, 0x1b, 0xc8, 0xc4, 0xb1, 0x6f, 0xc6, 0xcf, 0x9a, 0x5b, 0x2e, 0x71, 0x89, 0x00, 0x2d, 0x7e, + 0xca, 0xfc, 0x9a, 0xaf, 0xba, 0x84, 0xb8, 0x13, 0x6c, 0xa1, 0xd0, 0xb3, 0x50, 0x10, 0x10, 0x86, + 0x98, 0x47, 0x02, 0x9a, 0xa3, 0x8d, 0x1c, 0x15, 0xd6, 0xd9, 0xf4, 0xdc, 0x42, 0xc1, 0x6c, 0x01, + 0x39, 0x84, 0xfa, 0x84, 0x0e, 0xb3, 0x88, 0x99, 0x91, 0x43, 0xcd, 0xb5, 0xb4, 0x78, 0x0a, 0x02, + 0x33, 0x3e, 0x07, 0xf0, 0x95, 0x13, 0xea, 0xee, 0x73, 0x0f, 0x3c, 0xf5, 0x07, 0x89, 0xda, 0x81, + 0xd2, 0x08, 0x31, 0xa4, 0x81, 0x36, 0xe8, 0xd4, 0xb6, 0xb7, 0xcc, 0xec, 0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+ 0x4a, 0x2d, 0xcd, 0x37, 0xfe, 0xc6, 0x61, 0x51, 0xac, 0xf1, 0xda, 0x27, 0x3f, 0xfe, 0xf6, 0x65, + 0x51, 0x37, 0x9e, 0x5a, 0xeb, 0xeb, 0x34, 0xf7, 0x1e, 0xb2, 0xa4, 0xf7, 0xfc, 0x62, 0xde, 0x02, + 0x97, 0xf3, 0x16, 0xf8, 0x75, 0xde, 0x02, 0x5f, 0x5c, 0xb5, 0x0a, 0x97, 0x57, 0xad, 0xc2, 0x4f, + 0x57, 0xad, 0xc2, 0x07, 0xb7, 0xf5, 0x84, 0x63, 0x2e, 0xa7, 0x65, 0xa0, 0x44, 0x84, 0x12, 0x9a, + 0x3a, 0xab, 0x88, 0x55, 0xfb, 0xf6, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x40, 0x52, 0x65, 0x8f, + 0x4e, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/evm/types/tx.pb.gw.go b/x/evm/types/tx.pb.gw.go index a74e123efd..f58f9572d6 100644 --- a/x/evm/types/tx.pb.gw.go +++ b/x/evm/types/tx.pb.gw.go @@ -20,6 +20,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -30,6 +31,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join var ( filter_Msg_EthereumTx_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} @@ -70,12 +72,14 @@ func local_request_Msg_EthereumTx_0(ctx context.Context, marshaler runtime.Marsh // RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". // UnaryRPC :call MsgServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterMsgHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMsgHandlerFromEndpoint instead. func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error { mux.Handle("POST", pattern_Msg_EthereumTx_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -83,6 +87,7 @@ func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server return } resp, md, err := local_request_Msg_EthereumTx_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -158,7 +163,7 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client } var ( - pattern_Msg_EthereumTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "ethereum_tx"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Msg_EthereumTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "evm", "v1", "ethereum_tx"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/feemarket/types/feemarket.pb.go b/x/feemarket/types/feemarket.pb.go index 2ed40604bd..be30ff3cd9 100644 --- a/x/feemarket/types/feemarket.pb.go +++ b/x/feemarket/types/feemarket.pb.go @@ -6,7 +6,7 @@ package types import ( fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" diff --git a/x/feemarket/types/genesis.pb.go b/x/feemarket/types/genesis.pb.go index 60e1b3eac4..ff230f09db 100644 --- a/x/feemarket/types/genesis.pb.go +++ b/x/feemarket/types/genesis.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" math "math" diff --git a/x/feemarket/types/query.pb.go b/x/feemarket/types/query.pb.go index e1326ae2a9..bb4466bc5f 100644 --- a/x/feemarket/types/query.pb.go +++ b/x/feemarket/types/query.pb.go @@ -7,7 +7,7 @@ import ( context "context" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/gogo/protobuf/gogoproto" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" diff --git a/x/feemarket/types/query.pb.gw.go b/x/feemarket/types/query.pb.gw.go index 9836c4d8cd..729d5aa99f 100644 --- a/x/feemarket/types/query.pb.gw.go +++ b/x/feemarket/types/query.pb.gw.go @@ -20,6 +20,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -30,6 +31,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryParamsRequest @@ -88,12 +90,14 @@ func local_request_Query_BlockGas_0(ctx context.Context, marshaler runtime.Marsh // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -101,6 +105,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -114,6 +119,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_BaseFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -121,6 +128,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_BaseFee_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -134,6 +142,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_BlockGas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -141,6 +151,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_BlockGas_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -256,11 +267,11 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "feemarket", "v1", "params"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "feemarket", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_BaseFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "feemarket", "v1", "base_fee"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_BaseFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "feemarket", "v1", "base_fee"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_BlockGas_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "feemarket", "v1", "block_gas"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_BlockGas_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ethermint", "feemarket", "v1", "block_gas"}, "", runtime.AssumeColonVerbOpt(false))) ) var (