EspressoSystems / jellyfish

A Rust Implementation of the PLONK ZKP System and Extensions
https://jellyfish.docs.espressosys.com
MIT License
391 stars 96 forks source link

Build `blst` in portable mode when building for older processors #368

Open jbearer opened 1 year ago

jbearer commented 1 year ago

https://github.com/supranational/blst/blob/master/bindings/rust/README.md

chancharles92 commented 1 year ago

cc @mrain

jbearer commented 1 year ago

I'm not sure how this would work exactly because we don't know the processor when we're building, just the architecture, I think. It's possible that we need separate Docker images of all services that depend on this in order to support older processors. cc @Ancient123

Ancient123 commented 1 year ago

That doc says we should just need to trigger the portable flag while compiling.

jbearer commented 1 year ago

What I'm worried about is if unconditionally setting that flag disables some optimization that would work on newer processors

mrain commented 1 year ago

To me, the issue feels like an intel ADX thing. We may compile 2 images for older CPUs and new ones.

Ancient123 commented 1 year ago

That would match up with the processor having issues. It was haswell which is the generation right before ADX got added.