Skip to content

Commit ceb0929

Browse files
committed
wip
1 parent 23539d3 commit ceb0929

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

yarn-project/end-to-end/src/e2e_pending_note_hashes_contract.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,8 @@ describe('e2e_pending_note_hashes_contract', () => {
284284
});
285285

286286
it('Should handle overflowing the kernel data structures in nested calls', async () => {
287+
// This test verifies that a transaction can emit more notes than MAX_NOTE_HASHES_PER_TX without failing, since
288+
// the notes are nullified and will be squashed by the kernel reset circuit.
287289
const sender = owner;
288290
const notesPerIteration = Math.min(MAX_NOTE_HASHES_PER_CALL, MAX_NOTE_HASH_READ_REQUESTS_PER_CALL);
289291
const minToNeedReset = Math.min(MAX_NOTE_HASHES_PER_TX, MAX_NOTE_HASH_READ_REQUESTS_PER_TX) + 1;

yarn-project/pxe/src/tagging/sync_sender_tagging_indexes.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { MAX_PRIVATE_LOGS_PER_TX } from '@aztec/constants';
21
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
32
import type { AztecNode } from '@aztec/stdlib/interfaces/server';
43
import type { DirectionalAppTaggingSecret, PreTag, TxScopedL2Log } from '@aztec/stdlib/logs';
@@ -9,9 +8,13 @@ import { SiloedTag } from './siloed_tag.js';
98
import { Tag } from './tag.js';
109

1110
// This window has to be as large as the largest expected number of logs emitted in a tx for a given directional app
12-
// tagging secret. If we get more logs than this window length, an error is thrown in `PXE::proveTx` function. Since
13-
// tag indexes are consumed only for private logs it makes sense to set it to MAX_PRIVATE_LOGS_PER_TX.
14-
export const WINDOW_LEN = MAX_PRIVATE_LOGS_PER_TX;
11+
// tagging secret. If we get more tag indexes consumed than this window, an error is thrown in `PXE::proveTx` function.
12+
// This is set to a larger value than MAX_PRIVATE_LOGS_PER_TX (currently 32) because there could be more than
13+
// MAX_PRIVATE_LOGS_PER_TX indexes consumed in case the logs are squashed. This happens when the log contains a note
14+
// and the note is nullified in the same tx.
15+
// Note: Set it to 100 because `e2e_pending_note_hashes_contract` test hit 95 indexes emitted. I (benesjan) think this
16+
// window length should be fine.
17+
export const WINDOW_LEN = 100;
1518

1619
/**
1720
* Syncs the highest finalized tagging index and pending tagging indexes for a given secret.

0 commit comments

Comments
 (0)