Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connecting stitcher-splitter to the compilation suite #562

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading