-
Notifications
You must be signed in to change notification settings - Fork 1
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
validator assumes unixfs encoded blocks #97
Comments
if the problem here is that we can't detect an error if kubo truncates a CAR response, then we should dig some more there and see if we can find a way to detect that. |
here where we use the old /dag/export http api... this could be replaced with a call to the newer Line 28 in 0ce1f90
that would be worth trying to see if it allows us to detect an error. see: https://docs.ipfs.tech/reference/http/gateway/#trusted-vs-trustless note that this is the public gateway api, and is served from the gateway port, not the api port, so some changes would be needed to the config. |
We could pin the DAG to the local Kubo node, wait until we definitely have the entire DAG locally and then do the car export from the blockstore in a way that errors usefully if anything goes wrong. We'd at least be able to know the DAG size before we start the export. |
When a CAR is written to the S3 bucket, it is added to the E-IPFS indexer queue. We need to avoid the need for additional validation (upload fails if error) ...or, if we have to do additional validation then we must write cars we haven't validated to a different bucket and then move them once validated, being careful to verify integrity checking when moving. |
some options
1.b We can pin the dag to the kubo node and find the complete dag size, and count the block size in the through stream. If the total of block sizes sent does not match the total dag size then it has been truncated
2.b Have a seperate kubo node as a validator. Import the CAR into kubo to check it is valid. |
Notes from lidel on detecting a truncated CAR export
|
This pr refers to: #97 Add a new bucket for the validation. Pickup store the file in a vavlidation bucket. The CAR is validated then, if is valid, moved to the final Bucket.
@codeflyer please simplify the validation logic. It should only
All the other checks can be deleted. |
All we can reliably validate from a CAR is if each blocks bytes matches each CID multihash for the set of hash functions we support and that the CAR contains a block for every link we encounter where the blocks are encoded with a codec we support.
TODO
pickup
worker to write CARs to the validation bucket.Complete
then consider the CAR valid.The text was updated successfully, but these errors were encountered: