SwiftSync - smarter synchronization with hints

Posted by Greg Maxwell

May 2, 2025/06:47 UTC

Ruben Somsen's message highlights an innovative approach that maintains security properties akin to the assume valid mechanism while introducing enhanced performance and optimization opportunities. The discussed scheme benefits from its non-normative nature, allowing for flexibility and updates without permanent commitments. This adaptability means the entire framework can be revised in subsequent versions without negative impacts, barring potential issues when initiating Initial Block Download (IBD) with one version and attempting completion with another.

The efficiency of the proposed method is partly attributed to the handling of hashes, particularly if a Merkle-Damgård (MD) style hash function like SHA-256 is utilized. Placing the salt before the data allows for the midstate of the hash function to be reused, potentially doubling hashing performance. Given that hashing is assumed to be a significant portion of the profile cost, even a one-third improvement would be noteworthy. It's advised to minimize compression function runs to enhance this efficiency further.

Additionally, the scheme allows for optimization in the storage of hints through careful management of false positives. False positives are deemed harmless as long as they remain infrequent, suggesting a strategy where extra transaction outputs (txouts) can be safely ignored until they're found to be spent, at which point they can be removed. This could lead to a more memory and read-efficient system. For instance, employing ribbon filters could optimize space by constructing a hash table through solving a linear system to ensure all inputs match, aiming for a specific false positive rate. While cuckoo filters with two or four memory accesses could also serve this purpose, the need for runtime modifications makes them less ideal compared to solutions that optimize for space and efficiency.

Link to Raw Post
Bitcoin Logo

TLDR

Join Our Newsletter

We’ll email you summaries of the latest discussions from authoritative bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.

Explore all Products

ChatBTC imageBitcoin searchBitcoin TranscriptsSaving SatoshiBitcoin Transcripts Review
Built with 🧡 by the Bitcoin Dev Project
View our public visitor count

We'd love to hear your feedback on this project?

Give Feedback