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.

515 lines
18 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
  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. message RequestPrepareProposal {
  107. bytes hash = 1;
  108. tendermint.types.Header header = 2 [(gogoproto.nullable) = false];
  109. // txs is an array of transactions that will be included in a block,
  110. // sent to the app for possible modifications.
  111. repeated bytes txs = 3;
  112. ExtendedCommitInfo local_last_commit = 4 [(gogoproto.nullable) = false];
  113. repeated Evidence byzantine_validators = 5 [(gogoproto.nullable) = false];
  114. // the modified transactions cannot exceed this size.
  115. int64 max_tx_bytes = 6;
  116. }
  117. message RequestProcessProposal {
  118. bytes hash = 1;
  119. tendermint.types.Header header = 2 [(gogoproto.nullable) = false];
  120. repeated bytes txs = 3;
  121. CommitInfo proposed_last_commit = 4 [(gogoproto.nullable) = false];
  122. repeated Evidence byzantine_validators = 5 [(gogoproto.nullable) = false];
  123. }
  124. // Extends a vote with application-side injection
  125. message RequestExtendVote {
  126. types.Vote vote = 1;
  127. }
  128. // Verify the vote extension
  129. message RequestVerifyVoteExtension {
  130. types.Vote vote = 1;
  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 ResponsePrepareProposal {
  268. ModifiedTxStatus modified_tx_status = 1;
  269. repeated TxRecord tx_records = 2;
  270. bytes app_hash = 3;
  271. repeated ExecTxResult tx_results = 4;
  272. repeated ValidatorUpdate validator_updates = 5;
  273. tendermint.types.ConsensusParams consensus_param_updates = 6;
  274. enum ModifiedTxStatus {
  275. UNKNOWN = 0;
  276. UNMODIFIED = 1;
  277. MODIFIED = 2;
  278. }
  279. }
  280. message ResponseProcessProposal {
  281. ProposalStatus status = 1;
  282. bytes app_hash = 2;
  283. repeated ExecTxResult tx_results = 3;
  284. repeated ValidatorUpdate validator_updates = 4;
  285. tendermint.types.ConsensusParams consensus_param_updates = 5;
  286. enum ProposalStatus {
  287. UNKNOWN = 0;
  288. ACCEPT = 1;
  289. REJECT = 2;
  290. }
  291. }
  292. message ResponseExtendVote {
  293. tendermint.types.VoteExtension vote_extension = 1;
  294. }
  295. message ResponseVerifyVoteExtension {
  296. VerifyStatus status = 1;
  297. enum VerifyStatus {
  298. UNKNOWN = 0;
  299. ACCEPT = 1;
  300. REJECT = 2;
  301. }
  302. }
  303. message ResponseFinalizeBlock {
  304. repeated Event events = 1
  305. [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
  306. repeated ExecTxResult tx_results = 2;
  307. repeated ValidatorUpdate validator_updates = 3 [(gogoproto.nullable) = false];
  308. tendermint.types.ConsensusParams consensus_param_updates = 4;
  309. bytes app_hash = 5;
  310. int64 retain_height = 6;
  311. }
  312. //----------------------------------------
  313. // Misc.
  314. message CommitInfo {
  315. int32 round = 1;
  316. repeated VoteInfo votes = 2 [(gogoproto.nullable) = false];
  317. }
  318. message ExtendedCommitInfo {
  319. int32 round = 1;
  320. repeated ExtendedVoteInfo votes = 2 [(gogoproto.nullable) = false];
  321. }
  322. // Event allows application developers to attach additional information to
  323. // ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx.
  324. // Later, transactions may be queried using these events.
  325. message Event {
  326. string type = 1;
  327. repeated EventAttribute attributes = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes,omitempty"];
  328. }
  329. // EventAttribute is a single key-value pair, associated with an event.
  330. message EventAttribute {
  331. string key = 1;
  332. string value = 2;
  333. bool index = 3; // nondeterministic
  334. }
  335. // ExecTxResult contains results of executing one individual transaction.
  336. //
  337. // * Its structure is equivalent to #ResponseDeliverTx which will be deprecated/deleted
  338. message ExecTxResult {
  339. uint32 code = 1;
  340. bytes data = 2;
  341. string log = 3; // nondeterministic
  342. string info = 4; // nondeterministic
  343. int64 gas_wanted = 5;
  344. int64 gas_used = 6;
  345. repeated Event events = 7
  346. [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; // nondeterministic
  347. string codespace = 8;
  348. }
  349. // TxResult contains results of executing the transaction.
  350. //
  351. // One usage is indexing transaction results.
  352. message TxResult {
  353. int64 height = 1;
  354. uint32 index = 2;
  355. bytes tx = 3;
  356. ExecTxResult result = 4 [(gogoproto.nullable) = false];
  357. }
  358. message TxRecord {
  359. TxAction action = 1;
  360. bytes tx = 2;
  361. // TxAction contains App-provided information on what to do with a transaction that is part of a raw proposal
  362. enum TxAction {
  363. UNKNOWN = 0; // Unknown action
  364. UNMODIFIED = 1; // The Application did not modify this transaction.
  365. ADDED = 2; // The Application added this transaction.
  366. REMOVED = 3; // The Application wants this transaction removed from the proposal and the mempool.
  367. }
  368. }
  369. //----------------------------------------
  370. // Blockchain Types
  371. // Validator
  372. message Validator {
  373. bytes address = 1; // The first 20 bytes of SHA256(public key)
  374. // PubKey pub_key = 2 [(gogoproto.nullable)=false];
  375. int64 power = 3; // The voting power
  376. }
  377. // ValidatorUpdate
  378. message ValidatorUpdate {
  379. tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false];
  380. int64 power = 2;
  381. }
  382. // VoteInfo
  383. message VoteInfo {
  384. Validator validator = 1 [(gogoproto.nullable) = false];
  385. bool signed_last_block = 2;
  386. reserved 3; // Placeholder for tendermint_signed_extension in v0.37
  387. reserved 4; // Placeholder for app_signed_extension in v0.37
  388. }
  389. message ExtendedVoteInfo {
  390. Validator validator = 1 [(gogoproto.nullable) = false];
  391. bool signed_last_block = 2;
  392. bytes vote_extension = 3;
  393. }
  394. enum EvidenceType {
  395. UNKNOWN = 0;
  396. DUPLICATE_VOTE = 1;
  397. LIGHT_CLIENT_ATTACK = 2;
  398. }
  399. message Evidence {
  400. EvidenceType type = 1;
  401. // The offending validator
  402. Validator validator = 2 [(gogoproto.nullable) = false];
  403. // The height when the offense occurred
  404. int64 height = 3;
  405. // The corresponding time where the offense occurred
  406. google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
  407. // Total voting power of the validator set in case the ABCI application does
  408. // not store historical validators.
  409. // https://github.com/tendermint/tendermint/issues/4581
  410. int64 total_voting_power = 5;
  411. }
  412. //----------------------------------------
  413. // State Sync Types
  414. message Snapshot {
  415. uint64 height = 1; // The height at which the snapshot was taken
  416. uint32 format = 2; // The application-specific snapshot format
  417. uint32 chunks = 3; // Number of chunks in the snapshot
  418. bytes hash = 4; // Arbitrary snapshot hash, equal only if identical
  419. bytes metadata = 5; // Arbitrary application metadata
  420. }
  421. //----------------------------------------
  422. // Service Definition
  423. service ABCIApplication {
  424. rpc Echo(RequestEcho) returns (ResponseEcho);
  425. rpc Flush(RequestFlush) returns (ResponseFlush);
  426. rpc Info(RequestInfo) returns (ResponseInfo);
  427. rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx);
  428. rpc Query(RequestQuery) returns (ResponseQuery);
  429. rpc Commit(RequestCommit) returns (ResponseCommit);
  430. rpc InitChain(RequestInitChain) returns (ResponseInitChain);
  431. rpc ListSnapshots(RequestListSnapshots) returns (ResponseListSnapshots);
  432. rpc OfferSnapshot(RequestOfferSnapshot) returns (ResponseOfferSnapshot);
  433. rpc LoadSnapshotChunk(RequestLoadSnapshotChunk) returns (ResponseLoadSnapshotChunk);
  434. rpc ApplySnapshotChunk(RequestApplySnapshotChunk) returns (ResponseApplySnapshotChunk);
  435. rpc PrepareProposal(RequestPrepareProposal) returns (ResponsePrepareProposal);
  436. rpc ProcessProposal(RequestProcessProposal) returns (ResponseProcessProposal);
  437. rpc ExtendVote(RequestExtendVote) returns (ResponseExtendVote);
  438. rpc VerifyVoteExtension(RequestVerifyVoteExtension) returns (ResponseVerifyVoteExtension);
  439. rpc FinalizeBlock(RequestFinalizeBlock) returns (ResponseFinalizeBlock);
  440. }