Global Feed Post Login
Replying to Avatar Super Testnet

A guy at btc++ Istanbul had an interesting project. He downloads the blockchain without checking for doublespending. After he has all the data, he does a doublespend check by running an efficient sorting algorithm called MergeSort, which, in his implementation, takes all "input" utxos and "output" utxos, sorts them alphabetically via txid_vout, and removes duplicates. Those are always outputs created in one tx and spent in another

The result is a list only containing unspent outputs, i.e. the result is the utxo set, and this procedure gives him a sync speedup of slightly over 50%. It also does not seem to require storing an "intermediate" utxo set *during* ibd

I wonder if is wise to do ibd with that method, and then apply the utreexo accumulator procedure to the utxo set once it gets created at the end of ibd. The result would be, you only need the full utxo set once during the lifetime of your node: you need it at the end of ibd, and only to construct the utreexo accumulator. After that, you don't need the utxo set, unless you want to help others sync the same way

Avatar
Carman 3mo ago 💬 2

If there is a double spend though, you gotta resync everything

Reply to this note

Please Login to reply.

Discussion

Avatar
Super Testnet 3mo ago

Yeah, it has that in common with the swiftsync proposal

Thread collapsed
Avatar
ruben 3mo ago

if i got it right, he baches the sync by downloading and handling 210000 blocks at a time to avoid to big resync.

Thread collapsed