< guest3423423> why do we need undo information again?
< belcher> for reorgs
< belcher> i believe
< sipa> correct
< guest3423423> but there's already raw block data
< sipa> raw block data does not tell you which outputs were spent by the block
< sipa> only which ones were added
< sipa> a block is a 'forward patch' to the UTXO set
< sipa> the undo data is a reverse patch
< guest3423423> but block's transations tell you that, no?
< sipa> no
< guest3423423> prevout?
< sipa> you have a transaction A which creates a output A1
< sipa> that tells you the hash and index which is being spent
< sipa> not the contents of the UTXO
< sipa> (the scriptPubKey and amount)
< sipa> you need to be able to restore the scriptPubKey and amount to the UTXO database
< guest3423423> of, so to avaoid indexing all the txs, we keep undo data only?
< sipa> we don't index any txn at all
< sipa> there is just a separate database with only the unspent transaction outputs
< sipa> not full transactions, not an index
< guest3423423> txindex flag, could tell you where to look it up and figure out the amounts etc
< sipa> just copies of the outputs
< sipa> that was used until bitcoin 0.7, and it became horrendously slow
< guest3423423> so it is an optimization after all?
< sipa> as you'd need to go seek all over you disk to gather all the inputs
< guest3423423> yes
< sipa> yes
< sipa> it's how the database layout is designed
< guest3423423> great. makes sense. i thought i was going crazy over this
< sipa> alternatives are certainly possible
< sipa> but they're very different
< guest3423423> that answers my question. stackoverflow could use a patch :-)
< guest3423423> to make this clearer
< sipa> link?
< guest3423423> one moment
< guest3423423> by the way folks, when should slack be used vs freenode?
< sipa> slack is for development
< sipa> eh, freenode is
< sipa> slack is for the rest
< guest3423423> the rest?
< moli> slack is for drama
< guest3423423> that explains it :-)
< guest3423423> sipa: who do I send my job application to?
< GitHub47> [bitcoin] theuni opened pull request #8023: RFC: Interruptible threads (master...interruptible-thread) https://github.com/bitcoin/bitcoin/pull/8023