evm: remove tx logs and block bloom from chain state (#556)

Closes #452

fix unit tests

changelog and fix lint

fix unit test

Update ethereum/rpc/backend/backend.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

Update ethereum/rpc/backend/utils.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>

changelog

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
yihuang
2021-09-15 09:45:03 +00:00
committed by GitHub
co-authored by Federico Kunze Küllmer
parent 3f1eeb30b6
commit 116de54617
28 changed files with 1972 additions and 3406 deletions
-72
View File
@@ -40,10 +40,6 @@
- [QueryAccountResponse](#ethermint.evm.v1.QueryAccountResponse)
- [QueryBalanceRequest](#ethermint.evm.v1.QueryBalanceRequest)
- [QueryBalanceResponse](#ethermint.evm.v1.QueryBalanceResponse)
- [QueryBlockBloomRequest](#ethermint.evm.v1.QueryBlockBloomRequest)
- [QueryBlockBloomResponse](#ethermint.evm.v1.QueryBlockBloomResponse)
- [QueryBlockLogsRequest](#ethermint.evm.v1.QueryBlockLogsRequest)
- [QueryBlockLogsResponse](#ethermint.evm.v1.QueryBlockLogsResponse)
- [QueryCodeRequest](#ethermint.evm.v1.QueryCodeRequest)
- [QueryCodeResponse](#ethermint.evm.v1.QueryCodeResponse)
- [QueryCosmosAccountRequest](#ethermint.evm.v1.QueryCosmosAccountRequest)
@@ -372,7 +368,6 @@ GenesisState defines the evm module's genesis state.
| ----- | ---- | ----- | ----------- |
| `accounts` | [GenesisAccount](#ethermint.evm.v1.GenesisAccount) | repeated | accounts is an array containing the ethereum genesis accounts. |
| `params` | [Params](#ethermint.evm.v1.Params) | | params defines all the paramaters of the module. |
| `txs_logs` | [TransactionLogs](#ethermint.evm.v1.TransactionLogs) | repeated | |
@@ -637,70 +632,6 @@ QueryBalanceResponse is the response type for the Query/Balance RPC method.
<a name="ethermint.evm.v1.QueryBlockBloomRequest"></a>
### QueryBlockBloomRequest
QueryBlockBloomRequest is the request type for the Query/BlockBloom RPC
method.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `height` | [int64](#int64) | | height of the block which we want to query the bloom filter. Tendermint always replace the query request header by the current context header, height cannot be extracted from there, so we need to explicitly pass it in parameter. |
<a name="ethermint.evm.v1.QueryBlockBloomResponse"></a>
### QueryBlockBloomResponse
QueryBlockBloomResponse is the response type for the Query/BlockBloom RPC
method.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `bloom` | [bytes](#bytes) | | bloom represents bloom filter for the given block hash. |
<a name="ethermint.evm.v1.QueryBlockLogsRequest"></a>
### QueryBlockLogsRequest
QueryBlockLogsRequest is the request type for the Query/BlockLogs RPC method.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `hash` | [string](#string) | | hash is the block hash to query the logs for. |
| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. |
<a name="ethermint.evm.v1.QueryBlockLogsResponse"></a>
### QueryBlockLogsResponse
QueryTxLogs is the response type for the Query/BlockLogs RPC method.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `tx_logs` | [TransactionLogs](#ethermint.evm.v1.TransactionLogs) | repeated | logs represents the ethereum logs generated at the given block hash. |
| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. |
<a name="ethermint.evm.v1.QueryCodeRequest"></a>
### QueryCodeRequest
@@ -955,9 +886,6 @@ Query defines the gRPC querier service.
| `Balance` | [QueryBalanceRequest](#ethermint.evm.v1.QueryBalanceRequest) | [QueryBalanceResponse](#ethermint.evm.v1.QueryBalanceResponse) | Balance queries the balance of a the EVM denomination for a single EthAccount. | GET|/ethermint/evm/v1/balances/{address}|
| `Storage` | [QueryStorageRequest](#ethermint.evm.v1.QueryStorageRequest) | [QueryStorageResponse](#ethermint.evm.v1.QueryStorageResponse) | Storage queries the balance of all coins for a single account. | GET|/ethermint/evm/v1/storage/{address}/{key}|
| `Code` | [QueryCodeRequest](#ethermint.evm.v1.QueryCodeRequest) | [QueryCodeResponse](#ethermint.evm.v1.QueryCodeResponse) | Code queries the balance of all coins for a single account. | GET|/ethermint/evm/v1/codes/{address}|
| `TxLogs` | [QueryTxLogsRequest](#ethermint.evm.v1.QueryTxLogsRequest) | [QueryTxLogsResponse](#ethermint.evm.v1.QueryTxLogsResponse) | TxLogs queries ethereum logs from a transaction. | GET|/ethermint/evm/v1/tx_logs/{hash}|
| `BlockLogs` | [QueryBlockLogsRequest](#ethermint.evm.v1.QueryBlockLogsRequest) | [QueryBlockLogsResponse](#ethermint.evm.v1.QueryBlockLogsResponse) | BlockLogs queries all the ethereum logs for a given block hash. | GET|/ethermint/evm/v1/block_logs/{hash}|
| `BlockBloom` | [QueryBlockBloomRequest](#ethermint.evm.v1.QueryBlockBloomRequest) | [QueryBlockBloomResponse](#ethermint.evm.v1.QueryBlockBloomResponse) | BlockBloom queries the block bloom filter bytes at a given height. | GET|/ethermint/evm/v1/block_bloom|
| `Params` | [QueryParamsRequest](#ethermint.evm.v1.QueryParamsRequest) | [QueryParamsResponse](#ethermint.evm.v1.QueryParamsResponse) | Params queries the parameters of x/evm module. | GET|/ethermint/evm/v1/params|
| `EthCall` | [EthCallRequest](#ethermint.evm.v1.EthCallRequest) | [MsgEthereumTxResponse](#ethermint.evm.v1.MsgEthereumTxResponse) | EthCall implements the `eth_call` rpc api | GET|/ethermint/evm/v1/eth_call|
| `EstimateGas` | [EthCallRequest](#ethermint.evm.v1.EthCallRequest) | [EstimateGasResponse](#ethermint.evm.v1.EstimateGasResponse) | EstimateGas implements the `eth_estimateGas` rpc api | GET|/ethermint/evm/v1/estimate_gas|