Cointime

Download App
iOS & Android

Bitcoin Optech Newsletter #290

This week’s newsletter describes a proposal for providing DNS-based human-readable Bitcoin payment instructions, summarizes a post with thoughts about mempool incentive compatibility, links to a thread discussing the design of Cashu and other ecash systems, briefly looks at continuing discussion about 64-bit arithmetic in Bitcoin scripts (including a specification for a previously proposed opcode), and gives an overview of an improved reproducible ASMap creation process. Also included are our regular sections describing updates to clients and services, new releases and release candidates, and notable changes to popular Bitcoin infrastructure software.

News

  •  DNS-based human-readable Bitcoin payment instructions: following previous discussions (see Newsletter #278), Matt Corallo posted to Delving Bitcoin a draft BIP that will allow a string like [email protected] to resolve to DNS address such as example.user._bitcoin-payment.example.com, which will return a DNSSEC-signed TXT record containing a BIP21 URI such as bitcoin:bc1qexampleaddress0123456. BIP21 URIs can be extended to support multiple protocols (see the BIP70 payment protocol); for example, the following TXT record could indicate a bech32m address to use as a fallback by simple onchain wallets, a silent payment address to use by onchain wallets that support that protocol, and an LN offerto use by LN-enabled wallets:bitcoin:bc1qexampleaddress0123456?sp=sp1qexampleaddressforsilentpayments0123456&b12=lno1qexampleblindedpathforanoffer... The specifics of the different supported payment protocols are not defined in the draft BIP. Corallo has two other drafts, one a BOLT and one a BLIP for describing details relevant for LN nodes. The BOLT allows a domain owner to set a wildcard record such as *.user._bitcoin-payment.example.com that will resolve to a BIP21 URI containing the parameter of omlookup (onion message lookup) and a blinded path to a particular LN node. A spender wanting to make an offer to [email protected] will then pass the receiver part (example) to that LN node to allow a multiuser node to correctly handle the payment. The BLIP describes an option for allowing any LN node to securely resolve payment instructions for any other node over the LN communication protocol.At the time of writing, most discussion about the proposal could be found on the PR to the BIPs repository. One suggestion was to use an HTTPS solution which might be more accessible to many web developers but would require additional dependencies; Corallo said he will not change this part of the specification, but he did write a small library with a demo website that does all the work for web developers. Another suggestion was to use the existing OpenAlias DNS-based payment address resolution system that is already supported by some Bitcoin software, such as Electrum. A third significantly discussed topic was how addresses should be displayed, e.g. [email protected]@[email protected]example$example.com, etc.
  •  Thinking about mempool incentive compatibility: Suhas Daftuar posted to Delving Bitcoin several insights into the criteria full nodes can use to select which transactions to accept into their mempools, relay to other nodes, and mine for maximal revenue. The post starts from first principles and proceeds to the cutting edge of current research with approachable descriptions that should be accessible to anyone interested in the design of Bitcoin Core’s transaction relay policy. Some of the insights we found most interesting included: Pure replace by feerate doesn’t guarantee incentive compatibility: it seems like replacing a transaction paying a lower feerate with a transaction paying a higher feerate ought to be a strict win for miners. Daftuar provides a simple illustrated example of why that’s not always the case. For previous discussion of pure replace by feerate, see Newsletter #288.Miners with different hashrates have different priorities:a miner with 1% of total network hashrate who forgoes including a particular transaction in their block templates and manages to find the next block will only have a 1% chance of mining an immediate successor block that could include that transaction. This strongly encourages the small miner to collect as much fee as it can now, even if that means it significantly reduces the amount of fee available to miners of future blocks (including itself, potentially).By comparison, a miner with 25% of total network hashrate who forgoes including a transaction in the next block will have a 25% chance of mining an immediate successor block that could include that transaction. This large miner is incentivized to avoid collecting some fees now if doing so is likely to significantly increase the available fees in the future.Daftuar gives an example of two conflicting transactions. The smaller transaction pays a higher feerate; the larger transaction pays more absolute fees. If there aren’t many transactions in the mempool near the feerate of the larger transaction, a block containing it would pay its miner more fees than a block containing the smaller (higher feerate) transaction. However, if there are many transactions in the mempool with similar feerates to the large transaction, a miner with a small share of total network hashrate might be motivated to mine the smaller (higher feerate) version to get as much fee now—but a miner with a larger share of total hashrate might be motivated to wait until it’s profitable to mine the larger (lower feerate) version (or until the spender becomes even more tired of waiting and creates an even higher feerate version). The differing incentives of different miners may imply there’s no universal policy for incentive compatibility. Finding incentive-compatible behaviors that can’t resist DoS attacks would be useful: Daftuar describes how the Bitcoin Core project tries to implement policy rules that are both incentive compatible and resistant to denial-of-service (DoS) attacks. However, he notes “an interesting and valuable area of research would be to determine if there are incentive-compatible behaviors that would not be DoS-resistant to deploy on the entire network (and characterize them, if they exist). If so, such behaviors could introduce an incentive for users to connect directly to miners, which might be mutually beneficial to those parties but harmful to the decentralization of mining on the network overall. […] Understanding those scenarios may also be helpful to us as we try to design incentive-compatible protocols that are DoS-resistant, so that we know where the boundaries are of what is possible.”
  •  Pure replace by feerate doesn’t guarantee incentive compatibility: it seems like replacing a transaction paying a lower feerate with a transaction paying a higher feerate ought to be a strict win for miners. Daftuar provides a simple illustrated example of why that’s not always the case. For previous discussion of pure replace by feerate, see Newsletter #288.
  • Miners with different hashrates have different priorities:a miner with 1% of total network hashrate who forgoes including a particular transaction in their block templates and manages to find the next block will only have a 1% chance of mining an immediate successor block that could include that transaction. This strongly encourages the small miner to collect as much fee as it can now, even if that means it significantly reduces the amount of fee available to miners of future blocks (including itself, potentially).By comparison, a miner with 25% of total network hashrate who forgoes including a transaction in the next block will have a 25% chance of mining an immediate successor block that could include that transaction. This large miner is incentivized to avoid collecting some fees now if doing so is likely to significantly increase the available fees in the future.Daftuar gives an example of two conflicting transactions. The smaller transaction pays a higher feerate; the larger transaction pays more absolute fees. If there aren’t many transactions in the mempool near the feerate of the larger transaction, a block containing it would pay its miner more fees than a block containing the smaller (higher feerate) transaction. However, if there are many transactions in the mempool with similar feerates to the large transaction, a miner with a small share of total network hashrate might be motivated to mine the smaller (higher feerate) version to get as much fee now—but a miner with a larger share of total hashrate might be motivated to wait until it’s profitable to mine the larger (lower feerate) version (or until the spender becomes even more tired of waiting and creates an even higher feerate version). The differing incentives of different miners may imply there’s no universal policy for incentive compatibility.
  •  Finding incentive-compatible behaviors that can’t resist DoS attacks would be useful: Daftuar describes how the Bitcoin Core project tries to implement policy rules that are both incentive compatible and resistant to denial-of-service (DoS) attacks. However, he notes “an interesting and valuable area of research would be to determine if there are incentive-compatible behaviors that would not be DoS-resistant to deploy on the entire network (and characterize them, if they exist). If so, such behaviors could introduce an incentive for users to connect directly to miners, which might be mutually beneficial to those parties but harmful to the decentralization of mining on the network overall. […] Understanding those scenarios may also be helpful to us as we try to design incentive-compatible protocols that are DoS-resistant, so that we know where the boundaries are of what is possible.”
  •  Cashu and other ecash system design discussion: several weeks ago, developer Thunderbiscuit posted to Delving Bitcoin a description of the blind signature scheme behind the Chaumian ecash system used in Cashu, which denominates balances in satoshis and allows sending and receiving money using Bitcoin and LN. Developers Moonsettler and Zmnscpxj replied this week to talk about some of the constraints of the simple version of blind signing and how alternative protocols might be able to provide additional benefits. The discussion was entirely theoretical but we think it could be interesting to anyone curious about ecash-style systems.
  •  Continued discussion about 64-bit arithmetic and OP_INOUT_AMOUNT opcode: several developers have continued discussing a potential future soft fork that could add 64-bit arithmetic operations to Bitcoin (see Newsletter #285). Most discussion since our earlier mention has continued to focus on how to encode 64-bit values in scripts, with the main difference being whether to use a format that minimizes onchain data or a format that’s simplest to operate on programmatically. Also discussed was whether to use signed integers or only allow unsigned integers (for those who don’t know, which seems to include a self-proclaimed advanced Bitcoin innovator, signed integers indicate whatsignthey use (positive sign or negative sign); unsigned integers only allow expressing zero and positive numbers). Additionally considered was whether to allow operating on larger numbers, potentially up to 4,160 bits (which matches the current Bitcoin stack element size limit of 520 bytes).This week, Chris Stewart created a new discussion thread for a draft BIP for an opcode originally proposed as part of OP_TAPLEAF_UPDATE_VERIFY (see Newsletter #166). The opcode, OP_INOUT_AMOUNT pushes to the stack the value of the current input (which is the value of the output it is spending) and the value of output in the transaction that has the same index as this input. For example, if the transaction’s first input is worth 4 million sats, the second input is 3 million sats, the first output pays 2 million sats, and the second output pays 1 million sats, then an OP_INOUT_AMOUNT executed as part of evaluating the second input would put on the stack 3_000_000 1_000_000 (encoded, if we understand the draft BIP correctly, as a 64-bit little-endian unsigned integer, e.g. 0xc0c62d0000000000 0x40420f0000000000). If the opcode were added to Bitcoin in a soft fork, it would make it much easier for contracts to verify that the input and output amounts were within the range expected by the contract, e.g. that a user only withdrew from a joinpool the amount to which they were entitled.
  •  Improved reproducible ASMap creation process: Fabian Jahr posted to Delving Bitcoin about advancements in creating a map of autonomous systems (ASMap) that each control the routing for large parts of the internet. Bitcoin Core currently tries to maintain connections to peers from a diverse collection of subnets of the global namespace so that an attacker will need to obtain IP addresses on each subnet to perform the simplest type of eclipse attack against a node. However, some ISPs and hosting services control IP addresses on multiple subnets, weakening this protection. The ASMap project aims to provide approximate information about which ISPs control which IP addresses directly to Bitcoin Core (see Newsletters #52 and #83). A major challenge faced by this project is allowing multiple contributors to create a map in a reproducible manner, allowing independent verification that its contents were accurate at the time it was created.In this week’s post, Jahr describes the tooling and techniques that he says has “found that there is a good chance that within a group of 5 or more the majority of participants will have the same result. […] This process can be initiated by anyone, very similar to a Core PR. Participants that have a matching result could be interpreted as ACKs. If anyone sees something weird in the result or they simply didn’t get a match, they can ask for the raw data to be shared to investigate further.”If the process is eventually found acceptable (perhaps with additional refinements), it’s possible future versions of Bitcoin Core could be shipped with ASMaps and the feature enabled by default, improving resistance to eclipse attacks.

Changes to services and client software

In this monthly feature, we highlight interesting updates to Bitcoin wallets and services.

Releases and release candidates

New releases and release candidates for popular Bitcoin infrastructure projects. Please consider upgrading to new releases or helping to test release candidates.

Notable code and documentation changes

Notable recent changes in Bitcoin CoreCore LightningEclairLDKLNDlibsecp256k1Hardware Wallet Interface (HWI)Rust BitcoinBTCPay ServerBDKBitcoin Improvement Proposals (BIPs)Lightning BOLTsBitcoin Inquisition, and BINANAs.

  •  Bitcoin Core #27877 updates Bitcoin Core’s wallet with a new coin selection strategy, CoinGrinder (see Newsletter #283). This strategy is intended to be used when estimated feerates are high compared to their long-term baseline, allowing the wallet to create small transactions now (with the consequence that it may need to create larger transactions at a later time, hopefully when feerates are lower).
  •  BOLTs #851 adds support for dual funding to the LN specification along with support for the interactive transaction construction protocol. Interactive construction allows two nodes to exchange preferences and UTXO details that allow them to construct a funding transaction together. Dual funding allows a transaction to include inputs from either or both parties. For example, Alice may want to open a channel with Bob. Before this specification change, Alice had to provide all of the funding for the channel. Now, when using an implementation that supports dual funding, Alice can open a channel with Bob where he provides all of the funding or where they each contribute funds to the initial channel state. This can be combined with the experimental liquidity advertisements protocol, which has not yet been added to the specification.
Comments

All Comments

Recommended for you

  • Another Iranian Oil Tanker Returns to Iran After Breaking US Blockade

    On April 21, according to CCTV News, maritime intelligence company 'TankerTrackers' reported that a tanker belonging to the National Iranian Tanker Company returned to Iran after unloading approximately 2 million barrels of crude oil in Indonesia, crossing the relevant maritime blockade line. The tanker is currently en route to Iran's main oil export hub, Khark Island, and is expected to arrive on April 22 local time. It is reported that the tanker set sail from Iran in late March, heading towards the Riau Islands of Indonesia.

  • White House: US and Iran on the Verge of Reaching an Agreement

    On April 21, White House Press Secretary Kayleigh McEnany stated in an interview with Fox News on the evening of the 20th that the United States and Iran are on the "verge of reaching an agreement." McEnany remarked, "The US has never been closer to achieving a truly good deal." However, she did not disclose any information regarding the current status of the negotiations. McEnany noted that even if an agreement is not reached, President Trump has multiple options and is not afraid to utilize these measures. Previous actions have demonstrated that Trump is not just "bluffing."

  • Kelp DAO Attacker Transfers 30,800 ETH to Special Address

    On April 21, news emerged that, according to monitoring by PeckShield, the Kelp DAO attacker transferred 30,800 ETH to a special address starting with 0x00000, possibly indicating a destruction action.

  • Trump: 'Midnight Hammer' Completely Dismantled Iran's Nuclear Dust Base

    On April 21, U.S. President Trump stated that the 'Midnight Hammer' operation has completely destroyed the 'nuclear dust' base within Iran. As a result, the cleanup will be a long and arduous process. The fake news media, including CNN and other corrupt media networks and platforms, have failed to give our great pilots the credit they deserve, instead always attempting to belittle and undermine them. They are losers!!! (Dongxin News Agency)

  • BTC Drops Below $76,000

    Market data shows that BTC has dropped below $76,000, currently priced at $75,999.63, with a 24-hour increase of 1.68%. The market is experiencing significant volatility, so please ensure proper risk management.

  • Japan Officially Allows Export of Lethal Weapons Through Cabinet Resolution

    On April 21, according to Kyodo News, the Japanese government officially revised the 'Three Principles on Transfer of Defense Equipment' and its operational guidelines during a cabinet meeting, which will, in principle, allow the export of lethal weapons. (Xinhua News Agency)

  • Trump Claims Iran Will Negotiate

    On April 21, during a phone interview with CNN, U.S. President Trump stated that Iran "will negotiate" and expressed confidence in potential talks set to take place in Pakistan. Trump remarked, "They will negotiate; if they don't, they will face unprecedented problems." He also expressed hope that both sides could reach a "fair agreement" and emphasized that Iran "will not have nuclear weapons." Additionally, he defended military actions against Iran by stating there was "no choice" and claimed that they would ultimately "wrap things up."

  • Amazon to Invest Additional $5 Billion in Anthropic

    On April 21, Amazon announced on Monday that it will invest an additional $5 billion in the artificial intelligence company Anthropic, bringing the total investment to as much as $20 billion. Anthropic develops the Claude chatbot and programming tools, and plans to invest over $100 billion in Amazon's cloud technology and chips over the next decade.

  • Three U.S. Carrier Strike Groups May Deploy Simultaneously in the Middle East

    On April 21, according to CCTV, the U.S. military is expected to deploy three carrier strike groups simultaneously in the Middle East in the coming days. Currently, the USS Lincoln strike group is stationed in the Gulf of Oman, near the Strait of Hormuz, participating in maritime blockade operations; the USS Ford strike group is located in the northern Red Sea; and the USS Bush strike group, which is taking a route around Africa, is heading north from the southeast of Africa and is expected to enter the Arabian Sea—this carrier may replace the USS Ford in its mission. In the short term, the U.S. military may have three aircraft carriers in the Middle East.

  • BTC Surpasses $76,000

    Market data shows that BTC has surpassed $76,000, currently priced at $76,039.83, with a 24-hour increase of 1.67%. The market is highly volatile, so please ensure proper risk management.