Revert "proto: abci++ changes (#348)" (#360)

This reverts commit caaafc4449.
This commit is contained in:
William Banfield
2021-11-16 16:21:48 -05:00
committed by GitHub
parent a00de7199f
commit ffe8742e1c
+32 -94
View File
@@ -21,24 +21,20 @@ import "gogoproto/gogo.proto";
message Request { message Request {
oneof value { oneof value {
RequestEcho echo = 1; RequestEcho echo = 1;
RequestFlush flush = 2; RequestFlush flush = 2;
RequestInfo info = 3; RequestInfo info = 3;
RequestInitChain init_chain = 4; RequestInitChain init_chain = 4;
RequestQuery query = 5; RequestQuery query = 5;
RequestBeginBlock begin_block = 6 [deprecated = true]; RequestBeginBlock begin_block = 6;
RequestCheckTx check_tx = 7; RequestCheckTx check_tx = 7;
RequestDeliverTx deliver_tx = 8 [deprecated = true]; RequestDeliverTx deliver_tx = 8;
RequestEndBlock end_block = 9 [deprecated = true]; RequestEndBlock end_block = 9;
RequestCommit commit = 10; RequestCommit commit = 10;
RequestListSnapshots list_snapshots = 11; RequestListSnapshots list_snapshots = 11;
RequestOfferSnapshot offer_snapshot = 12; RequestOfferSnapshot offer_snapshot = 12;
RequestLoadSnapshotChunk load_snapshot_chunk = 13; RequestLoadSnapshotChunk load_snapshot_chunk = 13;
RequestApplySnapshotChunk apply_snapshot_chunk = 14; RequestApplySnapshotChunk apply_snapshot_chunk = 14;
RequestPrepareProposal prepare_proposal = 15;
RequestExtendVote extend_vote = 16;
RequestVerifyVoteExtension verify_vote_extension = 17;
RequestFinalizeBlock finalize_block = 18;
} }
} }
@@ -121,57 +117,26 @@ message RequestApplySnapshotChunk {
string sender = 3; string sender = 3;
} }
// Extends a vote with application-side injection
message RequestExtendVote {
types.Vote vote = 1;
}
// Verify the vote extension
message RequestVerifyVoteExtension {
types.Vote vote = 1;
}
message RequestPrepareProposal {
// block_data is an array of transactions that will be included in a block,
// sent to the app for possible modifications.
// applications can not exceed the size of the data passed to it.
repeated bytes block_data = 1;
// If an application decides to populate block_data with extra information, they can not exceed this value.
int64 block_data_size = 2;
}
message RequestFinalizeBlock {
repeated bytes txs = 1;
bytes hash = 2;
tendermint.types.Header header = 3 [(gogoproto.nullable) = false];
LastCommitInfo last_commit_info = 4 [(gogoproto.nullable) = false];
repeated Evidence byzantine_validators = 5 [(gogoproto.nullable) = false];
}
//---------------------------------------- //----------------------------------------
// Response types // Response types
message Response { message Response {
oneof value { oneof value {
ResponseException exception = 1; ResponseException exception = 1;
ResponseEcho echo = 2; ResponseEcho echo = 2;
ResponseFlush flush = 3; ResponseFlush flush = 3;
ResponseInfo info = 4; ResponseInfo info = 4;
ResponseInitChain init_chain = 5; ResponseInitChain init_chain = 5;
ResponseQuery query = 6; ResponseQuery query = 6;
ResponseBeginBlock begin_block = 7 [deprecated = true]; ResponseBeginBlock begin_block = 7;
ResponseCheckTx check_tx = 8; ResponseCheckTx check_tx = 8;
ResponseDeliverTx deliver_tx = 9 [deprecated = true]; ResponseDeliverTx deliver_tx = 9;
ResponseEndBlock end_block = 10 [deprecated = true]; ResponseEndBlock end_block = 10;
ResponseCommit commit = 11; ResponseCommit commit = 11;
ResponseListSnapshots list_snapshots = 12; ResponseListSnapshots list_snapshots = 12;
ResponseOfferSnapshot offer_snapshot = 13; ResponseOfferSnapshot offer_snapshot = 13;
ResponseLoadSnapshotChunk load_snapshot_chunk = 14; ResponseLoadSnapshotChunk load_snapshot_chunk = 14;
ResponseApplySnapshotChunk apply_snapshot_chunk = 15; ResponseApplySnapshotChunk apply_snapshot_chunk = 15;
ResponsePrepareProposal prepare_proposal = 16;
ResponseExtendVote extend_vote = 17;
ResponseVerifyVoteExtension verify_vote_extension = 18;
ResponseFinalizeBlock finalize_block = 19;
} }
} }
@@ -233,7 +198,6 @@ message ResponseCheckTx {
int64 priority = 10; int64 priority = 10;
// mempool_error is set by Tendermint. // mempool_error is set by Tendermint.
// ABCI applications creating a ResponseCheckTX should not set mempool_error. // ABCI applications creating a ResponseCheckTX should not set mempool_error.
string mempool_error = 11; string mempool_error = 11;
} }
@@ -298,32 +262,6 @@ message ResponseApplySnapshotChunk {
} }
} }
message ResponseExtendVote {
tendermint.types.VoteExtension vote_extension = 1;
}
message ResponseVerifyVoteExtension {
Result result = 1;
enum Result {
UNKNOWN = 0; // Unknown result, treat as ACCEPT by default
ACCEPT = 1; // Vote extension verified, include the vote
SLASH = 2; // Vote extension verification aborted, continue but slash validator
REJECT = 3; // Vote extension invalidated
}
}
message ResponsePrepareProposal {
repeated bytes block_data = 1;
}
message ResponseFinalizeBlock {
repeated ResponseDeliverTx txs = 1;
repeated ValidatorUpdate validator_updates = 2 [(gogoproto.nullable) = false];
tendermint.types.ConsensusParams consensus_param_updates = 3;
repeated Event events = 4 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"];
}
//---------------------------------------- //----------------------------------------
// Misc. // Misc.
@@ -417,15 +355,15 @@ service ABCIApplication {
rpc Echo(RequestEcho) returns (ResponseEcho); rpc Echo(RequestEcho) returns (ResponseEcho);
rpc Flush(RequestFlush) returns (ResponseFlush); rpc Flush(RequestFlush) returns (ResponseFlush);
rpc Info(RequestInfo) returns (ResponseInfo); rpc Info(RequestInfo) returns (ResponseInfo);
rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx);
rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx); rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx);
rpc Query(RequestQuery) returns (ResponseQuery); rpc Query(RequestQuery) returns (ResponseQuery);
rpc Commit(RequestCommit) returns (ResponseCommit); rpc Commit(RequestCommit) returns (ResponseCommit);
rpc InitChain(RequestInitChain) returns (ResponseInitChain); rpc InitChain(RequestInitChain) returns (ResponseInitChain);
rpc BeginBlock(RequestBeginBlock) returns (ResponseBeginBlock);
rpc EndBlock(RequestEndBlock) returns (ResponseEndBlock);
rpc ListSnapshots(RequestListSnapshots) returns (ResponseListSnapshots); rpc ListSnapshots(RequestListSnapshots) returns (ResponseListSnapshots);
rpc OfferSnapshot(RequestOfferSnapshot) returns (ResponseOfferSnapshot); rpc OfferSnapshot(RequestOfferSnapshot) returns (ResponseOfferSnapshot);
rpc LoadSnapshotChunk(RequestLoadSnapshotChunk) returns (ResponseLoadSnapshotChunk); rpc LoadSnapshotChunk(RequestLoadSnapshotChunk) returns (ResponseLoadSnapshotChunk);
rpc ApplySnapshotChunk(RequestApplySnapshotChunk) returns (ResponseApplySnapshotChunk); rpc ApplySnapshotChunk(RequestApplySnapshotChunk) returns (ResponseApplySnapshotChunk);
rpc ExtendVote(RequestExtendVote) returns (ResponseExtendVote);
rpc VerifyVoteExtension(RequestVerifyVoteExtension) returns (ResponseVerifyVoteExtension);
rpc PrepareProposal(RequestPrepareProposal) returns (ResponsePrepareProposal);
} }