Skip to content

Commit 5a702d4

Browse files
committed
(trivial) blockref: rephrase stripping leading zeroes from hash
1 parent c87b393 commit 5a702d4

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

docs/protocol-basics.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,9 @@ However, it helps the client to also provide the corresponding height,
234234
otherwise the client might need to maintain some kind of blockhash->blockheight map,
235235
which (naively) for a million blocks might take ~50-100 MB of RAM (or disk space).
236236

237-
To save some bandwidth, we can strip the leading zeroes (from the hex representation!)
238-
of the block hash. We only strip the zero hex characters from the low-entropy end,
239-
and as the length of the full blockhash is a known constant, this leaves the compressed
240-
representation unambiguous.
237+
To save some bandwidth, we strip the leading zeroes (which result from mining difficulty)
238+
from the hex representation of the block hash. As the length of the full blockhash
239+
is a known constant, this leaves the compressed representation unambiguous.
241240

242241
The `blockref` is a `(block_height, compressed_blockhash)` pair, serialized as a json array.
243242
`block_height` is an integer, the corresponding height for `compressed_blockhash`.

0 commit comments

Comments
 (0)