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

Support Data Segment Index #1258

Open
1 task done
willscott opened this issue Mar 4, 2023 · 2 comments
Open
1 task done

Support Data Segment Index #1258

willscott opened this issue Mar 4, 2023 · 2 comments
Assignees
Labels

Comments

@willscott
Copy link
Collaborator

willscott commented Mar 4, 2023

Boost component

  • boost daemon - storage providers

Improvement Suggestion

Currently boost indexes pieces using go-car to generate a local index of CIDs contained in the piece for use in retrievals and to notify network indexers.

This format has been extended recently, per the go-data-segment library. This wrapper can be used to parse pieces, in particular by parsing a trailing index if it exists.

as @Kubuxu notes:

Here is the code for parsing the data segment index: https://github.com/filecoin-project/go-data-segment/blob/master/datasegment/parse_index.go
After the index is parsed, you should use IndexData#ValidEntries()` to gather valid data segments on which you can access information of each segment using PieceCID() UnpaddedOffset() UnpaddedLength(): https://github.com/filecoin-project/go-data-segment/blob/master/datasegment/index.go#L156-L173

This is currently managed by the dagstore
I think the lid variant will be this? (can you confirm, @nonsense?)

@honghaoq
Copy link

Tracking link (from Jake): #573

@willscott
Copy link
Collaborator Author

This work is progressing in #1495

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In Progress
Development

No branches or pull requests

3 participants