From 7901cacd898f9df806942cbe8e454aef2fd8e5c3 Mon Sep 17 00:00:00 2001 From: esau <152162806+sklppy88@users.noreply.github.com> Date: Thu, 13 Feb 2025 10:05:15 +0000 Subject: [PATCH] fix: deterministic generation of vkeys in ts (#11951) --- yarn-project/circuits.js/src/structs/verification_key.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/yarn-project/circuits.js/src/structs/verification_key.ts b/yarn-project/circuits.js/src/structs/verification_key.ts index 04ca57d1d82..c6091b1f22b 100644 --- a/yarn-project/circuits.js/src/structs/verification_key.ts +++ b/yarn-project/circuits.js/src/structs/verification_key.ts @@ -9,6 +9,7 @@ import { HONK_VERIFICATION_KEY_LENGTH_IN_FIELDS, ROLLUP_HONK_VERIFICATION_KEY_LENGTH_IN_FIELDS, } from '../constants.gen.js'; +import { fr } from '../tests/factories.js'; import { CircuitType } from './shared.js'; /** @@ -147,8 +148,8 @@ export class VerificationKeyAsFields { static makeFakeRollupHonk(seed = 1): VerificationKeyAsFields { return new VerificationKeyAsFields( - makeTuple(ROLLUP_HONK_VERIFICATION_KEY_LENGTH_IN_FIELDS, Fr.random, seed), - Fr.random(), + makeTuple(ROLLUP_HONK_VERIFICATION_KEY_LENGTH_IN_FIELDS, fr, seed), + fr(seed + 1), ); }