1
0
mirror of https://github.com/bitcoinbook/bitcoinbook synced 2024-11-26 18:08:31 +00:00
Commit Graph

257 Commits

Author SHA1 Message Date
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
practicalswift
fed7506d88 Fix typos 2019-08-27 12:31:52 +00:00
Will Binns
f6f5b29822
Merge pull request #594 from ottosch/develop
Fixed typo: "note than" -> "note that"
2019-06-19 23:21:37 +02:00
Will Binns
10914b174e
Merge pull request #564 from satwo/patch-1
Specify height/timestamp cutoff for nLockTime
2019-05-09 20:05:30 +00:00
Will Binns
5785fc9d5d
Merge pull request #521 from kenjiszk/kenjiszk/fix-typo-patch-1
fix segit to segwit
2019-05-08 13:17:10 +00:00
ottoteixeira
b18ee82b46
Fixed typo: "note than" -> "note that" 2018-08-17 14:37:21 -03:00
Samuel B. Atwood
d6ec46403f
Specify height/timestamp cutoff for nLockTime
Changed "If it is above 500 million..." to "If it is greater than or equal to 500 million" to more accurately reflect the protocol spec.
See: https://en.bitcoin.it/wiki/Script#Locktime
2018-05-07 11:49:35 -05:00
Arthur O'Dwyer
8fb3e8946e Add a missing period.
(This sentence appears in Appendix D, in my PDF copy!)
2018-03-26 14:18:40 -07:00
kristen@oreilly.com
ab5ae32bae Edited ch07.asciidoc with Atlas code editor 2018-03-15 10:09:31 -07:00
kristen@oreilly.com
bab88e00aa Edited ch07.asciidoc with Atlas code editor 2018-03-15 09:30:29 -07:00
kristen@oreilly.com
6486a74a86 Edited ch07.asciidoc with Atlas code editor 2018-03-14 11:20:39 -07:00
kristen@oreilly.com
02cf61ecef Edited ch07.asciidoc with Atlas code editor 2018-03-14 11:18:44 -07:00
Andreas M. Antonopoulos
3d22d30685 Errata 163567 2018-03-14 10:58:05 -06:00
kenjiszk
8280075526 fix segit to segwit 2018-03-07 17:00:56 +09:00
kristen@oreilly.com
35c2b2a6c9 Edited ch07.asciidoc with Atlas code editor 2018-03-05 11:37:10 -08:00
kristen@oreilly.com
fef931c6f4 Edited ch07.asciidoc with Atlas code editor 2018-03-05 11:31:29 -08:00