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

feat: verify inclusion proofs #499

Draft
wants to merge 9 commits into
base: next
Choose a base branch
from
Draft

Conversation

tomyrd
Copy link
Collaborator

@tomyrd tomyrd commented Aug 27, 2024

closes #485

This PR adds verification for inclusion proofs on every sync. The status of the proof (Valid, Invalid or Not verified) is stored in a new field inside InputNoteRecord.

In terms of functionality, all proofs are asumed to be NotVerified unless it comes directly from the node. On every sync, all committed notes that aren't verified get updated with a new status. If a note is set to be invalid, it's not eliminated from the client but it is no longer shown.

@tomyrd tomyrd marked this pull request as ready for review August 28, 2024 18:39
@bobbinth
Copy link
Contributor

Thank you! Not a review - just a couple of preliminary comments:

If a note is set to be invalid, it's not eliminated from the client but it is no longer shown.

I'm not sure we should hide such notes form the user - it may be unclear why some notes have disappeared. Instead we should probably still show them to the user but clearly indicate that these notes have invalid proofs. Then, it would be up to the user to either delete the notes or do something else (e.g., try to retrieve proof by note ID). These additional things could be done in separate PRs.

More generally though, i wonder if we should first map out note states and transitions more comprehensively as I mentioned in #487 (comment). This may inform how exactly we may want to address different state transitions.

@tomyrd tomyrd marked this pull request as draft August 30, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants