-
Notifications
You must be signed in to change notification settings - Fork 313
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
view service: Implement LQT rpcs #5062
Conversation
core.component.sct.v1.Nullifier nullifier = 2; | ||
} | ||
|
||
message LqtVotingNotesResponse { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That doesn't seem right, because this RPC is supposed to return SNRs that can be used to vote in the LQT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right makes sense, thinking the request should take the epoch_index
and address_index
, and response should just be list of all eligible SNRs that are eligible and haven't been used to vote yet in current LQT period?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thinking about this more, what's the utility of returning SNRs in the response body to the frontend? why not just store them directly in to the LqtVotingNotes
IndexedDB table during the rpc call? Our existing logic for querying voting notes in wasm + nullifier rpc should be sufficient to filter eligible voting notes and save them to storage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we want to make assumptions about shared memory, for example, how would that work if the view server is remote (pclientd
) or if we are using the rust view server like in pcli.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a good point thanks
} | ||
|
||
// A list of votes cast for different incentivized assets. | ||
repeated Vote votes = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I forgot to add is the TransactionId
for the vote
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added TransactionId
field to TournamentVotesResponse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we also need the AddressIndex
in the request here
## Describe your changes appends `AddressIndex` field to `TournamentVotesRequest` ## Issue ticket number and link references #5062 ## Checklist before requesting a review - [x] I have added guiding text to explain how a reviewer should test these changes. - [x] If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason: > LQT branch
Describe your changes
defines and stubs
LqtVotingNotes
andTournamentVotes
view service rpcs.Issue ticket number and link
Checklist before requesting a review
I have added guiding text to explain how a reviewer should test these changes.
If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason: