From 62d1f4c48d94355468c563f209afef6ff698a704 Mon Sep 17 00:00:00 2001 From: joaolago1113 <22820692+joaolago1113@users.noreply.github.com> Date: Fri, 8 Dec 2023 12:45:02 +0000 Subject: [PATCH 1/9] Fix spelling errors in API comments: Corrected the spelling of 'methdods' to 'methods' in two instances within API comments for enhanced readability and professionalism. --- frontend/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/api.go b/frontend/api.go index f12060ff33..60e2b975d0 100644 --- a/frontend/api.go +++ b/frontend/api.go @@ -106,7 +106,7 @@ type API interface { // * -1 if i1 bound. // // If the absolute difference between the variables b and bound is known, then - // it is more efficient to use the bounded methdods in package + // it is more efficient to use the bounded methods in package // [github.com/consensys/gnark/std/math/bits]. AssertIsLessOrEqual(v Variable, bound Variable) From b1076889bde8bd8350e04bf74b35f5ee73e91e07 Mon Sep 17 00:00:00 2001 From: joaolago1113 <22820692+joaolago1113@users.noreply.github.com> Date: Fri, 8 Dec 2023 12:53:47 +0000 Subject: [PATCH 2/9] Fix Typo in Comment: Corrected 'doesn't not' to 'does not' --- constraint/r1cs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constraint/r1cs.go b/constraint/r1cs.go index b58ff95d40..8eef7599c8 100644 --- a/constraint/r1cs.go +++ b/constraint/r1cs.go @@ -135,7 +135,7 @@ func (it *R1CIterator) Next() *R1C { // if cptHints != 0 { // // TODO @gbotrel @ivokub investigate --> emulated hints seems to go in this path a lot. // sbb.WriteString(strconv.Itoa(cptHints)) -// sbb.WriteString(" unconstrained hints; i.e. wire created through NewHint() but doesn't not appear in the constraint system") +// sbb.WriteString(" unconstrained hints; i.e. wire created through NewHint() but does not appear in the constraint system") // sbb.WriteByte('\n') // log := logger.Logger() // log.Warn().Err(errors.New(sbb.String())).Send() From 7aa874fbb270e19158d17a35985a842f2f103a63 Mon Sep 17 00:00:00 2001 From: joaolago1113 <22820692+joaolago1113@users.noreply.github.com> Date: Fri, 8 Dec 2023 13:01:56 +0000 Subject: [PATCH 3/9] Fix spelling error in CheckUnconstrainedWires comment --- constraint/system.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constraint/system.go b/constraint/system.go index e03586af4e..ca61f563d3 100644 --- a/constraint/system.go +++ b/constraint/system.go @@ -71,7 +71,7 @@ type ConstraintSystem interface { // debug information only once. AttachDebugInfo(debugInfo DebugInfo, constraintID []int) - // CheckUnconstrainedWires returns and error if the constraint system has wires that are not uniquely constrained. + // CheckUnconstrainedWires returns an error if the constraint system has wires that are not uniquely constrained. // This is experimental. CheckUnconstrainedWires() error From 8ce301eb518424c124432996c0e69a13e9a57b37 Mon Sep 17 00:00:00 2001 From: joaolago1113 <22820692+joaolago1113@users.noreply.github.com> Date: Fri, 8 Dec 2023 13:04:20 +0000 Subject: [PATCH 4/9] Fixed typos in comments: changed 'overhide' to 'override' in Set function comment and corrected 'accross' to 'across' in package comment --- logger/logger.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/logger/logger.go b/logger/logger.go index 3a5e186cd2..4781fff75b 100644 --- a/logger/logger.go +++ b/logger/logger.go @@ -1,4 +1,4 @@ -// Package logger provides a configurable logger accross gnark components +// Package logger provides a configurable logger across gnark components // // The root logger defined by default uses github.com/rs/zerolog with a console writer package logger @@ -29,7 +29,7 @@ func SetOutput(w io.Writer) { logger = logger.Output(w) } -// Set allow a gnark user to overhide the global logger +// Set allow a gnark user to override the global logger func Set(l zerolog.Logger) { logger = l } From 66596e916d3706fdb2ee538dda15e21607a865f1 Mon Sep 17 00:00:00 2001 From: joaolago1113 <22820692+joaolago1113@users.noreply.github.com> Date: Fri, 8 Dec 2023 13:09:32 +0000 Subject: [PATCH 5/9] Fix typo in parseCircuit comment: change 'encoutering' to 'encountering' --- frontend/compile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/compile.go b/frontend/compile.go index 072aca1c34..23110ddac4 100644 --- a/frontend/compile.go +++ b/frontend/compile.go @@ -78,7 +78,7 @@ func parseCircuit(builder Builder, circuit Circuit) (err error) { log := logger.Logger() log.Info().Int("nbSecret", s.Secret).Int("nbPublic", s.Public).Msg("parsed circuit inputs") - // leaf handlers are called when encoutering leafs in the circuit data struct + // leaf handlers are called when encountering leafs in the circuit data struct // leafs are Constraints that need to be initialized in the context of compiling a circuit variableAdder := func(targetVisibility schema.Visibility) func(f schema.LeafInfo, tInput reflect.Value) error { return func(f schema.LeafInfo, tInput reflect.Value) error { From 62ee7f02579106dc9381f5e58874349e09dbc4dd Mon Sep 17 00:00:00 2001 From: joaolago1113 <22820692+joaolago1113@users.noreply.github.com> Date: Fri, 8 Dec 2023 13:11:46 +0000 Subject: [PATCH 6/9] Fix typo in Profile struct comment: change 'profiile' to 'profile' --- profile/profile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profile/profile.go b/profile/profile.go index fe3e58f3c2..ed80741d23 100644 --- a/profile/profile.go +++ b/profile/profile.go @@ -26,7 +26,7 @@ var ( // Profile represents an active constraint system profiling session. type Profile struct { // defaults to ./gnark.pprof - // if blank, profiile is not written to disk + // if blank, profile is not written to disk filePath string // actual pprof profile struct From 6467072010850924d96e6c2981107a3e108c32ed Mon Sep 17 00:00:00 2001 From: joaolago1113 <22820692+joaolago1113@users.noreply.github.com> Date: Fri, 8 Dec 2023 15:44:42 +0000 Subject: [PATCH 7/9] Fix comment typo: change 'it's purpose' to 'its purpose' to correct grammatical error --- profile/profile_worker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profile/profile_worker.go b/profile/profile_worker.go index 97817fe898..fbc3fd0939 100644 --- a/profile/profile_worker.go +++ b/profile/profile_worker.go @@ -11,7 +11,7 @@ import ( ) // since we are assuming usage of this package from a single go routine, this channel only has -// one "producer", and one "consumer". it's purpose is to guarantee the order of execution of +// one "producer", and one "consumer". its purpose is to guarantee the order of execution of // adding / removing a profiling session and sampling events, while enabling the caller // (frontend.Compile) to sample the events asynchronously. var chCommands = make(chan command, 100) From 2dd657516f54dec41c3eea16aa92a64e4678ec91 Mon Sep 17 00:00:00 2001 From: joaolago1113 <22820692+joaolago1113@users.noreply.github.com> Date: Fri, 8 Dec 2023 16:10:31 +0000 Subject: [PATCH 8/9] Fixed typo in comments, changed 'proogs' to 'proofs' --- std/commitments/kzg/verifier.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/std/commitments/kzg/verifier.go b/std/commitments/kzg/verifier.go index b4d86705c1..084cf0644e 100644 --- a/std/commitments/kzg/verifier.go +++ b/std/commitments/kzg/verifier.go @@ -486,7 +486,7 @@ func (v *Verifier[FR, G1El, G2El, GTEl]) BatchVerifySinglePoint(digests []Commit func (v *Verifier[FR, G1El, G2El, GTEl]) BatchVerifyMultiPoints(digests []Commitment[G1El], proofs []OpeningProof[FR, G1El], points []emulated.Element[FR], vk VerifyingKey[G1El, G2El]) error { var fr FR - // check consistency nb proogs vs nb digests + // check consistency nb proofs vs nb digests if len(digests) != len(proofs) { return fmt.Errorf("number of commitments doesn't match number of proofs") } From 1510c482d0ce2e3bffa2bde72d0ad09a9f5725de Mon Sep 17 00:00:00 2001 From: joaolago1113 <22820692+joaolago1113@users.noreply.github.com> Date: Fri, 8 Dec 2023 16:18:35 +0000 Subject: [PATCH 9/9] Fix typo: change occurences to occurrences in function documentation. --- std/internal/logderivarg/logderivarg.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/std/internal/logderivarg/logderivarg.go b/std/internal/logderivarg/logderivarg.go index 0038f9c74e..787da9e60d 100644 --- a/std/internal/logderivarg/logderivarg.go +++ b/std/internal/logderivarg/logderivarg.go @@ -6,7 +6,7 @@ // // ∏_{f∈F} (x-f)^count(f, S) == ∏_{s∈S} x-s, // -// where function `count` counts the number of occurences of f in S. The problem +// where function `count` counts the number of occurrences of f in S. The problem // with this approach is the high cost for exponentiating the left-hand side of // the equation. However, in [Haböck22] it was shown that when avoiding the // poles, we can perform the same check for the log-derivative variant of the