bitcoin/bitcoin — pull request #2802 by sipa (2013-06-27 22:50:29+00:00)
Title: Add an address-based transaction index

Changes:
* Maintain a salt to perturbate the address index (protection against collisions).
* Add support for address index entries in the block index, and maintain those if -addrindex is specified. It indexes the use of every >8-byte data push in output script or consumed script - or in case of no such push, the entire script.
* Add a searchrawtransactions RPC call, which can look up raw transactions by address.

I both hate and love this patch. I hate making it easy to build infrastructure that relies on a fully-indexed blockchain (which shouldn't be necessary), as it may remove the incentive to build more scalable solutions. On the other hand, in cases where the alternative is relying on a trusted third party, this approach is certainly preferable.

A full -txindex=1 -addrindex=1 index is about 2.7 GiB now.