From b6b5a5b4bb73eeb69c36137c22c18609a5e577fd Mon Sep 17 00:00:00 2001 From: Seiichi Uchida Date: Fri, 20 Jan 2017 00:32:09 +0900 Subject: [PATCH] Fix a typo in ch06.asciidoc: 'an' to 'and' --- ch06.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch06.asciidoc b/ch06.asciidoc index 6ca5558c..69efb56b 100644 --- a/ch06.asciidoc +++ b/ch06.asciidoc @@ -443,7 +443,7 @@ Try validating the preceding script yourself using pencil and paper. When the sc [[script_exec]] ===== Separate Execution of Unlocking and Locking Scripts -In the original bitcoin client, the unlocking and locking scripts were concatenated and executed in sequence. For security reasons, this was changed in 2010, because of a vulnerability that allowed a malformed unlocking script to push data onto the stack an corrupt the locking script. In the current implementation, the scripts are executed separately with the stack transferred between the two executions, as described next. +In the original bitcoin client, the unlocking and locking scripts were concatenated and executed in sequence. For security reasons, this was changed in 2010, because of a vulnerability that allowed a malformed unlocking script to push data onto the stack and corrupt the locking script. In the current implementation, the scripts are executed separately with the stack transferred between the two executions, as described next. First, the unlocking script is executed, using the stack execution engine. If the unlocking script executed without errors (e.g., it has no "dangling" operators left over), the main stack (not the alternate stack) is copied and the locking script is executed. If the result of executing the locking script with the stack data copied from the unlocking script is "TRUE," the unlocking script has succeeded in resolving the conditions imposed by the locking script and, therefore, the input is a valid authorization to spend the UTXO. If any result other than "TRUE" remains after execution of the combined script, the input is invalid because it has failed to satisfy the spending conditions placed on the UTXO.