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: limit max download size + calculate SHA-256 checksum #28

Merged
merged 4 commits into from
Oct 10, 2023

Conversation

bajtos
Copy link
Member

@bajtos bajtos commented Oct 3, 2023

The first commit introduces a limit of 200 MB on the amount of data we are willing to download. See #16

The second commit computes SHA-256 hash of the downloaded content and submits it in measurements. See #30

The measurements data submitted to SPARK API has two new fields:

  • carTooLarge indicating whether we downloaded all content or aborted in the middle
  • carChecksum containing a multihash of the content

@bajtos bajtos requested a review from juliangruber October 3, 2023 08:46
lib/spark.js Show resolved Hide resolved
lib/spark.js Show resolved Hide resolved
lib/spark.js Show resolved Hide resolved
* success -> healthy

* remove `success`

* update test
@bajtos
Copy link
Member Author

bajtos commented Oct 9, 2023

@juliangruber I merged your PR. Is there anything else to change 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.

2 participants