2023-05-19 19:49:14 -07:00
|
|
|
package gates
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"regexp"
|
|
|
|
|
|
2025-05-27 10:51:28 +02:00
|
|
|
gl "github.com/codex-storage/gnark-plonky2-verifier/goldilocks"
|
2023-05-19 19:49:14 -07:00
|
|
|
"github.com/consensys/gnark/frontend"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var noopGateRegex = regexp.MustCompile("NoopGate")
|
|
|
|
|
|
|
|
|
|
func deserializeNoopGate(parameters map[string]string) Gate {
|
|
|
|
|
// Has the format "NoopGate"
|
|
|
|
|
return NewNoopGate()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type NoopGate struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewNoopGate() *NoopGate {
|
|
|
|
|
return &NoopGate{}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (g *NoopGate) Id() string {
|
|
|
|
|
return "NoopGate"
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-24 16:08:17 -07:00
|
|
|
func (g *NoopGate) EvalUnfiltered(
|
|
|
|
|
api frontend.API,
|
2024-01-04 13:56:13 -08:00
|
|
|
glApi *gl.Chip,
|
2023-07-24 16:08:17 -07:00
|
|
|
vars EvaluationVars,
|
|
|
|
|
) []gl.QuadraticExtensionVariable {
|
|
|
|
|
return []gl.QuadraticExtensionVariable{}
|
2023-05-19 19:49:14 -07:00
|
|
|
}
|