-
Notifications
You must be signed in to change notification settings - Fork 2k
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
stake-pool: Add instruction creators that re-use existing seeds #6279
Comments
This comment was marked as spam.
This comment was marked as spam.
1 similar comment
This comment was marked as spam.
This comment was marked as spam.
@joncinque |
I'm not sure I totally understand the comment, but the concept is that solana-program-library/stake-pool/program/src/state.rs Lines 708 to 716 in 4d0c646
So |
So do we want to iterate through the validator lists and execute the |
@Hrushi20 it's only one instruction in this case, but you'll need to search through the |
Problem
The
IncreaseAdditionalValidatorStake
andDecreaseAdditionalValidatorStake
instruction creators helpers that take the vote account require that you pass in thetransient_stake_seed
:solana-program-library/stake-pool/program/src/instruction.rs
Lines 1325 to 1334 in c9eb289
And
solana-program-library/stake-pool/program/src/instruction.rs
Lines 1240 to 1249 in c9eb289
Since these instructions are usually meant to reuse an existing transient stake account, these instruction creators can be confusing.
Solution
Create a new variant of these creators,
decrease_additional_validator_stake_with_list
andincrease_additional_validator_stake_with_list
, which takes in the pool'sValidatorList
, ie:From the validator list, it can figure out the seeds and be much easier to use.
The text was updated successfully, but these errors were encountered: