2016-01-30 19:36:33 -08:00
|
|
|
syntax = "proto3";
|
|
|
|
package types;
|
|
|
|
|
2017-11-30 12:31:10 -08:00
|
|
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
|
|
|
|
|
|
|
|
2017-01-12 12:47:55 -08:00
|
|
|
// This file is copied from http://github.com/tendermint/abci
|
2016-01-31 19:56:02 -08:00
|
|
|
|
2016-01-30 19:36:33 -08:00
|
|
|
//----------------------------------------
|
|
|
|
// Request types
|
|
|
|
|
|
|
|
message Request {
|
2017-11-09 13:56:24 -08:00
|
|
|
oneof value{
|
|
|
|
RequestEcho echo = 1;
|
|
|
|
RequestFlush flush = 2;
|
|
|
|
RequestInfo info = 3;
|
|
|
|
RequestSetOption set_option = 4;
|
|
|
|
RequestDeliverTx deliver_tx = 5;
|
|
|
|
RequestCheckTx check_tx = 6;
|
|
|
|
RequestCommit commit = 7;
|
|
|
|
RequestQuery query = 8;
|
|
|
|
RequestInitChain init_chain = 9;
|
|
|
|
RequestBeginBlock begin_block = 10;
|
|
|
|
RequestEndBlock end_block = 11;
|
|
|
|
}
|
2016-05-13 23:22:32 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message RequestEcho {
|
2017-11-09 13:56:24 -08:00
|
|
|
string message = 1;
|
2016-05-13 23:22:32 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message RequestFlush {
|
|
|
|
}
|
|
|
|
|
|
|
|
message RequestInfo {
|
2017-11-09 13:56:24 -08:00
|
|
|
string version = 1;
|
2016-05-13 23:22:32 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message RequestSetOption{
|
2017-11-09 13:56:24 -08:00
|
|
|
string key = 1;
|
|
|
|
string value = 2;
|
2016-05-13 23:22:32 -07:00
|
|
|
}
|
|
|
|
|
2017-01-12 12:27:08 -08:00
|
|
|
message RequestDeliverTx{
|
2017-11-09 13:56:24 -08:00
|
|
|
bytes tx = 1;
|
2016-05-13 23:22:32 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message RequestCheckTx{
|
2017-11-09 13:56:24 -08:00
|
|
|
bytes tx = 1;
|
2016-05-13 23:22:32 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message RequestQuery{
|
2017-11-09 13:56:24 -08:00
|
|
|
bytes data = 1;
|
|
|
|
string path = 2;
|
2017-11-30 21:41:07 -08:00
|
|
|
int64 height = 3;
|
2017-11-09 13:56:24 -08:00
|
|
|
bool prove = 4;
|
2017-01-10 06:49:26 -08:00
|
|
|
}
|
|
|
|
|
2016-05-13 23:22:32 -07:00
|
|
|
message RequestCommit{
|
|
|
|
}
|
|
|
|
|
|
|
|
message RequestInitChain{
|
2017-11-09 13:56:24 -08:00
|
|
|
repeated Validator validators = 1;
|
2016-05-13 23:22:32 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message RequestBeginBlock{
|
2017-11-09 13:56:24 -08:00
|
|
|
bytes hash = 1;
|
|
|
|
Header header = 2;
|
2017-12-01 22:48:46 -08:00
|
|
|
repeated int32 absent_validators = 3 [(gogoproto.customtype) = "int", (gogoproto.nullable) = false];
|
2017-11-30 22:09:16 -08:00
|
|
|
repeated Evidence byzantine_validators = 4;
|
2016-05-13 23:22:32 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message RequestEndBlock{
|
2017-11-30 21:41:07 -08:00
|
|
|
int64 height = 1;
|
2016-01-30 19:36:33 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------
|
|
|
|
// Response types
|
|
|
|
|
2016-05-13 23:22:32 -07:00
|
|
|
|
2016-01-30 19:36:33 -08:00
|
|
|
message Response {
|
2017-11-09 13:56:24 -08:00
|
|
|
oneof value{
|
|
|
|
ResponseException exception = 1;
|
|
|
|
ResponseEcho echo = 2;
|
|
|
|
ResponseFlush flush = 3;
|
|
|
|
ResponseInfo info = 4;
|
|
|
|
ResponseSetOption set_option = 5;
|
|
|
|
ResponseDeliverTx deliver_tx = 6;
|
|
|
|
ResponseCheckTx check_tx = 7;
|
|
|
|
ResponseCommit commit = 8;
|
|
|
|
ResponseQuery query = 9;
|
|
|
|
ResponseInitChain init_chain = 10;
|
|
|
|
ResponseBeginBlock begin_block = 11;
|
|
|
|
ResponseEndBlock end_block = 12;
|
|
|
|
}
|
2016-05-13 23:22:32 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message ResponseException{
|
2017-11-09 13:56:24 -08:00
|
|
|
string error = 1;
|
2016-05-13 23:22:32 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message ResponseEcho {
|
2017-11-09 13:56:24 -08:00
|
|
|
string message = 1;
|
2016-05-13 23:22:32 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message ResponseFlush{
|
|
|
|
}
|
|
|
|
|
|
|
|
message ResponseInfo {
|
2017-11-09 13:56:24 -08:00
|
|
|
string data = 1;
|
|
|
|
string version = 2;
|
2017-11-30 21:41:07 -08:00
|
|
|
int64 last_block_height = 3;
|
2017-11-09 13:56:24 -08:00
|
|
|
bytes last_block_app_hash = 4;
|
2016-05-13 23:22:32 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message ResponseSetOption{
|
2017-11-09 13:56:24 -08:00
|
|
|
string log = 1;
|
2016-05-13 23:22:32 -07:00
|
|
|
}
|
|
|
|
|
2017-01-12 12:27:08 -08:00
|
|
|
message ResponseDeliverTx{
|
2017-11-30 11:29:12 -08:00
|
|
|
uint32 code = 1;
|
2017-11-30 12:31:10 -08:00
|
|
|
bytes data = 2 [(gogoproto.customtype) = "github.com/tendermint/go-wire/data.Bytes", (gogoproto.nullable) = false];
|
2017-11-09 13:52:52 -08:00
|
|
|
string log = 3;
|
|
|
|
repeated KVPair tags = 4;
|
2016-05-13 23:22:32 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message ResponseCheckTx{
|
2017-11-30 11:29:12 -08:00
|
|
|
uint32 code = 1;
|
2017-11-30 12:31:10 -08:00
|
|
|
bytes data = 2 [(gogoproto.customtype) = "github.com/tendermint/go-wire/data.Bytes", (gogoproto.nullable) = false];
|
2017-11-09 13:56:24 -08:00
|
|
|
string log = 3;
|
2017-11-30 21:41:07 -08:00
|
|
|
int64 gas = 4;
|
|
|
|
int64 fee = 5;
|
2016-05-13 23:22:32 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message ResponseQuery{
|
2017-11-30 11:29:12 -08:00
|
|
|
uint32 code = 1;
|
2017-11-09 13:56:24 -08:00
|
|
|
int64 index = 2;
|
2017-11-30 12:31:10 -08:00
|
|
|
bytes key = 3 [(gogoproto.customtype) = "github.com/tendermint/go-wire/data.Bytes", (gogoproto.nullable) = false];
|
|
|
|
bytes value = 4 [(gogoproto.customtype) = "github.com/tendermint/go-wire/data.Bytes", (gogoproto.nullable) = false];
|
|
|
|
bytes proof = 5 [(gogoproto.customtype) = "github.com/tendermint/go-wire/data.Bytes", (gogoproto.nullable) = false];
|
2017-11-30 21:41:07 -08:00
|
|
|
int64 height = 6;
|
2017-11-09 13:56:24 -08:00
|
|
|
string log = 7;
|
2017-01-10 06:49:26 -08:00
|
|
|
}
|
|
|
|
|
2016-05-13 23:22:32 -07:00
|
|
|
message ResponseCommit{
|
2017-11-30 11:29:12 -08:00
|
|
|
uint32 code = 1;
|
2017-11-30 12:31:10 -08:00
|
|
|
bytes data = 2 [(gogoproto.customtype) = "github.com/tendermint/go-wire/data.Bytes", (gogoproto.nullable) = false];
|
2017-11-09 13:56:24 -08:00
|
|
|
string log = 3;
|
2016-05-13 23:22:32 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
message ResponseInitChain{
|
|
|
|
}
|
|
|
|
|
|
|
|
message ResponseBeginBlock{
|
|
|
|
}
|
|
|
|
|
|
|
|
message ResponseEndBlock{
|
2017-11-09 13:56:24 -08:00
|
|
|
repeated Validator diffs = 1;
|
2016-01-30 19:36:33 -08:00
|
|
|
}
|
2016-01-31 19:56:02 -08:00
|
|
|
|
2016-08-22 11:01:26 -07:00
|
|
|
//----------------------------------------
|
|
|
|
// Blockchain Types
|
|
|
|
|
|
|
|
message Header {
|
2017-11-09 13:56:24 -08:00
|
|
|
string chain_id = 1;
|
2017-11-30 21:41:07 -08:00
|
|
|
int64 height = 2;
|
|
|
|
int64 time = 3;
|
2017-12-01 22:48:46 -08:00
|
|
|
int32 num_txs = 4 [(gogoproto.customtype) = "int", (gogoproto.nullable) = false];
|
2017-11-09 13:56:24 -08:00
|
|
|
BlockID last_block_id = 5;
|
|
|
|
bytes last_commit_hash = 6;
|
|
|
|
bytes data_hash = 7;
|
|
|
|
bytes validators_hash = 8;
|
|
|
|
bytes app_hash = 9;
|
2016-11-16 13:11:36 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
message BlockID {
|
2017-11-09 13:56:24 -08:00
|
|
|
bytes hash = 1;
|
|
|
|
PartSetHeader parts = 2;
|
2016-08-22 11:01:26 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
message PartSetHeader {
|
2017-12-01 22:48:46 -08:00
|
|
|
int32 total = 1 [(gogoproto.customtype) = "int", (gogoproto.nullable) = false];
|
2017-11-09 13:56:24 -08:00
|
|
|
bytes hash = 2;
|
2016-08-22 11:01:26 -07:00
|
|
|
}
|
2016-02-28 18:53:24 -08:00
|
|
|
|
|
|
|
message Validator {
|
2017-11-30 21:41:07 -08:00
|
|
|
bytes pub_key = 1;
|
|
|
|
int64 power = 2;
|
2016-02-28 18:53:24 -08:00
|
|
|
}
|
2016-05-17 21:54:32 -07:00
|
|
|
|
2017-11-30 22:09:16 -08:00
|
|
|
message Evidence {
|
|
|
|
bytes pub_key = 1;
|
|
|
|
int64 height = 2;
|
|
|
|
}
|
|
|
|
|
2017-11-09 13:52:52 -08:00
|
|
|
//----------------------------------------
|
|
|
|
// Abstract types
|
|
|
|
|
|
|
|
message KVPair {
|
|
|
|
string key = 1;
|
2017-11-20 16:21:59 -08:00
|
|
|
enum Type {
|
|
|
|
STRING = 0;
|
|
|
|
INT = 1;
|
|
|
|
}
|
|
|
|
Type value_type = 2;
|
|
|
|
string value_string = 3;
|
|
|
|
int64 value_int = 4;
|
2017-11-09 13:52:52 -08:00
|
|
|
}
|
|
|
|
|
2016-05-17 21:54:32 -07:00
|
|
|
//----------------------------------------
|
|
|
|
// Service Definition
|
|
|
|
|
2017-01-12 12:47:55 -08:00
|
|
|
service ABCIApplication {
|
2017-11-09 13:56:24 -08:00
|
|
|
rpc Echo(RequestEcho) returns (ResponseEcho) ;
|
|
|
|
rpc Flush(RequestFlush) returns (ResponseFlush);
|
|
|
|
rpc Info(RequestInfo) returns (ResponseInfo);
|
|
|
|
rpc SetOption(RequestSetOption) returns (ResponseSetOption);
|
|
|
|
rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx);
|
|
|
|
rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx);
|
|
|
|
rpc Query(RequestQuery) returns (ResponseQuery);
|
|
|
|
rpc Commit(RequestCommit) returns (ResponseCommit);
|
|
|
|
rpc InitChain(RequestInitChain) returns (ResponseInitChain);
|
|
|
|
rpc BeginBlock(RequestBeginBlock) returns (ResponseBeginBlock);
|
|
|
|
rpc EndBlock(RequestEndBlock) returns (ResponseEndBlock);
|
2016-05-17 21:54:32 -07:00
|
|
|
}
|