Skip to content

feat(script): add Transaction#verify_input and integration tests#68

Merged
sgbett merged 1 commit intomasterfrom
feature/62-end-to-end-integration
Feb 12, 2026
Merged

feat(script): add Transaction#verify_input and integration tests#68
sgbett merged 1 commit intomasterfrom
feature/62-end-to-end-integration

Conversation

@sgbett
Copy link
Owner

@sgbett sgbett commented Feb 12, 2026

Summary

Test plan

  • P2PKH end-to-end: create tx, sign, verify through interpreter
  • P2PK end-to-end verification
  • 2-of-3 multisig sign and verify
  • Transaction#verify_input works for P2PKH, P2PK, and multisig
  • Wrong key fails with :equalverify_failed
  • Corrupted signature raises ScriptError
  • Wrong locking script fails appropriately
  • OP_RETURN evaluates as early success (after genesis)
  • Conditional IF branches around CHECKSIG
  • Nonstandard scripts: hash-puzzle, arithmetic
  • Error messages are meaningful with error codes
  • Full suite: 924 examples, 0 failures
  • RuboCop clean

Closes #62

🤖 Generated with Claude Code

… tests (#62)

Add verify_input convenience method to Transaction that delegates to
the script interpreter. Expand integration tests with P2PKH, P2PK,
2-of-3 multisig, OP_RETURN, conditional CHECKSIG, hash-puzzle, and
arithmetic scripts. Includes negative tests for wrong key, corrupted
signature, and wrong locking script.

Completes the script interpreter (#21) and HLR #8.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sgbett sgbett merged commit 3974290 into master Feb 12, 2026
6 checks passed
@sgbett sgbett deleted the feature/62-end-to-end-integration branch February 12, 2026 19:44
@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

[Task 6] End-to-end integration + Transaction#verify_input

1 participant