Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make handle_transaction explicitly return the new decrypted notes #92

Merged
merged 2 commits into from
Oct 27, 2024

Conversation

panleone
Copy link
Member

Split the output of handle_transaction in two vectors of notes

  • The one already decrypted and stored in decryptedNotes;
  • The newly decrypted from the inputted transaction.

This is a nice optimization because now we can directly calculate the nullifier ONLY for the new notes. (Before this PR each transaction was handled twice, while in #89 nullifiers are recomputed for each note at each block)

@panleone panleone added the enhancement New feature or request label Oct 24, 2024
@panleone panleone requested a review from Duddino October 24, 2024 16:29
@panleone panleone self-assigned this Oct 24, 2024
@panleone panleone force-pushed the handle_block_performance branch from ac98f47 to db303dc Compare October 25, 2024 07:15
@panleone panleone mentioned this pull request Oct 25, 2024
witness
.write(&mut buff)
.map_err(|_| "Cannot write witness to buffer")?;
ser_comp_note.push((note.clone(), hex::encode(&buff)));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this clone, not sure if this is intended to be done in #93

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes I will rebase this PR or #93 depending on which gets merged first

@panleone panleone force-pushed the handle_block_performance branch from db303dc to 2410f2c Compare October 25, 2024 12:22
Copy link
Member

@Duddino Duddino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@Duddino Duddino merged commit b40814e into PIVX-Labs:master Oct 27, 2024
1 check passed
@panleone panleone deleted the handle_block_performance branch November 21, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants