Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unifications for compatibility with go-lachesis #44

Open
Maxime2 opened this issue Jan 16, 2019 · 1 comment
Open

Unifications for compatibility with go-lachesis #44

Maxime2 opened this issue Jan 16, 2019 · 1 comment

Comments

@Maxime2
Copy link
Contributor

Maxime2 commented Jan 16, 2019

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, rust-lang/rust#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.

@Maxime2
Copy link
Contributor Author

Maxime2 commented Jan 16, 2019

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.

@Maxime2 Maxime2 changed the title FNV hash function for compatibility with go-lachesis Unifications for compatibility with go-lachesis Jan 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant