StakePoolProgram.increaseAdditionalValidatorStake constructor

StakePoolProgram.increaseAdditionalValidatorStake({
  1. required SolAddress stakePool,
  2. required SolAddress staker,
  3. required SolAddress withdrawAuthority,
  4. required SolAddress validatorList,
  5. required SolAddress reserveStake,
  6. required SolAddress transientStake,
  7. required SolAddress validatorStake,
  8. required SolAddress validatorVote,
  9. required StakePoolIncreaseAdditionalValidatorStakeLayout layout,
  10. required SolAddress ephemeralStake,
})

(Staker only) Increase stake on a validator again in an epoch.

Works regardless if the transient stake account exists.

Internally, this instruction splits reserve stake into an ephemeral stake account, activates it, then merges or splits it into the transient stake account delegated to the appropriate validator. UpdateValidatorListBalance will do the work of merging once it's ready.

Implementation

factory StakePoolProgram.increaseAdditionalValidatorStake({
  /// Stake pool
  required SolAddress stakePool,

  /// Stake pool staker
  required SolAddress staker,

  /// Stake pool withdraw authority
  required SolAddress withdrawAuthority,

  /// Validator list
  required SolAddress validatorList,

  /// Stake pool reserve stake
  required SolAddress reserveStake,

  /// Transient stake account
  required SolAddress transientStake,

  /// Validator stake account
  required SolAddress validatorStake,

  /// Validator vote account to delegate to
  required SolAddress validatorVote,
  required StakePoolIncreaseAdditionalValidatorStakeLayout layout,

  /// Uninitialized ephemeral stake account to receive stake
  required SolAddress ephemeralStake,
}) {
  return StakePoolProgram(
      layout: layout,
      keys: [
        stakePool.toReadOnly(),
        staker.toSigner(),
        withdrawAuthority.toReadOnly(),
        validatorList.toWritable(),
        reserveStake.toWritable(),
        ephemeralStake.toWritable(),
        transientStake.toWritable(),
        validatorStake.toReadOnly(),
        validatorVote.toReadOnly(),
        SystemProgramConst.sysvarClockPubkey.toReadOnly(),
        SystemProgramConst.sysvarStakeHistoryPubkey.toReadOnly(),
        StakeProgramConst.stakeConfigId.toReadOnly(),
        SystemProgramConst.programId.toReadOnly(),
        StakeProgramConst.programId.toReadOnly()
      ],
      programId: StakePoolProgramConst.programId);
}