rpc, evm: remove tx Receipt (#81)

* rpc, evm: remove tc receipt

* rm receipt from gRPC query service

* update eth block

* update tx service response

* rpc tx fixes

* update bloom

* fix

* more fixes

* c++
This commit is contained in:
Federico Kunze
2021-06-08 07:11:37 -04:00
committed by GitHub
parent e3270aee5d
commit 6eadc8fdf8
27 changed files with 458 additions and 1820 deletions
+19 -25
View File
@@ -102,12 +102,12 @@ message ChainConfig {
(gogoproto.moretags) = "yaml:\"muir_glacier_block\"",
(gogoproto.nullable) = false
];
// Berlin switch block (< 0 = 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.nullable) = false
];
// Berlin switch block (< 0 = 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.nullable) = false
];
// YOLO v3: Gas repricings
string yolo_v3_block = 14 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
@@ -180,13 +180,13 @@ message Log {
message TxReceipt {
option (gogoproto.goproto_getters) = false;
string hash = 1;
string from = 2;
TxData data = 3;
TxResult result = 4;
uint64 index = 5;
string hash = 1;
string from = 2;
TxData data = 3;
TxResult result = 4;
uint64 index = 5;
uint64 block_height = 6;
string block_hash = 7;
string block_hash = 7;
}
// TxResult stores results of Tx execution.
@@ -216,10 +216,7 @@ message TxData {
option (gogoproto.goproto_getters) = false;
// destination EVM chain ID
bytes chain_id = 1 [
(gogoproto.customname) = "ChainID",
(gogoproto.jsontag) = "chainID"
];
bytes chain_id = 1 [(gogoproto.customname) = "ChainID", (gogoproto.jsontag) = "chainID"];
// nonce corresponds to the account nonce (transaction sequence).
uint64 nonce = 2;
// price defines the unsigned integer value of the gas price in bytes.
@@ -227,16 +224,13 @@ message TxData {
// gas defines the gas limit defined for the transaction.
uint64 gas = 4 [(gogoproto.customname) = "GasLimit"];
// hex formatted address of the recipient
string to = 5;
string to = 5;
// value defines the unsigned integer value of the transaction amount.
bytes value = 6 [(gogoproto.customname) = "Amount"];
// input defines the data payload bytes of the transaction.
bytes input = 7;
repeated AccessTuple accesses = 8 [
(gogoproto.castrepeated) = "AccessList",
(gogoproto.jsontag) = "accessList",
(gogoproto.nullable) = false
];
bytes input = 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
@@ -256,7 +250,7 @@ message AccessTuple {
option (gogoproto.goproto_getters) = false;
// hex formatted ethereum address
string address = 1;
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"];
}
+1 -36
View File
@@ -41,16 +41,6 @@ service Query {
option (google.api.http).get = "/ethermint/evm/v1alpha1/tx_logs/{hash}";
}
// TxReceipt queries a receipt by a transaction hash.
rpc TxReceipt(QueryTxReceiptRequest) returns (QueryTxReceiptResponse) {
option (google.api.http).get = "/ethermint/evm/v1alpha1/tx_receipt/{hash}";
}
// TxReceiptsByBlockHeight queries tx receipts by a block height.
rpc TxReceiptsByBlockHeight(QueryTxReceiptsByBlockHeightRequest) returns (QueryTxReceiptsByBlockHeightResponse) {
option (google.api.http).get = "/ethermint/evm/v1alpha1/tx_receipts_block";
}
// BlockLogs queries all the ethereum logs for a given block hash.
rpc BlockLogs(QueryBlockLogsRequest) returns (QueryBlockLogsResponse) {
option (google.api.http).get = "/ethermint/evm/v1alpha1/block_logs/{hash}";
@@ -175,31 +165,6 @@ message QueryTxLogsResponse {
repeated Log logs = 1;
}
// QueryTxReceiptRequest is the request type for the Query/TxReceipt RPC method.
message QueryTxReceiptRequest {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
// hash is the ethereum transaction hex hash to query the receipt for.
string hash = 1;
}
// QueryTxReceiptResponse is the response type for the Query/TxReceipt RPC method.
message QueryTxReceiptResponse {
// receipt represents the ethereum receipt for the given transaction.
TxReceipt receipt = 1;
}
// QueryTxReceiptsByBlockHeightRequest is the request type for the Query/TxReceiptsByBlockHeight RPC method.
message QueryTxReceiptsByBlockHeightRequest {
}
// QueryTxReceiptsByBlockHeightResponse is the response type for the Query/TxReceiptsByBlockHeight RPC method.
message QueryTxReceiptsByBlockHeightResponse {
// tx receipts list for the block
repeated TxReceipt receipts = 1;
}
// QueryBlockLogsRequest is the request type for the Query/BlockLogs RPC method.
message QueryBlockLogsRequest {
option (gogoproto.equal) = false;
@@ -221,7 +186,7 @@ message QueryBlockLogsResponse {
// QueryBlockBloomRequest is the request type for the Query/BlockBloom RPC
// method.
message QueryBlockBloomRequest { }
message QueryBlockBloomRequest {}
// QueryBlockBloomResponse is the response type for the Query/BlockBloom RPC
// method.
+9 -29
View File
@@ -42,34 +42,14 @@ message ExtensionOptionsWeb3Tx {
message MsgEthereumTxResponse {
option (gogoproto.goproto_getters) = false;
// 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\""];
// bloom represents the bloom filter bytes
bytes bloom = 2;
// tx_logs contains the transaction hash and the proto-compatible ethereum
// ethereum transaction hash in hex format. This hash differs from the Tendermint sha256 hash of the transaction
// bytes. See https://github.com/tendermint/tendermint/issues/6539 for reference
string hash = 1;
// logs contains the transaction hash and the proto-compatible ethereum
// logs.
TransactionLogs tx_logs = 3 [(gogoproto.moretags) = "yaml:\"tx_logs\"", (gogoproto.nullable) = false];
// ret defines the bytes from the execution.
bytes ret = 4;
repeated Log logs = 2;
// returned data from evm function (result or data supplied with revert opcode)
bytes ret = 3;
// reverted flag is set to true when the call has been reverted
bool reverted = 5;
}
// // SigCache is used to cache the derived sender and contains the signer used
// // to derive it.
// message SigCache {
// option (gogoproto.goproto_getters) = false;
// EIP155Signer signer = 1;
// bytes address = 2;
// }
// // EIP155Transaction implements Signer using the EIP155 rules.
// message EIP155Signer {
// option (gogoproto.goproto_getters) = false;
// bytes chain_id = 1 [(gogoproto.customname) = "chainId"];
// bytes chain_id_mul = 2 [(gogoproto.customname) = "chainIdMul"];
// }
bool reverted = 4;
}