← Back to team overview

mimblewimble team mailing list archive

Re: Compact blocks


dear Igno,

> BIP152 introduced a good solution by introducing short transaction ids
> (which we can generalize to inputs/outputs/kernels):
> https://github.com/bitcoin/bips/blob/master/bip-0152.mediawiki#Short_transaction_IDs
> It does force a full re-hashing of the pool on each block but siphash 2-4 is
> fast and we don't need to introduce a new crypto primitive as siphash 2-4 is
> already used by Cuckoo Cycle.

Not only that, but Cuckoo Cycle proceeds with exactly the same steps:

"Short transaction IDs are used to represent a transaction without
sending a full 256-bit hash. They are calculated by:
1. single-SHA256 hashing the block header with the nonce appended (in
2. Running SipHash-2-4 with the input being the transaction ID and the
keys (k0/k1) set to the first two little-endian 64-bit integers from
the above hash, respectively.
3. Dropping the 2 most significant bytes from the SipHash output to
make it 6 bytes."

Cuckoo Cycle on 2^{k+1} nodes looks for a cycle on the graph of
short transaction IDs truncated to k bits, where edge e, for 0<=e<2^k,
connects the transaction IDs 2*e and 2*e+1..