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.

477 lines
16 KiB

abci: Synchronize FinalizeBlock with the updated specification (#7983) This change set implements the most recent version of `FinalizeBlock`. # What does this change actually contain? * This change set is rather large but fear not! The majority of the files touched and changes are renaming `ResponseDeliverTx` to `ExecTxResult`. This should be a pretty inoffensive change since they're effectively the same type but with a different name. * The `execBlockOnProxyApp` was totally removed since it served as just a wrapper around the logic that is now mostly encapsulated within `FinalizeBlock` * The `updateState` helper function has been made a public method on `State`. It was being exposed as a shim through the testing infrastructure, so this seemed innocuous. * Tests already existed to ensure that the application received the `ByzantineValidators` and the `ValidatorUpdates`, but one was fixed up to ensure that `LastCommitInfo` was being sent across. * Tests were removed from the `psql` indexer that seemed to search for an event in the indexer that was not being created. # Questions for reviewers * We store this [ABCIResponses](https://github.com/tendermint/tendermint/blob/5721a13ab1f4479f9807f449f0bf5c536b9a05f2/proto/tendermint/state/types.pb.go#L37) type in the data base as the block results. This type has changed since v0.35 to contain the `FinalizeBlock` response. I'm wondering if we need to do any shimming to keep the old data retrieveable? * Similarly, this change is exposed via the RPC through [ResultBlockResults](https://github.com/tendermint/tendermint/blob/5721a13ab1f4479f9807f449f0bf5c536b9a05f2/rpc/coretypes/responses.go#L69) changing. Should we somehow shim or notify for this change? closes: #7658
2 years ago
abci: Synchronize FinalizeBlock with the updated specification (#7983) This change set implements the most recent version of `FinalizeBlock`. # What does this change actually contain? * This change set is rather large but fear not! The majority of the files touched and changes are renaming `ResponseDeliverTx` to `ExecTxResult`. This should be a pretty inoffensive change since they're effectively the same type but with a different name. * The `execBlockOnProxyApp` was totally removed since it served as just a wrapper around the logic that is now mostly encapsulated within `FinalizeBlock` * The `updateState` helper function has been made a public method on `State`. It was being exposed as a shim through the testing infrastructure, so this seemed innocuous. * Tests already existed to ensure that the application received the `ByzantineValidators` and the `ValidatorUpdates`, but one was fixed up to ensure that `LastCommitInfo` was being sent across. * Tests were removed from the `psql` indexer that seemed to search for an event in the indexer that was not being created. # Questions for reviewers * We store this [ABCIResponses](https://github.com/tendermint/tendermint/blob/5721a13ab1f4479f9807f449f0bf5c536b9a05f2/proto/tendermint/state/types.pb.go#L37) type in the data base as the block results. This type has changed since v0.35 to contain the `FinalizeBlock` response. I'm wondering if we need to do any shimming to keep the old data retrieveable? * Similarly, this change is exposed via the RPC through [ResultBlockResults](https://github.com/tendermint/tendermint/blob/5721a13ab1f4479f9807f449f0bf5c536b9a05f2/rpc/coretypes/responses.go#L69) changing. Should we somehow shim or notify for this change? closes: #7658
2 years ago
abci: Synchronize FinalizeBlock with the updated specification (#7983) This change set implements the most recent version of `FinalizeBlock`. # What does this change actually contain? * This change set is rather large but fear not! The majority of the files touched and changes are renaming `ResponseDeliverTx` to `ExecTxResult`. This should be a pretty inoffensive change since they're effectively the same type but with a different name. * The `execBlockOnProxyApp` was totally removed since it served as just a wrapper around the logic that is now mostly encapsulated within `FinalizeBlock` * The `updateState` helper function has been made a public method on `State`. It was being exposed as a shim through the testing infrastructure, so this seemed innocuous. * Tests already existed to ensure that the application received the `ByzantineValidators` and the `ValidatorUpdates`, but one was fixed up to ensure that `LastCommitInfo` was being sent across. * Tests were removed from the `psql` indexer that seemed to search for an event in the indexer that was not being created. # Questions for reviewers * We store this [ABCIResponses](https://github.com/tendermint/tendermint/blob/5721a13ab1f4479f9807f449f0bf5c536b9a05f2/proto/tendermint/state/types.pb.go#L37) type in the data base as the block results. This type has changed since v0.35 to contain the `FinalizeBlock` response. I'm wondering if we need to do any shimming to keep the old data retrieveable? * Similarly, this change is exposed via the RPC through [ResultBlockResults](https://github.com/tendermint/tendermint/blob/5721a13ab1f4479f9807f449f0bf5c536b9a05f2/rpc/coretypes/responses.go#L69) changing. Should we somehow shim or notify for this change? closes: #7658
2 years ago
abci: Synchronize FinalizeBlock with the updated specification (#7983) This change set implements the most recent version of `FinalizeBlock`. # What does this change actually contain? * This change set is rather large but fear not! The majority of the files touched and changes are renaming `ResponseDeliverTx` to `ExecTxResult`. This should be a pretty inoffensive change since they're effectively the same type but with a different name. * The `execBlockOnProxyApp` was totally removed since it served as just a wrapper around the logic that is now mostly encapsulated within `FinalizeBlock` * The `updateState` helper function has been made a public method on `State`. It was being exposed as a shim through the testing infrastructure, so this seemed innocuous. * Tests already existed to ensure that the application received the `ByzantineValidators` and the `ValidatorUpdates`, but one was fixed up to ensure that `LastCommitInfo` was being sent across. * Tests were removed from the `psql` indexer that seemed to search for an event in the indexer that was not being created. # Questions for reviewers * We store this [ABCIResponses](https://github.com/tendermint/tendermint/blob/5721a13ab1f4479f9807f449f0bf5c536b9a05f2/proto/tendermint/state/types.pb.go#L37) type in the data base as the block results. This type has changed since v0.35 to contain the `FinalizeBlock` response. I'm wondering if we need to do any shimming to keep the old data retrieveable? * Similarly, this change is exposed via the RPC through [ResultBlockResults](https://github.com/tendermint/tendermint/blob/5721a13ab1f4479f9807f449f0bf5c536b9a05f2/rpc/coretypes/responses.go#L69) changing. Should we somehow shim or notify for this change? closes: #7658
2 years ago
abci: Synchronize FinalizeBlock with the updated specification (#7983) This change set implements the most recent version of `FinalizeBlock`. # What does this change actually contain? * This change set is rather large but fear not! The majority of the files touched and changes are renaming `ResponseDeliverTx` to `ExecTxResult`. This should be a pretty inoffensive change since they're effectively the same type but with a different name. * The `execBlockOnProxyApp` was totally removed since it served as just a wrapper around the logic that is now mostly encapsulated within `FinalizeBlock` * The `updateState` helper function has been made a public method on `State`. It was being exposed as a shim through the testing infrastructure, so this seemed innocuous. * Tests already existed to ensure that the application received the `ByzantineValidators` and the `ValidatorUpdates`, but one was fixed up to ensure that `LastCommitInfo` was being sent across. * Tests were removed from the `psql` indexer that seemed to search for an event in the indexer that was not being created. # Questions for reviewers * We store this [ABCIResponses](https://github.com/tendermint/tendermint/blob/5721a13ab1f4479f9807f449f0bf5c536b9a05f2/proto/tendermint/state/types.pb.go#L37) type in the data base as the block results. This type has changed since v0.35 to contain the `FinalizeBlock` response. I'm wondering if we need to do any shimming to keep the old data retrieveable? * Similarly, this change is exposed via the RPC through [ResultBlockResults](https://github.com/tendermint/tendermint/blob/5721a13ab1f4479f9807f449f0bf5c536b9a05f2/rpc/coretypes/responses.go#L69) changing. Should we somehow shim or notify for this change? closes: #7658
2 years ago
abci: Synchronize FinalizeBlock with the updated specification (#7983) This change set implements the most recent version of `FinalizeBlock`. # What does this change actually contain? * This change set is rather large but fear not! The majority of the files touched and changes are renaming `ResponseDeliverTx` to `ExecTxResult`. This should be a pretty inoffensive change since they're effectively the same type but with a different name. * The `execBlockOnProxyApp` was totally removed since it served as just a wrapper around the logic that is now mostly encapsulated within `FinalizeBlock` * The `updateState` helper function has been made a public method on `State`. It was being exposed as a shim through the testing infrastructure, so this seemed innocuous. * Tests already existed to ensure that the application received the `ByzantineValidators` and the `ValidatorUpdates`, but one was fixed up to ensure that `LastCommitInfo` was being sent across. * Tests were removed from the `psql` indexer that seemed to search for an event in the indexer that was not being created. # Questions for reviewers * We store this [ABCIResponses](https://github.com/tendermint/tendermint/blob/5721a13ab1f4479f9807f449f0bf5c536b9a05f2/proto/tendermint/state/types.pb.go#L37) type in the data base as the block results. This type has changed since v0.35 to contain the `FinalizeBlock` response. I'm wondering if we need to do any shimming to keep the old data retrieveable? * Similarly, this change is exposed via the RPC through [ResultBlockResults](https://github.com/tendermint/tendermint/blob/5721a13ab1f4479f9807f449f0bf5c536b9a05f2/rpc/coretypes/responses.go#L69) changing. Should we somehow shim or notify for this change? closes: #7658
2 years ago
abci: Synchronize FinalizeBlock with the updated specification (#7983) This change set implements the most recent version of `FinalizeBlock`. # What does this change actually contain? * This change set is rather large but fear not! The majority of the files touched and changes are renaming `ResponseDeliverTx` to `ExecTxResult`. This should be a pretty inoffensive change since they're effectively the same type but with a different name. * The `execBlockOnProxyApp` was totally removed since it served as just a wrapper around the logic that is now mostly encapsulated within `FinalizeBlock` * The `updateState` helper function has been made a public method on `State`. It was being exposed as a shim through the testing infrastructure, so this seemed innocuous. * Tests already existed to ensure that the application received the `ByzantineValidators` and the `ValidatorUpdates`, but one was fixed up to ensure that `LastCommitInfo` was being sent across. * Tests were removed from the `psql` indexer that seemed to search for an event in the indexer that was not being created. # Questions for reviewers * We store this [ABCIResponses](https://github.com/tendermint/tendermint/blob/5721a13ab1f4479f9807f449f0bf5c536b9a05f2/proto/tendermint/state/types.pb.go#L37) type in the data base as the block results. This type has changed since v0.35 to contain the `FinalizeBlock` response. I'm wondering if we need to do any shimming to keep the old data retrieveable? * Similarly, this change is exposed via the RPC through [ResultBlockResults](https://github.com/tendermint/tendermint/blob/5721a13ab1f4479f9807f449f0bf5c536b9a05f2/rpc/coretypes/responses.go#L69) changing. Should we somehow shim or notify for this change? closes: #7658
2 years ago
abci: Synchronize FinalizeBlock with the updated specification (#7983) This change set implements the most recent version of `FinalizeBlock`. # What does this change actually contain? * This change set is rather large but fear not! The majority of the files touched and changes are renaming `ResponseDeliverTx` to `ExecTxResult`. This should be a pretty inoffensive change since they're effectively the same type but with a different name. * The `execBlockOnProxyApp` was totally removed since it served as just a wrapper around the logic that is now mostly encapsulated within `FinalizeBlock` * The `updateState` helper function has been made a public method on `State`. It was being exposed as a shim through the testing infrastructure, so this seemed innocuous. * Tests already existed to ensure that the application received the `ByzantineValidators` and the `ValidatorUpdates`, but one was fixed up to ensure that `LastCommitInfo` was being sent across. * Tests were removed from the `psql` indexer that seemed to search for an event in the indexer that was not being created. # Questions for reviewers * We store this [ABCIResponses](https://github.com/tendermint/tendermint/blob/5721a13ab1f4479f9807f449f0bf5c536b9a05f2/proto/tendermint/state/types.pb.go#L37) type in the data base as the block results. This type has changed since v0.35 to contain the `FinalizeBlock` response. I'm wondering if we need to do any shimming to keep the old data retrieveable? * Similarly, this change is exposed via the RPC through [ResultBlockResults](https://github.com/tendermint/tendermint/blob/5721a13ab1f4479f9807f449f0bf5c536b9a05f2/rpc/coretypes/responses.go#L69) changing. Should we somehow shim or notify for this change? closes: #7658
2 years ago
  1. syntax = "proto3";
  2. package tendermint.abci;
  3. import "tendermint/crypto/proof.proto";
  4. import "tendermint/types/types.proto";
  5. import "tendermint/crypto/keys.proto";
  6. import "tendermint/types/params.proto";
  7. import "google/protobuf/timestamp.proto";
  8. import "gogoproto/gogo.proto";
  9. // This file is a temporary workaround to enable development during the ABCI++
  10. // project. This file should be deleted and any references to it removed when
  11. // the ongoing work on ABCI++ is completed.
  12. //
  13. // For the duration of ABCI++, this file should be able to build the `abci/types/types.pb.go`
  14. // file. Any changes that update that file must come as a result of a change in
  15. // this .proto file.
  16. // For more information, see https://github.com/tendermint/tendermint/issues/8066
  17. //----------------------------------------
  18. // Request types
  19. message Request {
  20. oneof value {
  21. RequestEcho echo = 1;
  22. RequestFlush flush = 2;
  23. RequestInfo info = 3;
  24. RequestInitChain init_chain = 4;
  25. RequestQuery query = 5;
  26. RequestBeginBlock begin_block = 6 [deprecated = true];
  27. RequestCheckTx check_tx = 7;
  28. RequestDeliverTx deliver_tx = 8 [deprecated = true];
  29. RequestEndBlock end_block = 9 [deprecated = true];
  30. RequestCommit commit = 10;
  31. RequestListSnapshots list_snapshots = 11;
  32. RequestOfferSnapshot offer_snapshot = 12;
  33. RequestLoadSnapshotChunk load_snapshot_chunk = 13;
  34. RequestApplySnapshotChunk apply_snapshot_chunk = 14;
  35. RequestPrepareProposal prepare_proposal = 15;
  36. RequestProcessProposal process_proposal = 16;
  37. RequestExtendVote extend_vote = 17;
  38. RequestVerifyVoteExtension verify_vote_extension = 18;
  39. RequestFinalizeBlock finalize_block = 19;
  40. }
  41. }
  42. message RequestEcho {
  43. string message = 1;
  44. }
  45. message RequestFlush {}
  46. message RequestInfo {
  47. string version = 1;
  48. uint64 block_version = 2;
  49. uint64 p2p_version = 3;
  50. string abci_version = 4;
  51. }
  52. message RequestInitChain {
  53. google.protobuf.Timestamp time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
  54. string chain_id = 2;
  55. tendermint.types.ConsensusParams consensus_params = 3;
  56. repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false];
  57. bytes app_state_bytes = 5;
  58. int64 initial_height = 6;
  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. tendermint.types.Header header = 2 [(gogoproto.nullable) = false];
  69. CommitInfo last_commit_info = 3 [(gogoproto.nullable) = false];
  70. repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false];
  71. }
  72. enum CheckTxType {
  73. NEW = 0 [(gogoproto.enumvalue_customname) = "New"];
  74. RECHECK = 1 [(gogoproto.enumvalue_customname) = "Recheck"];
  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. // lists available snapshots
  88. message RequestListSnapshots {}
  89. // offers a snapshot to the application
  90. message RequestOfferSnapshot {
  91. Snapshot snapshot = 1; // snapshot offered by peers
  92. bytes app_hash = 2; // light client-verified app hash for snapshot height
  93. }
  94. // loads a snapshot chunk
  95. message RequestLoadSnapshotChunk {
  96. uint64 height = 1;
  97. uint32 format = 2;
  98. uint32 chunk = 3;
  99. }
  100. // Applies a snapshot chunk
  101. message RequestApplySnapshotChunk {
  102. uint32 index = 1;
  103. bytes chunk = 2;
  104. string sender = 3;
  105. }
  106. // Extends a vote with application-side injection
  107. message RequestExtendVote {
  108. types.Vote vote = 1;
  109. }
  110. // Verify the vote extension
  111. message RequestVerifyVoteExtension {
  112. types.Vote vote = 1;
  113. }
  114. message RequestPrepareProposal {
  115. // block_data is an array of transactions that will be included in a block,
  116. // sent to the app for possible modifications.
  117. // applications can not exceed the size of the data passed to it.
  118. repeated bytes block_data = 1;
  119. // If an application decides to populate block_data with extra information, they can not exceed this value.
  120. int64 block_data_size = 2;
  121. // votes includes all votes from the previous block. This contains vote extension data that can be used in proposal
  122. // preparation. The votes here will then form the last commit that gets sent in the proposed block.
  123. repeated tendermint.types.Vote votes = 3;
  124. }
  125. message RequestProcessProposal {
  126. bytes hash = 1;
  127. tendermint.types.Header header = 2 [(gogoproto.nullable) = false];
  128. repeated bytes txs = 3;
  129. CommitInfo proposed_last_commit = 4 [(gogoproto.nullable) = false];
  130. repeated Evidence byzantine_validators = 5 [(gogoproto.nullable) = false];
  131. }
  132. message RequestFinalizeBlock {
  133. bytes hash = 1;
  134. tendermint.types.Header header = 2 [(gogoproto.nullable) = false];
  135. repeated bytes txs = 3;
  136. CommitInfo decided_last_commit = 4 [(gogoproto.nullable) = false];
  137. repeated Evidence byzantine_validators = 5 [(gogoproto.nullable) = false];
  138. }
  139. //----------------------------------------
  140. // Response types
  141. message Response {
  142. oneof value {
  143. ResponseException exception = 1;
  144. ResponseEcho echo = 2;
  145. ResponseFlush flush = 3;
  146. ResponseInfo info = 4;
  147. ResponseInitChain init_chain = 5;
  148. ResponseQuery query = 6;
  149. ResponseBeginBlock begin_block = 7 [deprecated = true];
  150. ResponseCheckTx check_tx = 8;
  151. ResponseDeliverTx deliver_tx = 9 [deprecated = true];
  152. ResponseEndBlock end_block = 10 [deprecated = true];
  153. ResponseCommit commit = 11;
  154. ResponseListSnapshots list_snapshots = 12;
  155. ResponseOfferSnapshot offer_snapshot = 13;
  156. ResponseLoadSnapshotChunk load_snapshot_chunk = 14;
  157. ResponseApplySnapshotChunk apply_snapshot_chunk = 15;
  158. ResponsePrepareProposal prepare_proposal = 16;
  159. ResponseProcessProposal process_proposal = 17;
  160. ResponseExtendVote extend_vote = 18;
  161. ResponseVerifyVoteExtension verify_vote_extension = 19;
  162. ResponseFinalizeBlock finalize_block = 20;
  163. }
  164. }
  165. // nondeterministic
  166. message ResponseException {
  167. string error = 1;
  168. }
  169. message ResponseEcho {
  170. string message = 1;
  171. }
  172. message ResponseFlush {}
  173. message ResponseInfo {
  174. string data = 1;
  175. // this is the software version of the application. TODO: remove?
  176. string version = 2;
  177. uint64 app_version = 3;
  178. int64 last_block_height = 4;
  179. bytes last_block_app_hash = 5;
  180. }
  181. message ResponseInitChain {
  182. tendermint.types.ConsensusParams consensus_params = 1;
  183. repeated ValidatorUpdate validators = 2 [(gogoproto.nullable) = false];
  184. bytes app_hash = 3;
  185. }
  186. message ResponseQuery {
  187. uint32 code = 1;
  188. // bytes data = 2; // use "value" instead.
  189. string log = 3; // nondeterministic
  190. string info = 4; // nondeterministic
  191. int64 index = 5;
  192. bytes key = 6;
  193. bytes value = 7;
  194. tendermint.crypto.ProofOps proof_ops = 8;
  195. int64 height = 9;
  196. string codespace = 10;
  197. }
  198. message ResponseBeginBlock {
  199. repeated Event events = 1 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
  200. }
  201. message ResponseCheckTx {
  202. uint32 code = 1;
  203. bytes data = 2;
  204. string log = 3; // nondeterministic
  205. string info = 4; // nondeterministic
  206. int64 gas_wanted = 5;
  207. int64 gas_used = 6;
  208. repeated Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
  209. string codespace = 8;
  210. string sender = 9;
  211. int64 priority = 10;
  212. // mempool_error is set by Tendermint.
  213. // ABCI applications creating a ResponseCheckTX should not set mempool_error.
  214. string mempool_error = 11;
  215. }
  216. message ResponseDeliverTx {
  217. uint32 code = 1;
  218. bytes data = 2;
  219. string log = 3; // nondeterministic
  220. string info = 4; // nondeterministic
  221. int64 gas_wanted = 5 [json_name = "gas_wanted"];
  222. int64 gas_used = 6 [json_name = "gas_used"];
  223. repeated Event events = 7
  224. [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; // nondeterministic
  225. string codespace = 8;
  226. }
  227. message ResponseEndBlock {
  228. repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false];
  229. tendermint.types.ConsensusParams consensus_param_updates = 2;
  230. repeated Event events = 3 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
  231. }
  232. message ResponseCommit {
  233. // reserve 1
  234. bytes data = 2;
  235. int64 retain_height = 3;
  236. }
  237. message ResponseListSnapshots {
  238. repeated Snapshot snapshots = 1;
  239. }
  240. message ResponseOfferSnapshot {
  241. Result result = 1;
  242. enum Result {
  243. UNKNOWN = 0; // Unknown result, abort all snapshot restoration
  244. ACCEPT = 1; // Snapshot accepted, apply chunks
  245. ABORT = 2; // Abort all snapshot restoration
  246. REJECT = 3; // Reject this specific snapshot, try others
  247. REJECT_FORMAT = 4; // Reject all snapshots of this format, try others
  248. REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others
  249. }
  250. }
  251. message ResponseLoadSnapshotChunk {
  252. bytes chunk = 1;
  253. }
  254. message ResponseApplySnapshotChunk {
  255. Result result = 1;
  256. repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply
  257. repeated string reject_senders = 3; // Chunk senders to reject and ban
  258. enum Result {
  259. UNKNOWN = 0; // Unknown result, abort all snapshot restoration
  260. ACCEPT = 1; // Chunk successfully accepted
  261. ABORT = 2; // Abort all snapshot restoration
  262. RETRY = 3; // Retry chunk (combine with refetch and reject)
  263. RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject)
  264. REJECT_SNAPSHOT = 5; // Reject this snapshot, try others
  265. }
  266. }
  267. message ResponseExtendVote {
  268. tendermint.types.VoteExtension vote_extension = 1;
  269. }
  270. message ResponseVerifyVoteExtension {
  271. Result result = 1;
  272. enum Result {
  273. UNKNOWN = 0; // Unknown result, reject vote extension
  274. ACCEPT = 1; // Vote extension verified, include the vote
  275. SLASH = 2; // Vote extension verification aborted, continue but slash validator
  276. REJECT = 3; // Vote extension invalidated
  277. }
  278. }
  279. message ResponsePrepareProposal {
  280. repeated bytes block_data = 1;
  281. }
  282. message ResponseProcessProposal {
  283. bool accept = 1;
  284. bytes app_hash = 2;
  285. repeated ExecTxResult tx_results = 3;
  286. repeated ValidatorUpdate validator_updates = 4;
  287. tendermint.types.ConsensusParams consensus_param_updates = 5;
  288. }
  289. message ResponseFinalizeBlock {
  290. repeated Event events = 1
  291. [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
  292. repeated ExecTxResult tx_results = 2;
  293. repeated ValidatorUpdate validator_updates = 3 [(gogoproto.nullable) = false];
  294. tendermint.types.ConsensusParams consensus_param_updates = 4;
  295. bytes app_hash = 5;
  296. int64 retain_height = 6;
  297. }
  298. //----------------------------------------
  299. // Misc.
  300. message CommitInfo {
  301. int32 round = 1;
  302. repeated VoteInfo votes = 2 [(gogoproto.nullable) = false];
  303. }
  304. // Event allows application developers to attach additional information to
  305. // ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx.
  306. // Later, transactions may be queried using these events.
  307. message Event {
  308. string type = 1;
  309. repeated EventAttribute attributes = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes,omitempty"];
  310. }
  311. // EventAttribute is a single key-value pair, associated with an event.
  312. message EventAttribute {
  313. string key = 1;
  314. string value = 2;
  315. bool index = 3; // nondeterministic
  316. }
  317. // ExecTxResult contains results of executing one individual transaction.
  318. //
  319. // * Its structure is equivalent to #ResponseDeliverTx which will be deprecated/deleted
  320. message ExecTxResult {
  321. uint32 code = 1;
  322. bytes data = 2;
  323. string log = 3; // nondeterministic
  324. string info = 4; // nondeterministic
  325. int64 gas_wanted = 5;
  326. int64 gas_used = 6;
  327. repeated Event events = 7
  328. [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; // nondeterministic
  329. string codespace = 8;
  330. }
  331. // TxResult contains results of executing the transaction.
  332. //
  333. // One usage is indexing transaction results.
  334. message TxResult {
  335. int64 height = 1;
  336. uint32 index = 2;
  337. bytes tx = 3;
  338. ExecTxResult result = 4 [(gogoproto.nullable) = false];
  339. }
  340. //----------------------------------------
  341. // Blockchain Types
  342. // Validator
  343. message Validator {
  344. bytes address = 1; // The first 20 bytes of SHA256(public key)
  345. // PubKey pub_key = 2 [(gogoproto.nullable)=false];
  346. int64 power = 3; // The voting power
  347. }
  348. // ValidatorUpdate
  349. message ValidatorUpdate {
  350. tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false];
  351. int64 power = 2;
  352. }
  353. // VoteInfo
  354. message VoteInfo {
  355. Validator validator = 1 [(gogoproto.nullable) = false];
  356. bool signed_last_block = 2;
  357. reserved 3; // Placeholder for tendermint_signed_extension in v0.37
  358. reserved 4; // Placeholder for app_signed_extension in v0.37
  359. }
  360. enum EvidenceType {
  361. UNKNOWN = 0;
  362. DUPLICATE_VOTE = 1;
  363. LIGHT_CLIENT_ATTACK = 2;
  364. }
  365. message Evidence {
  366. EvidenceType type = 1;
  367. // The offending validator
  368. Validator validator = 2 [(gogoproto.nullable) = false];
  369. // The height when the offense occurred
  370. int64 height = 3;
  371. // The corresponding time where the offense occurred
  372. google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
  373. // Total voting power of the validator set in case the ABCI application does
  374. // not store historical validators.
  375. // https://github.com/tendermint/tendermint/issues/4581
  376. int64 total_voting_power = 5;
  377. }
  378. //----------------------------------------
  379. // State Sync Types
  380. message Snapshot {
  381. uint64 height = 1; // The height at which the snapshot was taken
  382. uint32 format = 2; // The application-specific snapshot format
  383. uint32 chunks = 3; // Number of chunks in the snapshot
  384. bytes hash = 4; // Arbitrary snapshot hash, equal only if identical
  385. bytes metadata = 5; // Arbitrary application metadata
  386. }
  387. //----------------------------------------
  388. // Service Definition
  389. service ABCIApplication {
  390. rpc Echo(RequestEcho) returns (ResponseEcho);
  391. rpc Flush(RequestFlush) returns (ResponseFlush);
  392. rpc Info(RequestInfo) returns (ResponseInfo);
  393. rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx);
  394. rpc Query(RequestQuery) returns (ResponseQuery);
  395. rpc Commit(RequestCommit) returns (ResponseCommit);
  396. rpc InitChain(RequestInitChain) returns (ResponseInitChain);
  397. rpc ListSnapshots(RequestListSnapshots) returns (ResponseListSnapshots);
  398. rpc OfferSnapshot(RequestOfferSnapshot) returns (ResponseOfferSnapshot);
  399. rpc LoadSnapshotChunk(RequestLoadSnapshotChunk) returns (ResponseLoadSnapshotChunk);
  400. rpc ApplySnapshotChunk(RequestApplySnapshotChunk) returns (ResponseApplySnapshotChunk);
  401. rpc PrepareProposal(RequestPrepareProposal) returns (ResponsePrepareProposal);
  402. rpc ProcessProposal(RequestProcessProposal) returns (ResponseProcessProposal);
  403. rpc ExtendVote(RequestExtendVote) returns (ResponseExtendVote);
  404. rpc VerifyVoteExtension(RequestVerifyVoteExtension) returns (ResponseVerifyVoteExtension);
  405. rpc FinalizeBlock(RequestFinalizeBlock) returns (ResponseFinalizeBlock);
  406. }