Open pixelspark opened 6 years ago
Use a Merkle tree for partial roll ups/verification?
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.
Rollup = current state of database serialized in some canonical format (note, take care of undefined stuff, such as row ordering, sorting specifics, etc.).
x
is a parameter determining when blocks are considered verified andN
is the rollup interval.