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

tpr: extend to lqt actions #5080

Merged
merged 5 commits into from
Feb 10, 2025
Merged

tpr: extend to lqt actions #5080

merged 5 commits into from
Feb 10, 2025

Conversation

TalDerei
Copy link
Collaborator

@TalDerei TalDerei commented Feb 9, 2025

Describe your changes

extends TransactionPlannerRequest to support ActionLiquidityTournamentVote variant, which is necessary for wasm testing.

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:

    LQT branch

@TalDerei TalDerei added the consensus-breaking breaking change to execution of on-chain data label Feb 9, 2025
@TalDerei TalDerei self-assigned this Feb 9, 2025
// The address the user wants potential rewards to go to.
core.keys.v1.Address rewards_recipient = 2;
// The note containing the staked note used for voting.
SpendableNoteRecord staked_note = 3;
Copy link
Collaborator Author

@TalDerei TalDerei Feb 9, 2025

Choose a reason for hiding this comment

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

probably only need Note type here, but taking an entire SNR object seems fine.

Copy link
Contributor

@cronokirby cronokirby Feb 9, 2025

Choose a reason for hiding this comment

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

If we take a SpendableNoteRecord then we shouldn't take the position of the note as well, since the SNR contains the position

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good catch, kept SpendableNoteRecord and removed note position

Copy link
Collaborator Author

@TalDerei TalDerei Feb 9, 2025

Choose a reason for hiding this comment

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

should the request actually accept Vec<SpendableNoteRecord>? what if the user's voting weight exceeds a single note and spans multiple notes?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah I think having a repeated here makes sense

Copy link
Collaborator Author

@TalDerei TalDerei Feb 10, 2025

Choose a reason for hiding this comment

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

yeah I think having a repeated here makes sense

modified accordingly 13e82f2

// The position of the staked note.
uint64 staked_note_position = 4;
// The start position of the tournament.
uint64 start_position = 5;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should take an epoch index here (same type, different field name) so that we match the plan. Also, any position should always be (epoch, 0, 0) so it might as well be the epoch.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

modified field name to epoch_index

@TalDerei TalDerei requested a review from cronokirby February 9, 2025 17:25
@TalDerei TalDerei merged commit fa7ec9c into protocol/lqt_branch Feb 10, 2025
10 checks passed
@TalDerei TalDerei deleted the lqt-tpr branch February 10, 2025 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consensus-breaking breaking change to execution of on-chain data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants