Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
3b8b06f
initilize theta step
Soleimani193 Oct 13, 2025
0e96919
interface for theta and roh steps
Soleimani193 Oct 14, 2025
673d7b3
cleaned interface
Soleimani193 Oct 14, 2025
8d97de3
minor
Soleimani193 Oct 14, 2025
243050c
constraints over inputs, absorbing blocks into state
Soleimani193 Oct 14, 2025
3cf59e5
start implementation of rho step
Soleimani193 Oct 16, 2025
d185331
rotation step
Soleimani193 Oct 17, 2025
588bf90
added prover action for linear combination
Soleimani193 Oct 17, 2025
9e672b1
seperated base conversion, added rho test
Soleimani193 Oct 20, 2025
f63b513
test for rho step is passing
Soleimani193 Oct 21, 2025
a1e7762
cleaning
Soleimani193 Oct 21, 2025
3740383
defining chi constraints
Soleimani193 Oct 21, 2025
5420ae9
chi assignment wip
Soleimani193 Oct 23, 2025
0cb9e87
test for chi
Soleimani193 Oct 24, 2025
17345ee
debugging wip
Soleimani193 Oct 27, 2025
9fba4dc
test for chi is passing
Soleimani193 Oct 27, 2025
b75aab3
integrating iota step
Soleimani193 Oct 27, 2025
71b9f70
fixed the bug for round constant in chi step
Soleimani193 Oct 28, 2025
2e1bdba
wip debugging integration
Soleimani193 Oct 28, 2025
16f0a8f
test passing for the message integration into chi step
Soleimani193 Oct 29, 2025
0562cba
testing base conversion BaseChi to BaseTheta
Soleimani193 Oct 29, 2025
bff9871
state conversion from iota back to theta
Soleimani193 Oct 30, 2025
a1282db
added constraints for iota to theta
Soleimani193 Oct 30, 2025
a2e0ae3
debugging wip
Soleimani193 Nov 4, 2025
96be75a
test for keccakf input preparation passes
Soleimani193 Nov 5, 2025
f631472
prover action for to-basex
Soleimani193 Nov 5, 2025
7a7bcae
debuggin io keccakf initial circuit test passes
Soleimani193 Nov 6, 2025
daab81b
io-keccakf is passing with all constraints.
Soleimani193 Nov 7, 2025
ca6ff7e
cleaning
Soleimani193 Nov 7, 2025
55daede
to base 2 for output
Soleimani193 Nov 12, 2025
a6d092c
added output layer
Soleimani193 Nov 12, 2025
83ec261
Prover/KeccakF Theta for Small Field (#1605)
arijitdutta67 Nov 13, 2025
04a562c
keccakf integration
Soleimani193 Nov 14, 2025
20e601f
cleaning
Soleimani193 Nov 14, 2025
75862a6
minor
Soleimani193 Nov 14, 2025
246f5af
typos
Soleimani193 Nov 14, 2025
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
22 changes: 22 additions & 0 deletions prover/maths/common/vector/vector_wizard.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,25 @@ func PseudoRand(rng *rand.Rand, size int) []field.Element {
}
return slice
}

// Zero creates a vector of given size filled with zeroes.
func Zero(size int) []field.Element {
slice := make([]field.Element, size)
for i := range slice {
slice[i].SetZero()
}
return slice
}

// it return a vector of length 'size' where it is one on the given period and zero elsewhere.
func PeriodicOne(period int, size int) []field.Element {
slice := make([]field.Element, size)
for i := range slice {
if i%period == 0 {
slice[i].SetOne()
} else {
slice[i].SetZero()
}
}
return slice
}
18 changes: 18 additions & 0 deletions prover/protocol/dedicated/repeated_pattern_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ import (
"github.com/consensys/linea-monorepo/prover/maths/common/smartvectors"
"github.com/consensys/linea-monorepo/prover/maths/common/vector"
"github.com/consensys/linea-monorepo/prover/maths/field"
"github.com/consensys/linea-monorepo/prover/protocol/column/verifiercol"
"github.com/consensys/linea-monorepo/prover/protocol/compiler/dummy"
"github.com/consensys/linea-monorepo/prover/protocol/ifaces"
"github.com/consensys/linea-monorepo/prover/protocol/internal/testtools"
"github.com/consensys/linea-monorepo/prover/protocol/wizard"
"github.com/stretchr/testify/assert"
)

// RepeatedPatternTestcase represents a test case for [RepeatedPattern].
Expand Down Expand Up @@ -78,3 +80,19 @@ func TestRepeatedPattern(t *testing.T) {
})
}
}

func TestRepeatedPatWithVerifCol(t *testing.T) {

var rp *RepeatedPattern
define := func(b *wizard.Builder) {
pattern := vector.ForTest(1, 2, 3)
rp = NewRepeatedPattern(b.CompiledIOP, 0, pattern, verifiercol.NewConstantCol(field.One(), 32, "active"))
}
prove := func(run *wizard.ProverRuntime) {
rp.Assign(run)
}
compiled := wizard.Compile(define, dummy.Compile)
proof := wizard.Prove(compiled, prove)
assert.NoError(t, wizard.Verify(compiled, proof))

}
3 changes: 3 additions & 0 deletions prover/protocol/wizard/compiled.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,9 @@ func (c *CompiledIOP) InsertPrecomputed(name ifaces.ColID, v smartvectors.SmartV
// not have the same content but the same name, then we will end up with
// a very messed up bug that is hard to track.
if c.Columns.Exists(name) {
if c.Columns.GetHandle(name).Size() != v.Len() {
utils.Panic("Precomputed column %v is registered twice with different sizes (%v and %v)", name, c.Columns.GetHandle(name).Size(), v.Len())
}
return c.Columns.GetHandle(name)
}

Expand Down
12 changes: 12 additions & 0 deletions prover/protocol/wizardutils/evaluation.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,15 @@ func RandLinCombColAssignment(run *wizard.ProverRuntime, coinVal fext.Element, h
}
return smartvectors.NewRegularExt(vWitness)
}

// LinCombExpr generates a symbolic expression representing a linear combination
// the expression can be evaluated at point x over the columns hs via [column.EvalExprColumn].
func LinCombExpr(x int, hs []ifaces.Column) *symbolic.Expression {
cols := make([]*symbolic.Expression, len(hs))
xExpr := symbolic.NewConstant(int64(x))
for c := range cols {
cols[c] = ifaces.ColumnAsVariable(hs[c])
}
expr := symbolic.NewPolyEval(xExpr, cols)
return expr
}
Loading
Loading