-
Notifications
You must be signed in to change notification settings - Fork 10
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 WASM #99
Fix WASM #99
Conversation
aca2ec5
to
06b7641
Compare
Fixed how the value of |
Patch secp256k1-zkp to work in WASM. Use my local branch until BlockstreamResearch/simfony#99 is merged.
My local CI cannot handle patches in Cargo.toml. Can you just PR to rust-secp-zkp to do a new minor release? |
The CMR used in debug symbols was a hash of the literal span of the affected function call expression. It turns out that the spans from the PEST library differ on x86 and WASM. This resulted in entirely different debug symbols and entirely different root CMRs of programs with debug symbols. To fix this, we assign each span an index. Instead of hashing the span, we hash its index. Because the PEST parser maintains identity and order of spans on all architectures, the resulting debug symbols are the same on all architectures.
The debug symbol for `dbg!(x)` used the span of `x`. If `x` was an expression with its own debug symbol, then there would be a conflict. For example, `dbg!(jet::bip_0340_verify(...))` would have one debug symbol instead of two. An easy fix is to use the whole span of `dbg!(x)` for its debug symbol. We have to trim the `dbg!(` prefix and `)` suffix for the text of the debug symbol.
06b7641
to
7c91cab
Compare
Updated this PR to use the latest version of rust-secp256k1-sys. Remove the Cargo.toml |
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.
ACK 7c91cab; successfully ran local tests
This crate was broken on WASM; make it compile again. Check WASM compilation in CI. Fix broken debug symbols on WASM.