diff --git a/prover/protocol/compiler/splitter/stitcher/stitcher.go b/prover/protocol/compiler/splitter/stitcher/stitcher.go index 11178f040..efd1b58be 100644 --- a/prover/protocol/compiler/splitter/stitcher/stitcher.go +++ b/prover/protocol/compiler/splitter/stitcher/stitcher.go @@ -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) } } diff --git a/prover/protocol/compiler/splitter/stitcher/stitcher_test.go b/prover/protocol/compiler/splitter/stitcher/stitcher_test.go index 463832ee0..69a42b1d8 100644 --- a/prover/protocol/compiler/splitter/stitcher/stitcher_test.go +++ b/prover/protocol/compiler/splitter/stitcher/stitcher_test.go @@ -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 @@ -259,6 +260,8 @@ 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)) @@ -266,6 +269,7 @@ func TestGlobalWithVerifCol(t *testing.T) { //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)