Three questions, three boundaries
- Which bytes are instructions?
- What is left on the stack?
- What bytes did the signature commit to?
This is P-256/HASH256 course code, not Bitcoin consensus validation.
1 / 6
This is P-256/HASH256 course code, not Bitcoin consensus validation.
02 76 aa 76: push literal 76aa, then DUP.
The aa byte is data. Next cursor after the push is 3.
[sig,pub] → DUP → [sig,pub,pub]
HASH256 → push expected → EQUALVERIFY → [sig,pub]
CHECKSIG pops pubkey then signature; leaves 01 or 00.
A later push can cover CHECKSIG's false value in this generic machine.
H(tx.ID || uint32_le(index) || lockingScript)
The function does not recompute ID from outputs. Changing an output while keeping ID does not change this digest.
Trace 01 07 76 88 through execution and the final truth test.
Then explain why signature verification alone does not prove UTXO validity.