-
Notifications
You must be signed in to change notification settings - Fork 70
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
Store decompressed BlsPublicKeys in IndexedDB #3174
base: albatross
Are you sure you want to change the base?
Conversation
Without understanding/thoroughly reading the code: is this Indexeddb cache optional? Will it fail without crashing the client? Indexeddb might not be available in all browser contexts nor in NodeJS, so this needs to be purely optional and not affect the client if not available or unwritable/unreadable for any other reason. |
Yes, it's in an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's still an error in the web client compilation:
Generating main WASM for target nodejs...
error:
it looks like the Rust project used to create this Wasm file was linked against
version of wasm-bindgen that uses a different bindgen format than this binary:
rust Wasm file schema version: 0.2.95
this binary schema version: 0.2.97
Currently the bindgen format is unstable enough that these two schema versions
must exactly match. You can accomplish this by either updating this binary or
the wasm-bindgen dependency in the Rust project.
You should be able to update the wasm-bindgen dependency with:
cargo update -p wasm-bindgen --precise 0.2.97
don't forget to recompile your Wasm file! Alternatively, you can update the
binary with:
cargo install -f wasm-bindgen-cli --version 0.2.95
if this warning fails to go away though and you're not sure what to do feel free
to open an issue at https://github.com/rustwasm/wasm-bindgen/issues!
web-client/src/client/bls_cache.rs
Outdated
#[derive(Serialize, Deserialize, Debug)] | ||
struct BlsKeyEntry { | ||
compressed_key: String, | ||
public_key: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We talked about adding a "last used" field so we can apply some sort of cache eviction in the future.
The wasm-bindgen version missmatch will go away when rebasing on top of |
670dcb5
to
ec4de84
Compare
Rebased on top of albatross. |
ec4de84
to
48e42ea
Compare
48e42ea
to
16e9e77
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good to me. Left some minor comments only. It however does still have 2 clippy warnings for a RefCell
which is held across an .await
. Those should be reseolved.
I would also like to see some more rustdoc added, where it is missing.
16e9e77
to
01a47bf
Compare
Done. |
No description provided.