solana-cli: add a Squads vault path to shreds validator-client-rewards claim - #4309
Draft
elitegreg wants to merge 1 commit into
Draft
solana-cli: add a Squads vault path to shreds validator-client-rewards claim#4309elitegreg wants to merge 1 commit into
elitegreg wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves: #4185
Summary of Changes
shreds validator-client-rewards claimgains a Squads vault path. With--multisig(and optional--vault-index), the vault stands in for the wallet as manager, no keypair is loaded, and the command prints base58 payloads for import into Squads instead of signing and sending. Each payload carriesCheckCliVersionand the claim, and no compute budget instructions, since Squads sets the budget on its execute transaction.create_idempotent, so each payload stays independently executable, and the output says the vault pays the rent. An explicit--destination-token-accountthat does not exist is refused. The direct path still requires the destination to exist.MAX_CLAIM_EPOCHS_PER_TXis retired. Each transaction grows one holding at a time while a trial still fits. The direct path measures the v0 transaction the wallet sends, always counting the fee payer and both compute budget instructions so packing does not shift with the flags. The vault path measures the legacy message the base58 string carries against the Squads payload budget. Measured capacities: 19 holdings per direct transaction, 16 with a distinct--fee-payer, 12 per vault payload into an existing destination, 10 when every payload creates it.--max-transactions Ncaps how many transactions one invocation produces. The output reports how many were withheld and how to reach them.solana-client-tools: addsquads::try_write_vault_transaction, a writer-taking form thattry_print_vault_transactionnow delegates to, andWallet::try_transaction_size, which measures the transactionnew_transactionwould build with the same signer set.Diff Breakdown
Test and core lines are split by test module within each Rust file, so the per-category numbers are approximate. Roughly half the change is the claim command itself and a third is new tests.
Key files (click to expand)
offchain/crates/solana-cli/src/command/shreds/validator_client_rewards/claim.rs— actor selection (wallet or vault), destination resolution and ATA creation, measured packing,--max-transactions, and the vault outputoffchain/crates/solana-client-tools/src/payer.rs—Wallet::try_transaction_sizeand the shared signer list it measures withoffchain/crates/solana-client-tools/src/squads.rs—try_write_vault_transaction, with the printing form delegating to itTesting Verification
--max-transactionswithheld note, the create-ATA instruction appearing in every payload,--vault-indexrequiring--multisig,--max-transactions 0being rejected, and the manager mismatch message naming the wallet or the vault.Walletwith a distinct fee payer measures exactly 96 bytes larger than one without, and the writer-taking Squads printer puts the base58 alone on its own line.--multisigpointed at a non-Squads account fails with the "not the Squads v4 program" message before anything is built, and a real devnet multisig gets through the multisig check to the validator client rewards lookup. No devnet client is managed by a Squads vault, so no end-to-end payload was produced against a live multisig.