Fold a Fibonacci Circuit
Realization of a Fibonacci step circuit
Why Build a Fibonacci Example?
Circuit Configuration in fn configure
fn configure/// Configure the step circuit. This method initializes necessary
/// fixed columns and advice columns
fn configure(cs: &mut ConstraintSystem<F>) -> Self::Config {
let config = Self::Config {
s: cs.selector(),
e: cs.advice_column(),
};
cs.enable_equality(config.e);
cs.create_gate("fibo-block", |meta| {
let s = meta.query_selector(config.s);
let e1 = meta.query_advice(config.e, Rotation(-2));
let e2 = meta.query_advice(config.e, Rotation(-1));
let e3 = meta.query_advice(config.e, Rotation(0));
vec![s * (e1 + e2 - e3)]
});
config
}Circuit Synthesis in fn synthesize_step
fn synthesize_stepRunning the Example
Summary
Last updated