Skip to content

Commit d01b38b

Browse files
LarryRuanebitschmidty
authored andcommitted
News225: add review club summary 26265
1 parent d482bee commit d01b38b

File tree

2 files changed

+89
-4
lines changed

2 files changed

+89
-4
lines changed

_posts/en/newsletters/2022-11-09-newsletter.md

Lines changed: 86 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,91 @@ Bitcoin infrastructure software.
140140
meeting, highlighting some of the important questions and answers. Click on a
141141
question below to see a summary of the answer from the meeting.*
142142

143-
FIXME:LarryRuane
143+
[Relax MIN_STANDARD_TX_NONWITNESS_SIZE to 65 non-witness bytes][review club 26265]
144+
is a PR by instagibbs that relaxes the mempool policy's non-witness transaction size
145+
constraints. It allows transactions to be as small as 65 bytes, replacing
146+
the current policy that requires transactions to be at least 85 bytes (see
147+
[Newsletter #222][news222 min relay size]).
148+
149+
Since this Review Club meeting, this PR has been closed in favor of
150+
PR [#26398][bitcoin core #26398], which
151+
relaxes policy even further by disallowing _only_ 64-byte transactions.
152+
The relative merits of these two slightly-different policies were
153+
discussed during the meeting.
144154

145155
{% include functions/details-list.md
146-
q0="FIXME"
147-
a0="FIXME"
148-
a0link="https://bitcoincore.reviews/26114#l-27FIXME"
156+
q0="Why was the minimum transaction size 82 bytes?
157+
Can you describe the attack?"
158+
159+
a0="The 82-byte minimum, which was introduced by PR [#11423][bitcoin core #11423] in 2018, is
160+
the size of the smallest standard payment transaction. This was
161+
presented as a cleanup of the standardness rules. But in reality,
162+
the change was to prevent a 64-byte transaction from being considered standard,
163+
because this size allowed a [spoof payment attack][]
164+
against SPV clients (making them think they've received a payment when they hadn't).
165+
The attack involves tricking an SPV client into thinking that a 64-byte
166+
transaction is an inner node of the transaction merkle tree, which is also
167+
64 bytes in length."
168+
169+
a0link="https://bitcoincore.reviews/26265#l-35"
170+
171+
q1="A participant asked, was it was necessary to fix this vulnerability
172+
covertly, given that it would be very expensive (on the order of USD$1M) to
173+
carry out this attack, combined with the fact that it seems unlikely
174+
people would use SPV clients for payments that large?"
175+
176+
a1="There was some agreement, but one participant pointed out that our
177+
intuition about this could be wrong."
178+
179+
a1link="https://bitcoincore.reviews/26265#l-66"
180+
181+
q2="What does _non-witness size_ mean,
182+
and why do we care about the non-witness distinction?"
183+
184+
a2="We care about the non-witness distinction because, as part of the
185+
segwit upgrade, witness data is excluded from the calculation of the merkle root.
186+
Since the attack requires the malicious transaction to be 64 bytes in the
187+
merkle root construction (so it looks like an inner node), we need to exclude
188+
witness data from it."
189+
190+
a2link="https://bitcoincore.reviews/26265#l-62"
191+
192+
q3="Why does setting this policy help to prevent the attack?"
193+
194+
a3="Since inner merkle tree nodes can only be exactly 64 bytes, a transaction
195+
of a different size cannot be misinterpreted as an inner merkle node."
196+
197+
a3link="https://bitcoincore.reviews/26265#l-84"
198+
199+
q4="Does it eliminate the attack vector entirely?"
200+
201+
a4="Changing the standardness rules only prevents 64-byte transactions
202+
from being accepted into mempools and relayed, but such transactions
203+
may still be consensus-valid and so can be mined into a block.
204+
For this reason, the attack is still possible, but only with the help of miners."
205+
206+
a4link="https://bitcoincore.reviews/26265#l-84"
207+
208+
q5="Why might we want to change the minimum transaction size to 65 bytes,
209+
apart from the fact that it's unnecessary to obfuscate the CVE?"
210+
211+
a5="There are legitimate use cases for transactions that are less than 82 bytes.
212+
One example mentioned is a [Child Pays For Parent (CPFP)][topic cpfp] transaction that assigns
213+
an entire parent output to fees (such a transaction would have a single input
214+
and an empty `OP_RETURN` output)."
215+
216+
a5link="https://bitcoincore.reviews/26265#l-100"
217+
218+
q6="Between disallowing sizes less than 65 bytes and sizes equal to 64 bytes,
219+
which approach do you think is better and why?
220+
What are the implications of both approaches?"
221+
222+
a6="After some byte-counting discussion, it was agreed that a valid
223+
but non-standard transaction can be as small as 60 bytes:
224+
a stripped (non-witness) with a single native segwit input is
225+
41 B + 10 B header + 8 B value + 1 B `OP_TRUE` or `OP_RETURN` = 60 B."
226+
227+
a6link="https://bitcoincore.reviews/26265#l-124"
149228
%}
150229

151230
## Releases and release candidates
@@ -257,5 +336,8 @@ Proposals (BIPs)][bips repo], and [Lightning BOLTs][bolts repo].*
257336
[news220 v3tx]: /en/newsletters/2022/10/05/#proposed-new-transaction-relay-policies-designed-for-ln-penalty
258337
[news222 bug]: /en/newsletters/2022/10/19/#block-parsing-bug-affecting-btcd-and-lnd
259338
[liquid and rust bitcoin vulns]: https://twitter.com/Liquid_BTC/status/1587499305664913413
339+
[spoof payment attack]: /en/topics/cve/#CVE-2017-12842
260340
[towns find]: https://twitter.com/roasbeef/status/1587481219981508608
261341
[26438 close]: https://github.com/bitcoin/bitcoin/pull/26438#issuecomment-1307715677
342+
[review club 26265]: https://bitcoincore.reviews/26265
343+
[news222 min relay size]: /en/newsletters/2022/10/19/#minimum-relayable-transaction-size

_topics/en/cve.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ optech_mentions:
7777
- title: "CVE-2017-12842: discussion of lowering minimum relayable transaction size"
7878
url: /en/newsletters/2022/10/19/#minimum-relayable-transaction-size
7979

80+
- title: "CVE-2017-12842: Bitcoin Core PR Review Club discussion about lowering min relayable tx size"
81+
url: /en/newsletters/2022/11/09/#bitcoin-core-pr-review-club
82+
8083
## Optional. Same format as "primary_sources" above
8184
#see_also:
8285

0 commit comments

Comments
 (0)