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

Exonum do not support big-endian architectures #32

Closed
2 tasks
alekseysidorov opened this issue Apr 12, 2017 · 5 comments
Closed
2 tasks

Exonum do not support big-endian architectures #32

alekseysidorov opened this issue Apr 12, 2017 · 5 comments
Assignees
Labels
Milestone

Comments

@alekseysidorov
Copy link
Contributor

At least two modules are implicitily assume that current hardware is little-endian.

  • Storage
  • Messages

It seems not to be critical issue because most of modern hardware is little-endian.

@defuz
Copy link
Contributor

defuz commented Apr 12, 2017

Why did you decide that? We use the byteorder crate and explicit conversions like LittleEndian::read_u32 and LittleEndian::write_u32 wherever the behavior between architectures may differ.

We must use a unified approach of -endianess for messages and storage data since it's protocol-specific behaviour and it is independent of the target architecture.

TLDR: The actual code should work on both architectures in the same way, but we did not test that.

Feel free to reopen issue.

@defuz defuz closed this as completed Apr 12, 2017
@vldm
Copy link
Contributor

vldm commented Apr 12, 2017

@defuz yes, the code of u64/u16/u32 use byteorder::LittleEndian conversions, but SegmentFields slices, for example &[u64] &[u32] use transmute and Slice::from_raw which is not right way to represent architecture independent data.
@alekseysidorov reopen it pls

@dj8yfo
Copy link
Contributor

dj8yfo commented Apr 16, 2017

@defuz reopen plz.

@defuz
Copy link
Contributor

defuz commented Apr 18, 2017

@vldm You know what to do :)

@defuz defuz reopened this Apr 18, 2017
@defuz defuz added this to the Release 0.1 milestone Apr 28, 2017
@defuz defuz added the bug 🪲 label Apr 28, 2017
@defuz defuz mentioned this issue Apr 28, 2017
23 tasks
@dj8yfo
Copy link
Contributor

dj8yfo commented Jun 16, 2017

@vldm, i assume this is covered now?

@vldm vldm closed this as completed Jun 27, 2017
@vldm vldm self-assigned this Jul 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants