1
0
mirror of https://github.com/bitcoinbook/bitcoinbook synced 2024-12-23 07:08:13 +00:00
Commit Graph

241 Commits

Author SHA1 Message Date
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
a823b10938 ch07: add table summarizing bitcoin non-segwit and segwit addresses 2021-02-26 12:49:50 +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
kristen@oreilly.com
81a0e7ee39 Edited ch07.asciidoc with Atlas code editor 2018-03-05 11:29:32 -08:00
Andreas M. Antonopoulos
77d0ca8ee2
Merge pull request #504 from trustkim/patch-1
correct CLTV's note description: CLTV in the inputs -> CLTV in the outputs
2018-02-14 14:58:50 -06:00
trustkim
1cc6c60e28
correct CLTV's note description
I think CLTV is output-level locktime. so it should be corrected
2018-02-09 18:11:58 +09:00
theStack
cf87badbd2 script opcode count IF vs. VERIFY: diff is two ops
v1: HASH160 <expected hash> EQUALVERIFY <Bob's Pubkey> CHECKSIG
v2: HASH160 <expected hash> EQUAL IF <Bob's Pubkey> CHECKSIG ENDIF

ignoring the push-data ops (hash, pubkey),
v1 consists of [HASH160, EQUALVERIFY, CHECKSIG] -> 3 opcodes,
v2 consists of [HASH160, EQUAL, IF, CHECKSIG, ENDIF] -> 5 opcodes,
hence the difference is two opcodes.
2018-02-05 14:23:38 -05:00
Andreas M. Antonopoulos
9c783e1edf Clarified #421 2018-02-03 21:20:42 -06:00
Andreas M. Antonopoulos
8a9869f808 Fixed missing forward reference and clean up #420 2018-02-03 19:31:31 -06:00
Andreas M. Antonopoulos
f5c0df0ed5
Merge pull request #493 from theStack/isstandard
replace "isStandard" by "IsStandard" (ref. to Bitcoin Core function)
2018-02-03 14:05:04 -08:00
Andreas M. Antonopoulos
bd730b5570
wording 2018-02-03 16:04:39 -06:00
Andreas M. Antonopoulos
76e44f226e
Rewrite 3-key limit information 2018-02-03 16:02:41 -06:00
Andreas M. Antonopoulos
1ddd89b658 Several fixes to Segwit/P2SH #440
There were several errors in the address and hash calculations. Fixed errors and added command line examples to clarify the process
2018-02-03 15:38:34 -06:00
Andreas M. Antonopoulos
240b5b0c1c Better P2SH example with bx 2018-02-03 15:36:44 -06:00
Andreas M. Antonopoulos
2fcc1db70f wording 2018-02-03 15:36:16 -06:00
Andreas M. Antonopoulos
4ebfce27d2 wording 2018-02-03 15:35:51 -06:00
theStack
2f1015c23f s/isStandard/IsStandard/ (ref. to Bitcoin Core) 2018-02-03 05:58:52 -05:00
Andreas M. Antonopoulos
3830fafc1d Merge branch 'develop' into feature/move_segwit 2018-02-02 17:10:05 -08:00
Andreas M. Antonopoulos
06158f95bf Moved segwit appendix to ch07 2018-02-02 17:08:49 -08:00