Add invariant validation to compliment policy (Bitcoin)#36
Add invariant validation to compliment policy (Bitcoin)#36
Conversation
…tps://github.com/vultisig/recipes into 33-add-invariant-validation-to-compliment-policy
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Replaced by #51 |
DRAFT - Depends on #35
This PR implements Bitcoin transaction invariant validation to ensure Bitcoin transfers always follow security requirements. This is currently a draft because it depends on vault utilities from PR1. I will rebase it once #35 merges, leaving it here so I dont lose it.
Related Issue: Closes #33
Dependencies: PR #[PR1_NUMBER] (vault utilities must merge first)
Adds transaction invariant validation for Bitcoin to prevent malicious transactions by enforcing that:
Core Implementation
ValidateInvariantsmethod to Chain interfacecheckTransactionStructure: Validates transaction has 1-2 outputsvalidateChangeOutput: Ensures change goes to vault-derived addressEngine Integration
ValidateInvariantsinEngine.Evaluateafter policy rules matchEvaluatemethod signatureTest: One input One output, should pass. To test the validation of the change output is more complex as it also needs the corresponding vult file, refer to engine_test.go