-
Notifications
You must be signed in to change notification settings - Fork 31
Verifiable manifests #642
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
Verifiable manifests #642
Conversation
codex/manifest/manifest.nim
Outdated
| originalDatasetSize: NBytes | ||
| case verifiable {.serialize.}: bool # Verifiable datasets can be used to generate storage proofs | ||
| of true: | ||
| datasetRoot: VerificationHash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| datasetRoot: VerificationHash | |
| verificationRoot: VerificationHash |
codex/manifest/types.nim
Outdated
| type | ||
| ManifestCoderType*[codec: static MultiCodec] = object | ||
| DagPBCoder* = ManifestCoderType[multiCodec("dag-pb")] | ||
| VerificationHash* = F |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot hardcode this, this needs to be parametrizable with the correct hash type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes perfect sense. I would like a nice generalized way we can wrap up the Poseidon2 field elements and plug them into the manifest, and drop the VerificationHash type completely.
|
In general, the manifest should never be hardcoded with any particular set of hashes or other types. We should use a combination of templates/generics and multicodecs to keep the manifest generic and hash type agnostic. |
a53e4c7 to
d06452d
Compare
tbekas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good. I agree that it would be nice to keep manifest agnostic to the hash type. But I don't know how to do it. With multicodec we're not able to specify poseidon2 as a codec.
b157e3b to
9a5e0b4
Compare
This is just a matter of adding the missing multicodecs and I already did it in vacp2p/nim-libp2p#974 |
Co-authored-by: Dmitriy Ryajov <[email protected]> Signed-off-by: Ben Bierens <[email protected]>
b566f56 to
8fe5e9a
Compare
No description provided.