Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

fix: chain-id in grpc query is not initialized without abci event #1405

Merged
merged 41 commits into from
Nov 18, 2022
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
879318f
fix: chain-id in grpc query is not initialized without abci event
yihuang Oct 27, 2022
704273f
Update CHANGELOG.md
yihuang Oct 27, 2022
7d9871d
only override if input is not empty
yihuang Oct 27, 2022
b21fa51
Merge remote-tracking branch 'fork/main'
yihuang Oct 27, 2022
879178b
add comment to chain id
yihuang Oct 27, 2022
7315adf
pass chain-id to state transition
yihuang Oct 28, 2022
9b9fab0
Merge branch 'main' into main
yihuang Oct 28, 2022
d286dca
Update x/evm/keeper/grpc_query.go
yihuang Oct 28, 2022
ff915fa
Apply suggestions from code review
yihuang Oct 28, 2022
3f34c7b
fix golang lint
yihuang Oct 28, 2022
c3a7177
Merge remote-tracking branch 'fork/main'
yihuang Oct 28, 2022
eb55c9f
Merge branch 'main' into main
yihuang Oct 28, 2022
de63d8d
update gomod2nix.toml
yihuang Oct 28, 2022
34fe936
Merge remote-tracking branch 'fork/main'
yihuang Oct 28, 2022
9fecbd1
fix unit tests
yihuang Oct 29, 2022
17aa02d
update gomod2nix
yihuang Oct 29, 2022
de2ee2c
Merge branch 'main' into main
yihuang Oct 31, 2022
710d811
api breaking changelog
yihuang Oct 31, 2022
86773b6
add unit tests, and fix TraceBlock by the way
yihuang Oct 31, 2022
dd00580
Update CHANGELOG.md
fedekunze Nov 1, 2022
5ee7bd1
Merge branch 'main' into main
fedekunze Nov 2, 2022
b7c9824
Merge remote-tracking branch 'origin/main'
yihuang Nov 9, 2022
f3fda5b
Merge branch 'main' into main
yihuang Nov 10, 2022
ecf8f89
test --grpc-only mode in integration tests
yihuang Nov 10, 2022
5ce1586
Merge remote-tracking branch 'fork/main'
yihuang Nov 10, 2022
08a63ea
Merge branch 'main' into main
yihuang Nov 10, 2022
94d98c9
remove tmp var
yihuang Nov 10, 2022
a2b1259
Merge remote-tracking branch 'fork/main'
yihuang Nov 10, 2022
0e38258
Update tests/integration_tests/test_grpc_only.py
yihuang Nov 10, 2022
16a50a1
Update x/evm/keeper/grpc_query_test.go
yihuang Nov 11, 2022
e8ac732
Merge branch 'main' into main
yihuang Nov 11, 2022
f70990b
Merge branch 'main' into main
facs95 Nov 14, 2022
d029534
fix linters
yihuang Nov 15, 2022
2d4de7e
Merge branch 'main' into main
facs95 Nov 17, 2022
ca38164
fix nil pointer in tests
facs95 Nov 17, 2022
abfb0a3
Merge branch 'main' into yihuang/main
facs95 Nov 17, 2022
e4636be
fix conflicts
facs95 Nov 17, 2022
9e0d9e5
fix conflicts
facs95 Nov 17, 2022
929c790
fixes
facs95 Nov 18, 2022
749d981
fix lint
yihuang Nov 18, 2022
6d17c66
fix unit test
facs95 Nov 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### API Breaking

