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

Fix tar gz localforage #28

Merged
merged 3 commits into from
Feb 8, 2023
Merged

Conversation

rmccrear
Copy link
Contributor

@rmccrear rmccrear commented Feb 5, 2023

This will allow the ${filename}.zkey*.tar.gz files to be downloaded from a remote server and stored with localforage.

It introduces the pako and js-tar modules to help with uncompressing the files. Then the files are stored as ArrayBuffers with the index key: ${filename}.zkey${a} (where a is a letter [b-k]) to be consumed by the snarkjs module when needed.

@Divide-By-0
Copy link
Member

Divide-By-0 commented Feb 8, 2023

Comment from dm:
Seems to not work for me. I've fixed the bug you got when running (the one about line 145), do you mind trying again with your twitter password reset email?

Also, when you call the wasm you have an extra slash / before the filename, so it doesn't get the wasm correctly (but even fixing that bug leaves it not-working due to the decompressed files).

I've also uploaded .gz files to the bucket per your advice, so we can use those instead if it's easier.

It seems to have this error when reading the zkey files into the buffer:

Uncaught (in promise) Error: Reading out of bounds
at MemFile.readToBuffer (memfile.js:76:1)
at MemFile.read

Edit: lgtm now, thanks for the contribution!

@Divide-By-0 Divide-By-0 merged commit dfd1867 into zkemail:main Feb 8, 2023
@Divide-By-0 Divide-By-0 mentioned this pull request Mar 8, 2023
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.

2 participants