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