HorizenOfficial / zend_oo

This repository is archived, Zendoo is out of beta and has been included in https://github.com/HorizenOfficial/zen.
https://github.com/HorizenOfficial/zen
Other
34 stars 22 forks source link

Investigate runtime behavior of zend_oo built with bmi2/adx on old CPUs #206

Open cronicc opened 3 years ago

cronicc commented 3 years ago

As we're going to default to building with bmi2/adx Rust compiler flags (which requires at least Intel Broadwell or AMD Excavator architectures) we should investigate how binaries compiled with these flags behave on platforms that don't support them.

I see two possible cases:

  1. zend fails to start, e.g. with a segfault
  2. zend does start, but fails when specific functions from zendoo-mc-cryptolib are being called, e.g. certificate verification

Case 1. would be "safe" for us and wanted behavior, although it would be nice to print useful information about the incompatibility to the user.

But if 2. is the case we should add code to zend to detect the incompatible platform, bail and notify the user.

If we do have to modify zend_oo, compatibility to older architectures by building with --legacy-cpu should be taken into account, see https://github.com/HorizenOfficial/zend_oo/commit/5d557abe72c8181884eea0d3be853711d45be3e2.