Skip to content

Commit

Permalink
fix: missing wait on channel in plonk prover (#926)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbotrel authored Nov 17, 2023
1 parent 51719fe commit 5b37273
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 0 deletions.
8 changes: 8 additions & 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.

8 changes: 8 additions & 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.

8 changes: 8 additions & 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.

8 changes: 8 additions & 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.

8 changes: 8 additions & 0 deletions backend/plonk/bn254/prove.go

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

8 changes: 8 additions & 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.

8 changes: 8 additions & 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.

2 changes: 2 additions & 0 deletions constraint/solver/hint_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ func RegisterHint(hintFns ...Hint) {
}

func GetRegisteredHint(key HintID) Hint {
registryM.Lock()
defer registryM.Unlock()
return registry[key]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,14 @@ func (s *instance) batchOpening() error {
// evaluate the full set of constraints, all polynomials in x are back in
// canonical regular form at the end
func (s *instance) computeNumerator() (*iop.Polynomial, error) {

// wait for chQk to be closed (or ctx.Done())
select {
case <-s.ctx.Done():
return nil, errContextDone
case <-s.chQk:
}

n := s.pk.Domain[0].Cardinality

nbBsbGates := (len(s.x) - id_Qci + 1) >> 1
Expand Down

0 comments on commit 5b37273

Please sign in to comment.