Skip to content

Commit fa3fd5c

Browse files
arya2claude
andcommitted
get-hashes: add a per-block transparent output count (txouts)
Verified against a trusted commitment, cumulative txouts values give each block's bit offsets within the spentness-hint bitmap of the sync draft, letting a synchronizing node check the bitmap's length before downloading bodies and letting parallel work units index the bitmap without processing the blocks below them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 155d838 commit fa3fd5c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

zips/draft-arya-jvff-p2p-quic-transport.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,6 +1279,7 @@ Entry `k`, for `k` from 0 to `count − 1`, describes the block at height
12791279
| 32 | `hash` | Hash of the block at height `start_height + k`. |
12801280
| varies | `size` | The block's serialized size in bytes (see [Serialized Blocks](#serializedblocks)) (CompactSize). |
12811281
| varies | `txs` | Number of transactions in the block, including the coinbase transaction (CompactSize). |
1282+
| varies | `txouts` | Number of transparent outputs created by the block's transactions, including coinbase outputs (CompactSize). |
12821283
| varies | `notes` | Number of note commitments added by the block: two per JoinSplit description, plus one per Sapling Output description, plus one per Orchard-protocol Action description (in the Orchard or, from NU6.3, the Ironwood pool) (CompactSize). |
12831284

12841285
Requests the hashes of `count` consecutive blocks of the responder's best
@@ -1287,11 +1288,14 @@ metadata. A requester that needs coarser granularity (for example, the
12871288
spacing of its checkpoints; see [^draft-sync]) aggregates the per-block
12881289
values itself.
12891290

1290-
The `size`, `txs`, and `notes` fields are *scheduling hints*: they let a
1291+
The `size`, `txs`, `txouts`, and `notes` fields are *scheduling hints*:
1292+
they let a
12911293
synchronizing node estimate, before downloading, the download volume and
12921294
the validation and note-commitment-tree work in each range of the chain,
12931295
and so divide download work across peers and interleave transfer with
1294-
computation to reach the tip fastest (see [^draft-sync]). They are
1296+
computation to reach the tip fastest (see [^draft-sync]). Cumulative
1297+
`txouts` values additionally locate each block's bits within the
1298+
spentness-hint bitmap of [^draft-sync]. They are
12951299
deterministic functions of the block — for a given `hash`, every honest
12961300
responder returns identical values. A node MUST NOT rely on them for any
12971301
consensus or validity purpose.

0 commit comments

Comments
 (0)