pull down to refresh

Ruben Somsen at it again.
Near-stateless, fully parallelizable validation of the Bitcoin blockchain with hints about which outputs remain unspent. All other inputs/outputs are efficiently crossed off inside a single hash aggregate that only reaches zero if validation was successful and the hints were correct.
Validation is at the heart of Bitcoin. Any improvements in validation speed will have a direct impact on the scalability of the system, including everything that is built on top of it. For this reason improving validation performance may be one of the most important things we can do.
The generalized observation of SwiftSync is that if we have two sets (in this case the inputs and outputs), and we want to know the difference between these sets (the UTXO set), validating a given answer to this question (the hints) is significantly easier than calculating the answer itself. The novel part here (to my knowledge) is specifically how this can be applied to sets. It seems likely that this observation can also be useful in other blockchain-related contexts, and perhaps beyond that as well.
Regular validation as it occurs today in Bitcoin Core involves traversing the blockchain sequentially (with some more minor context independent checks being done in parallel), adding outputs to the UTXO set, and subsequently looking them up and removing them. Often the UTXO set doesn't fit in memory, slowing things down further with disk access.
SwiftSync changes this completely, without reducing the security assumptions. There are no database lookups, memory usage drops to near-zero, and everything can be done in parallel. This would essentially remove memory, disk IO, and single threaded performance from the list of potential bottlenecks. The remaining bottlenecks are CPU and bandwidth, and the more of it you have, the faster you'll be able to validate.
The statelessness of the protocol may also make it well-suited for memory-constrained scenarios such as validating the blockchain with specialized hardware (FPGAs, ASICs), building zero-knowledge proofs, or simply freeing up more memory for other operations such as batch validation of Schnorr signatures.
reply