Using a storage engine without UTXO-index



Summary:

A new approach to indexing for verifying the order of transactions is being developed, which uses a spend-tree where spends are scanned against spent outputs instead of unspent outputs. The approach was used in libbitcoin version2 but had higher storage space requirements and validation complexity compared to other methods. The implementation used a hash table for better performance and concurrency. Tomas has now developed a Version3 store which doesn't use a spends table/index nor does it store any table of UTXOs. Instead, it uses the tx hash table augmented with 32 bits per output for spender height. This results in faster performance without the storage cost or complexity disadvantages. The memory mapped files become in-memory hash tables and an opaque UTXO cache is implemented to limit paging on low memory machines. The new approach could lead to protocol improvements and should be considered an implementation detail. Discussions can continue on the libbitcoin mailing list.


Updated on: 2023-06-11T23:50:29.605779+00:00