Skip to content
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

Merged
merged 10 commits into from Feb 14, 2023
Merged

feat: add validation bucket #98

merged 10 commits into from Feb 14, 2023

Conversation

codeflyer
Copy link
Contributor

@codeflyer codeflyer commented Feb 13, 2023

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.

@seed-deploy seed-deploy bot temporarily deployed to pr98 February 13, 2023 10:10 Inactive
@seed-deploy
Copy link

seed-deploy bot commented Feb 13, 2023

View stack outputs

@seed-deploy seed-deploy bot temporarily deployed to pr98 February 13, 2023 11:16 Inactive
@seed-deploy
Copy link

seed-deploy bot commented Feb 13, 2023

Stack outputs updated
  • pr98-pickup-BasicApiStack

    Name Value
    ApiEndpoint https://9ltdppfoc5.execute-api.us-west-2.amazonaws.com
    CustomDomain https://pr98.pickup.dag.haus
    S3EventsTopicARN arn:aws:sns:us-west-2:505595374361:pr98-pickup-S3Events
  • pr98-pickup-PickupStack

    Name Value
    ServiceSQSQueue88C16836 pr98-pickup-Pin
    ServiceSQSQueueArnDDC422AE arn:aws:sqs:us-west-2:505595374361:pr98-pickup-Pin
    ServiceValidatorSQSQueue5667BEDA pr98-pickup-ValidationPinQueue
    ServiceValidatorSQSQueueArnCF57A57B arn:aws:sqs:us-west-2:505595374361:pr98-pickup-ValidationPinQueue

@seed-deploy seed-deploy bot temporarily deployed to pr98 February 13, 2023 11:33 Inactive
@seed-deploy seed-deploy bot temporarily deployed to pr98 February 13, 2023 12:17 Inactive
@seed-deploy seed-deploy bot temporarily deployed to pr98 February 13, 2023 12:52 Inactive
@seed-deploy seed-deploy bot temporarily deployed to pr98 February 13, 2023 14:14 Inactive
@github-actions
Copy link

github-actions bot commented Feb 13, 2023

package-lock.json changes

Summary

Status Count
ADDED 4
REMOVED 72
Click to toggle table visibility
Name Status Previous Current
@ipld/dag-json ADDED - 8.0.11
ansi-term REMOVED 0.0.2 -
ansicolors REMOVED 0.2.1 -
assert-plus REMOVED 1.0.0 -
asynckit REMOVED 0.4.0 -
aws-sign2 REMOVED 0.7.0 -
aws4 REMOVED 1.12.0 -
blessed-contrib REMOVED 2.5.3 -
blessed REMOVED 0.1.81 -
bresenham REMOVED 0.0.3 -
buffers REMOVED 0.1.1 -
cardinal REMOVED 1.0.0 -
caseless REMOVED 0.12.0 -
charm REMOVED 0.1.2 -
cli-table REMOVED 0.3.11 -
climem REMOVED 1.0.3 -
colors REMOVED 1.0.3 -
combined-stream REMOVED 1.0.8 -
dashdash REMOVED 1.14.1 -
delayed-stream REMOVED 1.0.0 -
drawille-blessed-contrib REMOVED 1.0.0 -
drawille-canvas-blessed-contrib REMOVED 0.1.3 -
ecc-jsbn REMOVED 0.1.2 -
event-stream REMOVED 0.9.8 -
eventemitter3 REMOVED 4.0.7 -
extend REMOVED 3.0.2 -
extsprintf REMOVED 1.3.0 -
flush-write-stream REMOVED 1.1.1 -
forever-agent REMOVED 0.6.1 -
form-data REMOVED 2.3.3 -
from2 REMOVED 2.3.0 -
getpass REMOVED 0.1.7 -
gl-matrix REMOVED 2.8.1 -
har-schema REMOVED 2.0.0 -
har-validator REMOVED 5.1.5 -
has-ansi REMOVED 2.0.0 -
here REMOVED 0.0.2 -
http-signature REMOVED 1.2.0 -
is-typedarray REMOVED 1.0.0 -
isstream REMOVED 0.1.2 -
it-merge REMOVED 2.0.0 -
it-parallel REMOVED 3.0.0 -
it-pushable REMOVED 3.1.2 -
it-stream-types REMOVED 1.0.5 -
jsbn REMOVED 0.1.1 -
json-schema REMOVED 0.4.0 -
jsprim REMOVED 1.4.2 -
linkdex ADDED - 2.0.0
lodash.assign REMOVED 4.2.0 -
map-canvas REMOVED 0.1.5 -
marked-terminal REMOVED 1.7.0 -
marked REMOVED 0.3.19 -
memory-streams REMOVED 0.1.3 -
memorystream REMOVED 0.3.1 -
mri ADDED - 1.2.0
node-emoji REMOVED 1.11.0 -
oauth-sign REMOVED 0.9.0 -
optimist REMOVED 0.3.7 -
p-queue REMOVED 7.3.0 -
performance-now REMOVED 2.1.0 -
picture-tube REMOVED 0.0.4 -
png-js REMOVED 0.1.1 -
psl REMOVED 1.9.0 -
redeyed REMOVED 1.0.1 -
request REMOVED 2.88.2 -
sade ADDED - 1.8.1
sparkline REMOVED 0.1.2 -
sshpk REMOVED 1.17.0 -
term-canvas REMOVED 0.0.5 -
through2 REMOVED 2.0.5 -
tough-cookie REMOVED 2.5.0 -
tunnel-agent REMOVED 0.6.0 -
verror REMOVED 1.10.0 -
wordwrap REMOVED 0.0.3 -
x256 REMOVED 0.0.2 -
xtend REMOVED 4.0.2 -

@seed-deploy seed-deploy bot temporarily deployed to pr98 February 13, 2023 14:43 Inactive
@seed-deploy seed-deploy bot temporarily deployed to pr98 February 13, 2023 14:50 Inactive
@codeflyer codeflyer merged commit 800ab90 into main Feb 14, 2023
@codeflyer codeflyer deleted the feat/new-validation branch February 14, 2023 09:50
Copy link
Contributor

@olizilla olizilla left a 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) {
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants