Posted by andrewtoth
Aug 24, 2026/23:16 UTC
The recent integration of SipHash-1-3-UJ into the Bitcoin codebase, specifically within the CoinsViewOverlay::StartFetching function, represents a significant advancement in transaction handling and efficiency during the block connection process. This change was implemented following the merge of a previous pull request that introduced parallel fetching of block input prevouts during ConnectBlock, which can be viewed in detail here. The adoption of SipHash-1-3-UJ modified the handling of the earlier_txids set, crucial for optimizing transaction verification processes by filtering out prevouts created by earlier transactions within the same block.
This modification is pivotal as it ensures that all transaction identifiers (txids) for each block are stored in a set, which is instrumental in excluding prevouts generated by preceding transactions in the same block. These specific prevouts are directly created in the CoinsViewOverlay cache, necessitating that they are not fetched again from the main cache or disk to avoid redundancy and enhance processing speed. The necessity for hashing both the txid of every transaction for insertion into the set and the prevout hash of every input to check for their existence underlines the importance of this lighter hash function. This optimization reduces the serial overhead on the main thread, which must be completed before any speed gains from parallel fetching can be realized, thus underscoring the effectiveness of using SipHash-1-3-UJ in this context.
Further details on the modifications made to the earlier_txids set can be explored through the changes documented here. This adaptation fits perfectly with the use case for this new hash function, as the txids inserted are exclusively those resulting from SHA256 hashing of transaction data processed directly by our node, thereby enhancing both the security and efficiency of block connections.
TLDR
We’ll email you summaries of the latest discussions from high signal bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.
We'd love to hear your feedback on this project.
Give Feedback