BITCOIN DATA TYPES
In this section, we introduce the main Bitcoin specific data types.
Figure 3.1 A Merkle tree of depth 3, accumulating eight elements U0,... ,U7.
Scripts
Bitcoin introduced a custom non-Turing complete scripting language in an attempt to support different types of transactions and extend the applicability of transactions beyond the simple transfer of funds. Scripts are stack-based, support a number of functions (commonly referred to as opcodes), and either evaluate to true or false. The language supports dozens of different opcodes ranging from simple comparison opcodes to cryptographic hash functions and signature verification. Since scripts are supposed to be executed on any Bitcoin node, they could be abused to conduct denial-of-service attacks and therefore, a considerable number of opcodes have been temporarily disabled. This was one of the main reasons why scripts do not provide rich support when compared to standard programming languages.
An example script program