Consensys/eth2.0-dafny

Make the behaviour of int_to_bytes and bytes_to_int in Math.dfy dependent on the ENDIANNESS constant

Closed this issue · 3 comments

The Eth2 .md spec prescribes that the behaviour of int_to_bytes and bytes_to_int should be dependent on the value of the ENDIANNESS constant.

In the current Dafny specification, little endianness is hardcoded for both functions.

To note that little endianness is also hardcoded for both functions in the Eth2 K-Spec.

I think little endian is the choice for the spec, and there is no consideration to move to big endianness.
Am I missing something?

I think little endian is the choice for the spec, and there is no consideration to move to big endianness.

You are likely to be right, it is probably inconceivable that the endianness may be changed now.

However, the Eth2 spec still specifies that int_to_bytes and bytes_to_int should be dependent on the value of ENDIANNESS.
image

Closing this as seems to be resolved.