Skip to content

Commit

Permalink
Merge pull request from GHSA-7p92-x423-vwj6
Browse files Browse the repository at this point in the history
* feat: bumped gnark-crypto

* fix: fixed challenge generation

* build: update to gnark-crypto v0.12.1

* fixed: calldataload -> mload

* fix: fixed template (declatration of _mPtr)

* feat: bumped gnark-crypto

* fix: fixed non critical issues

* fix: check number of public inputs

* build: udpate to latest gnark-crypto

---------

Co-authored-by: Gautam Botrel <[email protected]>
  • Loading branch information
ThomasPiellard and gbotrel authored Oct 16, 2023
1 parent 33db4ee commit 3421eaa
Show file tree
Hide file tree
Showing 19 changed files with 629 additions and 483 deletions.
1 change: 1 addition & 0 deletions backend/plonk/bls12-377/prove.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/plonk/bls12-377/verify.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/plonk/bls12-381/prove.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/plonk/bls12-381/verify.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/plonk/bls24-315/prove.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/plonk/bls24-315/verify.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/plonk/bls24-317/prove.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/plonk/bls24-317/verify.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/plonk/bn254/prove.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,090 changes: 609 additions & 481 deletions backend/plonk/bn254/solidity.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions backend/plonk/bn254/verify.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/plonk/bw6-633/prove.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/plonk/bw6-633/verify.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/plonk/bw6-761/prove.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions backend/plonk/bw6-761/verify.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/bits-and-blooms/bitset v1.8.0
github.com/blang/semver/v4 v4.0.0
github.com/consensys/bavard v0.1.13
github.com/consensys/gnark-crypto v0.12.2-0.20231012161402-206544105834
github.com/consensys/gnark-crypto v0.12.2-0.20231013160410-1f65e75b6dfb
github.com/fxamacker/cbor/v2 v2.5.0
github.com/google/go-cmp v0.5.9
github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/Yj
github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI=
github.com/consensys/gnark-crypto v0.12.2-0.20231012161402-206544105834 h1:o+Q1/PSZfNkoUAl/Gf5N/u+H6LkOzR3gF0mS8nRSWYM=
github.com/consensys/gnark-crypto v0.12.2-0.20231012161402-206544105834/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY=
github.com/consensys/gnark-crypto v0.12.2-0.20231013160410-1f65e75b6dfb h1:f0BMgIjhZy4lSRHCXFbQst85f5agZAjtDMixQqBWNpc=
github.com/consensys/gnark-crypto v0.12.2-0.20231013160410-1f65e75b6dfb/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY=
github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,7 @@ func (s *instance) batchOpening() error {
s.zeta,
s.hFunc,
s.pk.Kzg,
s.proof.ZShiftedOpening.ClaimedValue.Marshal(),
)

return err
Expand Down Expand Up @@ -1350,4 +1351,4 @@ func computeLinearizedPolynomial(lZeta, rZeta, oZeta, alpha, beta, gamma, zeta,
return blindedZCanonical
}

var errContextDone = errors.New("context done")
var errContextDone = errors.New("context done")
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ func Verify(proof *Proof, vk *VerifyingKey, publicWitness fr.Vector) error {
&proof.BatchedProof,
zeta,
hFunc,
zu.Marshal(),
)
if err != nil {
return err
Expand Down

0 comments on commit 3421eaa

Please sign in to comment.