-
Notifications
You must be signed in to change notification settings - Fork 5.8k
BIP 433: Add P2A BIP #1982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
instagibbs
wants to merge
1
commit into
bitcoin:master
Choose a base branch
from
instagibbs:2025-09-p2a
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
BIP 433: Add P2A BIP #1982
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| <pre> | ||
| BIP: 433 | ||
| Layer: Applications | ||
| Title: Pay to Anchor (P2A) | ||
| Author: Gregory Sanders <gsanders87@gmail.com> | ||
| Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0433 | ||
| Status: Draft | ||
| Type: Informational | ||
| Created: 2025-12-08 | ||
| License: BSD-3-Clause | ||
| Post-History: 2024-06-27: https://github.com/bitcoin/bitcoin/pull/30352 Github PR | ||
| 2024-10-10: https://bitcoinops.org/en/bitcoin-core-28-wallet-integration-guide/ wallet integration guide | ||
| </pre> | ||
|
|
||
| ==Abstract== | ||
|
|
||
| This document describes a new standard output script called Pay to Anchor (P2A) and prescribes making spending of this output type standard. | ||
|
|
||
| This output is "keyless" meaning no signature or witness data at all are required to spend this output typea. | ||
|
|
||
| ==Motivation== | ||
|
|
||
| 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. | ||
|
|
||
| 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: | ||
|
|
||
| 1. Using an output type with minimal output and spending input footprint saves fees | ||
| 2. Keyless operation aids in interoperability of services like watchtowers as there is no privileged key material required for bumping | ||
|
|
||
| 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]. | ||
|
|
||
| ===Specification=== | ||
|
|
||
| A P2A output is defined as one with the scriptPubKey | ||
|
|
||
| <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> | ||
|
|
||
| corresponding to the addresses <code>bc1pfeessrawgf</code> on Bitcoin mainnet, <code><tb1pfees9rn5nz</code> on public testnets, and <code>bcrt1pfeesnyr2tx</code> on regtest. | ||
|
|
||
| P2A inputs are considered standard by Bitcoin Core for spending if no witness data is attached. This avoids meaningless witness padding. Consensus meaning is unchanged. | ||
|
|
||
| ====Implementation==== | ||
|
|
||
| * https://github.com/bitcoin/bitcoin/pull/30352 | ||
|
|
||
| ====Related Work==== | ||
|
|
||
| There are a number of related but separate historical concepts: | ||
|
|
||
| [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 threshold for P2A is set at 240 satoshis by default, other dust levels remain unchanged, and the dust-having transaction must be zero fee. Any output script type may have down to 0-value outputs. | ||
|
|
||
| [https://bitcoinops.org/en/topics/ephemeral-anchors/ Ephemeral Anchors]: Historically the union of P2A output type and ephemeral dust. Keyed anchors along with ephemeral dust are also an accepted pattern and as such they remain separate concepts. | ||
|
|
||
| [https://github.com/bitcoin/bips/blob/master/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. | ||
|
|
||
| ====Backward Compatibility==== | ||
|
|
||
| Creation of P2A outputs has been considered standard since the deployment of Segwit softfork on the network. | ||
|
|
||
| Transactions with P2A inputs were previously nonstandard, reserved as an upgrade hook. | ||
murchandamus marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| There are no known conflicts with previous usage. | ||
|
|
||
| ==Acknowledgements== | ||
|
|
||
| Thanks to collaborators who helped focus the historical ideas into deployed ones: | ||
| Suhas Daftuar, | ||
| Gloria Zhao, | ||
| Pieter Wuille, | ||
| Jeremy Rubin, | ||
| and Bastien Teinturier. | ||
|
|
||
| ==References and Rationale== | ||
jonatack marked this conversation as resolved.
Show resolved
Hide resolved
instagibbs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| <references/> | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe link here to the SegWit BIP section making them standard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the BIPs aren't standardness BIPs, so I'm not sure that helps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not sure if the segwit BIPs (141–144) mentioned it, but BIP 173 (Bech32) states that “implementations MUST allow the use of any version”. And that recommendation is repeated in BIP 350 (bech32m), which mentions it in the Implementation advice for test vectors.