go-perun
go-perun copied to clipboard
Switching to big-endian byte order in `pkg/io/serialize.go`?
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.Int
s, 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.