mirror of https://github.com/zcash/halo2.git
Circuit::synthesize(): Spend authority.
This commit is contained in:
parent
48b862f13f
commit
f431100a7a
|
@ -529,6 +529,20 @@ impl plonk::Circuit<pallas::Base> for Circuit {
|
||||||
.extract_p()
|
.extract_p()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Spend authority
|
||||||
|
// TODO: constrain to equal public input rk
|
||||||
|
let _rk = {
|
||||||
|
// alpha_commitment = [alpha] SpendAuthG
|
||||||
|
let (alpha_commitment, _) = {
|
||||||
|
let spend_auth_g = OrchardFixedBasesFull::SpendAuthG;
|
||||||
|
let spend_auth_g = FixedPoint::from_inner(ecc_chip.clone(), spend_auth_g);
|
||||||
|
spend_auth_g.mul(layouter.namespace(|| "[alpha] SpendAuthG"), self.alpha)?
|
||||||
|
};
|
||||||
|
|
||||||
|
// [alpha] SpendAuthG + ak
|
||||||
|
alpha_commitment.add(layouter.namespace(|| "rk"), &ak)?
|
||||||
|
};
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue