Skip to content

Commit 048dfed

Browse files
authored
chore: Remove code of the fake AVM recursive verifier (#13614)
1 parent 4264c8c commit 048dfed

File tree

2 files changed

+0
-39
lines changed

2 files changed

+0
-39
lines changed

noir-projects/noir-protocol-circuits/crates/rollup-lib/src/base/public_base_rollup.nr

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,6 @@ impl PublicBaseRollupInputs {
102102
tube_data_validator.verify_proof();
103103
tube_data_validator.validate_with_rollup_data(self.constants);
104104

105-
// Warning: Fake verification! TODO(#8470)
106-
// if !dep::std::runtime::is_unconstrained() {
107-
// self.avm_proof_data.fake_verify();
108-
// }
109-
110105
// TODO(#8470)
111106
// if !dep::std::runtime::is_unconstrained() {
112107
// self.avm_proof_data.verify();

noir-projects/noir-protocol-circuits/crates/types/src/abis/avm_circuit_public_inputs.nr

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -188,40 +188,6 @@ pub struct AvmProofData {
188188
pub vk_data: VkData<AVM_VERIFICATION_KEY_LENGTH_IN_FIELDS>,
189189
}
190190

191-
// The number of columns for the AVM recursive verifier we want to fake, i.e., the resulting
192-
// verify() routine below will create a similar number of gates as a real AVM recursive verifier
193-
// with the number of columns set by this constant.
194-
// NOTE: It was decided to reduce the number of gates of the fake recursive verifier to 5 millions
195-
// as this would be the target for main net. Therefore, the number of columns was artificially adjusted
196-
// to 550. Zac has some ideas on how to improve the gate counts for the AVM recursive verifier until then.
197-
pub global DUMMY_AVM_VERIFIER_NUM_COLUMNS: u32 = 550;
198-
199-
// Current AVM recursive verifier has 9500 gates per column.
200-
// Note that the addition of a single column in AVM recursive verifier incurs 8500 gates.
201-
// (some additional costs are due to lookups, relations, ...).
202-
// 78 gates per Poseidon permutation
203-
// 9500/78 = 121.8
204-
pub global DUMMY_AVM_VERIFIER_NUM_ITERATIONS: u32 = DUMMY_AVM_VERIFIER_NUM_COLUMNS * 122;
205-
206-
// Warning: This is a fake avm recursive verification whose sole goal is to reproduce a similar
207-
// computational effort (number of gates) as the real recursive verifier.
208-
// TODO(#8470): Replace with the real AVM recursive verifier
209-
impl AvmProofData {
210-
pub fn fake_verify(self) {
211-
let mut input_hash = poseidon2::Poseidon2::hash(
212-
[self.public_inputs.transaction_fee, self.proof.fields[0], self.vk_data.vk.key[0]],
213-
3,
214-
);
215-
216-
let mut result: [Field; 4] = [input_hash, 0, 0, 0];
217-
for _i in 0..DUMMY_AVM_VERIFIER_NUM_ITERATIONS {
218-
result = poseidon2_permutation(result, 4);
219-
}
220-
221-
assert(!result[0].lt(1));
222-
}
223-
}
224-
225191
impl Verifiable for AvmProofData {
226192
fn verify(self) {
227193
// TODO(#8470)

0 commit comments

Comments
 (0)