Author: Bob McElrath 2015-10-30 16:36:04
Published on: 2015-10-30T16:36:04+00:00
The state of bitcoin transactions can be committed to in blocks by keeping two running hashes, one of unspent transaction outputs and one of spent transaction outputs. These hashes can be placed into a block's Merkle tree by miners with a soft fork. By defining how to compute (hTXO, hSXTO) we can define an implementation independent definition of consensus that is extremely cheap to compute. As a data structure storing the state of transactions, leveldb is consensus critical. However, there's only one right answer to what the set of UTXOs is. By creating and publishing (hTXO, hSXTO), miners can publish their view of the transaction state, and any implementation can be validated against it. It should be noted that (hTXO, hSXTO) can be computed twice, once without the database (while processing a new block) and once by requesting the same data from the database. So bad database behavior can be detected and prevented from causing consensus failures.
Updated on: 2023-06-11T00:50:01.258472+00:00