From 8662c56735d367c746546ef032e0e5d24c07a94c Mon Sep 17 00:00:00 2001 From: Thomas Piellard Date: Thu, 20 Jun 2024 15:20:01 +0200 Subject: [PATCH] style: cleaner computation nb BSB commitments --- backend/plonk/bls12-377/prove.go | 2 +- backend/plonk/bls12-381/prove.go | 2 +- backend/plonk/bls24-315/prove.go | 2 +- backend/plonk/bls24-317/prove.go | 2 +- backend/plonk/bn254/prove.go | 2 +- backend/plonk/bw6-633/prove.go | 2 +- backend/plonk/bw6-761/prove.go | 2 +- .../backend/template/zkpschemes/plonk/plonk.prove.go.tmpl | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/backend/plonk/bls12-377/prove.go b/backend/plonk/bls12-377/prove.go index 8dcd0479f..9bef6c1af 100644 --- a/backend/plonk/bls12-377/prove.go +++ b/backend/plonk/bls12-377/prove.go @@ -772,7 +772,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { case <-s.chQk: } - nbBsbGates := (len(s.x) - id_Qci + 1) >> 1 + nbBsbGates := len(s.proof.Bsb22Commitments) gateConstraint := func(u ...fr.Element) fr.Element { diff --git a/backend/plonk/bls12-381/prove.go b/backend/plonk/bls12-381/prove.go index 8e4352632..273a2930e 100644 --- a/backend/plonk/bls12-381/prove.go +++ b/backend/plonk/bls12-381/prove.go @@ -772,7 +772,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { case <-s.chQk: } - nbBsbGates := (len(s.x) - id_Qci + 1) >> 1 + nbBsbGates := len(s.proof.Bsb22Commitments) gateConstraint := func(u ...fr.Element) fr.Element { diff --git a/backend/plonk/bls24-315/prove.go b/backend/plonk/bls24-315/prove.go index b0e8f4d7c..d67e9c663 100644 --- a/backend/plonk/bls24-315/prove.go +++ b/backend/plonk/bls24-315/prove.go @@ -772,7 +772,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { case <-s.chQk: } - nbBsbGates := (len(s.x) - id_Qci + 1) >> 1 + nbBsbGates := len(s.proof.Bsb22Commitments) gateConstraint := func(u ...fr.Element) fr.Element { diff --git a/backend/plonk/bls24-317/prove.go b/backend/plonk/bls24-317/prove.go index 1e814667b..b008bae6c 100644 --- a/backend/plonk/bls24-317/prove.go +++ b/backend/plonk/bls24-317/prove.go @@ -772,7 +772,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { case <-s.chQk: } - nbBsbGates := (len(s.x) - id_Qci + 1) >> 1 + nbBsbGates := len(s.proof.Bsb22Commitments) gateConstraint := func(u ...fr.Element) fr.Element { diff --git a/backend/plonk/bn254/prove.go b/backend/plonk/bn254/prove.go index ee1bd21de..e395fd554 100644 --- a/backend/plonk/bn254/prove.go +++ b/backend/plonk/bn254/prove.go @@ -772,7 +772,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { case <-s.chQk: } - nbBsbGates := (len(s.x) - id_Qci + 1) >> 1 + nbBsbGates := len(s.proof.Bsb22Commitments) gateConstraint := func(u ...fr.Element) fr.Element { diff --git a/backend/plonk/bw6-633/prove.go b/backend/plonk/bw6-633/prove.go index c4e134320..6a414e41b 100644 --- a/backend/plonk/bw6-633/prove.go +++ b/backend/plonk/bw6-633/prove.go @@ -772,7 +772,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { case <-s.chQk: } - nbBsbGates := (len(s.x) - id_Qci + 1) >> 1 + nbBsbGates := len(s.proof.Bsb22Commitments) gateConstraint := func(u ...fr.Element) fr.Element { diff --git a/backend/plonk/bw6-761/prove.go b/backend/plonk/bw6-761/prove.go index c43194084..aa65bf903 100644 --- a/backend/plonk/bw6-761/prove.go +++ b/backend/plonk/bw6-761/prove.go @@ -772,7 +772,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { case <-s.chQk: } - nbBsbGates := (len(s.x) - id_Qci + 1) >> 1 + nbBsbGates := len(s.proof.Bsb22Commitments) gateConstraint := func(u ...fr.Element) fr.Element { diff --git a/internal/generator/backend/template/zkpschemes/plonk/plonk.prove.go.tmpl b/internal/generator/backend/template/zkpschemes/plonk/plonk.prove.go.tmpl index 44b5a9ff2..3ed109a9e 100644 --- a/internal/generator/backend/template/zkpschemes/plonk/plonk.prove.go.tmpl +++ b/internal/generator/backend/template/zkpschemes/plonk/plonk.prove.go.tmpl @@ -749,7 +749,7 @@ func (s *instance) computeNumerator() (*iop.Polynomial, error) { case <-s.chQk: } - nbBsbGates := (len(s.x) - id_Qci + 1) >> 1 + nbBsbGates := len(s.proof.Bsb22Commitments) gateConstraint := func(u ...fr.Element) fr.Element {