You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

343 lines
8.6 KiB

8 years ago
7 years ago
7 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
5 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
5 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
5 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
5 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
5 years ago
abci: Refactor tagging events using list of lists (#3643) ## PR This PR introduces a fundamental breaking change to the structure of ABCI response and tx tags and the way they're processed. Namely, the SDK can support more complex and aggregated events for distribution and slashing. In addition, block responses can include duplicate keys in events. Implement new Event type. An event has a type and a list of KV pairs (ie. list-of-lists). Typical events may look like: "rewards": [{"amount": "5000uatom", "validator": "...", "recipient": "..."}] "sender": [{"address": "...", "balance": "100uatom"}] The events are indexed by {even.type}.{even.attribute[i].key}/.... In this case a client would subscribe or query for rewards.recipient='...' ABCI response types and related types now include Events []Event instead of Tags []cmn.KVPair. PubSub logic now publishes/matches against map[string][]string instead of map[string]string to support duplicate keys in response events (from #1385). A match is successful if the value is found in the slice of strings. closes: #1859 closes: #2905 ## Commits: * Implement Event ABCI type and updates responses to use events * Update messages_test.go * Update kvstore.go * Update event_bus.go * Update subscription.go * Update pubsub.go * Update kvstore.go * Update query logic to handle slice of strings in events * Update Empty#Matches and unit tests * Update pubsub logic * Update EventBus#Publish * Update kv tx indexer * Update godocs * Update ResultEvent to use slice of strings; update RPC * Update more tests * Update abci.md * Check for key in validateAndStringifyEvents * Fix KV indexer to skip empty keys * Fix linting errors * Update CHANGELOG_PENDING.md * Update docs/spec/abci/abci.md Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * Update abci/types/types.proto Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update docs/spec/abci/abci.md Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update libs/pubsub/query/query.go Co-Authored-By: Ethan Buchman <ethan@coinculture.info> * Update match function to match if ANY value matches * Implement TestSubscribeDuplicateKeys * Update TestMatches to include multi-key test cases * Update events.go * Update Query interface godoc * Update match godoc * Add godoc for matchValue * DRY-up tx indexing * Return error from PublishWithEvents in EventBus#Publish * Update PublishEventNewBlockHeader to return an error * Fix build * Update events doc in ABCI * Update ABCI events godoc * Implement TestEventBusPublishEventTxDuplicateKeys * Update TestSubscribeDuplicateKeys to be table-driven * Remove mod file * Remove markdown from events godoc * Implement TestTxSearchDeprecatedIndexing test
5 years ago
8 years ago
  1. syntax = "proto3";
  2. package tendermint.abci.types;
  3. option go_package = "github.com/tendermint/tendermint/abci/types";
  4. // For more information on gogo.proto, see:
  5. // https://github.com/gogo/protobuf/blob/master/extensions.md
  6. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  7. import "github.com/tendermint/tendermint/crypto/merkle/merkle.proto";
  8. import "github.com/tendermint/tendermint/libs/common/types.proto";
  9. import "google/protobuf/timestamp.proto";
  10. // This file is copied from http://github.com/tendermint/abci
  11. // NOTE: When using custom types, mind the warnings.
  12. // https://github.com/gogo/protobuf/blob/master/custom_types.md#warnings-and-issues
  13. option (gogoproto.marshaler_all) = true;
  14. option (gogoproto.unmarshaler_all) = true;
  15. option (gogoproto.sizer_all) = true;
  16. option (gogoproto.goproto_registration) = true;
  17. // Generate tests
  18. option (gogoproto.populate_all) = true;
  19. option (gogoproto.equal_all) = true;
  20. option (gogoproto.testgen_all) = true;
  21. //----------------------------------------
  22. // Request types
  23. message Request {
  24. oneof value {
  25. RequestEcho echo = 2;
  26. RequestFlush flush = 3;
  27. RequestInfo info = 4;
  28. RequestSetOption set_option = 5;
  29. RequestInitChain init_chain = 6;
  30. RequestQuery query = 7;
  31. RequestBeginBlock begin_block = 8;
  32. RequestCheckTx check_tx = 9;
  33. RequestDeliverTx deliver_tx = 19;
  34. RequestEndBlock end_block = 11;
  35. RequestCommit commit = 12;
  36. }
  37. }
  38. message RequestEcho {
  39. string message = 1;
  40. }
  41. message RequestFlush {
  42. }
  43. message RequestInfo {
  44. string version = 1;
  45. uint64 block_version = 2;
  46. uint64 p2p_version = 3;
  47. }
  48. // nondeterministic
  49. message RequestSetOption {
  50. string key = 1;
  51. string value = 2;
  52. }
  53. message RequestInitChain {
  54. google.protobuf.Timestamp time = 1 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true];
  55. string chain_id = 2;
  56. ConsensusParams consensus_params = 3;
  57. repeated ValidatorUpdate validators = 4 [(gogoproto.nullable)=false];
  58. bytes app_state_bytes = 5;
  59. }
  60. message RequestQuery {
  61. bytes data = 1;
  62. string path = 2;
  63. int64 height = 3;
  64. bool prove = 4;
  65. }
  66. message RequestBeginBlock {
  67. bytes hash = 1;
  68. Header header = 2 [(gogoproto.nullable)=false];
  69. LastCommitInfo last_commit_info = 3 [(gogoproto.nullable)=false];
  70. repeated Evidence byzantine_validators = 4 [(gogoproto.nullable)=false];
  71. }
  72. enum CheckTxType {
  73. New = 0;
  74. Recheck = 1;
  75. }
  76. message RequestCheckTx {
  77. bytes tx = 1;
  78. CheckTxType type = 2;
  79. }
  80. message RequestDeliverTx {
  81. bytes tx = 1;
  82. }
  83. message RequestEndBlock {
  84. int64 height = 1;
  85. }
  86. message RequestCommit {
  87. }
  88. //----------------------------------------
  89. // Response types
  90. message Response {
  91. oneof value {
  92. ResponseException exception = 1;
  93. ResponseEcho echo = 2;
  94. ResponseFlush flush = 3;
  95. ResponseInfo info = 4;
  96. ResponseSetOption set_option = 5;
  97. ResponseInitChain init_chain = 6;
  98. ResponseQuery query = 7;
  99. ResponseBeginBlock begin_block = 8;
  100. ResponseCheckTx check_tx = 9;
  101. ResponseDeliverTx deliver_tx = 10;
  102. ResponseEndBlock end_block = 11;
  103. ResponseCommit commit = 12;
  104. }
  105. }
  106. // nondeterministic
  107. message ResponseException {
  108. string error = 1;
  109. }
  110. message ResponseEcho {
  111. string message = 1;
  112. }
  113. message ResponseFlush {
  114. }
  115. message ResponseInfo {
  116. string data = 1;
  117. string version = 2;
  118. uint64 app_version = 3;
  119. int64 last_block_height = 4;
  120. bytes last_block_app_hash = 5;
  121. }
  122. // nondeterministic
  123. message ResponseSetOption {
  124. uint32 code = 1;
  125. // bytes data = 2;
  126. string log = 3;
  127. string info = 4;
  128. }
  129. message ResponseInitChain {
  130. ConsensusParams consensus_params = 1;
  131. repeated ValidatorUpdate validators = 2 [(gogoproto.nullable)=false];
  132. }
  133. message ResponseQuery {
  134. uint32 code = 1;
  135. // bytes data = 2; // use "value" instead.
  136. string log = 3; // nondeterministic
  137. string info = 4; // nondeterministic
  138. int64 index = 5;
  139. bytes key = 6;
  140. bytes value = 7;
  141. tendermint.crypto.merkle.Proof proof = 8;
  142. int64 height = 9;
  143. string codespace = 10;
  144. }
  145. message ResponseBeginBlock {
  146. repeated Event events = 1 [(gogoproto.nullable)=false, (gogoproto.jsontag)="events,omitempty"];
  147. }
  148. message ResponseCheckTx {
  149. uint32 code = 1;
  150. bytes data = 2;
  151. string log = 3; // nondeterministic
  152. string info = 4; // nondeterministic
  153. int64 gas_wanted = 5;
  154. int64 gas_used = 6;
  155. repeated Event events = 7 [(gogoproto.nullable)=false, (gogoproto.jsontag)="events,omitempty"];
  156. string codespace = 8;
  157. }
  158. message ResponseDeliverTx {
  159. uint32 code = 1;
  160. bytes data = 2;
  161. string log = 3; // nondeterministic
  162. string info = 4; // nondeterministic
  163. int64 gas_wanted = 5;
  164. int64 gas_used = 6;
  165. repeated Event events = 7 [(gogoproto.nullable)=false, (gogoproto.jsontag)="events,omitempty"];
  166. string codespace = 8;
  167. }
  168. message ResponseEndBlock {
  169. repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable)=false];
  170. ConsensusParams consensus_param_updates = 2;
  171. repeated Event events = 3 [(gogoproto.nullable)=false, (gogoproto.jsontag)="events,omitempty"];
  172. }
  173. message ResponseCommit {
  174. // reserve 1
  175. bytes data = 2;
  176. }
  177. //----------------------------------------
  178. // Misc.
  179. // ConsensusParams contains all consensus-relevant parameters
  180. // that can be adjusted by the abci app
  181. message ConsensusParams {
  182. BlockParams block = 1;
  183. EvidenceParams evidence = 2;
  184. ValidatorParams validator = 3;
  185. }
  186. // BlockParams contains limits on the block size.
  187. message BlockParams {
  188. // Note: must be greater than 0
  189. int64 max_bytes = 1;
  190. // Note: must be greater or equal to -1
  191. int64 max_gas = 2;
  192. }
  193. // EvidenceParams contains limits on the evidence.
  194. message EvidenceParams {
  195. // Note: must be greater than 0
  196. int64 max_age = 1;
  197. }
  198. // ValidatorParams contains limits on validators.
  199. message ValidatorParams {
  200. repeated string pub_key_types = 1;
  201. }
  202. message LastCommitInfo {
  203. int32 round = 1;
  204. repeated VoteInfo votes = 2 [(gogoproto.nullable)=false];
  205. }
  206. message Event {
  207. string type = 1;
  208. repeated tendermint.libs.common.KVPair attributes = 2 [(gogoproto.nullable)=false, (gogoproto.jsontag)="attributes,omitempty"];
  209. }
  210. //----------------------------------------
  211. // Blockchain Types
  212. message Header {
  213. // basic block info
  214. Version version = 1 [(gogoproto.nullable)=false];
  215. string chain_id = 2 [(gogoproto.customname)="ChainID"];
  216. int64 height = 3;
  217. google.protobuf.Timestamp time = 4 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true];
  218. // prev block info
  219. BlockID last_block_id = 5 [(gogoproto.nullable)=false];
  220. // hashes of block data
  221. bytes last_commit_hash = 6; // commit from validators from the last block
  222. bytes data_hash = 7; // transactions
  223. // hashes from the app output from the prev block
  224. bytes validators_hash = 8; // validators for the current block
  225. bytes next_validators_hash = 9; // validators for the next block
  226. bytes consensus_hash = 10; // consensus params for current block
  227. bytes app_hash = 11; // state after txs from the previous block
  228. bytes last_results_hash = 12;// root hash of all results from the txs from the previous block
  229. // consensus info
  230. bytes evidence_hash = 13; // evidence included in the block
  231. bytes proposer_address = 14; // original proposer of the block
  232. }
  233. message Version {
  234. uint64 Block = 1;
  235. uint64 App = 2;
  236. }
  237. message BlockID {
  238. bytes hash = 1;
  239. PartSetHeader parts_header = 2 [(gogoproto.nullable)=false];
  240. }
  241. message PartSetHeader {
  242. int32 total = 1;
  243. bytes hash = 2;
  244. }
  245. // Validator
  246. message Validator {
  247. bytes address = 1;
  248. //PubKey pub_key = 2 [(gogoproto.nullable)=false];
  249. int64 power = 3;
  250. }
  251. // ValidatorUpdate
  252. message ValidatorUpdate {
  253. PubKey pub_key = 1 [(gogoproto.nullable)=false];
  254. int64 power = 2;
  255. }
  256. // VoteInfo
  257. message VoteInfo {
  258. Validator validator = 1 [(gogoproto.nullable)=false];
  259. bool signed_last_block = 2;
  260. }
  261. message PubKey {
  262. string type = 1;
  263. bytes data = 2;
  264. }
  265. message Evidence {
  266. string type = 1;
  267. Validator validator = 2 [(gogoproto.nullable)=false];
  268. int64 height = 3;
  269. google.protobuf.Timestamp time = 4 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true];
  270. int64 total_voting_power = 5;
  271. }
  272. //----------------------------------------
  273. // Service Definition
  274. service ABCIApplication {
  275. rpc Echo(RequestEcho) returns (ResponseEcho) ;
  276. rpc Flush(RequestFlush) returns (ResponseFlush);
  277. rpc Info(RequestInfo) returns (ResponseInfo);
  278. rpc SetOption(RequestSetOption) returns (ResponseSetOption);
  279. rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx);
  280. rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx);
  281. rpc Query(RequestQuery) returns (ResponseQuery);
  282. rpc Commit(RequestCommit) returns (ResponseCommit);
  283. rpc InitChain(RequestInitChain) returns (ResponseInitChain);
  284. rpc BeginBlock(RequestBeginBlock) returns (ResponseBeginBlock);
  285. rpc EndBlock(RequestEndBlock) returns (ResponseEndBlock);
  286. }