fix(encrypt-upload-client): load all CAR blocks into blockstore #659
Merged
fix(encrypt-upload-client): load all CAR blocks into blockstore #659
Conversation
Dhruv-Varshney-developer
approved these changes
Feb 5, 2026
fforbeck
pushed a commit
that referenced
this pull request
Feb 5, 2026
…9.95 (#661) ## @storacha/[email protected] (2026-02-05) ### 🩹 Fixes - #659 ### ❤️ Thank You - Felipe Forbeck @fforbeck ## @storacha/[email protected] (2026-02-05) ### 🧱 Updated Dependencies - Updated @storacha/encrypt-upload-client to 1.1.75 Co-authored-by: Rachabot <[email protected]>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
File decryption was failing with "Not Found" errors during metadata extraction. The issue happened when the UnixFS exporter attempted to read encrypted data from the blockstore - it could find the root block but failed when trying to access child blocks, causing the entire decryption process to fail.
Root Cause
The encrypted data is stored as a UnixFS file that may be chunked into multiple blocks forming a DAG structure. The original implementation only loaded the root block into the in-memory blockstore. When the exporter tried to traverse the DAG to read the file content, it couldn't find the child blocks and threw "Not Found" errors.
Solution
Modified
getEncryptedDataFromCarto load all blocks from the metadata CAR file into the blockstore, not just the root block. This ensures the exporter can successfully traverse the entire DAG structure and stream the encrypted data for decryption.