go-perun icon indicating copy to clipboard operation
go-perun copied to clipboard

Switching to big-endian byte order in `pkg/io/serialize.go`?

Open sebastianst opened this issue 2 years ago • 2 comments

While writing a proposal for perun-proposals, I realized that, in general, we use little-endian byte order in pkg/io (see variable byteOrder in file serialize.go). But for big.Ints, we use Byte() which returns the big int in big-endian byte order. So in order to be more consistent, we should consider changing the byteOrder to BigEndian. After reading a bit about byte orders, it also seems that big endian is still more commonly used in networking/wire protocols (whereas little endian byte order is the winner in chip architectures).

The only implication of this change would be that existing persisted channel data would be invalid.

sebastianst avatar Aug 27 '21 09:08 sebastianst