BIP Proposal: Compact Client Side Filtering for Light Clients



Summary:

A proposal for a new light client BIP was made by Olaoluwa Osuntokun and Alex Akselrod, which Gregory Maxwell reviewed. He pointed out that the inner loop of construction and lookup contains non-constant divmod, which could result in needlessly slow implementations. To fix this, he suggested using an approach that has the same non-uniformity as mod but requires only a multiply and shift, which he linked to. However, it cannot be used as described since it outputs 32-bit integers instead of 64-bit integers. If filter commitment are considered for a soft-fork in the future, the construction of filters should be optimized as much as possible. Maxwell also noted that all cases in the spec where N is transactions should be n=indexed-outputs to ensure that the golomb parameter and false positive rate are correct. This was due to an oversight on Osuntokun's part, but it has been corrected. In addition, another commit was made to explicitly take advantage of the fact that P is a power-of-two within the coding loop.


Updated on: 2023-05-20T02:43:39.545491+00:00