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: write content claims #2291

Merged
merged 15 commits into from
Jul 31, 2023
Merged

feat: write content claims #2291

merged 15 commits into from
Jul 31, 2023

Conversation

alanshaw
Copy link
Member

@alanshaw alanshaw commented Jul 18, 2023

This PR updates web3.storage to write content claims for uploaded CAR files.

Claims we write:

  • Inclusion claim for the CAR file
  • Partition claim for the index (we store this in a CAR in CARPARK now!)
  • Partition claim for the CAR file if complete
  • Relation claims for each block that has links (i.e. top of tree including the root, even if it does not have links)

storacha/linkdex#24 would make this PR a bit nicer and more efficient but not a blocker.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 18, 2023

@alanshaw alanshaw force-pushed the feat/write-content-claims branch from 4c98275 to 6c1c75f Compare July 20, 2023 15:32
@alanshaw alanshaw marked this pull request as ready for review July 21, 2023 15:28
@alanshaw alanshaw requested a review from a team as a code owner July 21, 2023 15:28
@alanshaw alanshaw force-pushed the feat/write-content-claims branch from a682da0 to 8d0cb43 Compare July 24, 2023 16:36
Copy link
Contributor

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, a few details commented inline.

packages/api/src/env.js Show resolved Hide resolved
packages/api/test/car.spec.js Show resolved Hide resolved
packages/api/src/car.js Outdated Show resolved Hide resolved
@alanshaw alanshaw merged commit 6a31c9b into main Jul 31, 2023
@alanshaw alanshaw deleted the feat/write-content-claims branch July 31, 2023 11:30
alanshaw pushed a commit that referenced this pull request Jul 31, 2023
🤖 I have created a release *beep* *boop*
---


##
[7.19.0](api-v7.18.1...api-v7.19.0)
(2023-07-31)


### Features

* write content claims
([#2291](#2291))
([6a31c9b](6a31c9b))


### Bug Fixes

* remove unnecessary compatibility flags
([#2301](#2301))
([436cdb8](436cdb8))
* signer DID
([82c3462](82c3462))
* this param for fetch calls
([#2292](#2292))
([bf32c53](bf32c53))
* use error message value in cause
([9b07288](9b07288))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

3 participants