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
feat: add validation bucket #98
Conversation
View stack outputs
|
Stack outputs updated
|
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 only need to iterate the blocks of the car and let linkdex tell us if the dag is complete. The other checks are redundant here as kubo has already verified each block as it reads it from the blockstore... (the old api code this is taken from has to do more checks as it is not running an ipfs node, and has to verify CARs sent over http from the wild)
} | ||
InvalidCarError.CODE = 'ERROR_INVALID_CAR' | ||
|
||
export async function carStats (carBytes) { |
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 don't need to do the all the same validation that the api does here... kubo has done most of this for us already. We really only need to detect CAR truncation here.
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.