Skip to content

Commit 5291558

Browse files
committed
bip-sizefp: Explain how the tx size/weight proofs actually work
1 parent 8b4f280 commit 5291558

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

bip-sizefp.mediawiki

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,14 @@ Why must a full tx size proof be included?
109109

110110
* This is necessary to establish that the claimed block transaction count is correct.
111111
112+
How does the full tx size proof actually prove the size?
113+
114+
* 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.
115+
116+
How does this prove the block weight?
117+
118+
* 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.
119+
112120
Why is the number of transactions in the block represented as a log2?
113121

114122
* To avoid attacks that rely on fooling clients by claiming an amount they cannot verify.

0 commit comments

Comments
 (0)