Skip to content

Commit

Permalink
fix the golangci-lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
Soleimani193 committed Sep 17, 2024
1 parent fc80ecd commit 329bf09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion prover/protocol/compiler/splitter/stitcher/stitcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func Stitcher(minSize, maxSize int) func(comp *wizard.CompiledIOP) {
// it assigns the stitching columns and delete the assignment of the sub columns.
comp.SubProvers.AppendToInner(comp.NumRounds()-1, func(run *wizard.ProverRuntime) {
for round := range comp.NumRounds() {
for subCol, _ := range ctx.Stitchings[round].BySubCol {
for subCol := range ctx.Stitchings[round].BySubCol {
run.Columns.TryDel(subCol)
}
}
Expand Down
6 changes: 5 additions & 1 deletion prover/protocol/compiler/splitter/stitcher/stitcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,10 @@ func TestGlobalMixedRounds(t *testing.T) {
require.NoError(t, err)
}

func TestGlobalWithVerifCol(t *testing.T) {
func TestWithVerifCol(t *testing.T) {
var a, b, c, verifcol1, verifcol2 ifaces.Column
var q1, q2 query.GlobalConstraint
var q3 query.LocalConstraint

define := func(builder *wizard.Builder) {
// declare columns of different sizes
Expand All @@ -259,13 +260,16 @@ func TestGlobalWithVerifCol(t *testing.T) {

expr = symbolic.Sub(symbolic.Add(a, verifcol2), c)
q2 = builder.GlobalConstraint("Q1", expr)

q3 = builder.LocalConstraint("Q2", expr)
}

comp := wizard.Compile(define, stitcher.Stitcher(4, 8))

//after stitcing-compilation we expect that the eligible columns and their relevant queries be ignored
assert.Equal(t, true, comp.QueriesNoParams.IsIgnored(q1.ID), "q1 should be ignored")
assert.Equal(t, true, comp.QueriesNoParams.IsIgnored(q2.ID), "q2 should be ignored")
assert.Equal(t, true, comp.QueriesNoParams.IsIgnored(q3.ID), "q2 should be ignored")

// manually compiles the comp
dummy.Compile(comp)
Expand Down

0 comments on commit 329bf09

Please sign in to comment.