Require frozen ALTs in proposal vault transactions - #480
Open
metapileks wants to merge 1 commit into
Open
Conversation
Contributor
|
Repository Guard
Repository GuardCargo dependency pinning
Cross-program Anchor/Solana version consistency
solana-program crate pin
Anchor.toml solana_version
Crate minimum age
Yarn package.json pinning
npm minimum age
Workflow toolchain consistency
GitHub Action SHA pinning
Sensitive program / config changes
Overall status: pass Lockfile freshness (Cargo.lock + yarn.lock) is checked by the workflow directly and cannot be bypassed. The sensitive-diff section is a review hint - CODEOWNERS handles the actual merge gate. |
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.
A proposal's Squads vault transaction may load accounts through Address Lookup Tables. This PR requires every ALT such a transaction references to be frozen. A frozen table's contents are permanently final, so the full account set of a proposal's transaction is fixed from the moment it gets created - the transaction the market evaluates is exactly the one that will execute.
Changes
validate_address_lookup_tablesinprograms/futarchy/src/squads.rs. For eachaddress_table_lookupsentry it checks the ALT account (passed via remaining accounts, in lookup order) matches the referenced key, is owned by the ALT program, is frozen (authority == None), and contains every index the message references.initialize_proposalandlaunch_proposalgain a requiredsquads_vault_transactionaccount. Launch re-checks to cover proposals initialized before this change ships.UnfrozenAddressLookupTable.initializeProposalIx/launchProposalIxare updated to take the new PDAs. The newgetSquadsVaultTransactionAccounts(squadsProposal)helper resolves the vault transaction PDA and its ALT keys, andsquadsProposalCreateTxnow also returns the vault transaction PDA.Breaking
Both instructions require the new account, so every caller must pass it. Vault transactions that reference no ALTs (the common case) need no remaining accounts and pass validation trivially.
Greptile Summary
Requires Address Lookup Tables referenced by Squads vault transactions to be frozen and valid before proposal initialization or launch.
Confidence Score: 5/5
The PR appears safe to merge, with no concrete correctness or security defects identified in the changed paths.
The new PDA constraints bind validation to the proposal’s Squads transaction, while the shared validator consistently verifies every referenced lookup table and the SDK propagates the required accounts.
Important Files Changed
Reviews (1): Last reviewed commit: "require frozen ALTs in proposal vault tr..." | Re-trigger Greptile