|
| 1 | +--- |
| 2 | +title: 'Bitcoin Optech Newsletter #28' |
| 3 | +permalink: /en/newsletters/2019/01/08/ |
| 4 | +name: 2019-01-08-newsletter |
| 5 | +type: newsletter |
| 6 | +layout: newsletter |
| 7 | +lang: en |
| 8 | +--- |
| 9 | +This week's newsletter announces a new maintenance release of Bitcoin |
| 10 | +Core, describes continued discussion about new signature hashes, and |
| 11 | +links to a post about possible economic barriers to LN payments crossing |
| 12 | +different currencies. Descriptions of notable code changes in popular |
| 13 | +Bitcoin infrastructure projects are also provided. |
| 14 | + |
| 15 | +## Action items |
| 16 | + |
| 17 | +- **Upgrade to Bitcoin Core 0.17.1:** this new [minor][maintenance] |
| 18 | + version released December 25th restores some previously-deprecated |
| 19 | + functionality to the `listtransactions` RPC and includes bug fixes and |
| 20 | + other improvements. Consider reading the [release notes][0.17.1 |
| 21 | + notes] and [upgrading][0.17.1 bin]. |
| 22 | + |
| 23 | +## News |
| 24 | + |
| 25 | +- **Continued sighash discussion:** as mentioned in the News section of |
| 26 | + [Newsletter #25][], developers on the Bitcoin-Dev mailing list |
| 27 | + discussed how signature hashes could be modified to give transactions |
| 28 | + access to new capabilities. Sighashes give spenders the ability to |
| 29 | + allow their transactions to be modified in specified ways after they |
| 30 | + are signed---for example, two people who open a payment channel |
| 31 | + together can use a particular type of sighash to allow either one of |
| 32 | + them to unilaterally attach additional transaction fees to a channel |
| 33 | + close transaction. |
| 34 | + |
| 35 | + The most recent discussion in this thread of almost 70 posts has |
| 36 | + mostly involved edge cases related to new sighash flags, |
| 37 | + particularly a BIP118-like `SIGHASH_NOINPUT_UNSAFE`. As part of the |
| 38 | + discussion, protocol developer Johnson Lau described an |
| 39 | + [optimization for Eltoo-based payment channels][lau bip68]. Also |
| 40 | + [discussed][rm codesep] is whether the `OP_CODESEPARATOR` opcode |
| 41 | + should be disabled in a script update that supports MAST (e.g. via |
| 42 | + Taproot). That opcode is not in common use, but if you plan to use |
| 43 | + it in future Script versions, you should comment on the thread. |
| 44 | + |
| 45 | +- **Cross-chain LN as an options contract:** pseudonymous LN |
| 46 | + contributor ZmnSCPxj started a thread on the Lightning-Dev mailing |
| 47 | + list pointing out that users could abuse payments that cross |
| 48 | + currencies to create almost free [short-term options contracts][] by |
| 49 | + delaying payment settlement. A [previous thread][cjp risk] by Corné |
| 50 | + Plooy in May 2018 described the same thing. |
| 51 | + |
| 52 | + For example, Mallory learns that Bob is willing to route payments |
| 53 | + from Bitcoin to Litecoin, so she sends a payment from one of her |
| 54 | + Bitcoin nodes through Bob to one of her Litecoin nodes. If this |
| 55 | + were a normal payment, she'd settle it immediately by releasing the |
| 56 | + preimage for the payment's hashlock---but instead her node delays |
| 57 | + for 24 hours waiting for the exchange rate to change. If the |
| 58 | + exchange rate increases in Litecoin's favor, Mallory settles the |
| 59 | + payment and receives litecoin today at yesterday's exchange rate. |
| 60 | + If the exchange rate stays the same or increases in Bitcoin's favor, |
| 61 | + Mallory causes the payment to fail and gets her bitcoin back. Since |
| 62 | + no fees are charged for failed payments, Mallory received an |
| 63 | + opportunity to temporarily lock-in the price of Litecoin for nothing |
| 64 | + but the cost of owning the bitcoins Mallory would've traded. |
| 65 | + |
| 66 | + There currently aren't any known cross-currency LN nodes, but the |
| 67 | + availability of this trick means that future such nodes could be |
| 68 | + abused for speculation rather than payment routing. If this turns |
| 69 | + out to be a real problem and if an acceptable solution isn't found, |
| 70 | + it may be the case that payment channel networks for different |
| 71 | + currencies will be isolated from each other. |
| 72 | + |
| 73 | +## Notable code changes |
| 74 | + |
| 75 | +*Notable code changes this week in [Bitcoin Core][core commits], |
| 76 | +[LND][lnd commits], [C-lightning][cl commits], and [libsecp256k1][secp |
| 77 | +commits].* |
| 78 | + |
| 79 | +- [Bitcoin Core #14565][] significantly improves the error handling for |
| 80 | + the `importmulti` RPC and will return a `warnings` field for each |
| 81 | + attempted import with an array of strings describing any problems with |
| 82 | + the that import (but only if there were any problems). |
| 83 | + |
| 84 | +- [Bitcoin Core #14811][] updates the [getblocktemplate][rpc |
| 85 | + getblocktemplate] RPC to require that the segwit flag be passed. This |
| 86 | + helps prevent miners from accidentally not using segwit, which reduces |
| 87 | + their fee income. See [Newsletter #20][] for a recent instance where |
| 88 | + this may have happened to a large mining pool. |
| 89 | + |
| 90 | +- [Bitcoin Core #14336][] changes the system call (syscall) Bitcoin Core |
| 91 | + uses to handle network connections and other resources on platforms |
| 92 | + that support an alternative syscall (only Linux for now). On a |
| 93 | + Debian GNU/Linux x86_64 system tested by Optech, this increased the |
| 94 | + maximum allowed number of connections from 865 to 9,999. Please note, |
| 95 | + developers strongly advise against increasing the maximum number of |
| 96 | + connections unless you have a special need for more connections. For |
| 97 | + each peer you have after your first peer, you increase the amount of |
| 98 | + bandwidth overhead used by your node and by all of your peers. The |
| 99 | + default minimum of 8 and maximum of 125 peers were chosen to provide |
| 100 | + enough connections to ensure robust relaying but also to not create so |
| 101 | + much bandwidth overhead that the network would be excessively |
| 102 | + wasteful. As relay improvements are implemented (see the News section |
| 103 | + of [Newsletter #26][]), Bitcoin Core developers may adjust these |
| 104 | + defaults. |
| 105 | + |
| 106 | +- [C-Lightning #2172][] allows `lightningd` to be shutdown normally even |
| 107 | + if it's operating as the primary process (PID 1), which can be useful |
| 108 | + in Docker containers. |
| 109 | + |
| 110 | +- [C-Lightning #2188][] adds notification subscription handlers that can |
| 111 | + be used by plugins, with initial support for notifications that the |
| 112 | + node has connected to a new peer or disconnected from an existing |
| 113 | + peer. The [plugin documentation][cl plugin event] and [sample |
| 114 | + plugin][cl helloworld.py] have been updated for these handlers. |
| 115 | + |
| 116 | +- [LND #2374][] increases the maximum size of the gRPC messages the |
| 117 | + `lncli` tool will accept from 4 MB to 50 MB. This fixes a problem |
| 118 | + some nodes were encountering where the `describegraph` RPC was failing |
| 119 | + due to the network having grown so large that messages exceeded this |
| 120 | + limit. Developers using gRPC directly will need to increase their |
| 121 | + client-side maximum message size setting---descriptions of how to do |
| 122 | + this have already been added as comments to the PR for python and nodejs. |
| 123 | + Ultimately it's expected that the network will grow large enough to |
| 124 | + exceed even this new maximum, so developers are planning to revamp the |
| 125 | + relevant RPCs to handle this situation. |
| 126 | + |
| 127 | +- [LND #2354][] adds a new `invoicestate` field and deprecates the former |
| 128 | + `settled` field in RPCs that get information about invoices. The |
| 129 | + settled field was boolean but the new state field can support multiple |
| 130 | + values. Currently this is just "open" or "settled", but additional |
| 131 | + future states are planned. |
| 132 | + |
| 133 | +{% include references.md %} |
| 134 | +{% include linkers/issues.md issues="14565,14811,14336,2172,2188,2374,2354" %} |
| 135 | +{% include linkers/github-log.md |
| 136 | + refname="core commits" |
| 137 | + repo="bitcoin/bitcoin" |
| 138 | + start="34241716852df6ea6a3543822f3bf6f886519d4b" |
| 139 | + end="fe5a70b9fefa0548f497a749746f53f3d7fd0ebb" |
| 140 | +%} |
| 141 | +{% include linkers/github-log.md |
| 142 | + refname="lnd commits" |
| 143 | + repo="lightningnetwork/lnd" |
| 144 | + start="0fafd5e2fd824f38ec6a03a56488de9c0798f34f" |
| 145 | + end="3c950e8f0dc103feeffd9c42c9683e1164b4e8d8" |
| 146 | +%} |
| 147 | +{% include linkers/github-log.md |
| 148 | + refname="cl commits" |
| 149 | + repo="ElementsProject/lightning" |
| 150 | + start="2c53572798f78ce2a66aced0627b7b3f2adb0514" |
| 151 | + end="6f027a24a04912859f44c314bf00e9d3fcb27500" |
| 152 | +%} |
| 153 | +{% include linkers/github-log.md |
| 154 | + refname="secp commits" |
| 155 | + repo="bitcoin-core/secp256k1" |
| 156 | + start="e34ceb333b1c0e6f4115ecbb80c632ac1042fa49" |
| 157 | + end="e34ceb333b1c0e6f4115ecbb80c632ac1042fa49" |
| 158 | +%} |
| 159 | + |
| 160 | +[0.17.1 bin]: https://bitcoincore.org/bin/bitcoin-core-0.17.1/ |
| 161 | +[0.17.1 notes]: https://bitcoincore.org/en/releases/0.17.1/ |
| 162 | +[maintenance]: https://bitcoincore.org/en/lifecycle/#maintenance-releases |
| 163 | +[lau bip68]: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-December/016574.html |
| 164 | +[rm codesep]: https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-December/016581.html |
| 165 | +[short-term options contracts]: https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-December/001752.html |
| 166 | +[cjp risk]: https://lists.linuxfoundation.org/pipermail/lightning-dev/2018-May/001292.html |
| 167 | +[cl plugin event]: https://github.com/ElementsProject/lightning/blob/master/doc/plugins.md#event-notifications |
| 168 | +[cl helloworld.py]: https://github.com/ElementsProject/lightning/blob/master/contrib/plugins/helloworld.py |
0 commit comments