From ece0a7f7744b3415af621673d63fbea4067e3111 Mon Sep 17 00:00:00 2001 From: Ian Culp <57159226+icculp@users.noreply.github.com> Date: Sat, 3 Jul 2021 11:42:38 -0500 Subject: [PATCH 1/2] fixing typo --- 10_2_Building_the_Structure_of_P2SH.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/10_2_Building_the_Structure_of_P2SH.md b/10_2_Building_the_Structure_of_P2SH.md index 906f310..830d671 100644 --- a/10_2_Building_the_Structure_of_P2SH.md +++ b/10_2_Building_the_Structure_of_P2SH.md @@ -6,7 +6,7 @@ In the previous section we overviewed the theory of how to create P2SH transacti Any P2SH transaction starts with a locking script. This is the subject of chapters 9 and 11-12. You can use any of the Bitcoin Script methods described therein to create any sort of locking script, as long as the resulting serialized `redeemScript` is 520 bytes or less. -> :book: ***Why are P2SH scripts limited to 520 bytes?*** As with many things in Bitcoin, the answer is backward compatibility: new functionality has to constantly be built within the old constraints of the system. Is this case, 520 bytes is the maximum that can be pushed onto the stack at once. Since the whole redeemScript is pushed onto the stack as part of the redemption process, it hits that limit. +> :book: ***Why are P2SH scripts limited to 520 bytes?*** As with many things in Bitcoin, the answer is backward compatibility: new functionality has to constantly be built within the old constraints of the system. In this case, 520 bytes is the maximum that can be pushed onto the stack at once. Since the whole redeemScript is pushed onto the stack as part of the redemption process, it hits that limit. ## Serialize a Locking Script the Hard Way From f8086fee460deb606de81c94ba638a892574bf0c Mon Sep 17 00:00:00 2001 From: Ian Culp <57159226+icculp@users.noreply.github.com> Date: Sat, 3 Jul 2021 13:29:10 -0500 Subject: [PATCH 2/2] space in the --- 10_2_Building_the_Structure_of_P2SH.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/10_2_Building_the_Structure_of_P2SH.md b/10_2_Building_the_Structure_of_P2SH.md index 830d671..5beb23c 100644 --- a/10_2_Building_the_Structure_of_P2SH.md +++ b/10_2_Building_the_Structure_of_P2SH.md @@ -67,7 +67,7 @@ To complete your serialization, you translate the hexcode into binary. On the co ## Run The Integer Conversion Script -A complete script for changing an integer between -2147483647 and 2147483647 to a little-endian signed-magnitude representation in hex can be found in th e[src code directory](src/10_2_integer2lehex.sh). You can download it as `integeer2lehex.sh`. +A complete script for changing an integer between -2147483647 and 2147483647 to a little-endian signed-magnitude representation in hex can be found in the [src code directory](src/10_2_integer2lehex.sh). You can download it as `integeer2lehex.sh`. > :warning: **WARNING:** This script has not been robustly checked. If you are going to use it to create real locking scripts you should make sure to double-check and test your results.