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

In leu of https://github.com/multiformats/js-multiformats/pull/261 landing, this PR uses the nodejs crypto library to create a streaming sha256 hasher. #23496

Open
sangshanrupesh opened this issue Nov 29, 2024 · 0 comments

Comments

@sangshanrupesh
Copy link

sangshanrupesh commented Nov 29, 2024

In leu of multiformats/js-multiformats#261 landing, this PR uses the nodejs crypto library to create a streaming sha256 hasher.

Before:

$ ipfs-car hash snow.car 
node:internal/fs/promises:516
    throw new ERR_FS_FILE_TOO_LARGE(size);
          ^

RangeError [ERR_FS_FILE_TOO_LARGE]: File size (11998084756) is greater than 2 GiB
    at readFileHandle (node:internal/fs/promises:516:11)
    at async Module.hash (file:///usr/local/lib/node_modules/ipfs-car/cmd/hash.js:13:13) {
  code: 'ERR_FS_FILE_TOO_LARGE'
}

Node.js v20.11.0

After:

$ ipfs-car hash snow.car
bagbaierabdsb7q55nozng74qw267etolakl4jwrszyjb5elw43zercwmowva

(Note: snow.car is an 11GB CAR)

resolves storacha/ipfs-car#158

Originally posted by @alanshaw in storacha/ipfs-car#162

┆Issue is synchronized with this Jira Task

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

No branches or pull requests

1 participant