One bit of feedback. It wasn't immediately obvious to me that OP_EQUALVERIFY would cause PubKeyHash and PubKeyHash2 to be removed from the stack. You stated:
OP_EQUAL and OP_VERIFY are executed. OP_EQUAL puts TRUE on the stack if the two elements are the same. OP_VERIFY marks a transaction valid if the top stack element is true. And removes the top stack element if its TRUE, if its false it leaves it there.
So I thought this meant that OP_EQUAL would simply add TRUE to the stack when they are equal, and that OP_VERIFY would remove the top element ( TRUE ). But this would leave PubKeyHash and PubKeyHash2 still in place.
So I reason that OP_EQUAL must also remove both input elements, and probably most operators do that when they evaluate to TRUE. But I'm not sure that you explicitly state that anywhere.
So logically if we used OP_EQUAL and then OP_VERIFY we would have:
TRUE
PubKey
Signature
after OP_EQUAL and then
PubKey
Signature
after OP_VERIFY.
yes?
Yes! generally the inputs of an operation are removed from the stack, this is very CPU like: they are loaded into the CPU and removed from the data store, the result is then put on the data store. this is like processor chips work at a low level. so its the exception that true will not be shown, how could I explain this best?