Blockchain alternative storage



Summary:

The context of the discussion is related to storing the block chain in a database like PostgreSQL or MySQL. To store the best chain, a simple schema can be created. The 'blocks' table has hash and index columns, with hash being the primary key, and index being unique. A size check constraint is added to ensure that the length of the hash is 256 bits. The 'transaction_inputs' table has output_transaction_id, output_index, and block_index columns, with output_transaction_id and output_index being the primary key. A size check constraint is added to ensure that the length of output_transaction_id is 256 bits. An index is created on the block_index column. The 'transaction_outputs' table has transaction_id, index, amount, type, addresses, block_index, and spent columns, with transaction_id and index being the primary key. Size check constraints are added to ensure that the length of transaction_id is 256 bits. Indexes are created on the addresses and block_index columns.A user named Marko Otbalkana inquires about any work/projects related to storing the block chain in a database and tools that can read the block chain from the Satoshi client and convert it into different formats. This inquiry was made on the Bitcoin-development mailing list.


Updated on: 2023-06-06T18:38:19.862435+00:00