-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
base: master
Are you sure you want to change the base?
Add P2A BIP #1982
Conversation
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.
Quick first pass.
bip-paytoanchor.mediawiki
Outdated
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 on average | ||
2. Keyless operation aids in interoperability of services like watchtowers as there is no privelaged key material for bumping |
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.
2. Keyless operation aids in interoperability of services like watchtowers as there is no privelaged key material for bumping | |
2. Keyless operation aids in interoperability of services like watchtowers, as there is no privileged key material for bumping, |
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.
done
bip-paytoanchor.mediawiki
Outdated
|
||
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 for P2A is set at 240 satoshis by default, others dust levels remain unchanged, and the dust-having transaction must be zero fee. |
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.
[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. | |
[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. |
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.
done
bip-paytoanchor.mediawiki
Outdated
|
||
A P2A output is defined as one with the exact witness output script | ||
|
||
<code>OP_1 <0x4e73></code> |
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.
Perhaps add a footnote describing "what is the 0x4e73
for?" per your answer in bitcoin/bitcoin#30352 (comment)
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.
done
Jeremy Rubin, | ||
and Bastien Teinturier. | ||
|
||
==References and Rationale== |
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.
TBD, or remove this header?
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.
one is added, leaving
|
||
====Backward Compatibility==== | ||
|
||
Creation of P2A outputs has been considered standard since the deployment of Segwit softfork on the network. |
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.
Thanks for making this. Nearly done with an implementation for btcsuite
.
bip-paytoanchor.mediawiki
Outdated
1. Using an output type with minimal output and spending input footprint saves fees on average | ||
2. Keyless operation aids in interoperability of services like watchtowers as there is no privelaged key material for bumping | ||
|
||
with the drawback that selection of this output type could result in griefing if anti-pinning measures are not taken. |
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.
Recommend that if unsure, then this new type is best used w/ v3 transactions are they have stricter replacement rules?
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.
done
bip-paytoanchor.mediawiki
Outdated
|
||
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 for P2A is set at 240 satoshis by default, others dust levels remain unchanged, and the dust-having transaction must be zero fee. |
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 think it's also worth specifying above that P2A outputs can be zero value as well.
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.
done
bip-paytoanchor.mediawiki
Outdated
|
||
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 for P2A is set at 240 satoshis by default, others dust levels remain unchanged, and the dust-having transaction must be zero fee. |
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.
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?
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.
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.
bip-paytoanchor.mediawiki
Outdated
|
||
<code>OP_1 <0x4e73></code> | ||
|
||
corresponding to the address <code>bc1pfeessrawgf</code> on Bitcoin mainnet. |
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.
Should also specify the encoding for: regtest, signet, and testnet. Would make for good test vectors.
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.
done
bip-paytoanchor.mediawiki
Outdated
|
||
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 for P2A is set at 240 satoshis by default, others dust levels remain unchanged, and the dust-having transaction must be zero fee. |
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.
Dust threshold instead of just dust?
As in, values before 240 for P2A are considered dust.
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.
fixed
Jeremy Rubin, | ||
and Bastien Teinturier. | ||
|
||
==References and Rationale== |
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.
Should link to the bitcoind PR that implemented this.
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.
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.
Was in "Implementation" section
3451560
to
9ed387c
Compare
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