Skip to content

Commit

Permalink
connecting stitcher-splitter to the compilation suite
Browse files Browse the repository at this point in the history
  • Loading branch information
Soleimani193 committed Jan 16, 2025
1 parent d29cdd4 commit 9976b8b
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 17 deletions.
6 changes: 4 additions & 2 deletions prover/example/test_cases/framework_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import (
"github.com/consensys/linea-monorepo/prover/protocol/compiler/lookup"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/permutation"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/specialqueries"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/splitter"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/stitch_split/splitter"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/stitch_split/stitcher"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/univariates"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/vortex"
"github.com/consensys/linea-monorepo/prover/protocol/ifaces"
Expand Down Expand Up @@ -66,7 +67,8 @@ var (
innerproduct.Compile,
}
ARITHMETICS = compilationSuite{
splitter.SplitColumns(8),
stitcher.Stitcher(4, 8),
splitter.Splitter(8),
localcs.Compile,
globalcs.Compile,
}
Expand Down
5 changes: 3 additions & 2 deletions prover/example/test_cases/local_opening_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import (
"github.com/consensys/linea-monorepo/prover/maths/common/smartvectors"
"github.com/consensys/linea-monorepo/prover/maths/field"
"github.com/consensys/linea-monorepo/prover/protocol/column"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/splitter"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/stitch_split/splitter"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/stitch_split/stitcher"
"github.com/consensys/linea-monorepo/prover/protocol/wizard"
"github.com/stretchr/testify/require"
)
Expand All @@ -31,7 +32,7 @@ func proverLocalOpening(run *wizard.ProverRuntime) {
}

func TestGnarkCompile(t *testing.T) {
comp := wizard.Compile(defineLocalOpening, splitter.SplitColumns(32))
comp := wizard.Compile(defineLocalOpening, stitcher.Stitcher(16, 32), splitter.Splitter(32))
proof := wizard.Prove(comp, proverLocalOpening)

circ, err := wizard.AllocateWizardCircuit(comp)
Expand Down
6 changes: 4 additions & 2 deletions prover/example/test_cases/range_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import (
"testing"

"github.com/consensys/linea-monorepo/prover/maths/common/smartvectors"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/splitter"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/stitch_split/splitter"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/stitch_split/stitcher"
"github.com/consensys/linea-monorepo/prover/protocol/wizard"
)

Expand All @@ -27,5 +28,6 @@ func proveRange(run *wizard.ProverRuntime) {
}

func TestRange(t *testing.T) {
checkSolved(t, defineRange, proveRange, join(ALL_SPECIALS, compilationSuite{splitter.SplitColumns(8)}, DUMMY), true)
checkSolved(t, defineRange, proveRange, join(ALL_SPECIALS,
compilationSuite{stitcher.Stitcher(4, 8), splitter.Splitter(8)}, DUMMY), true)
}
8 changes: 4 additions & 4 deletions prover/protocol/compiler/arcane.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/consensys/linea-monorepo/prover/protocol/compiler/lookup"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/permutation"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/specialqueries"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/splitter"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/splitter/sticker"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/stitch_split/splitter"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/stitch_split/stitcher"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/univariates"
"github.com/consensys/linea-monorepo/prover/protocol/wizard"
)
Expand All @@ -32,8 +32,8 @@ func Arcane(minStickSize, targetColSize int, noLog ...bool) func(comp *wizard.Co
if withLog_ {
logdata.Log("after-expansion")(comp)
}
sticker.Sticker(minStickSize, targetColSize)(comp)
splitter.SplitColumns(targetColSize)(comp)
stitcher.Stitcher(minStickSize, targetColSize)(comp)
splitter.Splitter(targetColSize)(comp)
if withLog_ {
logdata.Log("post-rectangularization")(comp)
}
Expand Down
8 changes: 4 additions & 4 deletions prover/protocol/compiler/fullrecursion/full_recursion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"github.com/consensys/linea-monorepo/prover/protocol/compiler/mimc"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/permutation"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/specialqueries"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/splitter"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/splitter/sticker"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/stitch_split/splitter"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/stitch_split/stitcher"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/univariates"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/vortex"
"github.com/consensys/linea-monorepo/prover/protocol/ifaces"
Expand Down Expand Up @@ -72,8 +72,8 @@ func TestLookup(t *testing.T) {
specialqueries.CompileFixedPermutations,
permutation.CompileGrandProduct,
innerproduct.Compile,
sticker.Sticker(1<<8, 1<<16),
splitter.SplitColumns(1 << 16),
stitcher.Stitcher(1<<8, 1<<16),
splitter.Splitter(1 << 16),
localcs.Compile,
globalcs.Compile,
univariates.CompileLocalOpening,
Expand Down
6 changes: 4 additions & 2 deletions prover/protocol/dedicated/functionals/eval_bivariate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import (
"github.com/consensys/linea-monorepo/prover/protocol/accessors"
"github.com/consensys/linea-monorepo/prover/protocol/coin"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/dummy"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/splitter"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/stitch_split/splitter"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/stitch_split/stitcher"
"github.com/consensys/linea-monorepo/prover/protocol/dedicated/functionals"
"github.com/consensys/linea-monorepo/prover/protocol/ifaces"
"github.com/consensys/linea-monorepo/prover/protocol/wizard"
Expand Down Expand Up @@ -124,7 +125,8 @@ func TestEvalBivariateSimpleWithSplitting(t *testing.T) {
}

compiled := wizard.Compile(definer,
splitter.SplitColumns(4),
stitcher.Stitcher(2, 4),
splitter.Splitter(4),
dummy.Compile,
)

Expand Down
3 changes: 2 additions & 1 deletion prover/protocol/dedicated/functionals/interpolation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ func TestInterpolate(t *testing.T) {
// specialqueries.CompileFixedPermutations,
// specialqueries.CompileInclusionPermutations,
// innerproduct.Compile,
// splitter.SplitColumns(8),
// stitcher.Stitcher(4, 8),
// splitter.Splitter(8),
// arithmetics.CompileLocal,
// arithmetics.CompileGlobal,
dummy.Compile,
Expand Down
1 change: 1 addition & 0 deletions prover/protocol/serialization/implementation_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func init() {
RegisterImplementation(verifiercol.ConstCol{})
RegisterImplementation(verifiercol.FromYs{})
RegisterImplementation(verifiercol.FromAccessors{})
RegisterImplementation(verifiercol.ExpandedVerifCol{})
RegisterImplementation(query.FixedPermutation{})
RegisterImplementation(query.GlobalConstraint{})
RegisterImplementation(query.Inclusion{})
Expand Down
1 change: 1 addition & 0 deletions prover/protocol/serialization/serialization_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func TestSerializeValue(t *testing.T) {
RegisterImplementation(verifiercol.ConstCol{})
RegisterImplementation(verifiercol.FromYs{})
RegisterImplementation(verifiercol.FromAccessors{})
RegisterImplementation(verifiercol.ExpandedVerifCol{})
RegisterImplementation(accessors.FromPublicColumn{})
RegisterImplementation(accessors.FromConstAccessor{})
RegisterImplementation(query.UnivariateEval{})
Expand Down

0 comments on commit 9976b8b

Please sign in to comment.