Skip to content

solana-cli: add a Squads vault path to shreds validator-client-rewards set-proportion #4186

Description

@karl-dz

Depends on #4185

Target repo: doublezerofoundation/doublezero-offchain

Summary

SetValidatorClientRewardsProportion takes the ValidatorClientRewards manager as its only signer, the same authority ClaimValidatorClientRewards requires, and shreds validator-client-rewards set-proportion has no vault path. A manager held by a Squads vault cannot set a proportion.

  • Add the OptionalSquadsArgs vault path the same way claim gets it, including the writer-taking variant of print_vault_transaction. One instruction and no batching, so one payload, encoded through the checked encoder rather than the budget accessor.
  • The vault path builds a SolanaConnection and no Wallet. build_wallet fails outright when no keypair is loadable, and the vault path has nothing to sign with.
  • Leave set_compute_unit_limit out of the payload. Squads sets the budget on its own execute transaction, and a compute budget instruction reached through a CPI is a no-op that only burns compute units.
  • Call validate_manager before building the instruction, against the wallet key on the direct path and the vault key on the vault path. This command reads no accounts at all today, so it gains a fetch of the ValidatorClientRewards account. It sends whatever the wallet signs and lets the program reject it, so a wallet that is not the manager gets an invalid account data failure rather than a message naming --multisig, and a vault that is not the manager would get a payload nothing can execute.
  • validate_manager lives in claim and now has a second caller, so hoist it into the validator_client_rewards module rather than copying it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions