Skip to content

Commit

Permalink
addressing feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
sklppy88 committed Oct 31, 2024
1 parent 3cedc85 commit 6e58f19
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class EncryptedLogPayload {
* Produces the same output as `decryptAsOutgoing`.
*
* @param ciphertext - The ciphertext for the log
* @param addressSecret - The incoming viewing secret key, used to decrypt the logs
* @param addressSecret - The address secret, used to decrypt the logs
* @returns The decrypted log payload
*/
public static decryptAsIncoming(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { produceNoteDaosForKey } from './produce_note_daos_for_key.js';
*
* @param simulator - An instance of AcirSimulator.
* @param db - An instance of PxeDatabase.
* @param addressPoint - The public counterpart to the secret key to be used in the decryption of incoming note logs.
* @param addressPoint - The public counterpart to the address secret, which is used in the decryption of incoming note logs.
* @param ovpkM - The public counterpart to the secret key to be used in the decryption of outgoing note logs.
* @param payload - An instance of l1NotePayload.
* @param txHash - The hash of the transaction that created the note. Equivalent to the first nullifier of the transaction.
Expand Down
10 changes: 5 additions & 5 deletions yarn-project/pxe/src/synchronizer/synchronizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,15 +371,15 @@ export class Synchronizer {

async #removeNullifiedNotes(notes: IncomingNoteDao[]) {
// now group the decoded incoming notes by public key
const publicKeyToIncomingNotes: Map<PublicKey, IncomingNoteDao[]> = new Map();
const addressPointToIncomingNotes: Map<PublicKey, IncomingNoteDao[]> = new Map();
for (const noteDao of notes) {
const notesForPublicKey = publicKeyToIncomingNotes.get(noteDao.addressPoint) ?? [];
notesForPublicKey.push(noteDao);
publicKeyToIncomingNotes.set(noteDao.addressPoint, notesForPublicKey);
const notesForAddressPoint = addressPointToIncomingNotes.get(noteDao.addressPoint) ?? [];
notesForAddressPoint.push(noteDao);
addressPointToIncomingNotes.set(noteDao.addressPoint, notesForAddressPoint);
}

// now for each group, look for the nullifiers in the nullifier tree
for (const [publicKey, notes] of publicKeyToIncomingNotes.entries()) {
for (const [publicKey, notes] of addressPointToIncomingNotes.entries()) {
const nullifiers = notes.map(n => n.siloedNullifier);
const relevantNullifiers: Fr[] = [];
for (const nullifier of nullifiers) {
Expand Down

0 comments on commit 6e58f19

Please sign in to comment.