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.
| 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.
We cannot hardcode this, this needs to be parametrizable with the correct hash type.
There was a problem hiding this comment.
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.
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 <dryajov@gmail.com> Signed-off-by: Ben Bierens <39762930+benbierens@users.noreply.github.com>
b566f56 to
8fe5e9a
Compare
No description provided.