Skip to content

Commit

Permalink
fix: enforce activation constraints for ecdata antichamber
Browse files Browse the repository at this point in the history
  • Loading branch information
ivokub committed Oct 10, 2024
1 parent 0fdbd2e commit e1b956c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 25 deletions.
2 changes: 1 addition & 1 deletion prover/zkevm/prover/ecdsa/antichamber.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func newAntichamber(comp *wizard.CompiledIOP, inputs *antichamberInput) *anticha
res.AlignedGnarkData = plonk.DefineAlignment(comp, toAlign)

// root module constraints
res.csIsActive(comp)
res.csIsActiveActivation(comp)
res.csZeroWhenInactive(comp)
res.csConsistentPushingFetching(comp)
res.csIDSequential(comp)
Expand Down
10 changes: 4 additions & 6 deletions prover/zkevm/prover/ecdsa/antichamber_constraints.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ import (
commoncs "github.com/consensys/linea-monorepo/prover/zkevm/prover/common/common_constraints"
)

// csIsActive constraints that IsActive module to be only one for antichamber rounds.
func (ac *antichamber) csIsActive(comp *wizard.CompiledIOP) {
// column must be binary
commoncs.MustBeBinary(comp, ac.IsActive)
// allow becoming inactive from active but now vice versa
isZeroWhenInactive(comp, ac.IsActive, column.Shift(ac.IsActive, -1))
// csIsActiveActivation constraints that IsActive module to be only one for antichamber rounds.
func (ac *antichamber) csIsActiveActivation(comp *wizard.CompiledIOP) {
// IsActive must be binary and cannot transition from 0 to 1
commoncs.MustBeActivationColumns(comp, ac.IsActive)
}

func (ac *antichamber) csZeroWhenInactive(comp *wizard.CompiledIOP) {
Expand Down
18 changes: 0 additions & 18 deletions prover/zkevm/prover/ecdsa/utils.go

This file was deleted.

0 comments on commit e1b956c

Please sign in to comment.