Skip to content

Commit

Permalink
Add comments in kernel_prover.ts related to hints
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanmon committed Feb 22, 2024
1 parent 5c232af commit 401c949
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions yarn-project/pxe/src/kernel_prover/kernel_prover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ export class KernelProver {
/**
* Performs the matching between an array of read request and an array of commitments. This produces
* hints for the private kernel ordering circuit to efficiently match a read request with the corresponding
* commitment.
* commitment. Several read requests might be pointing to the same commitment value. It is therefore valid
* to return more than one hint with the same index (contrary to getNullifierHints).
*
* @param readRequests - The array of read requests.
* @param commitments - The array of commitments.
Expand All @@ -346,9 +347,11 @@ export class KernelProver {
}

/**
* Performs the matching between an array of nullified commitments and an array of commitments. This produces
* Performs the matching between an array of nullified commitments and an array of commitments. This produces
* hints for the private kernel ordering circuit to efficiently match a nullifier with the corresponding
* commitment.
* commitment. Note that the same commitment value might appear more than once in the commitments
* (resp. nullified commitments) array. It is crucial in this case that each hint points to a different index
* of the nullified commitments array. Otherwise, the private kernel will fail to validate.
*
* @param nullifiedCommitments - The array of nullified commitments.
* @param commitments - The array of commitments.
Expand Down

0 comments on commit 401c949

Please sign in to comment.