Skip to content

Commit 7b74933

Browse files
authored
Merge pull request bitcoinops#118 from harding/2019-03-12-newsletter
Newsletters: add bitcoinops#37 (2019-03-12)
2 parents 973be35 + 4141ea2 commit 7b74933

File tree

5 files changed

+579
-0
lines changed

5 files changed

+579
-0
lines changed

_includes/references.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
[bitcoin.se]: https://bitcoin.stackexchange.com/
1313
[c-lightning]: https://github.com/ElementsProject/lightning
1414
[c-lightning repo]: https://github.com/ElementsProject/lightning
15+
[cve-2012-2459]: https://bitcointalk.org/?topic=102395
1516
[cve-2017-12842]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-12842
1617
[cve-2018-17144]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-17144
1718
[descriptor]: https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md
@@ -79,6 +80,8 @@ place, put links here. -->{% endcomment %}
7980
[newsletter #11]: {{news11}}
8081
{% assign news12 = "/en/newsletters/2018/09/11/" %}
8182
[newsletter #12]: {{news12}}
83+
{% assign news13 = "/en/newsletters/2018/09/18/" %}
84+
[newsletter #13]: {{news13}}
8285
{% assign news16 = "/en/newsletters/2018/10/09/" %}
8386
[newsletter #16]: {{news16}}
8487
{% assign news17 = "/en/newsletters/2018/10/16/" %}
@@ -101,6 +104,8 @@ place, put links here. -->{% endcomment %}
101104
[newsletter #27]: {{news27}}
102105
{% assign news31 = "/en/newsletters/2019/01/29/" %}
103106
[newsletter #31]: {{news31}}
107+
{% assign news36 = "/en/newsletters/2019/03/05/" %}
108+
[newsletter #36]: {{news36}}
104109

105110
{% comment %}
106111
<!--REQUIRES PERIODIC UPDATE: update rpc_version below to latest
Lines changed: 277 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,277 @@
1+
---
2+
title: 'Bitcoin Optech Newsletter #37'
3+
permalink: /en/newsletters/2019/03/12/
4+
name: 2019-03-12-newsletter
5+
type: newsletter
6+
layout: newsletter
7+
lang: en
8+
---
9+
This week's newsletter notes a vulnerability in Bitcoin Core versions
10+
that are already past end-of-life, asks for help testing release
11+
candidates of the next major version of Bitcoin Core, provides an update
12+
on the Bitcoin-Dev mailing list, describes recent discussions from the
13+
list, and links to a chapter about payment batching in Optech's
14+
work-in-progress scaling techniques book. Also included are
15+
descriptions of several notable commits in popular Bitcoin
16+
infrastructure projects.
17+
18+
## Action items
19+
20+
- **Ensure you aren't running old Bitcoin Core versions:** Suhas Daftuar
21+
disclosed a vulnerability affecting Bitcoin Core 0.13.0 to 0.13.2.
22+
(Note: those releases have been past [end-of-life][core eol] for
23+
several months.) The vulnerability would allow an attacker to convince
24+
your node that a valid block was invalid, forking you off the
25+
consensus block chain and making it possible to trick you into
26+
believing that you received confirmed bitcoins you wouldn't actually
27+
control. In addition to checking for old versions of Bitcoin Core in
28+
your infrastructure, it's also recommended that you check for altcoins
29+
whose nodes are based on the affected Bitcoin Core versions. See the
30+
disclosure details below for more information.
31+
32+
- **Help test Bitcoin Core 0.18.0 RC1:** The first Release Candidate
33+
(RC) for the next major version of Bitcoin Core has been released.
34+
Organizations and experienced users who depend upon Bitcoin Core are
35+
highly encouraged to [test it][0.18.0] for regressions and other
36+
problems that could affect your use of it in production. Any testing
37+
is appreciated, but if you have some extra time after testing for your
38+
specific use cases, please consider helping test [0.18's changes][gui 0.18] to the GUI. This
39+
interface is primarily used by less experienced users who are unlikely
40+
to test RCs themselves but who would be especially affected by any
41+
problems that slip through.
42+
43+
## News
44+
45+
- **Bitcoin-Dev mailing list status update:** the service outage
46+
reported in [last week's newsletter][Newsletter #36] has been resolved
47+
but list administrators are [planning][bishop list] to migrate to
48+
another solution. Many posts sent in the past two weeks have been
49+
relayed to list subscribers, but some have been lost. If you don't
50+
see your post in the [February][list feb] or [March][list mar]
51+
archives, please resend it. Future Optech newsletters will mention
52+
any actions list subscribers need to take in order to continue to
53+
receive protocol discussion.
54+
55+
- **Bitcoin Core vulnerability disclosure:** Suhas Daftuar
56+
[disclosed][merkle disclosure] a novel method for tricking earlier
57+
Bitcoin Core versions into rejecting valid blocks. If an attacker
58+
created a block with two transactions whose 32-byte hashes (txids),
59+
when concatenated together, appear to be a 64-byte transaction, it's
60+
possible to create two different interpretations of the merkle tree rooted in
61+
the block header---one where the tree points to a single invalid 64-byte
62+
transaction and one where it points to two valid transactions.
63+
(Similar conflicting versions can also be created with more than two
64+
transactions.)
65+
66+
![Diagram of two identical merkle roots derived from different block
67+
data](/img/posts/2019-03-merkle-ambiguity.svg)
68+
69+
This can create a problem for Bitcoin Core as, normally, if it
70+
rejects a block as being invalid, it will add the header hash of
71+
that block to a cache so that it doesn't waste resources requesting
72+
or re-processing that block again. This allowed an attacker to
73+
send your node the invalid form of the block to subsequently prevent
74+
your node from processing its valid form or any blocks that descend
75+
from it, forking you off the chain.
76+
77+
A similar vulnerability was disclosed in 2012 as [CVE-2012-2459][]
78+
and Bitcoin Core was adapted then to not cache invalidity for blocks
79+
whose merkle tree contains ambiguities. However, an
80+
[optimization][bitcoin core #7225] implemented in Bitcoin Core 0.13.0
81+
reintroduced this caching problem and necessitated a [fix][bitcoin
82+
core #9765], which was included in Bitcoin Core 0.14.0. Daftuar's
83+
email includes a [very informative PDF][daftuar pdf] that not only
84+
describes this specific problem in detail and shows its cost to be a
85+
very small 30 bits of brute force work (although you also need to
86+
mine a custom block) but which also describes other known
87+
vulnerabilities possible with Bitcoin's merkle trees and calculates
88+
the average amount of brute force work to exploit them. Daftuar did
89+
not find any instances of the attack to date in the current
90+
consensus block chain.
91+
92+
- **Cleanup soft fork proposal discussion:** this week saw discussion
93+
about the consensus cleanup soft fork [proposal][bip-cleanup]
94+
described in [last week's newsletter][newsletter #36]. Russell
95+
O'Connor [raised the concern][roconnor codesep] that invalidation of
96+
the `OP_CODESEPARATOR` opcode could prevent
97+
existing UTXOs using the opcode from being spent. It's not possible to detect this
98+
because people could've paid money to a P2SH address whose
99+
not-yet-revealed redeemScript uses the discouraged opcode. O'Connor
100+
proposes to mitigate the problem of `OP_CODESEPARATOR` being used to
101+
increase worse-case block verification time by instead increasing the
102+
weight (vbytes) of transactions whose evaluated scripts contain the
103+
opcode. This would reduce the maximum number of code separators that
104+
could be contained within a block while also likely reducing the
105+
overall size and total number of operations in the block to the point
106+
where it could be verified reasonably quickly.
107+
108+
O'Connor also raised a [similar concern][roconnor sighash] regarding
109+
the soft fork's proposal to invalidate the unallocated sighash type bytes.
110+
It's also not possible to entirely detect this because Bitcoin users
111+
may have created pre-signed locktimed transactions for which they've
112+
lost or destroyed the signing keys, preventing them from creating
113+
new signatures. Instead of increasing the weight of the unallocated
114+
sighash bytes to restrict their use, he recommends use of a more
115+
complex sighash cache (as previously described as an option in the
116+
proposed BIP).
117+
118+
Matt Corallo replied to both of O'Connor's concerns by pointing out
119+
that, although we can't detect usage of these features for spends
120+
that haven't been broadcast, we can detect them for any transactions
121+
in the existing chain---and that usage doesn't exist. "I'm
122+
seriously skeptical that someone is using a highly esoteric scheme
123+
and has just been pouring money into it without ever having tested
124+
it or having withdrawn any money from it whatsoever," said Corallo
125+
before also discussing the amount of extra complexity for
126+
calculating fees and caching sighashes if these features aren't
127+
disabled. His rebuttal also included a plea for anyone using
128+
transaction features that are not relayed or mined by default
129+
("non-standard") to [contact][core contact] Bitcoin Core developers
130+
and let them know about the situation so that policies can be
131+
reconsidered.
132+
133+
- **Feedback requested on signet:** Karl-Johan Alm has been working on
134+
an [alternative][signet] to Bitcoin's testnet that uses
135+
centrally-signed blocks instead of proof of work. Although this
136+
doesn't allow testing the decentralized nature of Bitcoin, it could
137+
make the testing network much more convenient for application
138+
developers by providing regular block production most of the time plus
139+
scheduled tests of adverse events such as block chain reorganizations
140+
or fee spikes. It would also ensure the central signing authority
141+
always had test coins to distribute via their faucet. By comparison,
142+
testnet block production is sometimes too fast for peers to keep up or
143+
so slow that it's useless for testing, faucets are often empty, and
144+
griefers can create reorg scenarios that would be extremely unlikely
145+
to exist on a network with actual value at stake. Alm is seeking
146+
feedback and would like to eventually incorporate his code into
147+
Bitcoin Core (and, probably, have other node implementations support
148+
it too).
149+
150+
- **Removal of BIP61 P2P `reject` messages:** Marco Falke started a
151+
[thread][falke bip61] seeking feedback about his desire to remove
152+
[BIP61][] reject messages from Bitcoin Core. When your node receives
153+
a message (such as a transaction) that has some problem, your node
154+
will return a `reject` message that contains a description of the
155+
problem. BIP61 messages are not trustless (your node could lie) and
156+
the same information about problems can be extracted from the
157+
rejecting node's logs, which allows developers to investigate problems
158+
with messages sent to their own nodes. See [Newsletter #13][] for
159+
our description of Falke's PR that disabled `reject` messages by
160+
default in Bitcoin Core.
161+
162+
Andreas Schildbach, a wallet author and lead maintainer of the
163+
popular BitcoinJ library, requested keeping the messages and
164+
re-enabling them by default. His users email him logfiles
165+
containing reject messages when their transactions don't go through,
166+
helping him to debug problems. In response, Gregory Maxwell pointed
167+
out that even when an honest node accepts a transaction, that
168+
doesn't mean it'll be also accepted by that node's peers. That
169+
means clients still need to monitor for transaction propagation
170+
without using BIP61, making BIP61 redundant for that purpose.
171+
Similarly, BIP61 can't reasonably be used to detect transactions
172+
with too-low feerates because an accepted transaction paying a
173+
minimum feerate may take weeks longer to confirm than the user
174+
desired when default-sized mempools are full. Finally, verification
175+
nodes are designed to maximize performance, which often conflicts
176+
with the ability to provide maximally-useful debugging information
177+
to random untrusted peers.
178+
179+
- **Extension fields to Partially-Signed Bitcoin Transactions (PSBTs):**
180+
Andrew Poelstra [proposed][psbt extension] the addition of several
181+
fields to PSBTs to help support several new features. He also
182+
proposed making one currently-required field optional. These new
183+
fields can help clients determine whether an `OP_CHECKSEQUENCEVERIFY`
184+
(CSV) condition is satisfied, support the full range of scripts it's
185+
possible to generate with [miniscript][], and include extra data for
186+
use with the [MuSig][], pay-to-contract, and sign-to-contract
187+
protocols. [BIP174][] author Andrew Chow appeared receptive to most
188+
of the suggestions.
189+
190+
- **Review of Bitcoin privacy literature published:** Chris Belcher
191+
published an extended [summary][privacy summary] of various privacy
192+
concerns present in Bitcoin. That page and the Wiki's related
193+
[Privacy category][] provides an excellent starting point for anyone
194+
researching Bitcoin privacy concerns.
195+
196+
- **Version 2 `addr` message proposed:** Wladimir van der Laan has
197+
[proposed][addrv2 proposal] creating a BIP for a new version of the
198+
P2P protocol `addr` message. The existing message communicates the IP
199+
address or [OnionCat][] encoded Tor hidden service (.onion) name of a
200+
node, its port, and a bitmap of the services the node provides.
201+
However, since the release of the original Bitcoin codebase, Tor has
202+
upgraded their hidden service addresses to use 256 bits, preventing
203+
them from being used in Bitcoin's existing `addr` messages. There are
204+
also other network overlay protocols, such as I2P, that also use
205+
longer addresses. The proposed BIP, if implemented, will provide
206+
support for these protocols.
207+
208+
- **Optech publishes book chapter about payment batching:** paying
209+
multiple people in the same transaction can reduce the average
210+
transaction fee cost per payment by more than 70%. The technique is
211+
especially convenient for high-frequency spenders such as exchanges.
212+
As part of Optech's ongoing work to create a guide to
213+
individually-deployable scaling techniques, we're publishing our [draft
214+
chapter][batching chapter] that describes this technique and its
215+
tradeoffs in detail.
216+
217+
## Notable code and documentation changes
218+
219+
*Notable changes this week in [Bitcoin Core][bitcoin core repo],
220+
[LND][lnd repo], [C-Lightning][c-lightning repo], [Eclair][eclair repo],
221+
[libsecp256k1][libsecp256k1 repo], and [Bitcoin Improvement Proposals
222+
(BIPs)][bips repo]. Note that Bitcoin Core currently has work being
223+
performed on both its master development branch and the branch for the
224+
upcoming 0.18 release, so we've noted which branch each Bitcoin Core
225+
merge affected.*
226+
227+
- [Bitcoin Core #15118][] generalizes how Bitcoin Core stores and
228+
retrieves data associated with blocks and UTXO changes in order to
229+
make it easier for new methods to store and retrieve other information
230+
in the same way. This was done to allow reusing that mechanism for
231+
storing [BIP157][] compact block filters on disk. This is currently
232+
part of the master development branch only.
233+
234+
- [Bitcoin Core #15492][] removes the deprecated `generate` RPC used for
235+
creating blocks in regtest mode. This RPC was previously superseded by
236+
the `generatetoaddress` RPC which doesn't require the node to be built
237+
or run with wallet support. This is part of the master development
238+
branch only.
239+
240+
- [Bitcoin Core #15497][] changes the use of [output script
241+
descriptors][] in multiple RPCs to use consistent range notation for
242+
deriving multiple addresses from a descriptor with a [BIP32][] HD
243+
wallet path. This is part of the 0.18 branch and 0.18.0RC1 release.
244+
245+
- [LND #2690][] puts more gossip traffic in a queue (rather than sending
246+
it immediately) so that higher-priority information is more likely to
247+
be handled quickly. Gossip traffic is used for communicating which
248+
peers are on the network and what channels they have available.
249+
250+
- [C-Lightning #2391][] removes the `address` field from the `newaddr`
251+
RPC and replaces it with either a `bech32` field or a `p2sh-segwit` field
252+
depending on the address type requested (or both fields if an optional
253+
`all` parameter is passed to the RPC). The address type in each field
254+
is consistent with its name.
255+
256+
{% include references.md %}
257+
{% include linkers/issues.md issues="7225,9765,15118,15492,15497,2690,2391" %}
258+
[core eol]: https://bitcoincore.org/en/lifecycle/#schedule
259+
[0.18.0]: https://bitcoincore.org/bin/bitcoin-core-0.18.0/
260+
[bishop list]: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-March/016700.html
261+
[merkle disclosure]: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-February/016697.html
262+
[list feb]: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-February/date.html
263+
[list mar]: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-March/date.html
264+
[daftuar pdf]: http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20190225/a27d8837/attachment-0001.pdf
265+
[roconnor codesep]: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-March/016724.html
266+
[roconnor sighash]: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-March/016725.html
267+
[core contact]: https://bitcoincore.org/en/contact/
268+
[signet]: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-March/016734.html
269+
[falke bip61]: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-March/016701.html
270+
[bip-cleanup]: https://github.com/TheBlueMatt/bips/blob/cleanup-softfork/bip-XXXX.mediawiki
271+
[psbt extension]: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-March/016713.html
272+
[privacy summary]: https://en.bitcoin.it/wiki/Privacy
273+
[privacy category]: https://en.bitcoin.it/wiki/Category:Privacy
274+
[addrv2 proposal]: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-February/016687.html
275+
[onioncat]: https://web.archive.org/web/20121122003543/http://www.cypherpunk.at/onioncat/wiki/OnionCat
276+
[batching chapter]: https://github.com/bitcoinops/scaling-book/blob/master/x.payment_batching/payment_batching.md
277+
[gui 0.18]: https://github.com/bitcoin/bitcoin/pulls?utf8=%E2%9C%93&q=is%3Apr+label%3AGUI+milestone%3A0.18.0

0 commit comments

Comments
 (0)