-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: handle retrieval queries for unindexed identity payload CIDs (#747
) * feat: handle retrieval queries for unindexed identity payload CIDs There are valid cases where a CAR may have an identity CID as its root that is not represented as a 'block' within the CAR body and therefore isn't indexed by the dagstore. In this case, we inspect the identity CID content and treat the query as a query for the intersection of all of the links within the block. Ref: filecoin-project/boost#715 * fix: refactor out multiple calls to dagStore.GetPiecesContainingBlock 1. to support identity PayloadCID without having to duplicate decode & lookup logic 2. because it's not cheap, especially for identity PayloadCIDs with lots of links The tradeoff is that in some cases we end up calling the PieceStore more than we otherwise would. * feat: impose limits on identity PayloadCIDs * Byte limit (2048) * Link limit (32) * feat: handle retrievals for nested identity CIDs * chore: expand testing to cover dag-pb identity CIDs
- Loading branch information
Showing
7 changed files
with
406 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.