Skip to content

Add account owner and PDA validation to vote and execute instructions - #37

Merged
ShrinathNR merged 5 commits into
Turbin3:mainfrom
Abduovv:main
Dec 31, 2025
Merged

ShrinathNR merged 5 commits into
Turbin3:mainfrom
Abduovv:main

Conversation

@Abduovv

@Abduovv Abduovv commented Oct 7, 2025

Copy link
Copy Markdown
Contributor

Summary

Adds validation to ensure that both the proposal and multisig accounts are owned by the program and that their PDAs are correctly derived.
This prevents execution or voting using foreign proposals or fake PDAs.

Changes

  • Added account owner checks for multisig, proposal, and transaction accounts.
  • Added ProposalState::validate_pda in both vote and execute_transaction instructions.
  • Prevents executing a proposal that doesn't belong to the given multisig.

@ShrinathNR

ShrinathNR commented Dec 30, 2025 •

Copy link
Copy Markdown
Collaborator

sorry for the delay.
validating proposal PDA automatically takes care of the owner check of both proposal and multisig. so adding validate PDA in execute and vote is fine but dont need the owner checks.

Removed checks for illegal owners in transaction execution.
@Abduovv

Abduovv commented Dec 30, 2025

Copy link
Copy Markdown
Contributor Author

I removed the owner checks since validate_pda already handles it.

@ShrinathNR

ShrinathNR commented Dec 30, 2025 •

Copy link
Copy Markdown
Collaborator

there is still owner check for multisig and derived address comparisonf or multisig is also not needed. coz if the multisig is not valid, user will not be able to create the proposal in the first place and since we are validating the proposal PDA that takes care of multisig as well.

Abduovv and others added 2 commits December 30, 2025 19:18
@ShrinathNR
ShrinathNR merged commit 4f5e9a4 into Turbin3:main Dec 31, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants