1
0
mirror of https://github.com/bitcoinbook/bitcoinbook synced 2024-11-23 00:28:14 +00:00
Commit Graph

272 Commits

Author SHA1 Message Date
Dan Raviv
35b9de0cb4 Replace http scheme with https where appropriate 2021-04-10 10:51:03 +03:00
Will Binns
53ec800983
Merge pull request #901 from rating89us/patch-81
ch10: unmodified/unupgraded/nonupgraded -> non-upgraded
2021-04-08 12:21:09 +02:00
Will Binns
1f02e2232f
Merge pull request #890 from rating89us/patch-69
ch07: fix text + styling in tip
2021-04-08 11:39:10 +02:00
rating89us
1d9f80131f
ch07: nonupgraded -> non-upgraded 2021-04-02 22:46:36 +02:00
rating89us
7c6f9c4cd2
ch07: fix text + styling in tip 2021-03-26 12:50:31 +01:00
krupawan5618
aa585005bb
Update ch07.asciidoc
a to an
2021-03-15 01:17:41 -04:00
Will Binns
553e1a51fb
ch07: Swap placement of sender and receiver
Closes #760
2021-03-10 10:18:58 +01:00
Will Binns
6661b9cbec
ch07: Update script example to account for bug
Closes #624
2021-03-10 09:36:12 +01:00
Will Binns
6b8e6ca895
Merge pull request #849 from krupawan5618/patch-7
Update ch07.asciidoc -  Clarify current restrictions of standard multisig vs. P2SH
2021-03-10 08:35:58 +01:00
Will Binns
8f059d8330
Merge pull request #847 from krupawan5618/patch-6
Update ch07.asciidoc - Removed Public Key for unlocking script for P2SH
2021-03-10 08:34:20 +01:00
Will Binns
ef7fd81d89
ch07: Fix 'BOOLOR' styling to match other operators 2021-03-09 14:52:46 +01:00
krupawan5618
a9a5ed38a9
Update ch07.asciidoc
refactored text to create sizeable tip box; fixed typos
2021-03-05 19:48:37 -05:00
krupawan5618
73c3af32c3
Update ch07.asciidoc
Elaborated a bit more on IsStandard() function and provided clarity to the examples written above. 

Reference: ed25cb58f6/src/policy/policy.cpp (L53)
2021-03-05 19:44:54 -05:00
krupawan5618
d2a386cf7f
Update ch07.asciidoc
Aim is to clarify the current restrictions of standard multisig vs. P2SH. The aim is to further clarify why a transaction would be invalid, in each perspective. On a technical note, saying that it 'invalidates the transaction' may not be correct, but my current understanding is that a 2 of 5 multisig transaction would enter the mempool but then become invalid by nodes. 