* (ante) [#1214](https://github.com/evmos/ethermint/pull/1214) Set mempool priority to EVM transactions.
* (evm) [#1405](https://github.com/evmos/ethermint/pull/1405) Add parameter `chainID` to evm keeper's `EVMConfig` method, so caller can choose to not use the cached `eip155ChainID`.

### Improvements

Expand Down Expand Up @@ -85,6 +86,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (state) [#1320](https://github.com/evmos/ethermint/pull/1320) Fix codehash check mismatch when the code has been deleted in the evm state.
* (rpc) [#1392](https://github.com/evmos/ethermint/pull/1392) Allow fill the proposer address in json-rpc through tendermint api, and pass explicitly to grpc query handler.
* (rpc) [#1431](https://github.com/evmos/ethermint/pull/1431) Align hex-strings proof fields in `eth_getProof` as Ethereum.
* (rpc) [#1405](https://github.com/evmos/ethermint/pull/1405) Fix uninitialized chain ID field in gRPC requests.

## [v0.19.3] - 2022-10-14

Expand Down
9 changes: 5 additions & 4 deletions client/docs/statik/statik.go

Large diffs are not rendered by default.

127 changes: 101 additions & 26 deletions client/docs/swagger-ui/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1301,6 +1301,18 @@ paths:
required: false
type: string
format: uint64
- name: proposer_address
description: the proposer of the requested block.
in: query
required: false
type: string
format: byte
- name: chain_id
description: the eip155 chain id parsed from the requested block header.
in: query
required: false
type: string
format: int64
tags:
- Query
/ethermint/evm/v1/eth_call:
Expand Down Expand Up @@ -1599,6 +1611,18 @@ paths:
required: false
type: string
format: uint64
- name: proposer_address
description: the proposer of the requested block.
in: query
required: false
type: string
format: byte
- name: chain_id
description: the eip155 chain id parsed from the requested block header.
in: query
required: false
type: string
format: int64
tags:
- Query
/ethermint/evm/v1/params:
Expand Down Expand Up @@ -1713,11 +1737,16 @@ paths:
title: >-
Eip-4345 (bomb delay) switch block (nil = no fork, 0 =
already activated)
merge_fork_block:
gray_glacier_block:
type: string
title: >-
EIP-3675 (TheMerge) switch block (nil = no fork, 0 =
already in merge proceedings)
EIP-5133 (bomb delay) switch block (nil = no fork, 0 =
already activated)
merge_netsplit_block:
type: string
title: >-
Virtual fork after The Merge to use as a network
splitter
description: >-
ChainConfig defines the Ethereum ChainConfig parameters
using *sdk.Int values
Expand All @@ -1727,7 +1756,7 @@ paths:
type: boolean
description: >-
Allow unprotected transactions defines if replay-protected
(i.e non EIP155
(i.e non EIP155

signed) transactions can be executed on the state machine.
title: Params defines the EVM module parameters
Expand Down Expand Up @@ -2481,10 +2510,15 @@ paths:
in: query
required: false
type: string
- name: trace_config.overrides.merge_fork_block
- name: trace_config.overrides.gray_glacier_block
description: >-
EIP-3675 (TheMerge) switch block (nil = no fork, 0 = already in
merge proceedings).
EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already
activated).
in: query
required: false
type: string
- name: trace_config.overrides.merge_netsplit_block
description: Virtual fork after The Merge to use as a network splitter.
in: query
required: false
type: string
Expand Down Expand Up @@ -2515,6 +2549,18 @@ paths:
required: false
type: string
format: date-time
- name: proposer_address
description: the proposer of the requested block.
in: query
required: false
type: string
format: byte
- name: chain_id
description: the eip155 chain id parsed from the requested block header.
in: query
required: false
type: string
format: int64
tags:
- Query
/ethermint/evm/v1/trace_tx:
Expand Down Expand Up @@ -2783,7 +2829,7 @@ paths:
type: string
format: byte
- name: msg.size
description: encoded storage size of the transaction.
description: 'DEPRECATED: encoded storage size of the transaction.'
in: query
required: false
type: number
Expand Down Expand Up @@ -2927,10 +2973,15 @@ paths:
in: query
required: false
type: string
- name: trace_config.overrides.merge_fork_block
- name: trace_config.overrides.gray_glacier_block
description: >-
EIP-3675 (TheMerge) switch block (nil = no fork, 0 = already in
merge proceedings).
EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already
activated).
in: query
required: false
type: string
- name: trace_config.overrides.merge_netsplit_block
description: Virtual fork after The Merge to use as a network splitter.
in: query
required: false
type: string
Expand Down Expand Up @@ -2961,6 +3012,18 @@ paths:
required: false
type: string
format: date-time
- name: proposer_address
description: the proposer of the requested block.
in: query
required: false
type: string
format: byte
- name: chain_id
description: the eip155 chain id parsed from the requested block header.
in: query
required: false
type: string
format: int64
tags:
- Query
/ethermint/evm/v1/validator_account/{cons_address}:
Expand Down Expand Up @@ -14111,11 +14174,14 @@ definitions:
title: >-
Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already
activated)
merge_fork_block:
gray_glacier_block:
type: string
title: >-
EIP-3675 (TheMerge) switch block (nil = no fork, 0 = already in merge
proceedings)
EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already
activated)
merge_netsplit_block:
type: string
title: Virtual fork after The Merge to use as a network splitter
description: >-
ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int
values
Expand Down Expand Up @@ -14344,7 +14410,7 @@ definitions:
size:
type: number
format: double
title: encoded storage size of the transaction
title: 'DEPRECATED: encoded storage size of the transaction'
hash:
type: string
title: transaction hash in hex format
Expand Down Expand Up @@ -14515,11 +14581,14 @@ definitions:
title: >-
Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already
activated)
merge_fork_block:
gray_glacier_block:
type: string
title: >-
EIP-3675 (TheMerge) switch block (nil = no fork, 0 = already in
merge proceedings)
EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already
activated)
merge_netsplit_block:
type: string
title: Virtual fork after The Merge to use as a network splitter
description: >-
ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int
values
Expand All @@ -14529,7 +14598,7 @@ definitions:
type: boolean
description: >-
Allow unprotected transactions defines if replay-protected (i.e non
EIP155
EIP155

signed) transactions can be executed on the state machine.
title: Params defines the EVM module parameters
Expand Down Expand Up @@ -14684,11 +14753,14 @@ definitions:
title: >-
Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already
activated)
merge_fork_block:
gray_glacier_block:
type: string
title: >-
EIP-3675 (TheMerge) switch block (nil = no fork, 0 = already
in merge proceedings)
EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already
activated)
merge_netsplit_block:
type: string
title: Virtual fork after The Merge to use as a network splitter
description: >-
ChainConfig defines the Ethereum ChainConfig parameters using
*sdk.Int values
Expand All @@ -14698,7 +14770,7 @@ definitions:
type: boolean
description: >-
Allow unprotected transactions defines if replay-protected (i.e
non EIP155
non EIP155

signed) transactions can be executed on the state machine.
title: Params defines the EVM module parameters
Expand Down Expand Up @@ -14839,11 +14911,14 @@ definitions:
title: >-
Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already
activated)
merge_fork_block:
gray_glacier_block:
type: string
title: >-
EIP-3675 (TheMerge) switch block (nil = no fork, 0 = already in
merge proceedings)
EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already
activated)
merge_netsplit_block:
type: string
title: Virtual fork after The Merge to use as a network splitter
description: >-
ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int
values
Expand Down
3 changes: 3 additions & 0 deletions docs/api/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,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 |
| `chain_id` | [int64](#int64) | | the eip155 chain id parsed from the requested block header |



Expand Down Expand Up @@ -794,6 +795,7 @@ QueryTraceBlockRequest defines TraceTx request
| `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 |
| `chain_id` | [int64](#int64) | | the eip155 chain id parsed from the requested block header |



Expand Down Expand Up @@ -830,6 +832,7 @@ QueryTraceTxRequest defines TraceTx request
| `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 |
| `chain_id` | [int64](#int64) | | the eip155 chain id parsed from the requested block header |



Expand Down
11 changes: 5 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ require (
github.com/tyler-smith/go-bip39 v1.1.0
golang.org/x/net v0.2.0
golang.org/x/text v0.4.0
google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e
google.golang.org/genproto v0.0.0-20221116193143-41c2ba794472
google.golang.org/grpc v1.50.1
google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8
sigs.k8s.io/yaml v1.3.0
)

require (
cloud.google.com/go v0.104.0 // indirect
cloud.google.com/go v0.105.0 // indirect
cloud.google.com/go/compute v1.12.1 // indirect
cloud.google.com/go/compute/metadata v0.2.1 // indirect
cloud.google.com/go/iam v0.4.0 // indirect
cloud.google.com/go/storage v1.23.0 // indirect
cloud.google.com/go/iam v0.7.0 // indirect
cloud.google.com/go/storage v1.27.0 // indirect
filippo.io/edwards25519 v1.0.0-rc.1 // indirect
github.com/99designs/keyring v1.2.1 // indirect
github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect
Expand Down Expand Up @@ -108,7 +108,6 @@ require (
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect
github.com/googleapis/gax-go/v2 v2.6.0 // indirect
github.com/googleapis/go-type-adapters v1.0.0 // indirect
github.com/gorilla/handlers v1.5.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
Expand Down Expand Up @@ -174,7 +173,7 @@ require (
github.com/zondax/hid v0.9.1-0.20220302062450-5552068d2266 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/crypto v0.3.0 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect
golang.org/x/sync v0.1.0 // indirect
Expand Down
Loading