3 ms·
>my guess before reading the paper is that the contract gives a hash and a file size and the host is responsible for giving a file of that size and that hash if
by nemo1618 9y ago
>my guess before reading the paper is that the contract gives a hash and a file size and the host is responsible for giving a file of that size and that hash if there is a dispute
Close! Sia uses Merkle trees to construct the storage proof. The storage contract specifies the Merkle tree root hash. The host must then provide one of the "leaves" of the tree (64 bytes of actual data), along with the other subtree roots in the tree necessary to construct the root hash. The consensus algorithm can then verify that by hashing the leaf and combining it with the other subtree roots, the top-level root can be obtained. This is a lot more compact and efficient than sending the entire file contents. The only trick is selecting which leaf to demand from the host -- if it could be predicted in advance, the host could cheat and store less data. But it can't be purely random either, since all nodes on the network need to pick the same leaf to arrive at consensus. So the leaf is chosen using existing entropy in the blockchain (e.g. the hash of the last block), so that it's both deterministic and difficult for an attacker to control.
- placeybordeaux 9y agoNeat! When I first learned about bitcoin I spent a fair bit of time navel gazing about how to make something like siacoin. Excellent to see an ostensibly well made implementation. Any experience actually using it for storage? Also any other coins actually doing some innovative work? A friend of mine got excited about Golem, but somehow I don't have a good feeling about that, wish I could easily short it...