Damus
Super Testnet profile picture
Super Testnet
@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
93โค๏ธ4๐Ÿ‘€3๐Ÿ‘1๐Ÿค”1๐Ÿค™1๐Ÿซก1
Sats champ · 57w
Interesting approach
benthecarman · 57w
If there is a double spend though, you gotta resync everything
Karadenizli · 57w
Does it check for the other consensus rules along the way though? And is the double spend check really bottlenecking people beyond their internet speed?
SwapMarket · 57w
I don't get it. Aren't the transactions in all mined blocks guaranteed to be NOT double spent, except maybe the last dozen?
Kevin's Bacon · 57w
Love algorithms talk like this. Nice.