Skip to content

Commit 36d9008

Browse files
Squashed commit of the following:
commit eb94d3a Merge: f847091 3b76348 Author: AztecBot <[email protected]> Date: Mon Aug 4 05:45:06 2025 +0000 Merge branch 'next' into merge-train/barretenberg commit 3b76348 Author: Lasse Herskind <[email protected]> Date: Mon Aug 4 06:03:02 2025 +0100 chore: address comments (#16175) Please read [contributing guidelines](CONTRIBUTING.md) and remove this line. For audit-related pull requests, please use the [audit PR template](?expand=1&template=audit.md). commit f847091 Merge: a86bcc3 b0affa7 Author: AztecBot <[email protected]> Date: Sun Aug 3 22:08:04 2025 +0000 Merge branch 'next' into merge-train/barretenberg commit b0affa7 Author: Lasse Herskind <[email protected]> Date: Sun Aug 3 22:26:43 2025 +0100 chore: updated fmt settings foundry.toml (#16155) Updated the `foundry.toml` to also wrap the comments and use the default line_length of 120 instead of the previous 100. Threw some thousands separators in there as well for constant values. ```toml [fmt] line_length = 120 tab_width = 2 variable_override_spacing=false wrap_comments = true number_underscore = "thousands" override_spacing = false ``` commit a86bcc3 Merge: c7a5799 3ded0f6 Author: AztecBot <[email protected]> Date: Sun Aug 3 20:41:47 2025 +0000 Merge branch 'next' into merge-train/barretenberg commit c7a5799 Merge: fd73d0e 935a8fa Author: AztecBot <[email protected]> Date: Sun Aug 3 20:11:19 2025 +0000 Merge branch 'next' into merge-train/barretenberg commit 3ded0f6 Author: Jan Beneš <[email protected]> Date: Sun Aug 3 21:56:09 2025 +0200 chore: minor fixes and docs improvements in governance (#16039) When doing my internal review of governance contracts I stumbled upon plenty of small and uncontroversial issues with which it didn't really make sense to clutter my review document. --------- Co-authored-by: LHerskind <[email protected]> commit fd73d0e Merge: e2b45d5 99e70e6 Author: AztecBot <[email protected]> Date: Sun Aug 3 19:29:46 2025 +0000 Merge branch 'next' into merge-train/barretenberg commit 935a8fa Author: Maddiaa <[email protected]> Date: Sun Aug 3 20:16:22 2025 +0100 feat(sol): vk hashing (#16015) Perform vk hashing in the solidity verifier Takes a different approach to the traditional verifiers. As the vk is fixed ahead of time, we hash it and include it in the precompiled contract, therefore it is preprocessed and does not need to be recomputed by the verifier. commit 99e70e6 Author: Lasse Herskind <[email protected]> Date: Sun Aug 3 19:46:27 2025 +0100 chore!: depositAmount and minimumStake naming (#16148) Addressing feedback from @benesjan. Also using his prompt idea to see how well it works. --- This PR refactors validator staking terminology throughout the Aztec codebase to improve clarity and better reflect the purpose of key staking parameters. The main changes involve renaming `depositAmount` to `activationThreshold` and `minimumStake` to `ejectionThreshold`, along with related library and method renames. - **`depositAmount` → `activationThreshold`**: The amount of tokens required to activate a validator and join the validator set - **`minimumStake` → `ejectionThreshold`**: The minimum token balance below which a validator is ejected from the active set - **Solidity Contracts**: Updated all references in `Rollup.sol`, `IStaking.sol`, `GSE.sol`, and related contracts - **Libraries**: - `UserLib` → `CheckpointedUintLib` (more descriptive name for checkpoint management) - `DelegationLib` → `StakeDelegationLib` (clearer purpose indication) - **Methods**: `finaliseHelper()` → `finaliseWithdraw()` in GSE contract for better clarity - Updated environment variables: - `AZTEC_DEPOSIT_AMOUNT` → `AZTEC_ACTIVATION_THRESHOLD` - `AZTEC_MINIMUM_STAKE` → `AZTEC_EJECTION_THRESHOLD` - Updated all configuration files, test constants, and deployment scripts - Updated CLI reference documentation to reflect new parameter names - Updated all code comments to use the new terminology 1. **Improved Clarity**: The new names clearly indicate the purpose of each parameter - one for entering the validator set, one for being removed from it 2. **Better Developer Experience**: Developers can immediately understand what these thresholds represent without needing additional context 3. **Consistency**: Uniform terminology across the entire codebase reduces confusion 4. **Future-Proof**: The new names are more generic and adaptable to potential future staking mechanism changes ⚠️ **This is a breaking change** that affects: 1. **Environment Variables**: Any deployment or configuration using the old environment variable names (`AZTEC_DEPOSIT_AMOUNT`, `AZTEC_MINIMUM_STAKE`) must be updated 2. **Contract Interfaces**: External systems calling `getDepositAmount()`, `getMinimumStake()`, or `finaliseHelper()` must update to use the new method names 3. **Configuration Files**: Any JSON/YAML configuration files using the old parameter names need updates 4. **Deployment Scripts**: Custom deployment scripts referencing the old names will need modification - Replace `depositAmount` with `activationThreshold` in all configurations - Replace `minimumStake` with `ejectionThreshold` in all configurations - Update contract calls: - `getDepositAmount()` → `getActivationThreshold()` - `getMinimumStake()` → `getEjectionThreshold()` - `finaliseHelper()` → `finaliseWithdraw()` commit e2b45d5 Author: AztecBot <[email protected]> Date: Fri Aug 1 20:40:41 2025 +0000 [empty] Start merge-train. Choo choo. commit 5d75421 Author: Aztec Bot <[email protected]> Date: Fri Aug 1 21:02:38 2025 +0100 feat: merge-train/barretenberg (#16170) See [merge-train-readme.md](https://github.com/AztecProtocol/aztec-packages/blob/next/.github/workflows/merge-train-readme.md). BEGIN_COMMIT_OVERRIDE chore: civc tests refactor (#16159) END_COMMIT_OVERRIDE --------- Co-authored-by: AztecBot <[email protected]> Co-authored-by: maramihali <[email protected]> commit 9ab0377 Author: Maddiaa <[email protected]> Date: Fri Aug 1 16:19:44 2025 +0100 chore(sol): remove unused param in relations.sol (#16166) Fixes a compiler warning commit 0ab7472 Author: Aztec Bot <[email protected]> Date: Fri Aug 1 16:02:34 2025 +0100 feat: merge-train/barretenberg (#16153) See [merge-train-readme.md](https://github.com/AztecProtocol/aztec-packages/blob/next/.github/workflows/merge-train-readme.md). BEGIN_COMMIT_OVERRIDE chore: add a `PG_TAIL` proof type and queue type (#16156) END_COMMIT_OVERRIDE --------- Co-authored-by: AztecBot <[email protected]> Co-authored-by: Khashayar Barooti <[email protected]> Co-authored-by: Suyash Bagad <[email protected]> Co-authored-by: federicobarbacovi <[email protected]> Co-authored-by: maramihali <[email protected]> Co-authored-by: Jonathan Hao <[email protected]> commit eccd655 Author: ludamad <[email protected]> Date: Fri Aug 1 10:18:11 2025 -0400 chore(release): aztec-nr releases like l1-contracts (#16123) Just overwrite the git contents and tag it / push to branch. Doesn't attempt to keep history commit 82bb4d8 Author: Santiago Palladino <[email protected]> Date: Fri Aug 1 11:17:11 2025 -0300 feat: Validators invalidate invalid blocks (#16120) We expect proposers to invalidate the previous block if it is invalid, but if they fail to do so, validators will eventually do it, prioritizing the committee members and then any validator whatsoever. This commit includes other fixes: - If a proposer cannot build a block due to not enough txs, it still tries to invalidate the previous one. - The archiver keeps track of the earliest (not latest) invalid block it has seen, so the sequencer can use this info to invalidate the earliest one. Builds on top of #16067 commit b18c823 Author: josh crites <[email protected]> Date: Fri Aug 1 09:49:18 2025 -0400 chore(docs): Update testnet info (#16163) Updates the testnet contract and version info in docs/docs, to be backported to master so that this info is correct when new releases are cut. Also sets the default testnet version to be published to be 1.2.0 commit e8bfa98 Author: Álvaro Rodríguez <[email protected]> Date: Fri Aug 1 14:14:17 2025 +0200 feat(avm)!: Tree opcodes fail in static context (#16158) Small PR to make emit notehash, emit nullifier and sstore fail on static contexts
1 parent 66cf61d commit 36d9008

File tree

277 files changed

+3189
-4827
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

277 files changed

+3189
-4827
lines changed

.github/workflows/mirror-repos.yml

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -33,51 +33,3 @@ jobs:
3333
git push
3434
fi
3535
36-
mirror-to-aztec-nr-repo:
37-
runs-on: ubuntu-latest
38-
# Force sequential.
39-
needs: mirror-to-barretenberg-repo
40-
steps:
41-
- name: Checkout
42-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
43-
with:
44-
fetch-depth: 0
45-
token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
46-
- name: Push to aztec-nr repo
47-
run: |
48-
SUBREPO_PATH=noir-projects/aztec-nr
49-
git config --global user.name AztecBot
50-
git config --global user.email [email protected]
51-
52-
monorepo_url="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY"
53-
# list all aztec-packages tags, take the "highest" version
54-
monorepo_tag="$(git tag --list v* | sort --version-sort | tail -1)"
55-
monorepo_protocol_circuits_path="noir-projects/noir-protocol-circuits"
56-
57-
# take all Nargo.toml files that reference noir-protocol-circuits
58-
nargo_files="$(find $SUBREPO_PATH -name 'Nargo.toml' | xargs grep --files-with-matches 'noir-protocol-circuits')"
59-
60-
# match lines like this:
61-
# protocol_types = { path = "../../noir-protocol-circuits/crates/types" }
62-
# and replace with
63-
# protocol_types = { git="https://github.com/aztecprotocol/aztec-packages", tag="v0.16.9", directory="noir-projects/noir-protocol-circuits/crates/types" }
64-
for nargo_file in $nargo_files; do
65-
sed --regexp-extended --in-place \
66-
"s;path\s*=\s*\".*noir-protocol-circuits(.*)\";git=\"$monorepo_url\", tag=\"$monorepo_tag\", directory=\"$monorepo_protocol_circuits_path\1\";" \
67-
$nargo_file
68-
done
69-
70-
git commit --all --message "chore: replace relative paths to noir-protocol-circuits"
71-
72-
if ./scripts/git_subrepo.sh push $SUBREPO_PATH --branch=master; then
73-
git fetch # in case a commit came after this
74-
git rebase origin/master
75-
76-
# restore old files
77-
for nargo_file in $nargo_files; do
78-
git restore --source=origin/master -- $nargo_file
79-
done
80-
git commit --all --amend -m "$(git log -1 --pretty=%B)"
81-
82-
git push
83-
fi

barretenberg/cpp/pil/vm2/opcodes/emit_notehash.pil

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,20 @@ namespace execution; // this is a virtual gadget that shares rows with the execu
1212
pol REMAINING_NOTE_HASH_WRITES = constants.MAX_NOTE_HASHES_PER_TX -
1313
prev_num_note_hashes_emitted;
1414

15-
// TODO(dbanks12): error if in static context
15+
pol commit sel_reached_max_note_hashes;
16+
sel_reached_max_note_hashes * (1 - sel_reached_max_note_hashes) = 0;
1617

1718
pol commit remaining_note_hashes_inv;
18-
// Opcode errors if REMAINING_NOTE_HASH_WRITES is 0
19-
#[EMIT_NOTEHASH_MAX_NOTE_HASH_WRITES_REACHED]
20-
sel_execute_emit_notehash * (REMAINING_NOTE_HASH_WRITES * (sel_opcode_error * (1 - remaining_note_hashes_inv) + remaining_note_hashes_inv) - 1 + sel_opcode_error) = 0;
19+
// We reached the max note hashes if REMAINING_NOTE_HASH_WRITES is 0
20+
#[MAX_NOTE_HASHES_REACHED]
21+
sel_execute_emit_notehash * (REMAINING_NOTE_HASH_WRITES * (sel_reached_max_note_hashes * (1 - remaining_note_hashes_inv) + remaining_note_hashes_inv) - 1 + sel_reached_max_note_hashes) = 0;
22+
23+
// Opcode errors if we've reached the max note hashes or if we're in a static context
24+
#[OPCODE_ERROR_IF_MAX_NOTE_HASHES_REACHED_OR_STATIC]
25+
sel_execute_emit_notehash * ((1 - sel_reached_max_note_hashes) * (1 - is_static) - (1 - sel_opcode_error)) = 0;
2126

2227
// Commited since it's used in the lookup
2328
pol commit sel_write_note_hash;
24-
#[EMIT_NOTEHASH_LIMIT_REACHED]
2529
sel_execute_emit_notehash * ((1 - sel_opcode_error) - sel_write_note_hash) = 0;
2630

2731
// =========== OPCODE EXECUTION ===========

barretenberg/cpp/pil/vm2/opcodes/emit_nullifier.pil

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,25 +30,27 @@ namespace execution; // this is a virtual gadget that shares rows with the execu
3030

3131
// =========== VALIDATION ===========
3232

33-
// TODO(dbanks12): error if in static context
34-
3533
pol REMAINING_NULLIFIER_WRITES = constants.MAX_NULLIFIERS_PER_TX -
3634
prev_num_nullifiers_emitted;
3735

38-
pol commit sel_write_nullifier;
39-
// LIMIT_ERROR implies that we do NOT write the nullifier via the lookup later
40-
pol LIMIT_ERROR = 1 - sel_write_nullifier;
36+
pol commit sel_reached_max_nullifiers;
37+
sel_reached_max_nullifiers * (1 - sel_reached_max_nullifiers) = 0;
4138

4239
pol commit remaining_nullifiers_inv;
4340
// Limit error if REMAINING_NULLIFIER_WRITES is 0
44-
#[EMIT_NULLIFIER_MAX_NULLIFIER_WRITES_REACHED]
45-
sel_execute_emit_nullifier * (REMAINING_NULLIFIER_WRITES * (LIMIT_ERROR * (1 - remaining_nullifiers_inv) + remaining_nullifiers_inv) - 1 + LIMIT_ERROR) = 0;
41+
#[MAX_NULLIFIER_WRITES_REACHED]
42+
sel_execute_emit_nullifier * (REMAINING_NULLIFIER_WRITES * (sel_reached_max_nullifiers * (1 - remaining_nullifiers_inv) + remaining_nullifiers_inv) - 1 + sel_reached_max_nullifiers) = 0;
43+
44+
pol commit sel_write_nullifier;
45+
// Validation errors if we've reached the max nullifiers or if we're in a static context
46+
#[VALIDATION_ERROR_DISABLE_WRITE]
47+
sel_execute_emit_nullifier * ((1 - sel_reached_max_nullifiers) * (1 - is_static) - sel_write_nullifier) = 0;
4648

47-
// A limit error must cause an "opcode error".
48-
// if LIMIT_ERROR == 1, sel_opcode_error must be 1
49+
// A validation error must cause an "opcode error".
50+
// if sel_write_nullifier == 0, sel_opcode_error must be 1
4951
// but otherwise, we don't force a value for sel_opcode_error and instead let the lookup below set it.
50-
#[OPCODE_ERROR_IF_LIMIT_ERROR]
51-
sel_execute_emit_nullifier * LIMIT_ERROR * (1 - sel_opcode_error) = 0;
52+
#[OPCODE_ERROR_IF_VALIDATION_ERROR]
53+
sel_execute_emit_nullifier * (1 - sel_write_nullifier) * (1 - sel_opcode_error) = 0;
5254

5355
// =========== OPCODE EXECUTION ===========
5456

barretenberg/cpp/pil/vm2/opcodes/sstore.pil

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ namespace execution; // this is a virtual gadget that shares rows with the execu
2323

2424
// =========== VALIDATION ===========
2525

26-
// TODO(dbanks12): error if in static context
27-
2826
pol commit max_data_writes_reached;
2927
max_data_writes_reached * (1 - max_data_writes_reached) = 0;
3028

@@ -40,8 +38,10 @@ namespace execution; // this is a virtual gadget that shares rows with the execu
4038
// If we are at the maximum number of data writes,
4139
// and the dynamic gas factor is 1 (which means that we haven't written to this slot before),
4240
// the opcode should fail since we can't write to this slot anymore.
43-
#[SSTORE_ERROR_TOO_MANY_WRITES]
44-
sel_execute_sstore * (max_data_writes_reached * dynamic_da_gas_factor - sel_opcode_error) = 0;
41+
// We also should error if we are in a static context.
42+
// Thus, sel_opcode_error = overflow OR static context
43+
#[OPCODE_ERROR_IF_OVERFLOW_OR_STATIC]
44+
sel_execute_sstore * ((1 - max_data_writes_reached * dynamic_da_gas_factor) * (1 - is_static) - (1 - sel_opcode_error)) = 0;
4545

4646
// Commited since it's used in the lookup
4747
// Note: we could perform the work unconditionally here, since the roots will be reverted if sel_opcode_error is one.

barretenberg/cpp/src/barretenberg/dsl/acir_proofs/honk_contract.hpp

Lines changed: 30 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -366,14 +366,12 @@ library TranscriptLib {
366366
function generateTranscript(
367367
Honk.Proof memory proof,
368368
bytes32[] calldata publicInputs,
369-
uint256 circuitSize,
370-
uint256 publicInputsSize,
371-
uint256 pubInputsOffset
369+
uint256 vkHash,
370+
uint256 publicInputsSize
372371
) internal pure returns (Transcript memory t) {
373372
Fr previousChallenge;
374-
(t.relationParameters, previousChallenge) = generateRelationParametersChallenges(
375-
proof, publicInputs, circuitSize, publicInputsSize, pubInputsOffset, previousChallenge
376-
);
373+
(t.relationParameters, previousChallenge) =
374+
generateRelationParametersChallenges(proof, publicInputs, vkHash, publicInputsSize, previousChallenge);
377375
378376
(t.alphas, previousChallenge) = generateAlphaChallenges(previousChallenge, proof);
379377
@@ -403,50 +401,46 @@ library TranscriptLib {
403401
function generateRelationParametersChallenges(
404402
Honk.Proof memory proof,
405403
bytes32[] calldata publicInputs,
406-
uint256 circuitSize,
404+
uint256 vkHash,
407405
uint256 publicInputsSize,
408-
uint256 pubInputsOffset,
409406
Fr previousChallenge
410407
) internal pure returns (Honk.RelationParameters memory rp, Fr nextPreviousChallenge) {
411408
(rp.eta, rp.etaTwo, rp.etaThree, previousChallenge) =
412-
generateEtaChallenge(proof, publicInputs, circuitSize, publicInputsSize, pubInputsOffset);
409+
generateEtaChallenge(proof, publicInputs, vkHash, publicInputsSize);
413410
414411
(rp.beta, rp.gamma, nextPreviousChallenge) = generateBetaAndGammaChallenges(previousChallenge, proof);
415412
}
416413
417414
function generateEtaChallenge(
418415
Honk.Proof memory proof,
419416
bytes32[] calldata publicInputs,
420-
uint256 circuitSize,
421-
uint256 publicInputsSize,
422-
uint256 pubInputsOffset
417+
uint256 vkHash,
418+
uint256 publicInputsSize
423419
) internal pure returns (Fr eta, Fr etaTwo, Fr etaThree, Fr previousChallenge) {
424-
bytes32[] memory round0 = new bytes32[](3 + publicInputsSize + 12);
425-
round0[0] = bytes32(circuitSize);
426-
round0[1] = bytes32(publicInputsSize);
427-
round0[2] = bytes32(pubInputsOffset);
420+
bytes32[] memory round0 = new bytes32[](1 + publicInputsSize + 12);
421+
round0[0] = bytes32(vkHash);
428422
429423
for (uint256 i = 0; i < publicInputsSize - PAIRING_POINTS_SIZE; i++) {
430-
round0[3 + i] = bytes32(publicInputs[i]);
424+
round0[1 + i] = bytes32(publicInputs[i]);
431425
}
432426
for (uint256 i = 0; i < PAIRING_POINTS_SIZE; i++) {
433-
round0[3 + publicInputsSize - PAIRING_POINTS_SIZE + i] = FrLib.toBytes32(proof.pairingPointObject[i]);
427+
round0[1 + publicInputsSize - PAIRING_POINTS_SIZE + i] = FrLib.toBytes32(proof.pairingPointObject[i]);
434428
}
435429
436430
// Create the first challenge
437431
// Note: w4 is added to the challenge later on
438-
round0[3 + publicInputsSize] = bytes32(proof.w1.x_0);
439-
round0[3 + publicInputsSize + 1] = bytes32(proof.w1.x_1);
440-
round0[3 + publicInputsSize + 2] = bytes32(proof.w1.y_0);
441-
round0[3 + publicInputsSize + 3] = bytes32(proof.w1.y_1);
442-
round0[3 + publicInputsSize + 4] = bytes32(proof.w2.x_0);
443-
round0[3 + publicInputsSize + 5] = bytes32(proof.w2.x_1);
444-
round0[3 + publicInputsSize + 6] = bytes32(proof.w2.y_0);
445-
round0[3 + publicInputsSize + 7] = bytes32(proof.w2.y_1);
446-
round0[3 + publicInputsSize + 8] = bytes32(proof.w3.x_0);
447-
round0[3 + publicInputsSize + 9] = bytes32(proof.w3.x_1);
448-
round0[3 + publicInputsSize + 10] = bytes32(proof.w3.y_0);
449-
round0[3 + publicInputsSize + 11] = bytes32(proof.w3.y_1);
432+
round0[1 + publicInputsSize] = bytes32(proof.w1.x_0);
433+
round0[1 + publicInputsSize + 1] = bytes32(proof.w1.x_1);
434+
round0[1 + publicInputsSize + 2] = bytes32(proof.w1.y_0);
435+
round0[1 + publicInputsSize + 3] = bytes32(proof.w1.y_1);
436+
round0[1 + publicInputsSize + 4] = bytes32(proof.w2.x_0);
437+
round0[1 + publicInputsSize + 5] = bytes32(proof.w2.x_1);
438+
round0[1 + publicInputsSize + 6] = bytes32(proof.w2.y_0);
439+
round0[1 + publicInputsSize + 7] = bytes32(proof.w2.y_1);
440+
round0[1 + publicInputsSize + 8] = bytes32(proof.w3.x_0);
441+
round0[1 + publicInputsSize + 9] = bytes32(proof.w3.x_1);
442+
round0[1 + publicInputsSize + 10] = bytes32(proof.w3.y_0);
443+
round0[1 + publicInputsSize + 11] = bytes32(proof.w3.y_1);
450444
451445
previousChallenge = FrLib.fromBytes32(keccak256(abi.encodePacked(round0)));
452446
(eta, etaTwo) = splitChallenge(previousChallenge);
@@ -698,7 +692,7 @@ library RelationsLib {
698692
accumulateDeltaRangeRelation(purportedEvaluations, evaluations, powPartialEval);
699693
accumulateEllipticRelation(purportedEvaluations, evaluations, powPartialEval);
700694
accumulateMemoryRelation(purportedEvaluations, rp, evaluations, powPartialEval);
701-
accumulateNnfRelation(purportedEvaluations, rp, evaluations, powPartialEval);
695+
accumulateNnfRelation(purportedEvaluations, evaluations, powPartialEval);
702696
accumulatePoseidonExternalRelation(purportedEvaluations, evaluations, powPartialEval);
703697
accumulatePoseidonInternalRelation(purportedEvaluations, evaluations, powPartialEval);
704698
// batch the subrelations with the alpha challenges to obtain the full honk relation
@@ -1186,7 +1180,6 @@ library RelationsLib {
11861180
11871181
function accumulateNnfRelation(
11881182
Fr[NUMBER_OF_ENTITIES] memory p,
1189-
Honk.RelationParameters memory rp,
11901183
Fr[NUMBER_OF_SUBRELATIONS] memory evals,
11911184
Fr domainSep
11921185
) internal pure {
@@ -1731,11 +1724,13 @@ abstract contract BaseHonkVerifier is IVerifier {
17311724
17321725
uint256 immutable $N;
17331726
uint256 immutable $LOG_N;
1727+
uint256 immutable $VK_HASH;
17341728
uint256 immutable $NUM_PUBLIC_INPUTS;
17351729
1736-
constructor(uint256 _N, uint256 _logN, uint256 _numPublicInputs) {
1730+
constructor(uint256 _N, uint256 _logN, uint256 _vkHash, uint256 _numPublicInputs) {
17371731
$N = _N;
17381732
$LOG_N = _logN;
1733+
$VK_HASH = _vkHash;
17391734
$NUM_PUBLIC_INPUTS = _numPublicInputs;
17401735
}
17411736
@@ -1764,9 +1759,7 @@ abstract contract BaseHonkVerifier is IVerifier {
17641759
}
17651760
17661761
// Generate the fiat shamir challenges for the whole protocol
1767-
Transcript memory t = TranscriptLib.generateTranscript(
1768-
p, publicInputs, vk.circuitSize, $NUM_PUBLIC_INPUTS, /*pubInputsOffset=*/ 1
1769-
);
1762+
Transcript memory t = TranscriptLib.generateTranscript(p, publicInputs, $VK_HASH, $NUM_PUBLIC_INPUTS);
17701763
17711764
// Derive public input delta
17721765
t.relationParameters.publicInputsDelta = computePublicInputDelta(
@@ -2170,7 +2163,7 @@ abstract contract BaseHonkVerifier is IVerifier {
21702163
}
21712164
}
21722165
2173-
contract HonkVerifier is BaseHonkVerifier(N, LOG_N, NUMBER_OF_PUBLIC_INPUTS) {
2166+
contract HonkVerifier is BaseHonkVerifier(N, LOG_N, VK_HASH, NUMBER_OF_PUBLIC_INPUTS) {
21742167
function loadVerificationKey() internal pure override returns (Honk.VerificationKey memory) {
21752168
return HonkVerificationKey.loadVerificationKey();
21762169
}

0 commit comments

Comments
 (0)