pixelspark / catena

Catena is a distributed database based on a blockchain, accessible using SQL.
MIT License
302 stars 23 forks source link

Checkpoints #66

Open pixelspark opened 6 years ago

pixelspark commented 6 years ago

Rollup = current state of database serialized in some canonical format (note, take care of undefined stuff, such as row ordering, sorting specifics, etc.).

pixelspark commented 6 years ago

Use a Merkle tree for partial roll ups/verification?

pixelspark commented 6 years ago

Merkle tree containing hashes for sets of N (1000? or <x MB, whichever comes first) rows. (Doesn't really need to be a tree now does it? Or perhaps group by table to allow fetching a table).

For downloading a copy, we need a fetchArchive gossip message using which a particular slice can be downloaded.

Nodes each verify a random piece against their own copy (if they only have partial copies that's what they'll verify against). They can also request a slice from another node (that builds it on the fly). If a signature is not good the block that contains it won't be accepted.