Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions yarn-project/end-to-end/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ function test_cmds {
echo "$prefix simple e2e_p2p/slashing"
echo "$prefix simple e2e_p2p/upgrade_governance_proposer"

echo "$prefix simple e2e_pending_note_hashes_contract"
echo "$prefix simple e2e_private_voting_contract"
echo "$prefix simple e2e_pruned_blocks"
echo "$prefix simple e2e_public_testnet_transfer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
MAX_NOTE_HASH_READ_REQUESTS_PER_TX,
MAX_NULLIFIERS_PER_TX,
MAX_NULLIFIER_READ_REQUESTS_PER_TX,
MAX_PRIVATE_LOGS_PER_TX,
NULLIFIER_TREE_HEIGHT,
VK_TREE_HEIGHT,
} from '@aztec/constants';
Expand Down Expand Up @@ -367,7 +368,12 @@ export class PrivateKernelResetPrivateInputsBuilder {
countAccumulatedItems(this.previousKernel.end.nullifiers) +
countAccumulatedItems(this.nextIteration?.nullifiers ?? []);
const nullifierWillOverflow = nextAccumNullifiers > MAX_NULLIFIERS_PER_TX;
if (this.nextIteration && !noteHashWillOverflow && !nullifierWillOverflow) {
const nextAccumLogs =
countAccumulatedItems(this.previousKernel.end.privateLogs) +
countAccumulatedItems(this.nextIteration?.privateLogs ?? []);
const logsWillOverflow = nextAccumLogs > MAX_PRIVATE_LOGS_PER_TX;

if (this.nextIteration && !noteHashWillOverflow && !nullifierWillOverflow && !logsWillOverflow) {
return false;
}

Expand Down Expand Up @@ -405,9 +411,14 @@ export class PrivateKernelResetPrivateInputsBuilder {
const forceResetAll = true;
const canClearReadRequests =
(noteHashWillOverflow && this.needsResetNoteHashReadRequests(forceResetAll)) ||
(nullifierWillOverflow && this.needsResetNullifierReadRequests(forceResetAll));
(nullifierWillOverflow && this.needsResetNullifierReadRequests(forceResetAll)) ||
(logsWillOverflow && this.needsResetNoteHashReadRequests(forceResetAll));
if (!canClearReadRequests) {
const overflownData = noteHashWillOverflow ? 'note hashes' : 'nullifiers';
const overflownData = noteHashWillOverflow
? 'note hashes'
: nullifierWillOverflow
? 'nullifiers'
: 'private logs';
throw new Error(`Number of ${overflownData} exceeds the limit.`);
}
// Clearing the read requests might not be enough to squash the overflown data.
Expand Down