Skip to content

Commit c0cf957

Browse files
authored
Merge pull request #5 from zcash/2025-11-comments
Documentation (comments) only
2 parents d978256 + 912fc36 commit c0cf957

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

walletrpc/compact_formats.proto

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ message CompactBlock {
2828
bytes hash = 3; // the ID (hash) of this block, same as in block explorers
2929
bytes prevHash = 4; // the ID (hash) of this block's predecessor
3030
uint32 time = 5; // Unix epoch time when the block was mined
31-
bytes header = 6; // (hash, prevHash, and time) OR (full header)
31+
bytes header = 6; // full header (as returned by the getblock RPC)
3232
repeated CompactTx vtx = 7; // zero or more compact transactions from this block
3333
ChainMetadata chainMetadata = 8; // information about the state of the chain as of this block
3434
}
@@ -41,6 +41,7 @@ message CompactBlock {
4141
message CompactTx {
4242
// The index of the transaction within the block.
4343
uint64 index = 1;
44+
4445
// The id of the transaction as defined in
4546
// [§ 7.1.1 ‘Transaction Identifiers’](https://zips.z.cash/protocol/protocol.pdf#txnidentifiers)
4647
// This byte array MUST be in protocol order and MUST NOT be reversed
@@ -58,6 +59,7 @@ message CompactTx {
5859
repeated CompactSaplingSpend spends = 4;
5960
repeated CompactSaplingOutput outputs = 5;
6061
repeated CompactOrchardAction actions = 6;
62+
6163
// `CompactTxIn` values corresponding to the `vin` entries of the full transaction.
6264
//
6365
// Note: the single null-outpoint input for coinbase transactions is omitted. Light
@@ -74,6 +76,7 @@ message CompactTxIn {
7476
// byte array must be in protocol order and MUST NOT be reversed or
7577
// hex-encoded.
7678
bytes prevoutTxid = 1;
79+
7780
// The index of the output being spent in the `vout` array of the
7881
// transaction referred to by `prevoutTxid`.
7982
uint32 prevoutIndex = 2;
@@ -86,6 +89,7 @@ message CompactTxIn {
8689
message TxOut {
8790
// The value of the output, in Zatoshis.
8891
uint64 value = 1;
92+
8993
// The script pubkey that must be satisfied in order to spend this output.
9094
bytes scriptPubKey = 2;
9195
}

walletrpc/service.proto

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,16 +200,23 @@ message GetAddressUtxosReplyList {
200200
service CompactTxStreamer {
201201
// Return the BlockID of the block at the tip of the best chain
202202
rpc GetLatestBlock(ChainSpec) returns (BlockID) {}
203+
203204
// Return the compact block corresponding to the given block identifier
204205
rpc GetBlock(BlockID) returns (CompactBlock) {}
206+
205207
// Same as GetBlock except the returned CompactBlock value contains only
206208
// nullifiers.
207209
//
208210
// Note: this method is deprecated. Implementations should ignore any
209211
// `PoolType::TRANSPARENT` member of the `poolTypes` argument.
210212
rpc GetBlockNullifiers(BlockID) returns (CompactBlock) {}
211-
// Return a list of consecutive compact blocks
213+
214+
// Return a list of consecutive compact blocks in the specified range.
215+
//
216+
// If range.start <= range.end, blocks are returned increasing height order;
217+
// otherwise blocks are returned in decreasing height order.
212218
rpc GetBlockRange(BlockRange) returns (stream CompactBlock) {}
219+
213220
// Same as GetBlockRange except the returned CompactBlock values contain
214221
// only nullifiers.
215222
//
@@ -219,6 +226,7 @@ service CompactTxStreamer {
219226

220227
// Return the requested full (not compact) transaction (as from zcashd)
221228
rpc GetTransaction(TxFilter) returns (RawTransaction) {}
229+
222230
// Submit the given transaction to the Zcash network
223231
rpc SendTransaction(RawTransaction) returns (SendResponse) {}
224232

@@ -268,6 +276,7 @@ service CompactTxStreamer {
268276

269277
// Return information about this lightwalletd instance and the blockchain
270278
rpc GetLightdInfo(Empty) returns (LightdInfo) {}
279+
271280
// Testing-only, requires lightwalletd --ping-very-insecure (do not enable in production)
272281
rpc Ping(Duration) returns (PingResponse) {}
273282
}

0 commit comments

Comments
 (0)