Skip to content

Commit

Permalink
fix: deterministic generation of vkeys in ts (#11951)
Browse files Browse the repository at this point in the history
  • Loading branch information
sklppy88 authored Feb 13, 2025
1 parent bbcdefc commit 7901cac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions yarn-project/circuits.js/src/structs/verification_key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

/**
Expand Down Expand Up @@ -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),
);
}

Expand Down

0 comments on commit 7901cac

Please sign in to comment.