From 4bdddf9829dce751b25b3166df604dd125cf4b80 Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Mon, 23 Jan 2017 20:48:12 -0800 Subject: [PATCH] First commit to demonstrate change --- README.md | 10 +++++++--- types/types.proto | 33 +++++++++++---------------------- 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 23c1ac65..083b031c 100644 --- a/README.md +++ b/README.md @@ -85,16 +85,20 @@ ABCI requests/responses are simple Protobuf messages. Check out the [schema fil #### Query * __Arguments__: - * `Data ([]byte)`: The query request bytes + * `Query ([]byte)`: The query request bytes + * `Path (string)`: Path of request + * `Height (uint64)`: The block height for which you want the query (default=0 returns data for the latest committed block) + * `Prove (bool)`: Return Merkle proof with response * __Returns__: - * `Code (uint32)`: Response code * `Data ([]byte)`: The query response bytes * `Log (string)`: Debug or error message + * `Height (uint64)`: The block height from which data was derived + * `Proof ([]byte)`: Proof for the data, if requested #### Proof * __Arguments__: * `Key ([]byte)`: The key whose data you want to verifiably query - * `Height (int64)`: The block height for which you want the proof (default=0 returns the proof for last committed block) + * `Height (uint64)`: The block height for which you want the proof (default=0 returns the proof for last committed block) * __Returns__: * `Code (uint32)`: Response code * `Data ([]byte)`: The query response bytes diff --git a/types/types.proto b/types/types.proto index 045c2d68..14093476 100644 --- a/types/types.proto +++ b/types/types.proto @@ -18,14 +18,13 @@ enum MessageType { Info = 0x03; SetOption = 0x04; Exception = 0x05; - DeliverTx = 0x11; + DeliverTx = 0x11; CheckTx = 0x12; Commit = 0x13; Query = 0x14; InitChain = 0x15; BeginBlock = 0x16; EndBlock = 0x17; - Proof = 0x18; } //---------------------------------------- @@ -87,7 +86,6 @@ message Request { RequestInitChain init_chain = 9; RequestBeginBlock begin_block = 10; RequestEndBlock end_block = 11; - RequestProof proof = 12; } } @@ -107,20 +105,18 @@ message RequestSetOption{ } message RequestDeliverTx{ - bytes tx = 1; + bytes tx = 1; } message RequestCheckTx{ - bytes tx = 1; + bytes tx = 1; } message RequestQuery{ - bytes query = 1; -} - -message RequestProof{ - bytes key = 1; - uint64 height = 2; + bytes query = 1; + string path = 2; + uint64 height = 3; + bool prove = 4; } message RequestCommit{ @@ -157,7 +153,6 @@ message Response { ResponseInitChain init_chain = 10; ResponseBeginBlock begin_block = 11; ResponseEndBlock end_block = 12; - ResponseProof proof = 13; } } @@ -196,15 +191,10 @@ message ResponseCheckTx{ } message ResponseQuery{ - CodeType code = 1; - bytes data = 2; - string log = 3; -} - -message ResponseProof{ - CodeType code = 1; bytes data = 2; string log = 3; + uint64 height = 4; + bytes proof = 5; } message ResponseCommit{ @@ -250,8 +240,8 @@ message PartSetHeader { } message Validator { - bytes pubKey = 1; - uint64 power = 2; + bytes pubKey = 1; + uint64 power = 2; } //---------------------------------------- @@ -265,7 +255,6 @@ service ABCIApplication { rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx); rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx); rpc Query(RequestQuery) returns (ResponseQuery); - rpc Proof(RequestProof) returns (ResponseProof); rpc Commit(RequestCommit) returns (ResponseCommit); rpc InitChain(RequestInitChain) returns (ResponseInitChain); rpc BeginBlock(RequestBeginBlock) returns (ResponseBeginBlock);