Skip to content

Commit e0283b1

Browse files
authored
Merge pull request #126 from harding/2019-03-26-newsletter
Newsletters: add #39 (2019-03-26)
2 parents b0e3ff3 + 8e02da4 commit e0283b1

File tree

3 files changed

+268
-1
lines changed

3 files changed

+268
-1
lines changed

_includes/references.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ for details --> {% endcomment %}
4444
{% comment %}<!-- Later link definitions supersede earlier definitions.
4545
When more recent information about a BIP is available not in the regular
4646
place, put links here. -->{% endcomment %}
47-
[BIP151]: https://gist.github.com/jonasschnelli/c530ea8421b8d0e80c51486325587c52
4847

4948
{% comment %}<!-- BOLTs in order lowest to highest -->{% endcomment %}
5049
[BOLT2]: https://github.com/lightningnetwork/lightning-rfc/blob/master/02-peer-protocol.md
@@ -114,6 +113,8 @@ place, put links here. -->{% endcomment %}
114113
[newsletter #36]: {{news36}}
115114
{% assign news37 = "/en/newsletters/2019/03/12/" %}
116115
[newsletter #37]: {{news37}}
116+
{% assign news38 = "/en/newsletters/2019/03/19/" %}
117+
[newsletter #37]: {{news38}}
117118

118119
{% comment %}
119120
<!--REQUIRES PERIODIC UPDATE: update rpc_version below to latest
Lines changed: 266 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,266 @@
1+
---
2+
title: 'Bitcoin Optech Newsletter #39'
3+
permalink: /en/newsletters/2019/03/26/
4+
name: 2019-03-26-newsletter
5+
type: newsletter
6+
layout: newsletter
7+
lang: en
8+
---
9+
This week's newsletter links to a proposal to encrypt P2P communication
10+
and describes Lightning Loop, a tool and service for withdrawing
11+
bitcoins from an LN channel to an onchain transaction. Also included
12+
are links to resources about bech32 adoption, summaries of popular
13+
questions and answers from Bitcoin StackExchange, and a list of notable
14+
code changes in popular Bitcoin infrastructure projects.
15+
16+
## Action items
17+
18+
- **Help test Bitcoin Core 0.18.0 RC2:** The second Release Candidate
19+
(RC) for the next major version of Bitcoin Core has been [released][0.18.0].
20+
Testing is still needed by organizations and experienced users who
21+
plan to run the new version of Bitcoin Core in production. Use [this
22+
issue][Bitcoin Core #15555] for reporting feedback.
23+
24+
## News
25+
26+
- **Version 2 P2P transport proposal:** Jonas Schnelli sent a [proposed
27+
BIP][v2 transport] to the Bitcoin-Dev mailing list that specifies an algorithm to be
28+
used to encrypt traffic between peers. It also specifies some other
29+
minor changes to the creation of protocol messages, such as allowing
30+
peers to use bandwidth-saving short identifiers and eliminating the
31+
SHA256-based checksum on messages, as the [AEAD][]-based encryption
32+
scheme protects data integrity. The proposal is meant to replace
33+
[BIP151][] and it contains links to an example implementation for
34+
Bitcoin Core and some benchmarks. See [Newsletter #10][] for previous
35+
discussion about P2P protocol encryption.
36+
37+
- **Loop announced:** Lightning Labs [announced][loop announced] a new
38+
tool and service to facilitate *submarine swaps*, HTLC-based atomic
39+
swaps of offchain bitcoins for onchain bitcoins. In essence, Alice
40+
sends Bob an LN payment secured by a secret she knows, preventing Bob
41+
from claiming it. Bob then creates an onchain payment that Alice can
42+
spend by revealing the secret. Alice waits for the payment to receive
43+
a suitable number of confirmations and then spends it onchain to any
44+
address she chooses---revealing the secret in the process. Bob sees
45+
Alice's onchain transaction and uses its revealed secret to claim the
46+
LN payment Alice sent him earlier. If Alice doesn't reveal the secret,
47+
the onchain payment contains a refund condition that allows Bob to
48+
spend it back to himself after a timelock expires.
49+
50+
Most of the process is trustless, so neither party has an
51+
opportunity to steal from the other (provided the software operates
52+
(and is operated) correctly). The exception is the creation of the
53+
initial onchain transaction and the possible need for Bob to create
54+
a refund transaction: if the trustless exchange doesn't happen, Bob
55+
will receive no compensation for the onchain transaction fees
56+
required for both of those transactions. According to the [Loop
57+
documentation][], their implementation has Alice send Bob a small
58+
trusted payment via LN in advance of the trustless exchange as an act of
59+
good faith and an assurance that the operation won't end up costing
60+
Bob money.
61+
62+
By allowing Alice and Bob to swap onchain and offchain funds, all
63+
while continuing to use their existing channels, Loop helps users
64+
keep their channels open longer and makes it conceivable that they
65+
could stay open indefinitely.
66+
67+
- **Square Crypto developer group announced:** the CEO of Square
68+
[announced on Twitter][sqcrypto announced] that they are forming a
69+
group to employ several contributors to open source Bitcoin projects,
70+
including both developers and a designer. See their announcement for
71+
application instructions. (Note: Square is also a sponsoring member
72+
of Optech.)
73+
74+
## Bech32 sending support
75+
76+
*Week 2 of 24. From now until the second anniversary of the segwit soft
77+
fork lock-in on 24 August 2019, the Optech Newsletter will contain this
78+
weekly section that provides information to help developers and
79+
organizations implement bech32 sending support---the ability to pay
80+
native segwit addresses. This [doesn't require implementing
81+
segwit][bech32 easy] yourself, but it does allow the people you pay to
82+
access all of segwit's multiple benefits.*
83+
84+
As described [last week][bech32 easy], implementing just segwit
85+
spending should be easy. Yet we suspect some managers might wonder
86+
whether there are enough people using segwit to justify their team
87+
spending development effort on it. This week, we look at sites that
88+
track various segwit adoption statistics so that you can decide whether
89+
it's popular enough that your wallet or service might become an outlier
90+
by failing to support it soon.
91+
92+
Optech tracks statistics about segwit use on our [dashboard][optech
93+
dashboard]; another site tracking related statistics is [P2SH.info][].
94+
We see an average of about 200 outputs per block are sent to native
95+
segwit addresses (bech32). Those outputs are then spent in about 10% of all
96+
Bitcoin transactions. That makes payments involving native segwit addresses
97+
more popular than almost all altcoins.
98+
99+
![Screenshot of Optech Dashboard segwit usage stats](/img/posts/2019-03-segwit-usage.png)
100+
101+
However, many wallets want to use segwit but still need to deal with
102+
services that don't yet have bech32 sending support. These wallets can
103+
generate a P2SH address that references their segwit details, which is
104+
less efficient than using bech32 but more efficient than not using
105+
segwit at all. Because these are normal P2SH addresses, we can't tell
106+
just by looking at transaction outputs which P2SH addresses are
107+
pre-segwit P2SH outputs and which contain a nested segwit
108+
commitment, and so we don't know the actual number of payments to
109+
nested-segwit addresses. However, when one of these outputs is spent,
110+
the spender reveals whether the output was segwit. The above statistics
111+
sites report that currently about 37% of transactions contain at least
112+
one spend from a nested-segwit output. That corresponds to about 1,400
113+
outputs per block on average.
114+
115+
Any wallet that supports P2SH nested segwit addresses also likely
116+
supports bech32 native addresses, so the number of transactions made by
117+
wallets that want to take advantage of bech32 sending support is
118+
currently over 45% and rising.
119+
120+
To further gauge segwit popularity, you might also want to know which
121+
notable Bitcoin wallets and services support it. For that, we recommend
122+
the community-maintained [bech32 adoption][] page on the Bitcoin Wiki or
123+
the [when segwit][] page maintained by BRD wallet.
124+
125+
The statistics and compatibility data show that segwit is already well
126+
supported and frequently used, but that there are a few notable holdouts
127+
that haven't yet provided support. It's our hope that our campaign and
128+
other community efforts will help convince the stragglers to catch up on
129+
bech32 sending support so that all wallets that want to take advantage
130+
of native segwit can do so in the next few months.
131+
132+
## Selected Q&A from Bitcoin StackExchange
133+
134+
*[Bitcoin StackExchange][bitcoin.se] is one of the first places Optech
135+
contributors look for answers to their questions---or when we have a
136+
few spare moments of time to help curious or confused users. In
137+
this monthly feature, we highlight some of the top voted questions and
138+
answers made since our last update.*
139+
140+
{% comment %}<!-- https://bitcoin.stackexchange.com/search?tab=votes&q=created%3a1m..%20is%3aanswer -->{% endcomment %}
141+
{% assign bse = "https://bitcoin.stackexchange.com/a/" %}
142+
143+
- Multiple questions about LN transport security: Rene Pickhardt asked
144+
several questions about the encryption used to communicate LN
145+
messages, such as [why is message length encrypted?]({{bse}}85259) and
146+
[what's special about ChaCha20-Poly1305?]({{bse}}84953). The answers
147+
to these questions may be especially interesting in the context of the
148+
proposed BIP for a Bitcoin P2P encrypted transport protocol, which is
149+
planned to use the same cipher.
150+
151+
- Multiple questions about Schnorr-based signatures: Pickhard also asked
152+
several question about [BIP-Schnorr][], [Taproot][], and the plans to
153+
make those features available to Bitcoin transactions. See [will
154+
Schnorr allow a single signature per block?]({{bse}}85213) and [does
155+
MuSig have the same security as current Bitcoin
156+
multisig?]({{bse}}85101).
157+
158+
- [How were the parameters for the secp256k1 curve
159+
chosen?]({{bse}}85387) This is the elliptical curve used in Bitcoin.
160+
Some curve parameters play an important role in security, so it's
161+
useful to know whether those parameters were chosen wisely. Other
162+
parameters don't matter much for security, but their history might be
163+
interesting anyway. In his answer, Gregory Maxwell provides the
164+
history he's learned so far, an explanation of why the still-open
165+
questions don't affect security, and why we might never learn any more
166+
about the origin of certain curve parameters.
167+
168+
- [What addresses should I support when developing a
169+
wallet?]({{bse}}84978) A developer asks whether he should support both
170+
P2PKH (`1foo...`) addresses and P2SH-wrapped segwit (`3bar...`)
171+
addresses, or whether it's safe to just provide the P2SH address.
172+
Andrew Chow answers that just the P2SH address is enough. Gregory
173+
Maxwell extends this by saying that, if developer did decide to
174+
display two addresses, a better combination would be the P2SH-wrapped
175+
segwit address and a native segwit (bech32) address (`bc1baz...`).
176+
177+
## Notable code and documentation changes
178+
179+
*Notable changes this week in [Bitcoin Core][bitcoin core repo],
180+
[LND][lnd repo], [C-Lightning][c-lightning repo], [Eclair][eclair repo],
181+
[libsecp256k1][libsecp256k1 repo], and [Bitcoin Improvement Proposals
182+
(BIPs)][bips repo].*
183+
184+
- [Bitcoin Core #10973][] makes Bitcoin Core's built-in wallet component access
185+
information about the block chain through a well-defined interface
186+
rather than directly accessing functions and variables on the node component.
187+
There are no user-visible changes associated
188+
with this update, but the merge is notable because it's the last of a
189+
set of foundational refactorings that should make it easy for
190+
future changes to run the node and the wallet/GUI in separate
191+
processes (see [Bitcoin Core #10102][] for one approach to this), as
192+
well as improving the modularity of the Bitcoin Core codebase and
193+
allowing more focused component testing.
194+
Besides laying the groundwork for major changes to come, this PR is
195+
notable for being open for over a year and a half, receiving almost
196+
200 code-review comments and replies, and requiring over 150 updates
197+
and rebases. Optech thanks the PR author, Russell Yanofsky, for his
198+
amazing dedication in seeing this PR through to merge.
199+
200+
- [Bitcoin Core #15617][] omits sending `addr` messages containing the
201+
IP addresses of peers the node currently has on its ban-list. This
202+
prevents your node from telling other nodes about peers it found
203+
to be abusive.
204+
205+
- [Bitcoin Core #13541][] modifies the `sendrawtransaction` RPC to
206+
replace the `allowhighfees` parameter with a `maxfeerate` parameter.
207+
The earlier parameter, if set to true, would send the transaction even
208+
if the total fee exceeded the amount set by the `maxtxfee`
209+
configuration option (default: 0.1 BTC). The new parameter takes a
210+
feerate and will reject the transaction if its feerate is above the
211+
provided value (regardless of the setting for `maxtxfee`). If no
212+
value is provided, it'll only send the transaction if its fee is
213+
below the `maxtxfee` total.
214+
215+
- [LND #2765][] changes how the LN node responds to channel breaches
216+
(attempted theft). Previously, if an attempted breach was detected,
217+
the node created a breach remedy transaction to collect all funds
218+
associated with that channel. However, when users start using
219+
watchtowers, the watchtower may create a breach remedy transaction
220+
but not include all the possible funds. (This doesn't mean the
221+
watchtower is malicious: your node may simply not have had a chance to
222+
tell the watchtower about the latest commitments it accepted.) This PR
223+
updates the logic used to generate the breach remedy transaction so
224+
that it only collects the funds that haven't been collected by prior
225+
breach remedy transactions, allowing recovery of any funds the
226+
watchtower didn't collect.
227+
228+
- [LND #2691][] increases the default address look-ahead value during
229+
recovery from 250 to 2,500. This is the number of keys derived from
230+
an HD seed that the wallet uses when rescanning the block chain for
231+
your funds. Previously, if your node gave out more than 250 addresses
232+
or pubkeys without any of them being used, your node would not find
233+
your complete balance on its first rescan, requiring you to initiate
234+
additional attempts. Now, you'd need to give out more than 2,500
235+
addresses before reiteration might become necessary. An earlier
236+
version of this PR wanted to set this value to 25,000, but there were
237+
concerns that this would significantly slow down rescanning with the
238+
BIP158 Neutrino implementation, so the value was decreased until it
239+
could be shown that people needed a value that high. (Note: checking
240+
addresses against a BIP158 filter is very fast by itself; the problem
241+
is that any match requires downloading and scanning the associated
242+
block---even if it's a false-positive match. The more addresses you
243+
check, the greater the number of expected false positives, so scanning
244+
becomes slower and requires more bandwidth.)
245+
246+
- [C-Lightning #2470][] modifies the recently-added `setchannelfee` RPC
247+
so that "all" can be passed instead of a specific node's id in order
248+
to set the routing fee for all channels.
249+
250+
- [Eclair #826][] updates Eclair to be compatible with Bitcoin Core 0.17
251+
and upcoming 0.18, dropping support for 0.16.
252+
253+
{% include references.md %}
254+
{% include linkers/issues.md issues="10973,15617,13541,2765,2691,2470,826,15555,10102" %}
255+
[0.18.0]: https://bitcoincore.org/bin/bitcoin-core-0.18.0/
256+
[aead]: https://en.wikipedia.org/wiki/Authenticated_encryption
257+
[loop announced]: https://blog.lightning.engineering/posts/2019/03/20/loop.html
258+
[loop documentation]: https://github.com/lightninglabs/loop/blob/master/docs/architecture.md
259+
[sqcrypto announced]: https://twitter.com/jack/status/1108487911802966017
260+
[bech32 easy]: {{news38}}#bech32-sending-support
261+
[optech dashboard]: https://dashboard.bitcoinops.org/
262+
[p2sh.info]: https://p2sh.info/
263+
[bech32 adoption]: https://en.bitcoin.it/wiki/Bech32_adoption
264+
[when segwit]: https://whensegwit.com/
265+
[taproot]: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-January/015614.html
266+
[v2 transport]: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-March/016806.html

img/posts/2019-03-segwit-usage.png

65.4 KB
Loading

0 commit comments

Comments
 (0)