supranational / blst

Multilingual BLS12-381 signature library
Apache License 2.0
454 stars 171 forks source link

`aggregate_verify` no longer accessible targetting `wasm32-unknown-unknown` #227

Closed emturner closed 3 weeks ago

emturner commented 3 weeks ago

Previously on min_pk::0.3.10, we were able to use aggregate_verify successfully, when targetting wasm.

However, on upgrading to 0.3.12, this is no longer the case - as the method is hidden behind the std feature flag that we cannot enable.

Is there any way to fix this? Is there a reason why that method would no-longer accessible on 0.3.12? Currently, it's a breaking change in the API for us.

We're using it to verify aggregate payload signatures from within a wasm32 program.

Thank you!

dot-asm commented 3 weeks ago

Could you test #228? The omission was unintended...

emturner commented 3 weeks ago

Hi, I've tested and can confirm that #228 does fix the issue!

dot-asm commented 3 weeks ago

Cool! I wonder if you could tell a little bit about your environment. Is it based on wasm-pack or something else? In the essence the underlying question is if there is a way to perform github actions tests in an wasm32-unkown-unknown environment, and if you have any ideas/pointers to share :-)

emturner commented 3 weeks ago

Of course! It's ultimately compiling into a wasm module, that gets linked against a custom module internally provided by our runtime. The code runs as the program in a tezos smart rollup, compiling against our SDK.

We don't use wasm pack or anything - very much just a plain cargo build --target wasm32-unknown-unknown.

We don't end up running any tests at all within a wasm32 environment, any unit tests all run natively (but we do run separate e2e tests against the full stack with the compiled module).

Hope that makes rough sense - happy to go into it more if you have any specific questions?

dot-asm commented 3 weeks ago

Thanks! It doesn't sound like something I'd be willing to put together and maintain as GA test, too many moving parts... We do exercise wasi and emscripten builds, so it's not like wasm is in total darkness:-) And thanks for the report!