zcashd/src
Pieter Wuille 450cbb0944 Ultraprune
This switches bitcoin's transaction/block verification logic to use a
"coin database", which contains all unredeemed transaction output scripts,
amounts and heights.

The name ultraprune comes from the fact that instead of a full transaction
index, we only (need to) keep an index with unspent outputs. For now, the
blocks themselves are kept as usual, although they are only necessary for
serving, rescanning and reorganizing.

The basic datastructures are CCoins (representing the coins of a single
transaction), and CCoinsView (representing a state of the coins database).
There are several implementations for CCoinsView. A dummy, one backed by
the coins database (coins.dat), one backed by the memory pool, and one
that adds a cache on top of it. FetchInputs, ConnectInputs, ConnectBlock,
DisconnectBlock, ... now operate on a generic CCoinsView.

The block switching logic now builds a single cached CCoinsView with
changes to be committed to the database before any changes are made.
This means no uncommitted changes are ever read from the database, and
should ease the transition to another database layer which does not
support transactions (but does support atomic writes), like LevelDB.

For the getrawtransaction() RPC call, access to a txid-to-disk index
would be preferable. As this index is not necessary or even useful
for any other part of the implementation, it is not provided. Instead,
getrawtransaction() uses the coin database to find the block height,
and then scans that block to find the requested transaction. This is
slow, but should suffice for debug purposes.
2012-10-20 23:08:57 +02:00
..
json
leveldb Backport Win32 LevelDB env from C++0x to C++ 2012-10-20 23:08:56 +02:00
obj
obj-test
qt Ultraprune 2012-10-20 23:08:57 +02:00
test Ultraprune 2012-10-20 23:08:57 +02:00
addrman.cpp Trim trailing whitespace for src/*.{h,cpp} 2012-09-18 15:07:58 -04:00
addrman.h Trim trailing whitespace for src/*.{h,cpp} 2012-09-18 15:07:58 -04:00
alert.cpp Give testnet it's own alert key. 2012-08-28 17:13:11 -04:00
alert.h Refactor: move alert code from main to alert.cpp/h 2012-08-28 17:04:54 -04:00
allocators.h Handle locked pages more robustly (Fixes issue #1462) 2012-08-23 06:55:35 +02:00
base58.h Trim trailing whitespace for src/*.{h,cpp} 2012-09-18 15:07:58 -04:00
bignum.h HexStr: don't build a vector<char> first 2012-09-10 04:24:57 +02:00
bitcoinrpc.cpp fix wrong (signed/unsigned) printf format specifier in bitcoinrpc.cpp 2012-10-05 23:31:58 +02:00
bitcoinrpc.h Add constants for HTTP status codes 2012-10-04 15:49:15 +02:00
checkpoints.cpp Checkpoint at block 193,000 2012-08-21 22:50:00 -04:00
checkpoints.h
clientversion.h Bump versions for 0.7.1 release 2012-10-09 12:37:35 -04:00
compat.h
crypter.cpp Make CCrypter use LockedPageManager to manage locked pages 2012-08-23 06:55:35 +02:00
crypter.h Make CCrypter use LockedPageManager to manage locked pages 2012-08-23 06:55:35 +02:00
db.cpp Ultraprune 2012-10-20 23:08:57 +02:00
db.h Ultraprune 2012-10-20 23:08:57 +02:00
init.cpp Ultraprune 2012-10-20 23:08:57 +02:00
init.h
irc.cpp get rid of strlcpy.h 2012-10-07 14:38:37 +02:00
irc.h
key.cpp Compact serialization for scripts 2012-10-20 23:08:56 +02:00
key.h Compact serialization for scripts 2012-10-20 23:08:56 +02:00
keystore.cpp
keystore.h
leveldb.cpp LevelDB glue 2012-10-20 23:08:56 +02:00
leveldb.h LevelDB glue 2012-10-20 23:08:56 +02:00
main.cpp Ultraprune 2012-10-20 23:08:57 +02:00
main.h Ultraprune 2012-10-20 23:08:57 +02:00
makefile.linux-mingw LevelDB glue 2012-10-20 23:08:56 +02:00
makefile.mingw LevelDB glue 2012-10-20 23:08:56 +02:00
makefile.osx LevelDB glue 2012-10-20 23:08:56 +02:00
makefile.unix LevelDB glue 2012-10-20 23:08:56 +02:00
mruset.h
net.cpp Merge pull request #1901 from laanwj/2012_10_remove_strlcpy 2012-10-11 00:39:51 -07:00
net.h Move external block import to separate thread 2012-10-20 01:54:10 +02:00
netbase.cpp Merge pull request #1913 from sipa/noi2p 2012-10-11 00:41:33 -07:00
netbase.h Merge pull request #1913 from sipa/noi2p 2012-10-11 00:41:33 -07:00
noui.cpp
protocol.cpp
protocol.h
rpcblockchain.cpp Document RPC error codes 2012-10-04 15:49:15 +02:00
rpcdump.cpp Document RPC error codes 2012-10-04 15:49:15 +02:00
rpcmining.cpp Ultraprune 2012-10-20 23:08:57 +02:00
rpcnet.cpp Trim trailing whitespace for src/*.{h,cpp} 2012-09-18 15:07:58 -04:00
rpcrawtransaction.cpp Ultraprune 2012-10-20 23:08:57 +02:00
rpcwallet.cpp Merge pull request #1859 from Diapolo/proxy_locks 2012-10-07 07:03:06 -07:00
script.cpp Ultraprune 2012-10-20 23:08:57 +02:00
script.h Ultraprune 2012-10-20 23:08:57 +02:00
serialize.h Compact serialization for variable-length integers 2012-10-20 23:08:56 +02:00
sync.cpp Trim trailing whitespace for src/*.{h,cpp} 2012-09-18 15:07:58 -04:00
sync.h Update comment, we're no longer using boost::interprocess::scoped_lock 2012-09-25 12:16:37 +02:00
ui_interface.h
uint256.h HexStr: don't build a vector<char> first 2012-09-10 04:24:57 +02:00
util.cpp Pre-allocate block and undo files in chunks 2012-10-20 23:08:57 +02:00
util.h Pre-allocate block and undo files in chunks 2012-10-20 23:08:57 +02:00
version.cpp Bitcoin-Qt (Windows only): add version info to Resource File 2012-09-07 16:08:18 +02:00
version.h Bitcoin-Qt (Windows only): add version info to Resource File 2012-09-07 16:08:18 +02:00
wallet.cpp Ultraprune 2012-10-20 23:08:57 +02:00
wallet.h Ultraprune 2012-10-20 23:08:57 +02:00
walletdb.cpp Handle corrupt wallets gracefully. 2012-10-08 17:46:45 -04:00
walletdb.h Handle corrupt wallets gracefully. 2012-10-08 17:46:45 -04:00