Open Maxime2 opened 5 years ago
Actually EventHash is calculated as SHA256(serialised event body); and go-lachesis and lachesis-rs have different event body definitions and different serialisation methods, - these ones need to be unified among all implementations of Lachesis, at least for things sent between nodes.
Current Lachesis implementation in Go uses FNV hash function to calculate EventHash, https://golang.org/pkg/hash/fnv/ ; but Rust has replaced FNV hash as its default hash function by a faster hash function, https://github.com/rust-lang/rust/pull/37229
To make lachesis-rs compatible with go implementation we need to use the very same hash function for event hashes. See https://github.com/servo/rust-fnv for fnv hash implementation in Rust.