cleanup proto

This commit is contained in:
Federico Kunze 2021-04-19 09:10:57 +02:00
parent 6f7470c2e0
commit 4a9d63356e
No known key found for this signature in database
GPG Key ID: 655F93A970080A30
23 changed files with 1703 additions and 7894 deletions

View File

@ -364,9 +364,6 @@ proto-swagger-gen:
proto-format: proto-format:
find ./ -not -path "./third_party/*" -name *.proto -exec clang-format -i {} \; find ./ -not -path "./third_party/*" -name *.proto -exec clang-format -i {} \;
proto-swagger-gen:
@./scripts/protoc-swagger-gen.sh
proto-lint: proto-lint:
@$(DOCKER_BUF) check lint --error-format=json @$(DOCKER_BUF) check lint --error-format=json

View File

@ -7,7 +7,7 @@
}, },
"apis": [ "apis": [
{ {
"url": "./tmp-swagger-gen/ethermint/evm/v1beta1/query.swagger.json", "url": "./tmp-swagger-gen/ethermint/evm/v1alpha1/query.swagger.json",
"operationIds": { "operationIds": {
"rename": { "rename": {
"Params": "EvmParams" "Params": "EvmParams"

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -16,4 +16,6 @@ message PubKey {
// PrivKey defines a type alias for an ecdsa.PrivateKey that implements // PrivKey defines a type alias for an ecdsa.PrivateKey that implements
// Tendermint's PrivateKey interface. // Tendermint's PrivateKey interface.
message PrivKey { bytes key = 1; } message PrivKey {
bytes key = 1;
}

View File

@ -11,16 +11,13 @@ message Params {
// evm_denom represents the token denomination used to run the EVM state // evm_denom represents the token denomination used to run the EVM state
// transitions. // 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 // 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 // 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 // extra_eips defines the additional EIPs for the vm.Config
repeated int64 extra_eips = 4 [ repeated int64 extra_eips = 4 [(gogoproto.customname) = "ExtraEIPs", (gogoproto.moretags) = "yaml:\"extra_eips\""];
(gogoproto.customname) = "ExtraEIPs",
(gogoproto.moretags) = "yaml:\"extra_eips\""
];
} }
// ChainConfig defines the Ethereum ChainConfig parameters using sdk.Int values // ChainConfig defines the Ethereum ChainConfig parameters using sdk.Int values
@ -38,96 +35,91 @@ message ChainConfig {
// Homestead switch block (< 0 no fork, 0 = already homestead) // Homestead switch block (< 0 no fork, 0 = already homestead)
string homestead_block = 1 [ string homestead_block = 1 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"homestead_block\"", (gogoproto.moretags) = "yaml:\"homestead_block\"",
(gogoproto.nullable) = false (gogoproto.nullable) = false
]; ];
// TheDAO hard-fork switch block (< 0 no fork) // TheDAO hard-fork switch block (< 0 no fork)
string dao_fork_block = 2 [ string dao_fork_block = 2 [
(gogoproto.customname) = "DAOForkBlock", (gogoproto.customname) = "DAOForkBlock",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"dao_fork_block\"", (gogoproto.moretags) = "yaml:\"dao_fork_block\"",
(gogoproto.nullable) = false (gogoproto.nullable) = false
]; ];
// Whether the nodes supports or opposes the DAO hard-fork // Whether the nodes supports or opposes the DAO hard-fork
bool dao_fork_support = 3 [ bool dao_fork_support = 3
(gogoproto.customname) = "DAOForkSupport", [(gogoproto.customname) = "DAOForkSupport", (gogoproto.moretags) = "yaml:\"dao_fork_support\""];
(gogoproto.moretags) = "yaml:\"dao_fork_support\""
];
// EIP150 implements the Gas price changes // EIP150 implements the Gas price changes
// (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (< 0 no fork) // (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (< 0 no fork)
string eip150_block = 4 [ string eip150_block = 4 [
(gogoproto.customname) = "EIP150Block", (gogoproto.customname) = "EIP150Block",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"eip150_block\"", (gogoproto.moretags) = "yaml:\"eip150_block\"",
(gogoproto.nullable) = false (gogoproto.nullable) = false
]; ];
// EIP150 HF hash (needed for header only clients as only gas pricing changed) // EIP150 HF hash (needed for header only clients as only gas pricing changed)
string eip150_hash = 5 [ string eip150_hash = 5 [(gogoproto.customname) = "EIP150Hash", (gogoproto.moretags) = "yaml:\"byzantium_block\""];
(gogoproto.customname) = "EIP150Hash",
(gogoproto.moretags) = "yaml:\"byzantium_block\""
];
// EIP155Block HF block // EIP155Block HF block
string eip155_block = 6 [ string eip155_block = 6 [
(gogoproto.customname) = "EIP155Block", (gogoproto.customname) = "EIP155Block",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"eip155_block\"", (gogoproto.moretags) = "yaml:\"eip155_block\"",
(gogoproto.nullable) = false (gogoproto.nullable) = false
]; ];
// EIP158 HF block // EIP158 HF block
string eip158_block = 7 [ string eip158_block = 7 [
(gogoproto.customname) = "EIP158Block", (gogoproto.customname) = "EIP158Block",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"eip158_block\"", (gogoproto.moretags) = "yaml:\"eip158_block\"",
(gogoproto.nullable) = false (gogoproto.nullable) = false
]; ];
// Byzantium switch block (< 0 no fork, 0 = already on byzantium) // Byzantium switch block (< 0 no fork, 0 = already on byzantium)
string byzantium_block = 8 [ string byzantium_block = 8 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"byzantium_block\"", (gogoproto.moretags) = "yaml:\"byzantium_block\"",
(gogoproto.nullable) = false (gogoproto.nullable) = false
]; ];
// Constantinople switch block (< 0 no fork, 0 = already activated) // Constantinople switch block (< 0 no fork, 0 = already activated)
string constantinople_block = 9 [ string constantinople_block = 9 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"constantinople_block\"", (gogoproto.moretags) = "yaml:\"constantinople_block\"",
(gogoproto.nullable) = false (gogoproto.nullable) = false
]; ];
// Petersburg switch block (< 0 same as Constantinople) // Petersburg switch block (< 0 same as Constantinople)
string petersburg_block = 10 [ string petersburg_block = 10 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"petersburg_block\"", (gogoproto.moretags) = "yaml:\"petersburg_block\"",
(gogoproto.nullable) = false (gogoproto.nullable) = false
]; ];
// Istanbul switch block (< 0 no fork, 0 = already on istanbul) // Istanbul switch block (< 0 no fork, 0 = already on istanbul)
string istanbul_block = 11 [ string istanbul_block = 11 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"istanbul_block\"", (gogoproto.moretags) = "yaml:\"istanbul_block\"",
(gogoproto.nullable) = false (gogoproto.nullable) = false
]; ];
// Eip-2384 (bomb delay) switch block (< 0 no fork, 0 = already activated) // Eip-2384 (bomb delay) switch block (< 0 no fork, 0 = already activated)
string muir_glacier_block = 12 [ string muir_glacier_block = 12 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"muir_glacier_block\"", (gogoproto.moretags) = "yaml:\"muir_glacier_block\"",
(gogoproto.nullable) = false (gogoproto.nullable) = false
]; ];
// YOLO v2: https://github.com/ethereum/EIPs/pull/2657 (Ephemeral testnet) // YOLO v2: https://github.com/ethereum/EIPs/pull/2657 (Ephemeral testnet)
string yolo_v2_block = 13 [ string yolo_v2_block = 13 [
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"yolo_v2_block\"", (gogoproto.moretags) = "yaml:\"yolo_v2_block\"",
(gogoproto.nullable) = false (gogoproto.nullable) = false
]; ];
// EWASM switch block (< 0 no fork, 0 = already activated) // EWASM switch block (< 0 no fork, 0 = already activated)
string ewasm_block = 14 [ string ewasm_block = 14 [
(gogoproto.customname) = "EWASMBlock", (gogoproto.customname) = "EWASMBlock",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.moretags) = "yaml:\"ewasm_block\"", (gogoproto.moretags) = "yaml:\"ewasm_block\"",
(gogoproto.nullable) = false (gogoproto.nullable) = false
]; ];
} }
// State represents a single Storage key value pair item. // State represents a single Storage key value pair item.
message State { message State {
string key = 1; string key = 1;
string value = 2; string value = 2;
} }
@ -135,7 +127,7 @@ message State {
// with a given hash. It it used for import/export data as transactions are not // with a given hash. It it used for import/export data as transactions are not
// persisted on blockchain state after an upgrade. // persisted on blockchain state after an upgrade.
message TransactionLogs { message TransactionLogs {
string hash = 1; string hash = 1;
repeated Log logs = 2; repeated Log logs = 2;
} }
@ -156,15 +148,15 @@ message Log {
// but not secured by consensus. // but not secured by consensus.
// block in which the transaction was included // 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 // 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 // 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 // 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 // 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 // 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 // reorganisation. You must pay attention to this field if you receive logs
@ -176,13 +168,13 @@ message Log {
message TxReceipt { message TxReceipt {
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
bytes hash = 1; bytes hash = 1;
bytes from = 2; bytes from = 2;
TxData data = 3; TxData data = 3;
TxResult result = 4; TxResult result = 4;
uint64 index = 5; uint64 index = 5;
uint64 blockHeight = 6; uint64 blockHeight = 6;
bytes blockHash = 7; bytes blockHash = 7;
} }
// TxResult stores results of Tx execution. // TxResult stores results of Tx execution.
@ -192,16 +184,12 @@ message TxResult {
// contract_address contains the ethereum address of the created contract (if // 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 // any). If the state transition is an evm.Call, the contract address will be
// empty. // empty.
string contract_address = 1 string contract_address = 1 [(gogoproto.moretags) = "yaml:\"contract_address\""];
[ (gogoproto.moretags) = "yaml:\"contract_address\"" ];
// bloom represents the bloom filter bytes // bloom represents the bloom filter bytes
bytes bloom = 2; bytes bloom = 2;
// tx_logs contains the transaction hash and the proto-compatible ethereum // tx_logs contains the transaction hash and the proto-compatible ethereum
// logs. // logs.
TransactionLogs tx_logs = 3 [ TransactionLogs tx_logs = 3 [(gogoproto.moretags) = "yaml:\"tx_logs\"", (gogoproto.nullable) = false];
(gogoproto.moretags) = "yaml:\"tx_logs\"",
(gogoproto.nullable) = false
];
// ret defines the bytes from the execution. // ret defines the bytes from the execution.
bytes ret = 4; bytes ret = 4;
// reverted flag is set to true when the call has been reverted // reverted flag is set to true when the call has been reverted
@ -218,18 +206,12 @@ message TxData {
// nonce corresponds to the account nonce (transaction sequence). // nonce corresponds to the account nonce (transaction sequence).
uint64 nonce = 1 [(gogoproto.customname) = "AccountNonce"]; uint64 nonce = 1 [(gogoproto.customname) = "AccountNonce"];
// price defines the unsigned integer value of the gas price in bytes. // price defines the unsigned integer value of the gas price in bytes.
bytes price = 2 [ bytes price = 2 [(gogoproto.jsontag) = "gasPrice"];
(gogoproto.jsontag) = "gasPrice"
];
// gas defines the gas limit defined for the transaction. // gas defines the gas limit defined for the transaction.
uint64 gas = 3 [(gogoproto.customname) = "GasLimit"]; uint64 gas = 3 [(gogoproto.customname) = "GasLimit"];
bytes to = 4 [ bytes to = 4 [(gogoproto.customname) = "Recipient"];
(gogoproto.customname) = "Recipient"
];
// value defines the unsigned integer value of the transaction amount. // value defines the unsigned integer value of the transaction amount.
bytes value = 5 [ bytes value = 5 [(gogoproto.customname) = "Amount"];
(gogoproto.customname) = "Amount"
];
// input defines the data payload bytes of the transaction. // input defines the data payload bytes of the transaction.
bytes input = 6 [(gogoproto.customname) = "Payload"]; bytes input = 6 [(gogoproto.customname) = "Payload"];
// v defines the signature value // v defines the signature value
@ -239,7 +221,7 @@ message TxData {
// s define the signature value // s define the signature value
bytes s = 9; bytes s = 9;
// hash defines the tx data hash, which is only used when marshaling to JSON. // hash defines the tx data hash, which is only used when marshaling to JSON.
string hash = 10 [ (gogoproto.moretags) = "rlp:\"-\"" ]; string hash = 10 [(gogoproto.moretags) = "rlp:\"-\""];
} }
message BytesList { message BytesList {

View File

@ -9,19 +9,13 @@ option go_package = "github.com/cosmos/ethermint/x/evm/types";
// GenesisState defines the evm module's genesis state. // GenesisState defines the evm module's genesis state.
message GenesisState { message GenesisState {
// accounts is an array containing the ethereum genesis accounts. // accounts is an array containing the ethereum genesis accounts.
repeated GenesisAccount accounts = 1 [ (gogoproto.nullable) = false ]; repeated GenesisAccount accounts = 1 [(gogoproto.nullable) = false];
// chain_config defines the Ethereum chain configuration. // chain_config defines the Ethereum chain configuration.
ChainConfig chain_config = 2 [ ChainConfig chain_config = 2 [(gogoproto.moretags) = "yaml:\"chain_config\"", (gogoproto.nullable) = false];
(gogoproto.moretags) = "yaml:\"chain_config\"",
(gogoproto.nullable) = false
];
// params defines all the paramaters of the module. // params defines all the paramaters of the module.
Params params = 3 [ (gogoproto.nullable) = false ]; Params params = 3 [(gogoproto.nullable) = false];
repeated TransactionLogs txs_logs = 4 [ repeated TransactionLogs txs_logs = 4 [(gogoproto.moretags) = "yaml:\"txs_logs\"", (gogoproto.nullable) = false];
(gogoproto.moretags) = "yaml:\"txs_logs\"",
(gogoproto.nullable) = false
];
} }
// GenesisAccount defines an account to be initialized in the genesis state. // GenesisAccount defines an account to be initialized in the genesis state.
@ -33,8 +27,5 @@ message GenesisAccount {
// code defines the hex bytes of the account code. // code defines the hex bytes of the account code.
string code = 2; string code = 2;
// storage defines the set of state key values for the account. // storage defines the set of state key values for the account.
repeated State storage = 3 [ repeated State storage = 3 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "Storage"];
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "Storage"
];
} }

View File

@ -27,8 +27,7 @@ service Query {
// Storage queries the balance of all coins for a single account. // Storage queries the balance of all coins for a single account.
rpc Storage(QueryStorageRequest) returns (QueryStorageResponse) { rpc Storage(QueryStorageRequest) returns (QueryStorageResponse) {
option (google.api.http).get = option (google.api.http).get = "/ethermint/evm/v1alpha1/storage/{address}/{key}";
"/ethermint/evm/v1alpha1/storage/{address}/{key}";
} }
// Code queries the balance of all coins for a single account. // Code queries the balance of all coins for a single account.
@ -79,7 +78,7 @@ service Query {
// QueryAccountRequest is the request type for the Query/Account RPC method. // QueryAccountRequest is the request type for the Query/Account RPC method.
message QueryAccountRequest { message QueryAccountRequest {
option (gogoproto.equal) = false; option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
// address is the ethereum hex address to query the account for. // address is the ethereum hex address to query the account for.
@ -98,7 +97,7 @@ message QueryAccountResponse {
// QueryCosmosAccountRequest is the request type for the Query/CosmosAccount RPC method. // QueryCosmosAccountRequest is the request type for the Query/CosmosAccount RPC method.
message QueryCosmosAccountRequest { message QueryCosmosAccountRequest {
option (gogoproto.equal) = false; option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
// address is the ethereum hex address to query the account for. // address is the ethereum hex address to query the account for.
@ -117,7 +116,7 @@ message QueryCosmosAccountResponse {
// QueryBalanceRequest is the request type for the Query/Balance RPC method. // QueryBalanceRequest is the request type for the Query/Balance RPC method.
message QueryBalanceRequest { message QueryBalanceRequest {
option (gogoproto.equal) = false; option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
// address is the ethereum hex address to query the balance for. // address is the ethereum hex address to query the balance for.
@ -132,7 +131,7 @@ message QueryBalanceResponse {
// QueryStorageRequest is the request type for the Query/Storage RPC method. // QueryStorageRequest is the request type for the Query/Storage RPC method.
message QueryStorageRequest { message QueryStorageRequest {
option (gogoproto.equal) = false; option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
/// address is the ethereum hex address to query the storage state for. /// address is the ethereum hex address to query the storage state for.
@ -151,7 +150,7 @@ message QueryStorageResponse {
// QueryCodeRequest is the request type for the Query/Code RPC method. // QueryCodeRequest is the request type for the Query/Code RPC method.
message QueryCodeRequest { message QueryCodeRequest {
option (gogoproto.equal) = false; option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
// address is the ethereum hex address to query the code for. // address is the ethereum hex address to query the code for.
@ -167,7 +166,7 @@ message QueryCodeResponse {
// QueryTxLogsRequest is the request type for the Query/TxLogs RPC method. // QueryTxLogsRequest is the request type for the Query/TxLogs RPC method.
message QueryTxLogsRequest { message QueryTxLogsRequest {
option (gogoproto.equal) = false; option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
// hash is the ethereum transaction hex hash to query the logs for. // hash is the ethereum transaction hex hash to query the logs for.
@ -182,7 +181,7 @@ message QueryTxLogsResponse {
// QueryTxReceiptRequest is the request type for the Query/TxReceipt RPC method. // QueryTxReceiptRequest is the request type for the Query/TxReceipt RPC method.
message QueryTxReceiptRequest { message QueryTxReceiptRequest {
option (gogoproto.equal) = false; option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
// hash is the ethereum transaction hex hash to query the receipt for. // hash is the ethereum transaction hex hash to query the receipt for.
@ -197,7 +196,7 @@ message QueryTxReceiptResponse {
// QueryTxReceiptsByBlockHeightRequest is the request type for the Query/TxReceiptsByBlockHeight RPC method. // QueryTxReceiptsByBlockHeightRequest is the request type for the Query/TxReceiptsByBlockHeight RPC method.
message QueryTxReceiptsByBlockHeightRequest { message QueryTxReceiptsByBlockHeightRequest {
option (gogoproto.equal) = false; option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
// height is the block height to query tx receipts for // height is the block height to query tx receipts for
@ -212,7 +211,7 @@ message QueryTxReceiptsByBlockHeightResponse {
// QueryTxReceiptsByBlockHashRequest is the request type for the Query/TxReceiptsByBlockHash RPC method. // QueryTxReceiptsByBlockHashRequest is the request type for the Query/TxReceiptsByBlockHash RPC method.
message QueryTxReceiptsByBlockHashRequest { message QueryTxReceiptsByBlockHashRequest {
option (gogoproto.equal) = false; option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
// hash is the ethereum transaction hex hash to query the receipt for. // hash is the ethereum transaction hex hash to query the receipt for.
@ -227,7 +226,7 @@ message QueryTxReceiptsByBlockHashResponse {
// QueryBlockLogsRequest is the request type for the Query/BlockLogs RPC method. // QueryBlockLogsRequest is the request type for the Query/BlockLogs RPC method.
message QueryBlockLogsRequest { message QueryBlockLogsRequest {
option (gogoproto.equal) = false; option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
// hash is the block hash to query the logs for. // hash is the block hash to query the logs for.
@ -237,12 +236,14 @@ message QueryBlockLogsRequest {
// QueryTxLogs is the response type for the Query/BlockLogs RPC method. // QueryTxLogs is the response type for the Query/BlockLogs RPC method.
message QueryBlockLogsResponse { message QueryBlockLogsResponse {
// logs represents the ethereum logs generated at the given block hash. // logs represents the ethereum logs generated at the given block hash.
repeated TransactionLogs tx_logs = 1 [ (gogoproto.nullable) = false ]; repeated TransactionLogs tx_logs = 1 [(gogoproto.nullable) = false];
} }
// QueryBlockBloomRequest is the request type for the Query/BlockBloom RPC // QueryBlockBloomRequest is the request type for the Query/BlockBloom RPC
// method. // method.
message QueryBlockBloomRequest { int64 height = 1; } message QueryBlockBloomRequest {
int64 height = 1;
}
// QueryBlockBloomResponse is the response type for the Query/BlockBloom RPC // QueryBlockBloomResponse is the response type for the Query/BlockBloom RPC
// method. // method.
@ -257,7 +258,7 @@ message QueryParamsRequest {}
// QueryParamsResponse defines the response type for querying x/evm parameters. // QueryParamsResponse defines the response type for querying x/evm parameters.
message QueryParamsResponse { message QueryParamsResponse {
// params define the evm module parameters. // params define the evm module parameters.
Params params = 1 [ (gogoproto.nullable) = false ]; Params params = 1 [(gogoproto.nullable) = false];
} }
// QueryStaticCallRequest defines static call request // QueryStaticCallRequest defines static call request

View File

@ -18,8 +18,8 @@ message MsgEthereumTx {
TxData data = 1; TxData data = 1;
// caches // caches
double size = 2 [ (gogoproto.jsontag) = "-" ]; double size = 2 [(gogoproto.jsontag) = "-"];
SigCache from = 3 [ (gogoproto.jsontag) = "-" ]; SigCache from = 3 [(gogoproto.jsontag) = "-"];
} }
message ExtensionOptionsEthereumTx { message ExtensionOptionsEthereumTx {
@ -37,15 +37,12 @@ message MsgEthereumTxResponse {
// contract_address contains the ethereum address of the created contract (if // 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 // any). If the state transition is an evm.Call, the contract address will be
// empty. // 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 // bloom represents the bloom filter bytes
bytes bloom = 2; bytes bloom = 2;
// tx_logs contains the transaction hash and the proto-compatible ethereum // tx_logs contains the transaction hash and the proto-compatible ethereum
// logs. // logs.
TransactionLogs tx_logs = 3 [ TransactionLogs tx_logs = 3 [(gogoproto.moretags) = "yaml:\"tx_logs\"", (gogoproto.nullable) = false];
(gogoproto.moretags) = "yaml:\"tx_logs\"",
(gogoproto.nullable) = false
];
// ret defines the bytes from the execution. // ret defines the bytes from the execution.
bytes ret = 4; bytes ret = 4;
// reverted flag is set to true when the call has been reverted // reverted flag is set to true when the call has been reverted
@ -57,14 +54,14 @@ message MsgEthereumTxResponse {
message SigCache { message SigCache {
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
EIP155Signer signer = 1; EIP155Signer signer = 1;
bytes address = 2; bytes address = 2;
} }
// EIP155Transaction implements Signer using the EIP155 rules. // EIP155Transaction implements Signer using the EIP155 rules.
message EIP155Signer { message EIP155Signer {
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
bytes chain_id = 1 [(gogoproto.customname) = "chainId"]; bytes chain_id = 1 [(gogoproto.customname) = "chainId"];
bytes chain_id_mul = 2 [(gogoproto.customname) = "chainIdMul"]; bytes chain_id_mul = 2 [(gogoproto.customname) = "chainIdMul"];
} }

View File

@ -10,16 +10,13 @@ option go_package = "github.com/cosmos/ethermint/types";
// EthAccount implements the authtypes.AccountI interface and embeds an // EthAccount implements the authtypes.AccountI interface and embeds an
// authtypes.BaseAccount type. It is compatible with the auth AccountKeeper. // authtypes.BaseAccount type. It is compatible with the auth AccountKeeper.
message EthAccount { message EthAccount {
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_stringer) = false;
option (gogoproto.equal) = false; option (gogoproto.equal) = false;
option (cosmos_proto.implements_interface) = option (cosmos_proto.implements_interface) = "github.com/cosmos/cosmos-sdk/x/auth/types.AccountI";
"github.com/cosmos/cosmos-sdk/x/auth/types.AccountI";
cosmos.auth.v1beta1.BaseAccount base_account = 1 [ cosmos.auth.v1beta1.BaseAccount base_account = 1
(gogoproto.embed) = true, [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""];
(gogoproto.moretags) = "yaml:\"base_account\"" bytes code_hash = 2 [(gogoproto.moretags) = "yaml:\"code_hash\""];
];
bytes code_hash = 2 [ (gogoproto.moretags) = "yaml:\"code_hash\"" ];
} }

View File

@ -3,19 +3,19 @@
set -eo pipefail set -eo pipefail
mkdir -p ./tmp-swagger-gen mkdir -p ./tmp-swagger-gen
proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) proto_dirs=$(find ./proto ./third_party/proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq)
for dir in $proto_dirs; do for dir in $proto_dirs; do
# generate swagger files (filter query files) # generate swagger files (filter query files)
query_file=$(find "${dir}" -maxdepth 1 -name 'query.proto') query_file=$(find "${dir}" -maxdepth 1 -name 'query.proto')
if [[ ! -z "$query_file" ]]; then if [[ ! -z "$query_file" ]]; then
buf protoc \ protoc \
-I "proto" \ -I "proto" \
-I "third_party/proto" \ -I "third_party/proto" \
"$query_file" \ "$query_file" \
--swagger_out=./tmp-swagger-gen \ --swagger_out ./tmp-swagger-gen \
--swagger_opt=logtostderr=true --swagger_opt=fqn_for_swagger_name=true --swagger_opt=simple_operation_ids=true --swagger_opt logtostderr=true --swagger_opt fqn_for_swagger_name=true --swagger_opt simple_operation_ids=true
fi fi
done done
# combine swagger files # combine swagger files
@ -25,3 +25,6 @@ swagger-combine ./client/docs/config.json -o ./client/docs/swagger-ui/swagger.ya
# clean swagger files # clean swagger files
rm -rf ./tmp-swagger-gen rm -rf ./tmp-swagger-gen
# generate binary for static server
statik -src=./client/docs/swagger-ui -dest=./client/docs

View File

@ -11,4 +11,6 @@ extend google.protobuf.MessageOptions {
string implements_interface = 93002; string implements_interface = 93002;
} }
extend google.protobuf.FieldOptions { string accepts_interface = 93001; } extend google.protobuf.FieldOptions {
string accepts_interface = 93001;
}

View File

@ -31,16 +31,16 @@ package gogoproto;
import "google/protobuf/descriptor.proto"; import "google/protobuf/descriptor.proto";
option java_package = "com.google.protobuf"; option java_package = "com.google.protobuf";
option java_outer_classname = "GoGoProtos"; 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 { extend google.protobuf.EnumOptions {
optional bool goproto_enum_prefix = 62001; optional bool goproto_enum_prefix = 62001;
optional bool goproto_enum_stringer = 62021; optional bool goproto_enum_stringer = 62021;
optional bool enum_stringer = 62022; optional bool enum_stringer = 62022;
optional string enum_customname = 62023; optional string enum_customname = 62023;
optional bool enumdecl = 62024; optional bool enumdecl = 62024;
} }
extend google.protobuf.EnumValueOptions { extend google.protobuf.EnumValueOptions {
@ -48,98 +48,98 @@ extend google.protobuf.EnumValueOptions {
} }
extend google.protobuf.FileOptions { extend google.protobuf.FileOptions {
optional bool goproto_getters_all = 63001; optional bool goproto_getters_all = 63001;
optional bool goproto_enum_prefix_all = 63002; optional bool goproto_enum_prefix_all = 63002;
optional bool goproto_stringer_all = 63003; optional bool goproto_stringer_all = 63003;
optional bool verbose_equal_all = 63004; optional bool verbose_equal_all = 63004;
optional bool face_all = 63005; optional bool face_all = 63005;
optional bool gostring_all = 63006; optional bool gostring_all = 63006;
optional bool populate_all = 63007; optional bool populate_all = 63007;
optional bool stringer_all = 63008; optional bool stringer_all = 63008;
optional bool onlyone_all = 63009; optional bool onlyone_all = 63009;
optional bool equal_all = 63013; optional bool equal_all = 63013;
optional bool description_all = 63014; optional bool description_all = 63014;
optional bool testgen_all = 63015; optional bool testgen_all = 63015;
optional bool benchgen_all = 63016; optional bool benchgen_all = 63016;
optional bool marshaler_all = 63017; optional bool marshaler_all = 63017;
optional bool unmarshaler_all = 63018; optional bool unmarshaler_all = 63018;
optional bool stable_marshaler_all = 63019; optional bool stable_marshaler_all = 63019;
optional bool sizer_all = 63020; optional bool sizer_all = 63020;
optional bool goproto_enum_stringer_all = 63021; optional bool goproto_enum_stringer_all = 63021;
optional bool enum_stringer_all = 63022; optional bool enum_stringer_all = 63022;
optional bool unsafe_marshaler_all = 63023; optional bool unsafe_marshaler_all = 63023;
optional bool unsafe_unmarshaler_all = 63024; optional bool unsafe_unmarshaler_all = 63024;
optional bool goproto_extensions_map_all = 63025; optional bool goproto_extensions_map_all = 63025;
optional bool goproto_unrecognized_all = 63026; optional bool goproto_unrecognized_all = 63026;
optional bool gogoproto_import = 63027; optional bool gogoproto_import = 63027;
optional bool protosizer_all = 63028; optional bool protosizer_all = 63028;
optional bool compare_all = 63029; optional bool compare_all = 63029;
optional bool typedecl_all = 63030; optional bool typedecl_all = 63030;
optional bool enumdecl_all = 63031; optional bool enumdecl_all = 63031;
optional bool goproto_registration = 63032; optional bool goproto_registration = 63032;
optional bool messagename_all = 63033; optional bool messagename_all = 63033;
optional bool goproto_sizecache_all = 63034; optional bool goproto_sizecache_all = 63034;
optional bool goproto_unkeyed_all = 63035; optional bool goproto_unkeyed_all = 63035;
} }
extend google.protobuf.MessageOptions { extend google.protobuf.MessageOptions {
optional bool goproto_getters = 64001; optional bool goproto_getters = 64001;
optional bool goproto_stringer = 64003; optional bool goproto_stringer = 64003;
optional bool verbose_equal = 64004; optional bool verbose_equal = 64004;
optional bool face = 64005; optional bool face = 64005;
optional bool gostring = 64006; optional bool gostring = 64006;
optional bool populate = 64007; optional bool populate = 64007;
optional bool stringer = 67008; optional bool stringer = 67008;
optional bool onlyone = 64009; optional bool onlyone = 64009;
optional bool equal = 64013; optional bool equal = 64013;
optional bool description = 64014; optional bool description = 64014;
optional bool testgen = 64015; optional bool testgen = 64015;
optional bool benchgen = 64016; optional bool benchgen = 64016;
optional bool marshaler = 64017; optional bool marshaler = 64017;
optional bool unmarshaler = 64018; optional bool unmarshaler = 64018;
optional bool stable_marshaler = 64019; optional bool stable_marshaler = 64019;
optional bool sizer = 64020; optional bool sizer = 64020;
optional bool unsafe_marshaler = 64023; optional bool unsafe_marshaler = 64023;
optional bool unsafe_unmarshaler = 64024; optional bool unsafe_unmarshaler = 64024;
optional bool goproto_extensions_map = 64025; optional bool goproto_extensions_map = 64025;
optional bool goproto_unrecognized = 64026; optional bool goproto_unrecognized = 64026;
optional bool protosizer = 64028; optional bool protosizer = 64028;
optional bool compare = 64029; 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_sizecache = 64034;
optional bool goproto_unkeyed = 64035; optional bool goproto_unkeyed = 64035;
} }
extend google.protobuf.FieldOptions { extend google.protobuf.FieldOptions {
optional bool nullable = 65001; optional bool nullable = 65001;
optional bool embed = 65002; optional bool embed = 65002;
optional string customtype = 65003; optional string customtype = 65003;
optional string customname = 65004; optional string customname = 65004;
optional string jsontag = 65005; optional string jsontag = 65005;
optional string moretags = 65006; optional string moretags = 65006;
optional string casttype = 65007; optional string casttype = 65007;
optional string castkey = 65008; optional string castkey = 65008;
optional string castvalue = 65009; optional string castvalue = 65009;
optional bool stdtime = 65010; optional bool stdtime = 65010;
optional bool stdduration = 65011; optional bool stdduration = 65011;
optional bool wktpointer = 65012; optional bool wktpointer = 65012;
optional string castrepeated = 65013; optional string castrepeated = 65013;
} }

View File

@ -19,11 +19,11 @@ package google.api;
import "google/api/http.proto"; import "google/api/http.proto";
import "google/protobuf/descriptor.proto"; import "google/protobuf/descriptor.proto";
option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
option java_multiple_files = true; option java_multiple_files = true;
option java_outer_classname = "AnnotationsProto"; option java_outer_classname = "AnnotationsProto";
option java_package = "com.google.api"; option java_package = "com.google.api";
option objc_class_prefix = "GAPI"; option objc_class_prefix = "GAPI";
extend google.protobuf.MethodOptions { extend google.protobuf.MethodOptions {
// See `HttpRule`. // See `HttpRule`.

View File

@ -16,12 +16,12 @@ syntax = "proto3";
package google.api; package google.api;
option cc_enable_arenas = true; option cc_enable_arenas = true;
option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
option java_multiple_files = true; option java_multiple_files = true;
option java_outer_classname = "HttpProto"; option java_outer_classname = "HttpProto";
option java_package = "com.google.api"; option java_package = "com.google.api";
option objc_class_prefix = "GAPI"; option objc_class_prefix = "GAPI";
// Defines the HTTP configuration for an API service. It contains a list of // Defines the HTTP configuration for an API service. It contains a list of
// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method // [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method

View File

@ -19,12 +19,12 @@ package google.api;
import "google/protobuf/any.proto"; import "google/protobuf/any.proto";
option cc_enable_arenas = true; option cc_enable_arenas = true;
option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody"; option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody";
option java_multiple_files = true; option java_multiple_files = true;
option java_outer_classname = "HttpBodyProto"; option java_outer_classname = "HttpBodyProto";
option java_package = "com.google.api"; option java_package = "com.google.api";
option objc_class_prefix = "GAPI"; option objc_class_prefix = "GAPI";
// Message that represents an arbitrary HTTP body. It should only be used for // Message that represents an arbitrary HTTP body. It should only be used for
// payload formats that can't be represented as JSON, such as raw binary or // payload formats that can't be represented as JSON, such as raw binary or

View File

@ -34,12 +34,12 @@ package google.protobuf;
import "gogoproto/gogo.proto"; import "gogoproto/gogo.proto";
option csharp_namespace = "Google.Protobuf.WellKnownTypes"; option csharp_namespace = "Google.Protobuf.WellKnownTypes";
option go_package = "types"; option go_package = "types";
option java_package = "com.google.protobuf"; option java_package = "com.google.protobuf";
option java_outer_classname = "AnyProto"; option java_outer_classname = "AnyProto";
option java_multiple_files = true; option java_multiple_files = true;
option objc_class_prefix = "GPB"; option objc_class_prefix = "GPB";
// `Any` contains an arbitrary serialized protocol buffer message along with a // `Any` contains an arbitrary serialized protocol buffer message along with a
// URL that describes the type of the serialized message. // URL that describes the type of the serialized message.

View File

@ -40,12 +40,12 @@ syntax = "proto2";
package google.protobuf; package google.protobuf;
option go_package = "google.golang.org/protobuf/types/descriptorpb"; option go_package = "google.golang.org/protobuf/types/descriptorpb";
option java_package = "com.google.protobuf"; option java_package = "com.google.protobuf";
option java_outer_classname = "DescriptorProtos"; option java_outer_classname = "DescriptorProtos";
option csharp_namespace = "Google.Protobuf.Reflection"; option csharp_namespace = "Google.Protobuf.Reflection";
option objc_class_prefix = "GPB"; option objc_class_prefix = "GPB";
option cc_enable_arenas = true; option cc_enable_arenas = true;
// descriptor.proto must be optimized for speed because reflection-based // descriptor.proto must be optimized for speed because reflection-based
// algorithms don't work during bootstrapping. // algorithms don't work during bootstrapping.
@ -53,11 +53,13 @@ option optimize_for = SPEED;
// The protocol compiler can output a FileDescriptorSet containing the .proto // The protocol compiler can output a FileDescriptorSet containing the .proto
// files it parses. // files it parses.
message FileDescriptorSet { repeated FileDescriptorProto file = 1; } message FileDescriptorSet {
repeated FileDescriptorProto file = 1;
}
// Describes a complete .proto file. // Describes a complete .proto file.
message FileDescriptorProto { message FileDescriptorProto {
optional string name = 1; // file name, relative to root of source tree optional string name = 1; // file name, relative to root of source tree
optional string package = 2; // e.g. "foo", "foo.bar", etc. optional string package = 2; // e.g. "foo", "foo.bar", etc.
// Names of files imported by this file. // Names of files imported by this file.
@ -69,10 +71,10 @@ message FileDescriptorProto {
repeated int32 weak_dependency = 11; repeated int32 weak_dependency = 11;
// All top-level definitions in this file. // All top-level definitions in this file.
repeated DescriptorProto message_type = 4; repeated DescriptorProto message_type = 4;
repeated EnumDescriptorProto enum_type = 5; repeated EnumDescriptorProto enum_type = 5;
repeated ServiceDescriptorProto service = 6; repeated ServiceDescriptorProto service = 6;
repeated FieldDescriptorProto extension = 7; repeated FieldDescriptorProto extension = 7;
optional FileOptions options = 8; optional FileOptions options = 8;
@ -91,15 +93,15 @@ message FileDescriptorProto {
message DescriptorProto { message DescriptorProto {
optional string name = 1; optional string name = 1;
repeated FieldDescriptorProto field = 2; repeated FieldDescriptorProto field = 2;
repeated FieldDescriptorProto extension = 6; repeated FieldDescriptorProto extension = 6;
repeated DescriptorProto nested_type = 3; repeated DescriptorProto nested_type = 3;
repeated EnumDescriptorProto enum_type = 4; repeated EnumDescriptorProto enum_type = 4;
message ExtensionRange { message ExtensionRange {
optional int32 start = 1; // Inclusive. optional int32 start = 1; // Inclusive.
optional int32 end = 2; // Exclusive. optional int32 end = 2; // Exclusive.
optional ExtensionRangeOptions options = 3; optional ExtensionRangeOptions options = 3;
} }
@ -114,7 +116,7 @@ message DescriptorProto {
// not overlap. // not overlap.
message ReservedRange { message ReservedRange {
optional int32 start = 1; // Inclusive. optional int32 start = 1; // Inclusive.
optional int32 end = 2; // Exclusive. optional int32 end = 2; // Exclusive.
} }
repeated ReservedRange reserved_range = 9; repeated ReservedRange reserved_range = 9;
// Reserved field names, which may not be used by fields in the same message. // Reserved field names, which may not be used by fields in the same message.
@ -136,33 +138,33 @@ message FieldDescriptorProto {
// 0 is reserved for errors. // 0 is reserved for errors.
// Order is weird for historical reasons. // Order is weird for historical reasons.
TYPE_DOUBLE = 1; TYPE_DOUBLE = 1;
TYPE_FLOAT = 2; TYPE_FLOAT = 2;
// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
// negative values are likely. // negative values are likely.
TYPE_INT64 = 3; TYPE_INT64 = 3;
TYPE_UINT64 = 4; TYPE_UINT64 = 4;
// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
// negative values are likely. // negative values are likely.
TYPE_INT32 = 5; TYPE_INT32 = 5;
TYPE_FIXED64 = 6; TYPE_FIXED64 = 6;
TYPE_FIXED32 = 7; TYPE_FIXED32 = 7;
TYPE_BOOL = 8; TYPE_BOOL = 8;
TYPE_STRING = 9; TYPE_STRING = 9;
// Tag-delimited aggregate. // Tag-delimited aggregate.
// Group type is deprecated and not supported in proto3. However, Proto3 // Group type is deprecated and not supported in proto3. However, Proto3
// implementations should still be able to parse the group wire format and // implementations should still be able to parse the group wire format and
// treat group fields as unknown fields. // treat group fields as unknown fields.
TYPE_GROUP = 10; TYPE_GROUP = 10;
TYPE_MESSAGE = 11; // Length-delimited aggregate. TYPE_MESSAGE = 11; // Length-delimited aggregate.
// New in version 2. // New in version 2.
TYPE_BYTES = 12; TYPE_BYTES = 12;
TYPE_UINT32 = 13; TYPE_UINT32 = 13;
TYPE_ENUM = 14; TYPE_ENUM = 14;
TYPE_SFIXED32 = 15; TYPE_SFIXED32 = 15;
TYPE_SFIXED64 = 16; TYPE_SFIXED64 = 16;
TYPE_SINT32 = 17; // Uses ZigZag encoding. TYPE_SINT32 = 17; // Uses ZigZag encoding.
TYPE_SINT64 = 18; // Uses ZigZag encoding. TYPE_SINT64 = 18; // Uses ZigZag encoding.
} }
enum Label { enum Label {
@ -172,9 +174,9 @@ message FieldDescriptorProto {
LABEL_REPEATED = 3; LABEL_REPEATED = 3;
} }
optional string name = 1; optional string name = 1;
optional int32 number = 3; optional int32 number = 3;
optional Label label = 4; optional Label label = 4;
// If type_name is set, this need not be set. If both this and type_name // If type_name is set, this need not be set. If both this and type_name
// are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
@ -236,7 +238,7 @@ message FieldDescriptorProto {
// Describes a oneof. // Describes a oneof.
message OneofDescriptorProto { message OneofDescriptorProto {
optional string name = 1; optional string name = 1;
optional OneofOptions options = 2; optional OneofOptions options = 2;
} }
@ -256,7 +258,7 @@ message EnumDescriptorProto {
// domain. // domain.
message EnumReservedRange { message EnumReservedRange {
optional int32 start = 1; // Inclusive. optional int32 start = 1; // Inclusive.
optional int32 end = 2; // Inclusive. optional int32 end = 2; // Inclusive.
} }
// Range of reserved numeric values. Reserved numeric values may not be used // Range of reserved numeric values. Reserved numeric values may not be used
@ -271,15 +273,15 @@ message EnumDescriptorProto {
// Describes a value within an enum. // Describes a value within an enum.
message EnumValueDescriptorProto { message EnumValueDescriptorProto {
optional string name = 1; optional string name = 1;
optional int32 number = 2; optional int32 number = 2;
optional EnumValueOptions options = 3; optional EnumValueOptions options = 3;
} }
// Describes a service. // Describes a service.
message ServiceDescriptorProto { message ServiceDescriptorProto {
optional string name = 1; optional string name = 1;
repeated MethodDescriptorProto method = 2; repeated MethodDescriptorProto method = 2;
optional ServiceOptions options = 3; optional ServiceOptions options = 3;
@ -291,15 +293,15 @@ message MethodDescriptorProto {
// Input and output type names. These are resolved in the same way as // Input and output type names. These are resolved in the same way as
// FieldDescriptorProto.type_name, but must refer to a message type. // FieldDescriptorProto.type_name, but must refer to a message type.
optional string input_type = 2; optional string input_type = 2;
optional string output_type = 3; optional string output_type = 3;
optional MethodOptions options = 4; optional MethodOptions options = 4;
// Identifies if client streams multiple client messages // Identifies if client streams multiple client messages
optional bool client_streaming = 5 [ default = false ]; optional bool client_streaming = 5 [default = false];
// Identifies if server streams multiple server messages // Identifies if server streams multiple server messages
optional bool server_streaming = 6 [ default = false ]; optional bool server_streaming = 6 [default = false];
} }
// =================================================================== // ===================================================================
@ -355,10 +357,10 @@ message FileOptions {
// named by java_outer_classname. However, the outer class will still be // named by java_outer_classname. However, the outer class will still be
// generated to contain the file's getDescriptor() method as well as any // generated to contain the file's getDescriptor() method as well as any
// top-level extensions defined in the file. // top-level extensions defined in the file.
optional bool java_multiple_files = 10 [ default = false ]; optional bool java_multiple_files = 10 [default = false];
// This option does nothing. // This option does nothing.
optional bool java_generate_equals_and_hash = 20 [ deprecated = true ]; optional bool java_generate_equals_and_hash = 20 [deprecated = true];
// If set true, then the Java2 code generator will generate code that // If set true, then the Java2 code generator will generate code that
// throws an exception whenever an attempt is made to assign a non-UTF-8 // throws an exception whenever an attempt is made to assign a non-UTF-8
@ -366,16 +368,16 @@ message FileOptions {
// Message reflection will do the same. // Message reflection will do the same.
// However, an extension field still accepts non-UTF-8 byte sequences. // However, an extension field still accepts non-UTF-8 byte sequences.
// This option has no effect on when used with the lite runtime. // This option has no effect on when used with the lite runtime.
optional bool java_string_check_utf8 = 27 [ default = false ]; optional bool java_string_check_utf8 = 27 [default = false];
// Generated classes can be optimized for speed or code size. // Generated classes can be optimized for speed or code size.
enum OptimizeMode { enum OptimizeMode {
SPEED = 1; // Generate complete code for parsing, serialization, SPEED = 1; // Generate complete code for parsing, serialization,
// etc. // etc.
CODE_SIZE = 2; // Use ReflectionOps to implement these methods. CODE_SIZE = 2; // Use ReflectionOps to implement these methods.
LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime.
} }
optional OptimizeMode optimize_for = 9 [ default = SPEED ]; optional OptimizeMode optimize_for = 9 [default = SPEED];
// Sets the Go package where structs generated from this .proto will be // Sets the Go package where structs generated from this .proto will be
// placed. If omitted, the Go package will be derived from the following: // placed. If omitted, the Go package will be derived from the following:
@ -394,20 +396,20 @@ message FileOptions {
// that generate code specific to your particular RPC system. Therefore, // that generate code specific to your particular RPC system. Therefore,
// these default to false. Old code which depends on generic services should // these default to false. Old code which depends on generic services should
// explicitly set them to true. // explicitly set them to true.
optional bool cc_generic_services = 16 [ default = false ]; optional bool cc_generic_services = 16 [default = false];
optional bool java_generic_services = 17 [ default = false ]; optional bool java_generic_services = 17 [default = false];
optional bool py_generic_services = 18 [ default = false ]; optional bool py_generic_services = 18 [default = false];
optional bool php_generic_services = 42 [ default = false ]; optional bool php_generic_services = 42 [default = false];
// Is this file deprecated? // Is this file deprecated?
// Depending on the target platform, this can emit Deprecated annotations // Depending on the target platform, this can emit Deprecated annotations
// for everything in the file, or it will be completely ignored; in the very // for everything in the file, or it will be completely ignored; in the very
// least, this is a formalization for deprecating files. // least, this is a formalization for deprecating files.
optional bool deprecated = 23 [ default = false ]; optional bool deprecated = 23 [default = false];
// Enables the use of arenas for the proto messages in this file. This applies // Enables the use of arenas for the proto messages in this file. This applies
// only to generated classes for C++. // only to generated classes for C++.
optional bool cc_enable_arenas = 31 [ default = true ]; optional bool cc_enable_arenas = 31 [default = true];
// Sets the objective c class prefix which is prepended to all objective c // Sets the objective c class prefix which is prepended to all objective c
// generated classes from this .proto. There is no default. // generated classes from this .proto. There is no default.
@ -471,18 +473,18 @@ message MessageOptions {
// //
// Because this is an option, the above two restrictions are not enforced by // Because this is an option, the above two restrictions are not enforced by
// the protocol compiler. // the protocol compiler.
optional bool message_set_wire_format = 1 [ default = false ]; optional bool message_set_wire_format = 1 [default = false];
// Disables the generation of the standard "descriptor()" accessor, which can // Disables the generation of the standard "descriptor()" accessor, which can
// conflict with a field of the same name. This is meant to make migration // conflict with a field of the same name. This is meant to make migration
// from proto1 easier; new code should avoid fields named "descriptor". // from proto1 easier; new code should avoid fields named "descriptor".
optional bool no_standard_descriptor_accessor = 2 [ default = false ]; optional bool no_standard_descriptor_accessor = 2 [default = false];
// Is this message deprecated? // Is this message deprecated?
// Depending on the target platform, this can emit Deprecated annotations // Depending on the target platform, this can emit Deprecated annotations
// for the message, or it will be completely ignored; in the very least, // for the message, or it will be completely ignored; in the very least,
// this is a formalization for deprecating messages. // this is a formalization for deprecating messages.
optional bool deprecated = 3 [ default = false ]; optional bool deprecated = 3 [default = false];
// Whether the message is an automatically generated map entry type for the // Whether the message is an automatically generated map entry type for the
// maps field. // maps field.
@ -522,7 +524,7 @@ message FieldOptions {
// representation of the field than it normally would. See the specific // representation of the field than it normally would. See the specific
// options below. This option is not yet implemented in the open source // options below. This option is not yet implemented in the open source
// release -- sorry, we'll try to include it in a future version! // release -- sorry, we'll try to include it in a future version!
optional CType ctype = 1 [ default = STRING ]; optional CType ctype = 1 [default = STRING];
enum CType { enum CType {
// Default mode. // Default mode.
STRING = 0; STRING = 0;
@ -549,7 +551,7 @@ message FieldOptions {
// //
// This option is an enum to permit additional types to be added, e.g. // This option is an enum to permit additional types to be added, e.g.
// goog.math.Integer. // goog.math.Integer.
optional JSType jstype = 6 [ default = JS_NORMAL ]; optional JSType jstype = 6 [default = JS_NORMAL];
enum JSType { enum JSType {
// Use the default type. // Use the default type.
JS_NORMAL = 0; JS_NORMAL = 0;
@ -589,16 +591,16 @@ message FieldOptions {
// implementation must either *always* check its required fields, or *never* // implementation must either *always* check its required fields, or *never*
// check its required fields, regardless of whether or not the message has // check its required fields, regardless of whether or not the message has
// been parsed. // been parsed.
optional bool lazy = 5 [ default = false ]; optional bool lazy = 5 [default = false];
// Is this field deprecated? // Is this field deprecated?
// Depending on the target platform, this can emit Deprecated annotations // Depending on the target platform, this can emit Deprecated annotations
// for accessors, or it will be completely ignored; in the very least, this // for accessors, or it will be completely ignored; in the very least, this
// is a formalization for deprecating fields. // is a formalization for deprecating fields.
optional bool deprecated = 3 [ default = false ]; optional bool deprecated = 3 [default = false];
// For Google-internal migration only. Do not use. // For Google-internal migration only. Do not use.
optional bool weak = 10 [ default = false ]; optional bool weak = 10 [default = false];
// The parser stores options it doesn't recognize here. See above. // The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999; repeated UninterpretedOption uninterpreted_option = 999;
@ -627,7 +629,7 @@ message EnumOptions {
// Depending on the target platform, this can emit Deprecated annotations // Depending on the target platform, this can emit Deprecated annotations
// for the enum, or it will be completely ignored; in the very least, this // for the enum, or it will be completely ignored; in the very least, this
// is a formalization for deprecating enums. // is a formalization for deprecating enums.
optional bool deprecated = 3 [ default = false ]; optional bool deprecated = 3 [default = false];
reserved 5; // javanano_as_lite reserved 5; // javanano_as_lite
@ -643,7 +645,7 @@ message EnumValueOptions {
// Depending on the target platform, this can emit Deprecated annotations // Depending on the target platform, this can emit Deprecated annotations
// for the enum value, or it will be completely ignored; in the very least, // for the enum value, or it will be completely ignored; in the very least,
// this is a formalization for deprecating enum values. // this is a formalization for deprecating enum values.
optional bool deprecated = 1 [ default = false ]; optional bool deprecated = 1 [default = false];
// The parser stores options it doesn't recognize here. See above. // The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999; repeated UninterpretedOption uninterpreted_option = 999;
@ -663,7 +665,7 @@ message ServiceOptions {
// Depending on the target platform, this can emit Deprecated annotations // Depending on the target platform, this can emit Deprecated annotations
// for the service, or it will be completely ignored; in the very least, // for the service, or it will be completely ignored; in the very least,
// this is a formalization for deprecating services. // this is a formalization for deprecating services.
optional bool deprecated = 33 [ default = false ]; optional bool deprecated = 33 [default = false];
// The parser stores options it doesn't recognize here. See above. // The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999; repeated UninterpretedOption uninterpreted_option = 999;
@ -683,18 +685,17 @@ message MethodOptions {
// Depending on the target platform, this can emit Deprecated annotations // Depending on the target platform, this can emit Deprecated annotations
// for the method, or it will be completely ignored; in the very least, // for the method, or it will be completely ignored; in the very least,
// this is a formalization for deprecating methods. // this is a formalization for deprecating methods.
optional bool deprecated = 33 [ default = false ]; optional bool deprecated = 33 [default = false];
// Is this method side-effect-free (or safe in HTTP parlance), or idempotent, // Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
// or neither? HTTP based RPC implementation may choose GET verb for safe // or neither? HTTP based RPC implementation may choose GET verb for safe
// methods, and PUT verb for idempotent methods instead of the default POST. // methods, and PUT verb for idempotent methods instead of the default POST.
enum IdempotencyLevel { enum IdempotencyLevel {
IDEMPOTENCY_UNKNOWN = 0; IDEMPOTENCY_UNKNOWN = 0;
NO_SIDE_EFFECTS = 1; // implies idempotent NO_SIDE_EFFECTS = 1; // implies idempotent
IDEMPOTENT = 2; // idempotent, but may have side effects IDEMPOTENT = 2; // idempotent, but may have side effects
} }
optional IdempotencyLevel idempotency_level = 34 optional IdempotencyLevel idempotency_level = 34 [default = IDEMPOTENCY_UNKNOWN];
[ default = IDEMPOTENCY_UNKNOWN ];
// The parser stores options it doesn't recognize here. See above. // The parser stores options it doesn't recognize here. See above.
repeated UninterpretedOption uninterpreted_option = 999; repeated UninterpretedOption uninterpreted_option = 999;
@ -716,19 +717,19 @@ message UninterpretedOption {
// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
// "foo.(bar.baz).qux". // "foo.(bar.baz).qux".
message NamePart { message NamePart {
required string name_part = 1; required string name_part = 1;
required bool is_extension = 2; required bool is_extension = 2;
} }
repeated NamePart name = 2; repeated NamePart name = 2;
// The value of the uninterpreted option, in whatever type the tokenizer // The value of the uninterpreted option, in whatever type the tokenizer
// identified it as during parsing. Exactly one of these should be set. // identified it as during parsing. Exactly one of these should be set.
optional string identifier_value = 3; optional string identifier_value = 3;
optional uint64 positive_int_value = 4; optional uint64 positive_int_value = 4;
optional int64 negative_int_value = 5; optional int64 negative_int_value = 5;
optional double double_value = 6; optional double double_value = 6;
optional bytes string_value = 7; optional bytes string_value = 7;
optional string aggregate_value = 8; optional string aggregate_value = 8;
} }
// =================================================================== // ===================================================================
@ -781,7 +782,7 @@ message SourceCodeInfo {
// ignore those that it doesn't understand, as more types of locations could // ignore those that it doesn't understand, as more types of locations could
// be recorded in the future. // be recorded in the future.
repeated Location location = 1; repeated Location location = 1;
message Location { message Location {
// Identifies which part of the FileDescriptorProto was defined at this // Identifies which part of the FileDescriptorProto was defined at this
// location. // location.
// //
@ -805,14 +806,14 @@ message SourceCodeInfo {
// [ 4, 3, 2, 7 ] // [ 4, 3, 2, 7 ]
// this path refers to the whole field declaration (from the beginning // this path refers to the whole field declaration (from the beginning
// of the label to the terminating semicolon). // of the label to the terminating semicolon).
repeated int32 path = 1 [ packed = true ]; repeated int32 path = 1 [packed = true];
// Always has exactly three or four elements: start line, start column, // Always has exactly three or four elements: start line, start column,
// end line (optional, otherwise assumed same as start line), end column. // end line (optional, otherwise assumed same as start line), end column.
// These are packed into a single field for efficiency. Note that line // These are packed into a single field for efficiency. Note that line
// and column numbers are zero-based -- typically you will want to add // and column numbers are zero-based -- typically you will want to add
// 1 to each before displaying to a user. // 1 to each before displaying to a user.
repeated int32 span = 2 [ packed = true ]; repeated int32 span = 2 [packed = true];
// If this SourceCodeInfo represents a complete declaration, these are any // If this SourceCodeInfo represents a complete declaration, these are any
// comments appearing before and after the declaration which appear to be // comments appearing before and after the declaration which appear to be
@ -861,8 +862,8 @@ message SourceCodeInfo {
// optional int32 grault = 6; // optional int32 grault = 6;
// //
// // ignored detached comments. // // ignored detached comments.
optional string leading_comments = 3; optional string leading_comments = 3;
optional string trailing_comments = 4; optional string trailing_comments = 4;
repeated string leading_detached_comments = 6; repeated string leading_detached_comments = 6;
} }
} }
@ -874,10 +875,10 @@ message GeneratedCodeInfo {
// An Annotation connects some span of text in generated code to an element // An Annotation connects some span of text in generated code to an element
// of its generating .proto file. // of its generating .proto file.
repeated Annotation annotation = 1; repeated Annotation annotation = 1;
message Annotation { message Annotation {
// Identifies the element in the original source .proto file. This field // Identifies the element in the original source .proto file. This field
// is formatted the same as SourceCodeInfo.Location.path. // is formatted the same as SourceCodeInfo.Location.path.
repeated int32 path = 1 [ packed = true ]; repeated int32 path = 1 [packed = true];
// Identifies the filesystem path to the original source .proto. // Identifies the filesystem path to the original source .proto.
optional string source_file = 2; optional string source_file = 2;

View File

@ -58,13 +58,12 @@ message RequestSetOption {
} }
message RequestInitChain { message RequestInitChain {
google.protobuf.Timestamp time = 1 google.protobuf.Timestamp time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; string chain_id = 2;
string chain_id = 2; ConsensusParams consensus_params = 3;
ConsensusParams consensus_params = 3; repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false];
repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false]; bytes app_state_bytes = 5;
bytes app_state_bytes = 5; int64 initial_height = 6;
int64 initial_height = 6;
} }
message RequestQuery { message RequestQuery {
@ -102,13 +101,12 @@ message RequestEndBlock {
message RequestCommit {} message RequestCommit {}
// lists available snapshots // lists available snapshots
message RequestListSnapshots { message RequestListSnapshots {}
}
// offers a snapshot to the application // offers a snapshot to the application
message RequestOfferSnapshot { message RequestOfferSnapshot {
Snapshot snapshot = 1; // snapshot offered by peers Snapshot snapshot = 1; // snapshot offered by peers
bytes app_hash = 2; // light client-verified app hash for snapshot height bytes app_hash = 2; // light client-verified app hash for snapshot height
} }
// loads a snapshot chunk // loads a snapshot chunk
@ -187,8 +185,8 @@ message ResponseInitChain {
message ResponseQuery { message ResponseQuery {
uint32 code = 1; uint32 code = 1;
// bytes data = 2; // use "value" instead. // bytes data = 2; // use "value" instead.
string log = 3; // nondeterministic string log = 3; // nondeterministic
string info = 4; // nondeterministic string info = 4; // nondeterministic
int64 index = 5; int64 index = 5;
bytes key = 6; bytes key = 6;
bytes value = 7; bytes value = 7;
@ -198,40 +196,35 @@ message ResponseQuery {
} }
message ResponseBeginBlock { message ResponseBeginBlock {
repeated Event events = 1 repeated Event events = 1 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
} }
message ResponseCheckTx { message ResponseCheckTx {
uint32 code = 1; uint32 code = 1;
bytes data = 2; bytes data = 2;
string log = 3; // nondeterministic string log = 3; // nondeterministic
string info = 4; // nondeterministic string info = 4; // nondeterministic
int64 gas_wanted = 5 [json_name = "gas_wanted"]; int64 gas_wanted = 5 [json_name = "gas_wanted"];
int64 gas_used = 6 [json_name = "gas_used"]; int64 gas_used = 6 [json_name = "gas_used"];
repeated Event events = 7 repeated Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; string codespace = 8;
string codespace = 8;
} }
message ResponseDeliverTx { message ResponseDeliverTx {
uint32 code = 1; uint32 code = 1;
bytes data = 2; bytes data = 2;
string log = 3; // nondeterministic string log = 3; // nondeterministic
string info = 4; // nondeterministic string info = 4; // nondeterministic
int64 gas_wanted = 5 [json_name = "gas_wanted"]; int64 gas_wanted = 5 [json_name = "gas_wanted"];
int64 gas_used = 6 [json_name = "gas_used"]; int64 gas_used = 6 [json_name = "gas_used"];
repeated Event events = 7 repeated Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; string codespace = 8;
string codespace = 8;
} }
message ResponseEndBlock { message ResponseEndBlock {
repeated ValidatorUpdate validator_updates = 1 repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false];
[(gogoproto.nullable) = false]; ConsensusParams consensus_param_updates = 2;
ConsensusParams consensus_param_updates = 2; repeated Event events = 3 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
repeated Event events = 3
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
} }
message ResponseCommit { message ResponseCommit {
@ -248,12 +241,12 @@ message ResponseOfferSnapshot {
Result result = 1; Result result = 1;
enum Result { enum Result {
UNKNOWN = 0; // Unknown result, abort all snapshot restoration UNKNOWN = 0; // Unknown result, abort all snapshot restoration
ACCEPT = 1; // Snapshot accepted, apply chunks ACCEPT = 1; // Snapshot accepted, apply chunks
ABORT = 2; // Abort all snapshot restoration ABORT = 2; // Abort all snapshot restoration
REJECT = 3; // Reject this specific snapshot, try others REJECT = 3; // Reject this specific snapshot, try others
REJECT_FORMAT = 4; // Reject all snapshots of this format, 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 REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others
} }
} }
@ -263,16 +256,16 @@ message ResponseLoadSnapshotChunk {
message ResponseApplySnapshotChunk { message ResponseApplySnapshotChunk {
Result result = 1; Result result = 1;
repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply
repeated string reject_senders = 3; // Chunk senders to reject and ban repeated string reject_senders = 3; // Chunk senders to reject and ban
enum Result { enum Result {
UNKNOWN = 0; // Unknown result, abort all snapshot restoration UNKNOWN = 0; // Unknown result, abort all snapshot restoration
ACCEPT = 1; // Chunk successfully accepted ACCEPT = 1; // Chunk successfully accepted
ABORT = 2; // Abort all snapshot restoration ABORT = 2; // Abort all snapshot restoration
RETRY = 3; // Retry chunk (combine with refetch and reject) RETRY = 3; // Retry chunk (combine with refetch and reject)
RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject) RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject)
REJECT_SNAPSHOT = 5; // Reject this snapshot, try others REJECT_SNAPSHOT = 5; // Reject this snapshot, try others
} }
} }
@ -306,17 +299,14 @@ message LastCommitInfo {
// Later, transactions may be queried using these events. // Later, transactions may be queried using these events.
message Event { message Event {
string type = 1; string type = 1;
repeated EventAttribute attributes = 2 [ repeated EventAttribute attributes = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes,omitempty"];
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "attributes,omitempty"
];
} }
// EventAttribute is a single key-value pair, associated with an event. // EventAttribute is a single key-value pair, associated with an event.
message EventAttribute { message EventAttribute {
bytes key = 1; bytes key = 1;
bytes value = 2; bytes value = 2;
bool index = 3; // nondeterministic bool index = 3; // nondeterministic
} }
// TxResult contains results of executing the transaction. // TxResult contains results of executing the transaction.
@ -334,9 +324,9 @@ message TxResult {
// Validator // Validator
message 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]; // PubKey pub_key = 2 [(gogoproto.nullable)=false];
int64 power = 3; // The voting power int64 power = 3; // The voting power
} }
// ValidatorUpdate // ValidatorUpdate
@ -364,10 +354,7 @@ message Evidence {
// The height when the offense occurred // The height when the offense occurred
int64 height = 3; int64 height = 3;
// The corresponding time where the offense occurred // The corresponding time where the offense occurred
google.protobuf.Timestamp time = 4 [ google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
(gogoproto.nullable) = false,
(gogoproto.stdtime) = true
];
// Total voting power of the validator set in case the ABCI application does // Total voting power of the validator set in case the ABCI application does
// not store historical validators. // not store historical validators.
// https://github.com/tendermint/tendermint/issues/4581 // https://github.com/tendermint/tendermint/issues/4581
@ -378,11 +365,11 @@ message Evidence {
// State Sync Types // State Sync Types
message Snapshot { message Snapshot {
uint64 height = 1; // The height at which the snapshot was taken uint64 height = 1; // The height at which the snapshot was taken
uint32 format = 2; // The application-specific snapshot format uint32 format = 2; // The application-specific snapshot format
uint32 chunks = 3; // Number of chunks in the snapshot uint32 chunks = 3; // Number of chunks in the snapshot
bytes hash = 4; // Arbitrary snapshot hash, equal only if identical bytes hash = 4; // Arbitrary snapshot hash, equal only if identical
bytes metadata = 5; // Arbitrary application metadata bytes metadata = 5; // Arbitrary application metadata
} }
//---------------------------------------- //----------------------------------------

View File

@ -17,19 +17,19 @@ message Evidence {
// DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. // DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes.
message DuplicateVoteEvidence { message DuplicateVoteEvidence {
tendermint.types.Vote vote_a = 1; tendermint.types.Vote vote_a = 1;
tendermint.types.Vote vote_b = 2; tendermint.types.Vote vote_b = 2;
int64 total_voting_power = 3; int64 total_voting_power = 3;
int64 validator_power = 4; int64 validator_power = 4;
google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; 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. // LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client.
message LightClientAttackEvidence { message LightClientAttackEvidence {
tendermint.types.LightBlock conflicting_block = 1; tendermint.types.LightBlock conflicting_block = 1;
int64 common_height = 2; int64 common_height = 2;
repeated tendermint.types.Validator byzantine_validators = 3; 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]; google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
} }

View File

@ -45,8 +45,7 @@ message EvidenceParams {
// It should correspond with an app's "unbonding period" or other similar // It should correspond with an app's "unbonding period" or other similar
// mechanism for handling [Nothing-At-Stake // 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). // 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 google.protobuf.Duration max_age_duration = 2 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
// This sets the maximum size of total evidence in bytes that can be committed in a single block. // 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. // and should fall comfortably under the max block bytes.

View File

@ -66,19 +66,19 @@ message Header {
BlockID last_block_id = 5 [(gogoproto.nullable) = false]; BlockID last_block_id = 5 [(gogoproto.nullable) = false];
// hashes of block data // hashes of block data
bytes last_commit_hash = 6; // commit from validators from the last block bytes last_commit_hash = 6; // commit from validators from the last block
bytes data_hash = 7; // transactions bytes data_hash = 7; // transactions
// hashes from the app output from the prev block // hashes from the app output from the prev block
bytes validators_hash = 8; // validators for the current block bytes validators_hash = 8; // validators for the current block
bytes next_validators_hash = 9; // validators for the next block bytes next_validators_hash = 9; // validators for the next block
bytes consensus_hash = 10; // consensus params for current block bytes consensus_hash = 10; // consensus params for current block
bytes app_hash = 11; // state after txs from the previous 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 last_results_hash = 12; // root hash of all results from the txs from the previous block
// consensus info // consensus info
bytes evidence_hash = 13; // evidence included in the block bytes evidence_hash = 13; // evidence included in the block
bytes proposer_address = 14; // original proposer of the block bytes proposer_address = 14; // original proposer of the block
} }
// Data contains the set of transactions included in the block // Data contains the set of transactions included in the block
@ -95,30 +95,27 @@ message Vote {
SignedMsgType type = 1; SignedMsgType type = 1;
int64 height = 2; int64 height = 2;
int32 round = 3; int32 round = 3;
BlockID block_id = 4 BlockID block_id = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil.
[(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
google.protobuf.Timestamp timestamp = 5 bytes validator_address = 6;
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; int32 validator_index = 7;
bytes validator_address = 6; bytes signature = 8;
int32 validator_index = 7;
bytes signature = 8;
} }
// Commit contains the evidence that a block was committed by a set of validators. // Commit contains the evidence that a block was committed by a set of validators.
message Commit { message Commit {
int64 height = 1; int64 height = 1;
int32 round = 2; int32 round = 2;
BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"];
repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; repeated CommitSig signatures = 4 [(gogoproto.nullable) = false];
} }
// CommitSig is a part of the Vote included in a Commit. // CommitSig is a part of the Vote included in a Commit.
message CommitSig { message CommitSig {
BlockIDFlag block_id_flag = 1; BlockIDFlag block_id_flag = 1;
bytes validator_address = 2; bytes validator_address = 2;
google.protobuf.Timestamp timestamp = 3 google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; bytes signature = 4;
bytes signature = 4;
} }
message Proposal { message Proposal {
@ -127,9 +124,8 @@ message Proposal {
int32 round = 3; int32 round = 3;
int32 pol_round = 4; int32 pol_round = 4;
BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false];
google.protobuf.Timestamp timestamp = 6 google.protobuf.Timestamp timestamp = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; bytes signature = 7;
bytes signature = 7;
} }
message SignedHeader { message SignedHeader {

View File

@ -18,13 +18,13 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) {
&MsgEthereumTx{}, &MsgEthereumTx{},
) )
registry.RegisterInterface("injective.evm.v1beta1.ExtensionOptionsEthereumTx", (*ExtensionOptionsEthereumTxI)(nil)) registry.RegisterInterface("injective.evm.v1alpha1.ExtensionOptionsEthereumTx", (*ExtensionOptionsEthereumTxI)(nil))
registry.RegisterImplementations( registry.RegisterImplementations(
(*ExtensionOptionsEthereumTxI)(nil), (*ExtensionOptionsEthereumTxI)(nil),
&ExtensionOptionsEthereumTx{}, &ExtensionOptionsEthereumTx{},
) )
registry.RegisterInterface("injective.evm.v1beta1.ExtensionOptionsWeb3Tx", (*ExtensionOptionsWeb3TxI)(nil)) registry.RegisterInterface("injective.evm.v1alpha1.ExtensionOptionsWeb3Tx", (*ExtensionOptionsWeb3TxI)(nil))
registry.RegisterImplementations( registry.RegisterImplementations(
(*ExtensionOptionsWeb3TxI)(nil), (*ExtensionOptionsWeb3TxI)(nil),
&ExtensionOptionsWeb3Tx{}, &ExtensionOptionsWeb3Tx{},