<oembed><type>rich</type><version>1.0</version><title>Greg Sanders [ARCHIVE] wrote</title><author_name>Greg Sanders [ARCHIVE] (npub1jd…3gh0m)</author_name><author_url>https://yabu.me/npub1jdl3plz00rvxwc6g2ckemzrgg0amx5wen4kfvs3laxtssxvk9cvsf3gh0m</author_url><provider_name>njump</provider_name><provider_url>https://yabu.me</provider_url><html>📅 Original date posted:2022-02-10&#xA;📝 Original message:One quick thought to the proposal and perhaps to sponsors in general(didn&#39;t&#xA;have time to go over original proposal again):&#xA;&#xA;Since sponsors can come from anywhere, the wallet application must have&#xA;access to the mempool to know what inputs must be double spent to RBF the&#xA;sponsor transaction.&#xA;&#xA;Seems like an important difference to be considered.&#xA;&#xA;On Fri, Feb 11, 2022 at 3:49 AM James O&#39;Beirne via bitcoin-dev &lt;&#xA;bitcoin-dev at lists.linuxfoundation.org&gt; wrote:&#xA;&#xA;&gt; There&#39;s been much talk about fee-bumping lately, and for good reason -&#xA;&gt; dynamic fee management is going to be a central part of bitcoin use as&#xA;&gt; the mempool fills up (lord willing) and right now fee-bumping is&#xA;&gt; fraught with difficulty and pinning peril.&#xA;&gt;&#xA;&gt; Gloria&#39;s recent post on the topic[0] was very lucid and highlights a&#xA;&gt; lot of the current issues, as well as some proposals to improve the&#xA;&gt; situation.&#xA;&gt;&#xA;&gt; As others have noted, the post was great. But throughout the course&#xA;&gt; of reading it and the ensuing discussion, I became troubled by the&#xA;&gt; increasing complexity of both the status quo and some of the&#xA;&gt; proposed remedies.&#xA;&gt;&#xA;&gt; Layering on special cases, more carve-outs, and X and Y percentage&#xA;&gt; thresholds is going to make reasoning about the mempool harder than it&#xA;&gt; already is. Special consideration for &#34;what should be in the next&#xA;&gt; block&#34; and/or the caching of block templates seems like an imposing&#xA;&gt; dependency, dragging in a bunch of state and infrastructure to a&#xA;&gt; question that should be solely limited to mempool feerate aggregates&#xA;&gt; and the feerate of the particular txn package a wallet is concerned&#xA;&gt; with.&#xA;&gt;&#xA;&gt; This is bad enough for protocol designers and Core developers, but&#xA;&gt; making the situation any more intractable for &#34;end-users&#34; and wallet&#xA;&gt; developers feels wrong.&#xA;&gt;&#xA;&gt; I thought it might be useful to step back and reframe. Here are a few&#xA;&gt; aims that are motivated chiefly by the quality of end-user experience,&#xA;&gt; constrained to obey incentive compatibility (i.e. miner reward, DoS&#xA;&gt; avoidance). Forgive the abstract dalliance for a moment; I&#39;ll talk&#xA;&gt; through concretes afterwards.&#xA;&gt;&#xA;&gt;&#xA;&gt; # Purely additive feerate bumps should never be impossible&#xA;&gt;&#xA;&gt; Any user should always be able to add to the incentive to mine any&#xA;&gt; transaction in a purely additive way. The countervailing force here&#xA;&gt; ends up being spam prevention (a la min-relay-fee) to prevent someone&#xA;&gt; from consuming bandwidth and mempool space with a long series of&#xA;&gt; infinitesimal fee-bumps.&#xA;&gt;&#xA;&gt; A fee bump, naturally, should be given the same per-byte consideration&#xA;&gt; as a normal Bitcoin transaction in terms of relay and block space,&#xA;&gt; although it would be nice to come up with a more succinct&#xA;&gt; representation. This leads to another design principle:&#xA;&gt;&#xA;&gt;&#xA;&gt; # The bandwidth and chain space consumed by a fee-bump should be minimal&#xA;&gt;&#xA;&gt; Instead of prompting a rebroadcast of the original transaction for&#xA;&gt; replacement, which contains a lot of data not new to the network, it&#xA;&gt; makes more sense to broadcast the &#34;diff&#34; which is the additive&#xA;&gt; contribution towards some txn&#39;s feerate.&#xA;&gt;&#xA;&gt; This dovetails with the idea that...&#xA;&gt;&#xA;&gt;&#xA;&gt; # Special transaction structure should not be required to bump fees&#xA;&gt;&#xA;&gt; In an ideal design, special structural foresight would not be needed&#xA;&gt; in order for a txn&#39;s feerate to be improved after broadcast.&#xA;&gt;&#xA;&gt; Anchor outputs specified solely for CPFP, which amount to many bytes of&#xA;&gt; wasted chainspace, are a hack. It&#39;s probably uncontroversial at this&#xA;&gt; point to say that even RBF itself is kind of a hack - a special&#xA;&gt; sequence number should not be necessary for post-broadcast contribution&#xA;&gt; toward feerate. Not to mention RBF&#39;s seemingly wasteful consumption of&#xA;&gt; bandwidth due to the rebroadcast of data the network has already seen.&#xA;&gt;&#xA;&gt; In a sane design, no structural foresight - and certainly no wasted&#xA;&gt; bytes in the form of unused anchor outputs - should be needed in order&#xA;&gt; to add to a miner&#39;s reward for confirming a given transaction.&#xA;&gt;&#xA;&gt; Planning for fee-bumps explicitly in transaction structure also often&#xA;&gt; winds up locking in which keys are required to bump fees, at odds&#xA;&gt; with the idea that...&#xA;&gt;&#xA;&gt;&#xA;&gt; # Feerate bumps should be able to come from anywhere&#xA;&gt;&#xA;&gt; One of the practical downsides of CPFP that I haven&#39;t seen discussed in&#xA;&gt; this conversation is that it requires the transaction to pre-specify the&#xA;&gt; keys needed to sign for fee bumps. This is problematic if you&#39;re, for&#xA;&gt; example, using a vault structure that makes use of pre-signed&#xA;&gt; transactions.&#xA;&gt;&#xA;&gt; What if the key you specified n the anchor outputs for a bunch of&#xA;&gt; pre-signed txns is compromised? What if you&#39;d like to be able to&#xA;&gt; dynamically select the wallet that bumps fees? CPFP does you no favors&#xA;&gt; here.&#xA;&gt;&#xA;&gt; There is of course a tension between allowing fee bumps to come from&#xA;&gt; anywhere and the threat of pinning-like attacks. So we should venture&#xA;&gt; to remove pinning as a possibility, in line with the first design&#xA;&gt; principle I discuss.&#xA;&gt;&#xA;&gt;&#xA;&gt; ---&#xA;&gt;&#xA;&gt; Coming down to earth, the &#34;tabula rasa&#34; thought experiment above has led&#xA;&gt; me to favor an approach like the transaction sponsors design that Jeremy&#xA;&gt; proposed in a prior discussion back in 2020[1].&#xA;&gt;&#xA;&gt; Transaction sponsors allow feerates to be bumped after a transaction&#39;s&#xA;&gt; broadcast, regardless of the structure of the original transaction.&#xA;&gt; No rebroadcast (wasted bandwidth) is required for the original txn data.&#xA;&gt; No wasted chainspace on only-maybe-used prophylactic anchor outputs.&#xA;&gt;&#xA;&gt; The interface for end-users is very straightforward: if you want to bump&#xA;&gt; fees, specify a transaction that contributes incrementally to package&#xA;&gt; feerate for some txid. Simple.&#xA;&gt;&#xA;&gt; In the original discussion, there were a few main objections that I noted:&#xA;&gt;&#xA;&gt; 1. In Jeremy&#39;s original proposal, only one sponsor txn per txid is&#xA;&gt;    allowed by policy. A malicious actor could execute a pinning-like&#xA;&gt;    attack by specifying an only-slightly-helpful feerate sponsor that&#xA;&gt;    then precludes other larger bumps.&#xA;&gt;&#xA;&gt; I think there are some ways around this shortcoming. For example: what&#xA;&gt; if, by policy, sponsor txns had additional constraints that&#xA;&gt;&#xA;&gt;   - each input must be signed {SIGHASH_SINGLE,SIGHASH_NONE}|ANYONECANPAY,&#xA;&gt;   - the txn must be specified RBFable,&#xA;&gt;   - a replacement for the sponsor txn must raise the sponsor feerate,&#xA;&gt;     including ancestors (maybe this is inherent in &#34;is RBFable,&#34; but&#xA;&gt;     I don&#39;t want to conflate absolute feerates into this).&#xA;&gt;&#xA;&gt; That way, there is still at most a single sponsor txn per txid in the&#xA;&gt; mempool, but anyone can &#34;mix in&#34; inputs which bump the effective&#xA;&gt; feerate of the sponsor.&#xA;&gt;&#xA;&gt; This may not be the exact solution we want, but I think it demonstrates&#xA;&gt; that the sponsors design has some flexibility and merits some thinking.&#xA;&gt;&#xA;&gt; The second objection about sponsors was&#xA;&gt;&#xA;&gt; 2. (from Suhas) sponsors break the classic invariant: &#34;once a valid&#xA;&gt;    transaction is created, it should not become invalid later on unless&#xA;&gt;    the inputs are double-spent.&#34;&#xA;&gt;&#xA;&gt; This doesn&#39;t seem like a huge concern to me if you consider the txid&#xA;&gt; being sponsored as a sort of spiritual input to the sponsor. While the&#xA;&gt; theoretical objection against broadening where one has to look in a txn&#xA;&gt; to determine its dependencies is understandable, I don&#39;t see what the&#xA;&gt; practical cost here is.&#xA;&gt;&#xA;&gt; Reorg complexity seems comparable if not identical, especially if we&#xA;&gt; broaden sponsor rules to allow blocks to contain sponsor txns that are&#xA;&gt; both for txids in the same block _or_ already included in the chain.&#xA;&gt;&#xA;&gt; This theoretical concession seems preferable to heaping more rules onto&#xA;&gt; an already labyrinthine mempool policy that is difficult for both&#xA;&gt; implementers and users to reason about practically and conceptually.&#xA;&gt;&#xA;&gt; A third objection that wasn&#39;t posed, IIRC, but almost certainly would&#xA;&gt; be:&#xA;&gt;&#xA;&gt; 3. Transaction sponsors requires a soft-fork.&#xA;&gt;&#xA;&gt; Soft-forks are no fun, but I&#39;ll tell you what also isn&#39;t fun: being on&#xA;&gt; the hook to model (and sometimes implement) a dizzying potpourri of&#xA;&gt; mempool policies and special-cases. Expecting wallet implementers to&#xA;&gt; abide by a maze of rules faithfully in order to ensure txn broadcast and&#xA;&gt; fee management invites bugs for perpetuity and network behavior that is&#xA;&gt; difficult to reason about a priori. Use of CPFP in the long-term also&#xA;&gt; risks needless chain waste.&#xA;&gt;&#xA;&gt; If a soft-fork is the cost of cleaning up this essential process,&#xA;&gt; consideration should be given to paying it as a one-time cost. This&#xA;&gt; topic merits a separate post, but consider that in the 5 years leading&#xA;&gt; up to the 2017 SegWit drama, we averaged about a soft-fork a year.&#xA;&gt; Uncontroversial, &#34;safe&#34; changes to the consensus protocol shouldn&#39;t be&#xA;&gt; out of the question when significant practical benefit is plain to see.&#xA;&gt;&#xA;&gt; ---&#xA;&gt;&#xA;&gt; I hope this message has added some framing to the discussion on fees,&#xA;&gt; as well prompting other participants to go back and give the&#xA;&gt; transaction sponsor proposal a serious look. The sponsors interface is&#xA;&gt; about the simplest I can imagine for wallets, and it seems easy to&#xA;&gt; reason about for implementers on Core and elsewhere.&#xA;&gt;&#xA;&gt; I&#39;m not out to propose soft-forks lightly, but the current complexity&#xA;&gt; in fee management feels untenable, and as evidenced by all the&#xA;&gt; discussion lately, fees are an increasingly crucial part of the system.&#xA;&gt;&#xA;&gt;&#xA;&gt;&#xA;&gt; [0]:&#xA;&gt; https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2022-January/019817.html&#xA;&gt; [1]:&#xA;&gt; https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-September/018168.html&#xA;&gt; _______________________________________________&#xA;&gt; bitcoin-dev mailing list&#xA;&gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20220211/c1c03c95/attachment.html&gt;</html></oembed>