{"id":15447,"date":"2021-07-28T15:51:53","date_gmt":"2021-07-28T15:51:53","guid":{"rendered":"http:\/\/ci02894301100025a3"},"modified":"2025-10-01T15:33:07","modified_gmt":"2025-10-01T20:33:07","slug":"stack-exchange-and-taproot-optech","status":"publish","type":"post","link":"https:\/\/bitcoinmagazine.com\/technical\/stack-exchange-and-taproot-optech","title":{"rendered":"Bitcoin Optech #159: Stack Exchange And Taproot"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><em>The Bitcoin Optech newsletter provides readers with a top-level summary of the most important technical news happening in Bitcoin, along with resources that help them learn more. To help our readers stay up-to-date with Bitcoin, we&#8217;re republishing the latest issue of this newsletter below. Remember to subscribe to receive this content straight to your inbox.<\/em><\/p>\n<p>This week\u2019s newsletter includes our regular sections with the best questions and answers of the past month from the Bitcoin Stack Exchange, our latest column about preparing for taproot, a list of new software releases and release candidates, and descriptions of notable changes to popular Bitcoin infrastructure software.<\/p>\n<h2>News<\/h2>\n<p><em>No significant news this week.<\/em><\/p>\n<h2>Selected Q&amp;A from Bitcoin Stack Exchange<\/h2>\n<p><a href=\"https:\/\/bitcoin.stackexchange.com\/\" target=\"_blank\" rel=\"noopener\"><em>Bitcoin Stack Exchange<\/em><\/a><em> is one of the first places Optech contributors look for answers to their questions\u2014or when we have a few spare moments to help curious or confused users. In this monthly feature, we highlight some of the top-voted questions and answers posted since our last update.<\/em><\/p>\n<ul>\n<li><strong><a href=\"https:\/\/bitcoin.stackexchange.com\/a\/107603\" target=\"_blank\" rel=\"noopener\">What is this unusual transaction in the Bitcoin blockchain?<\/a>&nbsp;<\/strong>Murch describes an output labeled \u201cUNKNOWN\u201d in a <a href=\"https:\/\/bitcoinops.org\/en\/topics\/block-explorers\/\" target=\"_blank\" rel=\"noopener\">block explorer<\/a>. The output is a segwit version 1 output with a contrived pubkey. As pointed out by 0xb10c, the 2019 transaction creating this output was for the purpose of testing segwit v1 support for <a href=\"https:\/\/bitcoinops.org\/en\/compatibility\/\" target=\"_blank\" rel=\"noopener\">Optech\u2019s Compatibility Matrix<\/a>. As warned previously (see <a href=\"https:\/\/bitcoinops.org\/en\/newsletters\/2021\/07\/21\/#preparing-for-taproot-5-why-are-we-waiting\" target=\"_blank\" rel=\"noopener\">Newsletter #158<\/a>), P2TR outputs are anyone-can-spend before the activation of taproot, as 0xb10c demonstrated and <a href=\"https:\/\/b10c.me\/blog\/007-spending-p2tr-pre-activation\/\" target=\"_blank\" rel=\"noopener\">elaborates in a blog post<\/a>.<\/li>\n<li><strong><a href=\"https:\/\/bitcoin.stackexchange.com\/a\/107443\" target=\"_blank\" rel=\"noopener\">What are miners signalling for when the block header nversion field ends in 4 i.e. 0x3fffe004?<\/a>&nbsp;<\/strong>While researching the overt form of ASICBoost, user shikaridota wonders why recently mined blocks have bit 2 being set in the nVersion field. Andrew Chow points out that <a href=\"https:\/\/bitcoinops.org\/en\/topics\/taproot\/\" target=\"_blank\" rel=\"noopener\">taproot<\/a> used bit 2 to signal for activation as specified in <a href=\"https:\/\/github.com\/bitcoin\/bips\/blob\/master\/bip-0341.mediawiki#deployment\" target=\"_blank\" rel=\"noopener\">BIP341\u2019s deployment<\/a> section.<\/li>\n<li><strong><a href=\"https:\/\/bitcoin.stackexchange.com\/a\/107407\" target=\"_blank\" rel=\"noopener\">Where can I find Bitcoin\u2019s alpha version with 15 minute block time intervals?<\/a> <\/strong>Andrew Chow points to a <a href=\"https:\/\/bitcointalk.org\/index.php?topic=382374.msg4108739#msg4108739\" target=\"_blank\" rel=\"noopener\">selection of source code<\/a>, allegedly from Satoshi, which contains 15 minute block times as well as 30 day retargeting periods.<\/li>\n<li><a href=\"https:\/\/bitcoin.stackexchange.com\/a\/107638\" target=\"_blank\" rel=\"noopener\"><strong>What\u2019s the purpose of using Guix within Gitian? Doesn\u2019t that reintroduce dependencies and security concerns?<\/strong><\/a> Andrew Chow and fanquake describe the benefits of reproducible builds, including using Gitian builds and <a href=\"https:\/\/github.com\/bitcoin\/bitcoin\/blob\/master\/contrib\/guix\/README.md\" target=\"_blank\" rel=\"noopener\">bootstrappable builds using Guix<\/a> and comment on using them together.<\/li>\n<li><strong><a href=\"https:\/\/bitcoin.stackexchange.com\/a\/107418\" target=\"_blank\" rel=\"noopener\">Why are there several round number transactions with no change?<\/a> <\/strong>Shm asks about a series of related transactions that have many inputs with a single round-number output with no change. Murch answers by describing <a href=\"https:\/\/en.bitcoin.it\/wiki\/Techniques_to_reduce_transaction_fees#Change_avoidance\" target=\"_blank\" rel=\"noopener\">change avoidance<\/a> in the context of a wallet with a large number of UTXOs. Change avoidance allows for smaller transactions, reduced future fees, UTXO consolidation, and privacy improvements.<\/li>\n<\/ul>\n<h2>Preparing for taproot #6: learn taproot by using it<\/h2>\n<p><em>A weekly <\/em><a href=\"https:\/\/bitcoinops.org\/en\/preparing-for-taproot\/\" target=\"_blank\" rel=\"noopener\"><em>series<\/em><\/a><em> about how developers and service providers can prepare for the upcoming activation of taproot at block height 709,632.<\/em><\/p>\n<p>Almost two years ago, James Chiang and Elichai Turkel produced an <a href=\"https:\/\/github.com\/bitcoinops\/taproot-workshop\" target=\"_blank\" rel=\"noopener\">open source repository<\/a> of Jupyter notebooks for a series of Optech workshops to train developers on <a href=\"https:\/\/bitcoinops.org\/en\/topics\/taproot\/\" target=\"_blank\" rel=\"noopener\">taproot<\/a> technology. Workshops <a href=\"https:\/\/bitcoinops.org\/en\/schorr-taproot-workshop\/\" target=\"_blank\" rel=\"noopener\">held<\/a> in San Francisco, New York City, and London received positive reviews, but travel restrictions prevented subsequent in-person workshops.<\/p>\n<p>Since the publication of the Jupyter notebooks, taproot underwent several changes. However, taproot support was also merged into Bitcoin Core, allowing the notebooks to drop their dependency on a custom branch of Bitcoin Core. Developer Elle Mouton has kindly <a href=\"https:\/\/twitter.com\/ElleMouton\/status\/1418108253096095745\" target=\"_blank\" rel=\"noopener\">updated<\/a> the <a href=\"https:\/\/github.com\/bitcoinops\/taproot-workshop\/pull\/168\" target=\"_blank\" rel=\"noopener\">notebooks<\/a> for all those changes, making them again a great way to quickly build hands-on experience working with taproot\u2019s algorithms and data types.<\/p>\n<p>The notebooks are divided into four sections:<\/p>\n<ul>\n<li>Section 0 contains a notebook that helps you set up your environment, covers the basics of elliptic curve cryptography, and teaches you about the tagged hashes used throughout BIPs <a href=\"https:\/\/github.com\/bitcoin\/bips\/blob\/master\/bip-0340.mediawiki\" target=\"_blank\" rel=\"noopener\">340<\/a>, <a href=\"https:\/\/github.com\/bitcoin\/bips\/blob\/master\/bip-0341.mediawiki\" target=\"_blank\" rel=\"noopener\">341<\/a>, and <a href=\"https:\/\/github.com\/bitcoin\/bips\/blob\/master\/bip-0342.mediawiki\" target=\"_blank\" rel=\"noopener\">342<\/a>.<\/li>\n<li>Section 1 walks you through creating <a href=\"https:\/\/bitcoinops.org\/en\/topics\/schnorr-signatures\/\" target=\"_blank\" rel=\"noopener\">schnorr signatures<\/a>. Once you\u2019ve mastered them, you learn how to create <a href=\"https:\/\/bitcoinops.org\/en\/topics\/multisignature\/\" target=\"_blank\" rel=\"noopener\">multisignatures<\/a> with the <a href=\"https:\/\/bitcoinops.org\/en\/topics\/musig\/\" target=\"_blank\" rel=\"noopener\">MuSig<\/a> protocol.<\/li>\n<li>Section 2 gives you experience with every aspect of taproot. It starts with a review of the principles of segwit v0 transactions and then helps you create and send segwit v1 (taproot) transactions. Applying the knowledge from section 1, you then create and spend a taproot output using MuSig. The concept of key tweaking is introduced and you learn how taproot allows you to use its public key to commit to data. Now that you can create commitments, you learn about <a href=\"https:\/\/bitcoinops.org\/en\/topics\/tapscript\/\" target=\"_blank\" rel=\"noopener\">tapscripts<\/a>\u2014how they differ from legacy and segwit v0 script, and how to commit to a tree of tapscripts. Finally, a short notebook introduces huffman encoding for creating optimal script trees.<\/li>\n<li>Section 3 provides an optional exercise in creating a taproot output that changes which signatures are required the longer the output goes unspent\u2014allowing the output to be efficiently spent under normal circumstances but also providing for a robust backup in case of problems.<\/li>\n<\/ul>\n<p>The notebooks include numerous programming exercises that are relatively easy but which will ensure that you actually learned the material presented. The author of this column, who is no great coder, was able to complete the notebooks in six hours and only regretted that he had not taken the time to learn from them earlier.<\/p>\n<h2>Releases and release candidates<\/h2>\n<p><em>New releases and release candidates for popular Bitcoin infrastructure projects. Please consider upgrading to new releases or helping to test release candidates.<\/em><\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/rust-bitcoin\/rust-bitcoin\/releases\/tag\/0.27.0\" target=\"_blank\" rel=\"noopener\">Rust Bitcoin 0.27.0<\/a> (bech32m support) is a new release. Most notably, it adds support for handling <a href=\"https:\/\/bitcoinops.org\/en\/topics\/bech32\/\" target=\"_blank\" rel=\"noopener\">bech32m<\/a> addresses.<\/li>\n<li><a href=\"https:\/\/github.com\/ElementsProject\/lightning\/releases\/tag\/v0.10.1rc1\" target=\"_blank\" rel=\"noopener\">C-Lightning 0.10.1rc1<\/a> is a release candidate for an upgrade that contains a number of new features, several bug fixes, and a few updates to developing protocols (including <a href=\"https:\/\/bitcoinops.org\/en\/topics\/dual-funding\/\" target=\"_blank\" rel=\"noopener\">dual funding<\/a> and <a href=\"https:\/\/bitcoinops.org\/en\/topics\/offers\/\" target=\"_blank\" rel=\"noopener\">offers<\/a>).<\/li>\n<\/ul>\n<h2>Notable code and documentation changes<\/h2>\n<p><em>Notable changes this week in <\/em><a href=\"https:\/\/github.com\/bitcoin\/bitcoin\" target=\"_blank\" rel=\"noopener\"><em>Bitcoin Core<\/em><\/a><em>, <\/em><a href=\"https:\/\/github.com\/ElementsProject\/lightning\" target=\"_blank\" rel=\"noopener\"><em>C-Lightning<\/em><\/a><em>, <\/em><a href=\"https:\/\/github.com\/ACINQ\/eclair\" target=\"_blank\" rel=\"noopener\"><em>Eclair<\/em><\/a><em>, <\/em><a href=\"https:\/\/github.com\/lightningnetwork\/lnd\/\" target=\"_blank\" rel=\"noopener\"><em>LND<\/em><\/a><em>, <\/em><a href=\"https:\/\/github.com\/rust-bitcoin\/rust-lightning\" target=\"_blank\" rel=\"noopener\"><em>Rust-Lightning<\/em><\/a><em>, <\/em><a href=\"https:\/\/github.com\/bitcoin-core\/secp256k1\" target=\"_blank\" rel=\"noopener\"><em>libsecp256k1<\/em><\/a><em>, <\/em><a href=\"https:\/\/github.com\/bitcoin-core\/HWI\" target=\"_blank\" rel=\"noopener\"><em>Hardware Wallet Interface (HWI)<\/em><\/a><em>, <\/em><a href=\"https:\/\/github.com\/rust-bitcoin\/rust-bitcoin\" target=\"_blank\" rel=\"noopener\"><em>Rust Bitcoin<\/em><\/a><em>, <\/em><a href=\"https:\/\/github.com\/btcpayserver\/btcpayserver\/\" target=\"_blank\" rel=\"noopener\"><em>BTCPay Server<\/em><\/a><em>, <\/em><a href=\"https:\/\/github.com\/bitcoin\/bips\/\" target=\"_blank\" rel=\"noopener\"><em>Bitcoin Improvement Proposals (BIPs)<\/em><\/a><em>, and <\/em><a href=\"https:\/\/github.com\/lightningnetwork\/lightning-rfc\/\" target=\"_blank\" rel=\"noopener\"><em>Lightning BOLTs<\/em><\/a><em>.<\/em><\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/bitcoin\/bitcoin\/issues\/22387\" target=\"_blank\" rel=\"noopener\">Bitcoin Core #22387<\/a> limits the average number of announced addresses it\u2019ll process from each peer to one per 10 seconds. Any addresses in excess of the limit will be ignored. It\u2019s possible to whitelist peers to allow them to exceed this limit, and any address announcements the node explicitly requests from its peers are also excluded from the limit. The limit is estimated to be about 40 times higher than the current rate at which a Bitcoin Core node announces addresses.<\/li>\n<li><a href=\"https:\/\/github.com\/ElementsProject\/lightning\/issues\/4669\" target=\"_blank\" rel=\"noopener\">C-Lightning #4669<\/a> fixes several bugs in its <a href=\"https:\/\/bitcoinops.org\/en\/topics\/offers\/\" target=\"_blank\" rel=\"noopener\">LN offers<\/a> parsing and validation logic. It also returns a previously created offer that hasn\u2019t yet expired if the user attempts to create a new offer with the same parameters; this may be especially useful since offers aren\u2019t created by default with an expiration date.<\/li>\n<li><a href=\"https:\/\/github.com\/ElementsProject\/lightning\/issues\/4639\" target=\"_blank\" rel=\"noopener\">C-Lightning #4639<\/a> adds experimental support for the liquidity advertisements proposed in BOLTs #878. This allows a node to use the LN gossip protocol to advertise its willingness to lease out its funds for a period of time, giving other nodes the ability to buy incoming capacity that allows them to receive instant payments. A node that sees the advertisement can simultaneously pay for and receive the incoming capacity using a <a href=\"https:\/\/bitcoinops.org\/en\/topics\/dual-funding\/\" target=\"_blank\" rel=\"noopener\">dual funded<\/a> channel open. Although there\u2019s no way to enforce that the advertising node actually routes payments, the proposal does incorporate an earlier <a href=\"https:\/\/lists.linuxfoundation.org\/pipermail\/lightning-dev\/2018-November\/001555.html\" target=\"_blank\" rel=\"noopener\">proposal<\/a> also planned to be used in <a href=\"https:\/\/lightning.engineering\/posts\/2020-11-02-pool-deep-dive\/\" target=\"_blank\" rel=\"noopener\">Lightning Pool<\/a> that prevents the advertiser from using their money for other purposes until the agreed upon lease period has concluded, so refusing to route would only deny them the opportunity to earn routing fees. The following table compares liquidity advertisements to the similar Lightning Pool marketplace described in <a href=\"https:\/\/bitcoinops.org\/en\/newsletters\/2020\/11\/11\/#incoming-channel-marketplace\" target=\"_blank\" rel=\"noopener\">Newsletter #123<\/a>.<\/li>\n<\/ul>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2024\/11\/screen-shot-2021-07-28-at-84038-am.png\" title=\"\"><\/figure>\n<ul>\n<li> <a href=\"https:\/\/github.com\/bitcoin\/bips\/issues\/1072\" target=\"_blank\" rel=\"noopener\">BIPs #1072<\/a> merges the informational <a href=\"https:\/\/github.com\/bitcoin\/bips\/blob\/master\/bip-0048.mediawiki\" target=\"_blank\" rel=\"noopener\">BIP48<\/a> titled \u201cMulti-Script Hierarchy for Multi-Sig Wallets\u201d. The document describes a widely deployed derivation standard for wallets participating in multisignature setups based on the <code>m\/48'<\/code> prefix, and elaborates on the six derivation levels used by the scheme.<\/li>\n<li><a href=\"https:\/\/github.com\/bitcoin\/bips\/issues\/1139\" target=\"_blank\" rel=\"noopener\">BIPs #1139<\/a> adds <a href=\"https:\/\/github.com\/bitcoin\/bips\/blob\/master\/bip-0371.mediawiki\" target=\"_blank\" rel=\"noopener\">BIP371<\/a> with a specification of new fields for using <a href=\"https:\/\/bitcoinops.org\/en\/topics\/psbt\/\" target=\"_blank\" rel=\"noopener\">PBSTs<\/a> (both <a href=\"https:\/\/github.com\/bitcoin\/bips\/blob\/master\/bip-0174.mediawiki\" target=\"_blank\" rel=\"noopener\">version 0<\/a> and <a href=\"https:\/\/github.com\/bitcoin\/bips\/blob\/master\/bip-0370.mediawiki\" target=\"_blank\" rel=\"noopener\">version 2<\/a>) with <a href=\"https:\/\/bitcoinops.org\/en\/topics\/taproot\/\" target=\"_blank\" rel=\"noopener\">taproot<\/a> transactions. See <a href=\"https:\/\/bitcoinops.org\/en\/newsletters\/2021\/06\/30\/#psbt-extensions-for-taproot\" target=\"_blank\" rel=\"noopener\">Newsletter #155<\/a> for previous discussion.<\/li>\n<\/ul>\n<p>Find the <a href=\"https:\/\/bitcoinops.org\/en\/newsletters\/2021\/07\/28\/\" target=\"_blank\" rel=\"noopener\">original post here.<\/a> <\/p>\n<p>Please <a href=\"https:\/\/bitcoinops.org\/en\/newsletters\/\" target=\"_blank\" rel=\"noopener\">subscribe to the Bitcoin Optech newsletter<\/a> directly to receive this content straight to your inbox every month.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week\u2019s newsletter features regular sections like Bitcoin Stack Exchange Q&#038;A and the latest column about preparing for Taproot.<\/p>\n","protected":false},"author":3246,"featured_media":10280,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[2887,1075],"class_list":["post-15447","post","type-post","status-publish","format-standard","has-post-thumbnail","category-technical","tag-bitcoin-optech","tag-taproot"],"author_data":{"id":3246,"name":"Bitcoin Optech","nicename":"bitcoin-optech","avatar_url":"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2024\/12\/optech-notext-96x96.png"},"featured_image_url":"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2024\/11\/mining-chips.jpg","_links":{"self":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/posts\/15447","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/users\/3246"}],"replies":[{"embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/comments?post=15447"}],"version-history":[{"count":0,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/posts\/15447\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/media\/10280"}],"wp:attachment":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/media?parent=15447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/categories?post=15447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/tags?post=15447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}