I'm trying to understand how a script works but am having trouble reading a script (the output of one Tx... and the input of a second Tx) and figuring out how the computer (bitcoin-qt) knows which input in the script is data and which is a command.
Please correct my assumption:
The script is read left to right and is the concatenation of the output of a preceding Transaction to the input of a consuming Transaction
A script output can have only one corresponding transaction script that consumes it.
There are several script commands and several are disabled in the current version of the client
The script can not rely on outside information (stock ticker) but can rely on an Oracle for these dependencies.
The script commands that are "commands" require certain data to be on the stack in order to function correctly
There are "standard scripts" (but I'm unclear if this means non-standard scripts may never get incorporated into a block)
If the concatenated evaluation of a preceding Tx Output and a subsequent Tx Input evaluates to true, then the transaction is valid.
- Can anyone tell me if those thoughts about scripts are correct?
- How does the forth like processor know the difference between data on the stack and commands on the stack?
- Does the processor think everything is just data until it hits data that matches a known "function"