Block stores persist blockchain data downloaded from remote peers. There is an SPV block store which preserves a ring buffer of headers on disk and is suitable for lightweight user wallets, a store that's backed by Postgres and which can calculate a full indexed UTXO set (i.e. it can query address balances), a store that's backed by the embedded H2 database, and a memory only store useful for unit tests.
Interface Summary Interface Description BlockStoreAn implementor of BlockStore saves StoredBlock objects to disk. FullPrunedBlockStoreAn implementor of FullPrunedBlockStore saves StoredBlock objects to some storage mechanism.
Class Summary Class Description DatabaseFullPrunedBlockStoreA generic full pruned block store for a relational database. H2FullPrunedBlockStoreA full pruned block store using the H2 pure-java embedded database. LevelDBBlockStoreAn SPV block store that writes every header it sees to a LevelDB. LevelDBFullPrunedBlockStoreAn implementation of a Fully Pruned Block Store using a leveldb implementation as the backing data store. MemoryBlockStoreKeeps
StoredBlocks in memory.
MemoryFullPrunedBlockStore MemoryFullPrunedBlockStore.StoredBlockAndWasUndoableFlag MySQLFullPrunedBlockStoreA full pruned block store using the MySQL database engine. PostgresFullPrunedBlockStoreA full pruned block store using the Postgres database engine. SPVBlockStoreAn SPVBlockStore holds a limited number of block headers in a memory mapped ring buffer.
Exception Summary Exception Description BlockStoreExceptionThrown when something goes wrong with storing a block. ChainFileLockedExceptionThrown by
SPVBlockStorewhen the process cannot gain exclusive access to the chain file.