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

add tests for notes-for-voting #589

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

Valentine1898
Copy link
Contributor

@Valentine1898 Valentine1898 commented Feb 21, 2024

This test does not really test anything, because all the filtering logic takes place in the storage package and is covered by the tests there.

Should we refactor to move the filtering logic to the rpc layer?

@Valentine1898 Valentine1898 linked an issue Feb 21, 2024 that may be closed by this pull request
@grod220
Copy link
Collaborator

grod220 commented Feb 22, 2024

Should we refactor to move the filtering logic to the rpc layer?

I think this depends. Is the view rpc method the only one that is requiring this filtering? Or do we think it will be used by something else in the future? If we anticipate it being shared later, we should leave it in the db layer. If not, we should move it to the rpc method.

@Valentine1898
Copy link
Contributor Author

Valentine1898 commented Feb 22, 2024

I think this depends. Is the view rpc method the only one that is requiring this filtering? Or do we think it will be used by something else in the future? If we anticipate it being shared later, we should leave it in the db layer. If not, we should move it to the rpc method.

In that case, I think we have reason to leave all the logic in the db layer.
Digging into rust, I found that notes_for_voting is also used to build transaction plan (wasm planner currently ignores this)
https://github.com/penumbra-zone/penumbra/blob/c34c4ec887751d2a5a1148a23fb599ac030675eb/crates/view/src/planner.rs#L490-L492

@Valentine1898 Valentine1898 force-pushed the 536-add-tests-for-notesforvotingrequest branch from e3aba37 to 4ec0b17 Compare February 22, 2024 11:31
Copy link
Collaborator

@grod220 grod220 left a comment

Choose a reason for hiding this comment

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

Sounds good to me

@Valentine1898 Valentine1898 merged commit ad3eab6 into main Feb 22, 2024
7 checks passed
@Valentine1898 Valentine1898 deleted the 536-add-tests-for-notesforvotingrequest branch February 22, 2024 11:43
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.

Add tests for NotesForVotingRequest
2 participants