fix: update private kernel reset hints builder#20760
Merged
Conversation
LeilaWang
commented
Feb 23, 2026
|
|
||
| const totalReadsToReset = numPendingReads + numSettledReads; | ||
| const minResetNeeded = numCurr + numNext - maxAmountToKeep; | ||
| if (totalReadsToReset < minResetNeeded) { |
Contributor
Author
There was a problem hiding this comment.
Catch and throw a better error here, instead of propagating to the next round of reset or the tail.
LeilaWang
commented
Feb 23, 2026
| ? 'nullifiers' | ||
| : 'private logs'; | ||
| throw new Error(`Number of ${overflownData} exceeds the limit.`); | ||
| if (this.nextIteration) { |
Contributor
Author
There was a problem hiding this comment.
It used to force reset the read requests when numTransientData == 0. But it should do it when numTransientData is not big enough to clear the space for adding items in the next iteration.
LeilaWang
commented
Feb 23, 2026
| .getActiveItems() | ||
| .filter(n => !n.contractAddress.isZero()).length; | ||
| const numToSilo = Math.max(0, numNullifiers - this.numTransientData); | ||
| // Include the first nullifier if there's something to silo. |
Contributor
Author
There was a problem hiding this comment.
This is no longer needed as the first nullifier (could be the protocol nullifier) has non-empty contract address and should be treated the same as other nullifiers.
1945f0b to
d15876c
Compare
d15876c to
4ab2ee6
Compare
AztecBot
pushed a commit
that referenced
this pull request
Mar 12, 2026
Update the hints building process in PrivateKernelResetPrivateInputsBuilder to match the private kernel reset circuit: - Do not squash a note hash if a future log is linked to it. - It can only be squashed when all its logs are included in the public inputs and can be squashed together. - Use the contract address to decide the type of a read request: - Empty contract address -> settled read request - Non-empty contract address -> pending read request - Clear read requests first when note hashes/nullifiers/private logs will overflow and there's not enough transient data to be reset. - Remove the assumption that the protocol/first nullifier has empty contract address.
Collaborator
|
✅ Successfully backported to backport-to-v4-staging #21410. |
ludamad
added a commit
that referenced
this pull request
Mar 12, 2026
BEGIN_COMMIT_OVERRIDE fix: fall back to package.json for CLI version detection (#21382) chore: Removed multiplier config (#21412) chore: Removed default snapshot url config (#21413) chore: Read tx filestores from network config (#21416) feat(p2p): use l2 priority fee only for tx priority (#21420) fix: update private kernel reset hints builder (#20760) END_COMMIT_OVERRIDE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update the hints building process in PrivateKernelResetPrivateInputsBuilder to match the private kernel reset circuit: