1
0
mirror of https://github.com/bitcoin/bips.git synced 2024-11-19 01:40:05 +01:00

Fix description of M parameter

The M parameter is used as the inverse of the false probability rate, so change its incorrect usage in two places.
This commit is contained in:
John Moffett 2023-01-31 13:12:53 -05:00 committed by GitHub
parent f277d42e0d
commit fa4eeeef38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,7 +85,7 @@ one is able to select both Parameters independently, then more optimal values
can be can be
selected<ref>https://gist.github.com/sipa/576d5f09c3b86c3b1b75598d799fc845</ref>. selected<ref>https://gist.github.com/sipa/576d5f09c3b86c3b1b75598d799fc845</ref>.
Set membership queries against the hash outputs will have a false positive rate Set membership queries against the hash outputs will have a false positive rate
of <code>M</code>. To avoid integer overflow, the number of items <code>N</code> of <code>1 / M</code>. To avoid integer overflow, the number of items <code>N</code>
MUST be <2^32 and <code>M</code> MUST be <2^32. MUST be <2^32 and <code>M</code> MUST be <2^32.
The items are first passed through the pseudorandom function ''SipHash'', which The items are first passed through the pseudorandom function ''SipHash'', which
@ -189,7 +189,7 @@ golomb_decode(stream, P: uint) -> uint64:
A GCS is constructed from four parameters: A GCS is constructed from four parameters:
* <code>L</code>, a vector of <code>N</code> raw items * <code>L</code>, a vector of <code>N</code> raw items
* <code>P</code>, the bit parameter of the Golomb-Rice coding * <code>P</code>, the bit parameter of the Golomb-Rice coding
* <code>M</code>, the target false positive rate * <code>M</code>, the inverse of the target false positive rate
* <code>k</code>, the 128-bit key used to randomize the SipHash outputs * <code>k</code>, the 128-bit key used to randomize the SipHash outputs
The result is a byte vector with a minimum size of <code>N * (P + 1)</code> The result is a byte vector with a minimum size of <code>N * (P + 1)</code>