<oembed><type>rich</type><version>1.0</version><author_name>npub1tjephawh7fdf6358jufuh5eyxwauzrjqa7qn50pglee4tayc2ntqcjtl6r</author_name><author_url>https://nostr.ae/npub1tjephawh7fdf6358jufuh5eyxwauzrjqa7qn50pglee4tayc2ntqcjtl6r</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2018-05-19&#xA;📝 Original message:On Fri, May 18, 2018, 19:57 Olaoluwa Osuntokun via bitcoin-dev &lt;&#xA;bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&#xA;&gt; Greg wrote:&#xA;&gt; &gt; What about also making input prevouts filter based on the scriptpubkey&#xA;&gt; being&#xA;&gt; &gt; _spent_?  Layering wise in the processing it&#39;s a bit ugly, but if you&#xA;&gt; &gt; validated the block you have the data needed.&#xA;&gt;&#xA;&gt; AFAICT, this would mean that in order for a new node to catch up the filter&#xA;&gt; index (index all historical blocks), they&#39;d either need to: build up a&#xA;&gt; utxo-set in memory during indexing, or would require a txindex in order to&#xA;&gt; look up the prev out&#39;s script. The first option increases the memory load&#xA;&gt; during indexing, and the second requires nodes to have a transaction index&#xA;&gt; (and would also add considerable I/O load). When proceeding from tip, this&#xA;&gt; doesn&#39;t add any additional load assuming that your synchronously index the&#xA;&gt; block as you validate it, otherwise the utxo set will already have been&#xA;&gt; updated (the spent scripts removed).&#xA;&gt;&#xA;&#xA;I was wondering about that too, but it turns out that isn&#39;t necessary. At&#xA;least in Bitcoin Core, all the data needed for such a filter is in the&#xA;block + undo files (the latter contain the scriptPubKeys of the outputs&#xA;being spent).&#xA;&#xA;I have a script running to compare the filter sizes assuming the regular&#xA;&gt; filter switches to include the prev out&#39;s script rather than the prev&#xA;&gt; outpoint itself. The script hasn&#39;t yet finished (due to the increased I/O&#xA;&gt; load to look up the scripts when indexing), but I&#39;ll report back once it&#39;s&#xA;&gt; finished.&#xA;&gt;&#xA;&#xA;That&#39;s very helpful, thank you.&#xA;&#xA;Cheers,&#xA;&#xA;-- &#xA;Pieter&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20180518/3077040c/attachment-0001.html&gt;</html></oembed>