From 41125bc1909c00e50cbfc206556960b163d52b5a Mon Sep 17 00:00:00 2001 From: John Guibas Date: Mon, 23 Sep 2024 16:48:30 -0700 Subject: [PATCH] fix eval contribution encoding --- backend/groth16/bls12-377/mpcsetup/marshal.go | 2 ++ backend/groth16/bls12-381/mpcsetup/marshal.go | 2 ++ backend/groth16/bls24-315/mpcsetup/marshal.go | 2 ++ backend/groth16/bls24-317/mpcsetup/marshal.go | 2 ++ backend/groth16/bn254/mpcsetup/marshal.go | 2 ++ backend/groth16/bw6-633/mpcsetup/marshal.go | 2 ++ backend/groth16/bw6-761/mpcsetup/marshal.go | 2 ++ .../template/zkpschemes/groth16/mpcsetup/marshal.go.tmpl | 2 ++ 8 files changed, 16 insertions(+) diff --git a/backend/groth16/bls12-377/mpcsetup/marshal.go b/backend/groth16/bls12-377/mpcsetup/marshal.go index 35ceece58f..00baac739a 100644 --- a/backend/groth16/bls12-377/mpcsetup/marshal.go +++ b/backend/groth16/bls12-377/mpcsetup/marshal.go @@ -151,6 +151,7 @@ func (c *Phase2Evaluations) WriteTo(writer io.Writer) (int64, error) { c.G1.A, c.G1.B, c.G2.B, + c.G1.VKK, } for _, v := range toEncode { @@ -169,6 +170,7 @@ func (c *Phase2Evaluations) ReadFrom(reader io.Reader) (int64, error) { &c.G1.A, &c.G1.B, &c.G2.B, + &c.G1.VKK, } for _, v := range toEncode { diff --git a/backend/groth16/bls12-381/mpcsetup/marshal.go b/backend/groth16/bls12-381/mpcsetup/marshal.go index 0aa64ea1f0..1ffa9491bb 100644 --- a/backend/groth16/bls12-381/mpcsetup/marshal.go +++ b/backend/groth16/bls12-381/mpcsetup/marshal.go @@ -151,6 +151,7 @@ func (c *Phase2Evaluations) WriteTo(writer io.Writer) (int64, error) { c.G1.A, c.G1.B, c.G2.B, + c.G1.VKK, } for _, v := range toEncode { @@ -169,6 +170,7 @@ func (c *Phase2Evaluations) ReadFrom(reader io.Reader) (int64, error) { &c.G1.A, &c.G1.B, &c.G2.B, + &c.G1.VKK, } for _, v := range toEncode { diff --git a/backend/groth16/bls24-315/mpcsetup/marshal.go b/backend/groth16/bls24-315/mpcsetup/marshal.go index f670a7af74..95afd4b23d 100644 --- a/backend/groth16/bls24-315/mpcsetup/marshal.go +++ b/backend/groth16/bls24-315/mpcsetup/marshal.go @@ -151,6 +151,7 @@ func (c *Phase2Evaluations) WriteTo(writer io.Writer) (int64, error) { c.G1.A, c.G1.B, c.G2.B, + c.G1.VKK, } for _, v := range toEncode { @@ -169,6 +170,7 @@ func (c *Phase2Evaluations) ReadFrom(reader io.Reader) (int64, error) { &c.G1.A, &c.G1.B, &c.G2.B, + &c.G1.VKK, } for _, v := range toEncode { diff --git a/backend/groth16/bls24-317/mpcsetup/marshal.go b/backend/groth16/bls24-317/mpcsetup/marshal.go index 6e1ebfc02c..f6711dd81e 100644 --- a/backend/groth16/bls24-317/mpcsetup/marshal.go +++ b/backend/groth16/bls24-317/mpcsetup/marshal.go @@ -151,6 +151,7 @@ func (c *Phase2Evaluations) WriteTo(writer io.Writer) (int64, error) { c.G1.A, c.G1.B, c.G2.B, + c.G1.VKK, } for _, v := range toEncode { @@ -169,6 +170,7 @@ func (c *Phase2Evaluations) ReadFrom(reader io.Reader) (int64, error) { &c.G1.A, &c.G1.B, &c.G2.B, + &c.G1.VKK, } for _, v := range toEncode { diff --git a/backend/groth16/bn254/mpcsetup/marshal.go b/backend/groth16/bn254/mpcsetup/marshal.go index 08cb2ae3d1..7244d04981 100644 --- a/backend/groth16/bn254/mpcsetup/marshal.go +++ b/backend/groth16/bn254/mpcsetup/marshal.go @@ -151,6 +151,7 @@ func (c *Phase2Evaluations) WriteTo(writer io.Writer) (int64, error) { c.G1.A, c.G1.B, c.G2.B, + c.G1.VKK, } for _, v := range toEncode { @@ -169,6 +170,7 @@ func (c *Phase2Evaluations) ReadFrom(reader io.Reader) (int64, error) { &c.G1.A, &c.G1.B, &c.G2.B, + &c.G1.VKK, } for _, v := range toEncode { diff --git a/backend/groth16/bw6-633/mpcsetup/marshal.go b/backend/groth16/bw6-633/mpcsetup/marshal.go index 4955ec6d92..db83f4d2d0 100644 --- a/backend/groth16/bw6-633/mpcsetup/marshal.go +++ b/backend/groth16/bw6-633/mpcsetup/marshal.go @@ -151,6 +151,7 @@ func (c *Phase2Evaluations) WriteTo(writer io.Writer) (int64, error) { c.G1.A, c.G1.B, c.G2.B, + c.G1.VKK, } for _, v := range toEncode { @@ -169,6 +170,7 @@ func (c *Phase2Evaluations) ReadFrom(reader io.Reader) (int64, error) { &c.G1.A, &c.G1.B, &c.G2.B, + &c.G1.VKK, } for _, v := range toEncode { diff --git a/backend/groth16/bw6-761/mpcsetup/marshal.go b/backend/groth16/bw6-761/mpcsetup/marshal.go index d1a071aa5d..0eac324176 100644 --- a/backend/groth16/bw6-761/mpcsetup/marshal.go +++ b/backend/groth16/bw6-761/mpcsetup/marshal.go @@ -151,6 +151,7 @@ func (c *Phase2Evaluations) WriteTo(writer io.Writer) (int64, error) { c.G1.A, c.G1.B, c.G2.B, + c.G1.VKK, } for _, v := range toEncode { @@ -169,6 +170,7 @@ func (c *Phase2Evaluations) ReadFrom(reader io.Reader) (int64, error) { &c.G1.A, &c.G1.B, &c.G2.B, + &c.G1.VKK, } for _, v := range toEncode { diff --git a/internal/generator/backend/template/zkpschemes/groth16/mpcsetup/marshal.go.tmpl b/internal/generator/backend/template/zkpschemes/groth16/mpcsetup/marshal.go.tmpl index 3af994ae04..5353e322c3 100644 --- a/internal/generator/backend/template/zkpschemes/groth16/mpcsetup/marshal.go.tmpl +++ b/internal/generator/backend/template/zkpschemes/groth16/mpcsetup/marshal.go.tmpl @@ -135,6 +135,7 @@ func (c *Phase2Evaluations) WriteTo(writer io.Writer) (int64, error) { c.G1.A, c.G1.B, c.G2.B, + c.G1.VKK, } for _, v := range toEncode { @@ -153,6 +154,7 @@ func (c *Phase2Evaluations) ReadFrom(reader io.Reader) (int64, error) { &c.G1.A, &c.G1.B, &c.G2.B, + &c.G1.VKK, } for _, v := range toEncode {