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.
Depends on #4185
Target repo: doublezerofoundation/doublezero-offchain
Summary
SetValidatorClientRewardsProportiontakes theValidatorClientRewardsmanager as its only signer, the same authorityClaimValidatorClientRewardsrequires, andshreds validator-client-rewards set-proportionhas no vault path. A manager held by a Squads vault cannot set a proportion.OptionalSquadsArgsvault path the same wayclaimgets it, including the writer-taking variant ofprint_vault_transaction. One instruction and no batching, so one payload, encoded through the checked encoder rather than the budget accessor.SolanaConnectionand noWallet.build_walletfails outright when no keypair is loadable, and the vault path has nothing to sign with.set_compute_unit_limitout 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.validate_managerbefore 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 theValidatorClientRewardsaccount. It sends whatever the wallet signs and lets the program reject it, so a wallet that is not the manager gets aninvalid account datafailure rather than a message naming--multisig, and a vault that is not the manager would get a payload nothing can execute.validate_managerlives inclaimand now has a second caller, so hoist it into thevalidator_client_rewardsmodule rather than copying it.