For interoperability with other schemes, it behooves me to write a BIP for this output type. It’s already standard to spend in well over half the network.
h/t roasbeef for bothering me about this repeatedly
For interoperability with other schemes, it behooves me to write a BIP for this output type. It’s already standard to spend in well over half the network.
h/t roasbeef for bothering me about this repeatedly
23+The "anchor" output type is a commonly used pattern in Bitcoin layer 2 systems such as Lightning Network and beyond. This pattern allows transactions which are presigned far in advance to leave a "hook" for CPFP fee bumping later, when prevailing feerates for block inclusion are better known.
24+
25+When the wallet user is unconcerned by *who* is able to bump the transaction fees as long as someone does, this output type may confer a couple of advantages:
26+
27+1. Using an output type with minimal output and spending input footprint saves fees on average
28+2. Keyless operation aids in interoperability of services like watchtowers as there is no privelaged key material for bumping
02. Keyless operation aids in interoperability of services like watchtowers, as there is no privileged key material for bumping,
45+
46+====Related Work====
47+
48+There are a number of related but separate historical concepts:
49+
50+[https://github.com/bitcoin/bitcoin/pull/30239 Ephemeral Dust]: Relay policies allowing a single dust output as long as it is spent in a transaction package. As an implementation detail, dust for P2A is set at 240 satoshis by default, others dust levels remain unchanged, and the dust-having transaction must be zero fee.
0[https://github.com/bitcoin/bitcoin/pull/30239 Ephemeral Dust]: Relay policies allowing a single dust output as long as it is spent in a transaction package. As an implementation detail, dust for P2A is set at 240 satoshis by default, other dust levels remain unchanged, and the dust-having transaction must be zero fee.
Have you considered making this BIP slightly more generalized, and also preicelyf defining the acceptance rules for ephemerl dust?
Eg: one question that’s popped into my mind several times is: can ephemeral dust only be used with v3 transactions?
Dust threshold instead of just dust?
As in, values before 240 for P2A are considered dust.
Ephemeral dust ended up being very implementation-specific, and likely to change in some future.
Wondering if there is a more BOLT-like living document suitable for that.
31+
32+===Specification===
33+
34+A P2A output is defined as one with the exact witness output script
35+
36+<code>OP_1 <0x4e73></code>
0x4e73 for?” per your answer in https://github.com/bitcoin/bitcoin/pull/30352#issuecomment-2215089061
68+Gloria Zhao,
69+Pieter Wuille,
70+Jeremy Rubin,
71+and Bastien Teinturier.
72+
73+==References and Rationale==
53+
54+[bip-0431.mediawiki TRUC transactions]: TRUC transactions bound the topology including child transaction size, which aids in anti-pinning for the P2A output, as anyone can attach a child transaction including an oversized, low feerate one. There is no ineherent dependency on this concept and P2A.
55+
56+====Backward Compatibility====
57+
58+Creation of P2A outputs has been considered standard since the deployment of Segwit softfork on the network.
25+When the wallet user is unconcerned by *who* is able to bump the transaction fees as long as someone does, this output type may confer a couple of advantages:
26+
27+1. Using an output type with minimal output and spending input footprint saves fees on average
28+2. Keyless operation aids in interoperability of services like watchtowers as there is no privelaged key material for bumping
29+
30+with the drawback that selection of this output type could result in griefing if anti-pinning measures are not taken.
33+
34+A P2A output is defined as one with the exact witness output script
35+
36+<code>OP_1 <0x4e73></code>
37+
38+corresponding to the address <code>bc1pfeessrawgf</code> on Bitcoin mainnet.
btcsuite.
0@@ -0,0 +1,76 @@
1+<pre>
2+ BIP: ?
3+ Layer: Applications
4+ Title: Pay To Anchor (P2A)
Nit: I’d use title case here:
0 Title: Pay to Anchor (P2A)
12+ 2024-10-10: https://bitcoinops.org/en/bitcoin-core-28-wallet-integration-guide/ wallet integration guide
13+</pre>
14+
15+==Abstract==
16+
17+This document describes a new standard output script called PayToAnchor (P2A) and prescribes making spending of this output type standard.
Nit:
0This document describes a new standard output script called Pay to Anchor (P2A) and prescribes making spending of this output type standard.
22+
23+The "anchor" output type is a commonly used pattern in Bitcoin layer 2 systems such as Lightning Network and beyond. This pattern allows transactions which are presigned far in advance to leave a "hook" for CPFP fee bumping later, when prevailing feerates for block inclusion are better known.
24+
25+When the wallet user is unconcerned by *who* is able to bump the transaction fees as long as someone does, this output type may confer a couple of advantages:
26+
27+1. Using an output type with minimal output and spending input footprint saves fees on average
That’s generally true, not just on average?
01. Using an output type with minimal output and spending input footprint saves fees
23+The "anchor" output type is a commonly used pattern in Bitcoin layer 2 systems such as Lightning Network and beyond. This pattern allows transactions which are presigned far in advance to leave a "hook" for CPFP fee bumping later, when prevailing feerates for block inclusion are better known.
24+
25+When the wallet user is unconcerned by *who* is able to bump the transaction fees as long as someone does, this output type may confer a couple of advantages:
26+
27+1. Using an output type with minimal output and spending input footprint saves fees on average
28+2. Keyless operation aids in interoperability of services like watchtowers as there is no privileged key material for bumping
missing word?
02. Keyless operation aids in interoperability of services like watchtowers as there is no privileged key material needed for bumping
29+
30+with the drawback that selection of this output type could result in griefing if anti-pinning measures are not taken. If unsure, use in conjunction with [https://github.com/bitcoin/bips/blob/master/bip-0431.mediawiki TRUC transactions].
31+
32+===Specification===
33+
34+A P2A output is defined as one with the exact witness output script
“exact witness output script” feels odd, how about one of:
0A P2A output is defined as one with the native segwit output script
0A P2A output is defined as one with the output script
0A P2A output is defined as one with exactly the output script
31+
32+===Specification===
33+
34+A P2A output is defined as one with the exact witness output script
35+
36+<code>OP_1 <0x4e73></code><ref>To be segwit it needs to be a witness version + witness program. This conforms to the smallest witness program size of two. The specific bytes cannot be zeros so they are chosen to spell "fees" in bech32m format.</ref>
How about:
0<code>OP_1 <0x4e73></code><ref>Native segwit outputs are composed of a witness version and a witness program. A witness program must be at least two bytes long and the specific bytes cannot be zeros. The two bytes for the P2A witness program are chosen to spell "fees" in bech32m encoding.</ref>
35+
36+<code>OP_1 <0x4e73></code><ref>To be segwit it needs to be a witness version + witness program. This conforms to the smallest witness program size of two. The specific bytes cannot be zeros so they are chosen to spell "fees" in bech32m format.</ref>
37+
38+corresponding to the addresses <code>bc1pfeessrawgf</code> on Bitcoin mainnet, <code><tb1pfees9rn5nz</code> on public testnets, and <code>bcrt1pfeesnyr2tx</code> on regtest.
39+
40+P2A inputs are considered standard for spending if no witness data is attached. This avoids meaningless witness padding. Consensus meaning is unchanged.
55+
56+====Backward Compatibility====
57+
58+Creation of P2A outputs has been considered standard since the deployment of Segwit softfork on the network.
59+
60+Transactions with P2A inputs were previously nonstandard, reserved as an upgrade hook.
0Transactions with P2A inputs were previously nonstandard by Bitcoin Core, reserved as an upgrade hook.
0@@ -0,0 +1,76 @@
1+<pre>
2+ BIP: ?
3+ Layer: Applications
4+ Title: Pay To Anchor (P2A)
5+ Author: Gregory Sanders <gsanders87@gmail.com>
6+ Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-?
7+ Status: Draft
8+ Type: Informational
9+ Created: 2025-09-23
This BIP has been assigned number 433!
(can update the readme in the PR to reflect assignment)