summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2017-03-22 22:40:49 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2017-03-22 22:40:49 +0000
commit5291558603e58a79b6505ad17e5ee595cb1bb59f (patch)
tree84bbabf77b35751d5278c8d20df9c94c099c6bcd
parent8b4f280c4c18fd603f154bdcd3c3699391cd231e (diff)
downloadbips-5291558603e58a79b6505ad17e5ee595cb1bb59f.tar.xz
bip-sizefp: Explain how the tx size/weight proofs actually work
-rw-r--r--bip-sizefp.mediawiki8
1 files changed, 8 insertions, 0 deletions
diff --git a/bip-sizefp.mediawiki b/bip-sizefp.mediawiki
index 4ea3b33..29d1478 100644
--- a/bip-sizefp.mediawiki
+++ b/bip-sizefp.mediawiki
@@ -109,6 +109,14 @@ Why must a full tx size proof be included?
* This is necessary to establish that the claimed block transaction count is correct.
+How does the full tx size proof actually prove the size?
+
+* The first step of SHA2 hashing is to transform the input data into chunks. The final chunk is required to include the absolute length of the input data at the end of the final chunk. Therefore, by committing to the midstate prior to the final chunk, and replaying only the final chunk, we can confirm that the claimed size matches the full transaction data being hashed.
+
+How does this prove the block weight?
+
+* The block weight defined by BIP 141 is the size of the block stripped of its segwit signatures times 3, plus the full size of the block. By proving minimal sizes of both the stripped block and the full block, a minimal weight can also be calculated.
+
Why is the number of transactions in the block represented as a log2?
* To avoid attacks that rely on fooling clients by claiming an amount they cannot verify.