-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store watcher chains in FileCoin #111
Comments
This will require creating an IPLD Codec for Watchers. We may also want to evaluate using some of the CosmosSDK merklization tooling to save ourselves some trouble. |
Since we want all the state and intermediate nodes available, we should avoid looking at zk-baded aggregation/compression. Hashlimks should provide sufficient compression, at some point we will want to evaluate existing hashing algorithms in this context. |
SSZ seems like a good candidate as well |
Well, I think it merits some discussion anyways. SSZ would be good if we envision it being desirable to provide concise proofs for individual fields in the watcher chain "blocks". But it also has significant overhead vs simply hashing the entire "block". E.g. If we used SSZ for each block we could provide concise proofs for e.g. the transformation code only- since references to it would be a field in the block- which is neat but still need to figure out what all the practical implications/tradeoffs are. |
Going hand-in-hand with this is the IPLDization of the watcher (code) itself. |
For Block0 the references are to the raw chain input + the watcher code used to perform transformation A. If the chain uses only one type of transformation then we can save space by only having the reference to that transformation code at the beginning of the chain e.g. Block0 (although the tradeoff would be that when verifying a later block model, e.g. Block2, you would need to work your way all the way back to the beginning of the chain to figure out the transformation you want to reapply in the verification process). We can introduce similar compression in a chain of variable transformations whereby we only include a reference to the transformation code at the blocks in the chain where a transformation occurs that is different than at the previous block. Every transformation-homogenous segment contains only one code reference at the beginning of that chain segment. E.g.
|
The above is poorly formatted, sorry. |
We should also consider using protobuf encoding for the individual fields in the consensus encoding of these block objects (ofc in the relational DB the fields would no be protobuf serialized values, but when we merkleize the chain we could consider them being so). I think SSZ for encoding and merkleization of the object as a whole + protobuf encoding for the individual fields in that object would be really powerful. But I'm also quite possibly getting carried away with the "cool" theoretical factor of this while neglecting practical ramifications. |
No description provided.
The text was updated successfully, but these errors were encountered: