crypto/bn256/gnark: align marshaling behavior

This commit is contained in:
MariusVanDerWijden 2025-06-20 10:44:29 +02:00
parent a29786b480
commit b2311cb119

View file

@ -64,7 +64,7 @@ func (g *G2) Unmarshal(buf []byte) (int, error) {
// Marshal serializes the point into a byte slice.
//
// The output is in EVM format: 128 bytes total.
// [32-byte x.0][32-byte x.1][32-byte y.0][32-byte y.1]
// [32-byte x.1][32-byte x.0][32-byte y.1][32-byte y.0]
// where each value is a big-endian integer.
func (g *G2) Marshal() []byte {
output := make([]byte, 128)