Hacker News new | ask | show | jobs
by oelmekki 3293 days ago
There is something I don't get about the databases distributed : they are read/write, and their data is not part of what is distributed in p2p, is that right? It seems to be what means "Block payloads are SQLite database files. Except for special metadata tables, their content is not enforced".

If that's so, what is the purpose of distributing blank sqlite databases (with exception of blockchain keys metadata)? Also, how is it p2p distributed if several users may have the sqlite databases in different state (and thus, different sqlite files)?

2 comments

The way that I understand it, the SQL databases are not empty and the mining process, if similar to standard blockchains, will mean that the block's hash has to be of a specific format. Thus data can be distributed, e.g. academic articles, which are safe from changes, as the hash is fixed.

I'm guessing that SQL databases were chosen to enable easy queries of structured data...

My understanding is the data is distributed, the metadata tables are enforced by the blockchain protocol, but the contents are free to be whatever the writer wants to put in the database. Once it's written, the metadata/protocol enforces the integrity of the data on the blockchain.
Indeed, it would make sense. "Content is not enforced" would mean "content data structure is up to block creator". Thanks!