diem / diem

Diem’s mission is to build a trusted and innovative financial network that empowers people and businesses around the world.
https://diem.com
Apache License 2.0
16.7k stars 2.58k forks source link

Build of libra-crypto broken for big-endian machines for testnet #3567

Open n4ss opened 4 years ago

n4ss commented 4 years ago

We're running in the following due to the bump of ed25519-dalek and our use of libra-crypto crate (https://github.com/libra/libra/pull/3350):

10 | / compile_error!(
11 | |     r#"
12 | | This crate doesn't support big-endian targets, since I didn't
13 | | have one to test correctness on.  If you're seeing this message,
14 | | please file an issue!
15 | | "#
16 | | );
   | |__^

error: aborting due to previous error

error: could not compile `merlin`.

I filed an issue in the nested dependency (merlin): https://github.com/dalek-cryptography/merlin/issues/58

cc @kchalkias @huitseeker @thefallentree

davidiw commented 4 years ago

@huitseeker, can you look at this and get it resolved? @n4ss, how long can we defer on fixing this? We can revert the PR if this is critical or at least time-bound it so that either a fix lands or the PR is reverted.

@kchalkias for awareness

kchalkias commented 4 years ago

We’re aware of this, @n4ss is exploring a few options.

thefallentree commented 4 years ago

Can we just get rid of Merlin if don’t have bandwidth to fix it ? (not only as an optional dep)

feature selection doesn’t work with batch default enabled , because of feature unification .

isislovecruft commented 4 years ago

Hi! Sorry you're running into this issue!

From my recollection of our design discussions, @huitseeker, @kchalkias, @valerini, an I decided to add merlin as a dependency for batch verification in order to provide what's usually termed "synthethic" randomness, which protects against systems with bad RNGs. When the batch_deterministic mode is enabled, merlin is necessary because we use it to deterministically construct a protocol transcript and ratchet the underlying permutation function before constructing an RNG.

I'm no longer under contract, but I'm happy to look into the endianness issue unless someone else is already on it.