On the other hand, nodes wouldn't have a way to tell if a P2SH hash has within it 15 public keys as it is just a hash; therefore, the only way to tell is to analyze unlocking script of a transaction in input, unless the basis for 15 public keys is a size restriction? Thank you
2021-03-05 17:54:26 -05:00
krupawan5618
3e6ae4aaee
Update ch07.asciidoc
Updated the P2SH unlocking script to state that just signatures are required to satisfy unlocking conditions, as depicted by the examples.
2021-03-05 17:19:30 -05:00
krupawan5618
23bdf8f305
Update ch07.asciidoc
Moved this Tip Box for flow.
2021-03-04 21:47:13 -05:00
krupawan5618
5d44f72caf
Update ch07.asciidoc
Restructured this Tip box sentence structure for flow. Comment related to P2WPKH and P2WSH are placed at the end with subtle pointer to continue reading for elaboration on this point.
2021-03-04 21:41:56 -05:00
Will Binns
cac0793e72
Merge pull request #828 from rating89us/patch-45
ch07: add pruning synonym
2021-03-04 19:39:34 +01:00
Will Binns
71cca17340
Merge pull request #827 from rating89us/patch-44
ch07: introduce "pure segwit transaction" term
2021-03-04 19:39:09 +01:00
Will Binns
8964f302ea
Merge pull request #826 from rating89us/patch-40
ch07: remove period in list item
2021-03-04 19:38:26 +01:00
Will Binns
4e5408a94c
Merge pull request #824 from rating89us/patch-36
ch07: tx = tx data + witness data
2021-03-04 19:37:37 +01:00
Will Binns
9992809452
Merge pull request #823 from rating89us/patch-32
ch07: change order of signers; add "the Lawyer" to Abdul's sig
2021-03-04 19:36:26 +01:00
Will Binns
359566c08a
Merge pull request #822 from rating89us/patch-30
ch07: must be satisfied to unlock it
2021-03-04 19:33:00 +01:00
Will Binns
2926b88751
Merge pull request #821 from rating89us/patch-27
ch07: fork attack -> fork/double-spend attack; del extra space
2021-03-04 19:32:33 +01:00
Will Binns
4a83b24370
Merge pull request #820 from rating89us/patch-25
ch07: reward -> mining reward
2021-03-04 19:31:46 +01:00
Will Binns
f31f8d97d6
Merge pull request #819 from rating89us/patch-23
ch07: fix numbered list; lock-time -> timelock
2021-03-04 19:31:04 +01:00
Will Binns
867d351f3a
Merge pull request #815 from rating89us/patch-21
ch07: transaction fee cost -> higher transaction fee costs
2021-03-04 19:22:15 +01:00
Will Binns
07d1fa3308
Merge pull request #814 from rating89us/patch-20
ch07: add table summarizing bitcoin non-segwit and segwit addresses
2021-03-04 19:21:49 +01:00
rating89us
925ee5d325
ch07: add pruning definition 2021-02-27 23:25:20 +01:00
rating89us
ca2415b0a8
ch07: introduce "pure segwit transaction" term 2021-02-27 22:44:36 +01:00
rating89us
60bb4d3f0b
ch07: remove period in list item 2021-02-27 21:30:07 +01:00
rating89us
7d0819d677 ch07: tx = tx data + witness data 2021-02-26 15:00:34 +01:00
rating89us
a823b10938 ch07: add table summarizing bitcoin non-segwit and segwit addresses 2021-02-26 12:49:50 +01:00
rating89us
74563c2c01
ch07: change order of signers; add "the Lawyer" to Abdul's sig 2021-02-26 00:05:18 +01:00
rating89us
123652efb9
ch07: must be satisfied to unlock it 2021-02-25 22:38:51 +01:00
rating89us
988d8cedf7
ch07: fork attack -> fork/double-spend attack; del extra space 2021-02-25 22:13:08 +01:00
rating89us
9c0b5d09ab
ch07: reward -> mining reward 2021-02-25 21:26:45 +01:00
rating89us
9f0cd2f74f
ch07: fix numbered list; lock-time -> timelock 2021-02-25 19:09:09 +01:00
rating89us
370930f0ae
ch07: transaction fee cost -> higher transaction fee costs 2021-02-24 20:41:22 +01:00
rating89us
32afaef9a7
ch07: add roles of sender and recipient 2021-02-24 18:23:26 +01:00
Felix Filozov
c66298c3c5 Added missing word. 2021-02-10 21:21:42 -05:00
Ning Shang
c942d694b6
ch07: Typo fixes
Fix minor typos related to 'equal to' and 'less/greater than'.
2021-01-18 20:34:24 -08:00
Ning Shang
555be41b2b
ch07: 2-of-5 instead of 2-of-3 for Mohammed's example
The example is a 2-of-5 multisig, according to the Pay-to-Script-Hash example description earlier, and the P2SH example a few lines below.
2021-01-18 20:00:19 -08:00
Murch
8072effb93
Correct transaction costs in segwit example
The transaction fees in the example were off.
2-of-3 P2SH inputs are between 293 and 297 bytes (293 bytes if both
signatures have low-R, 296 bytes if one signature has high-R, 297 bytes
if both signatures have high-R) and P2SH outputs are 32 bytes.

2-of-3 P2WSH (native segwit) inputs are between 104 and 104.5 vbytes
(416–418 WU, depending on low-R/high-R as above) and P2WSH outputs are
43 bytes.

The transaction header has 10 bytes for non-segwit transactions and 42
WU for segwit transactions.

Source:
https://github.com/BitGo/unspents/blob/master/src/dimensions.ts#L69

I have updated the numbers in the example and amended the conclusion
which did not match the new numbers. Calculation details follow.

-----

Let's assume that the wallet is using signature grinding and will always
produce signatures with low-R:

•Without Segregated Witness:
Transaction A using 2-of-3 P2SH inputs and P2SH outputs:
3*293 + 10 + 2*32 = 953
953 * 30 = 28,590

Transaction B using 2-of-3 P2SH inputs and P2SH outputs:
2*293 + 10 + 3*32 = 692
692 * 30 = 20,760

•With Segregated Witness:
Transaction A using 2-of-3 P2WSH (native segwit) inputs and outputs:
3*104 + 10.5 + 2*43 = 408.5
408.5 * 30 = 12,255

Transaction B using 2-of-3 P2WSH (native segwit) inputs and P2WSH
outputs:
2*104 + 10.5 + 3*43 = 347.5
347.5 * 30 = 10,425
2020-10-13 23:11:13 -04:00
Will Binns
6990e9d83a
Merge pull request #671 from jowo-io/develop
Ensuring "constant width" font is used for two references to `nLocktime`
2020-05-01 11:57:06 -06:00
Will Binns
720e376e3e
Merge pull request #661 from staciewaleyko/patch-1
Fix typo in chapter 7 ("to" => "with")
2020-04-30 22:14:23 -06:00
JoWo
0e2256e394 ensuring "constant width" of two references to nLocktime 2020-02-05 11:24:21 +01:00
Stacie Waleyko
ee79882eb8
Fix typo in chapter 7 ("to" => "with") 2019-10-28 08:30:42 -04:00
Gus
6599228da5 Removes sentence structure error: "outputs" 2019-10-10 08:35:27 -06:00
Will Binns
1bdd74320a
Merge branch 'develop' into op-tuck 2019-10-05 09:07:24 +02:00