@@ -267,12 +267,72 @@ Club][] meeting, highlighting some of the important questions and
267267answers. Click on a question below to see a summary of the answer from
268268the meeting.*
269269
270- FIXME: stickies-v
270+ [ Add PayToAnchor(P2A), OP_1 <0x4e73>, as standard output script for
271+ spending] [ review club 30352 ] is a PR by [ instagibbs] [ gh instagibbs ]
272+ that introduces a new ` TxoutType::ANCHOR ` output script type. Anchor
273+ outputs have a ` OP_1 <0x4e73> ` output script (resulting in a
274+ [ ` bc1pfeessrawgf ` ] [ mempool bc1pfeessrawgf ] address). Making these
275+ outputs standard facilitates creating and relaying transactions that
276+ spend from an anchor output.
271277
272278{% include functions/details-list.md
273- q0="FIXME"
274- a0="FIXME"
275- a0link="https://bitcoincore.reviews/29775#l-29FIXME "
279+ q0="Before ` TxoutType::ANCHOR ` is defined in this PR,
280+ what ` TxoutType ` would a ` scriptPubKey ` ` OP_1 <0x4e73> ` be classified
281+ as?"
282+ a0="Because it consists of a 1-byte push opcode (` OP_1 ` ) and a 2-byte
283+ data push (` 0x4e73 ` ), it is a valid v1 witness output. Because it is
284+ not 32 bytes, it doesn't qualify as a ` WITNESS_V1_TAPROOT ` , thus
285+ defaulting to a ` TxoutType::WITNESS_UNKNOWN ` ."
286+ a0link="https://bitcoincore.reviews/30352#l-18 "
287+
288+ q1="Based on the answer to the previous question, would it be standard
289+ to create this output type? What about to spend it? (Hint: how
290+ do [ ` IsStandard ` ] [ gh isstandard ] and [ ` AreInputsStandard ` ] [ gh
291+ areinputsstandard] treat this type?)"
292+ a1="Because ` IsStandard ` (which is used to check outputs) only
293+ considers ` TxoutType::NONSTANDARD ` to be non-standard, creating it
294+ would be standard. Because ` AreInputsStandard ` considers a transaction
295+ that spends from a ` TxoutType::WITNESS_UNKNOWN ` to be non-standard, it
296+ would not be standard to spend it."
297+ a1link="https://bitcoincore.reviews/30352#l-24 "
298+
299+ q2="Before this PR, with default settings, which output types can
300+ be _ created_ in a standard transaction? Is that the same as the script
301+ types that can be _ spent_ in a standard transaction?"
302+ a2="All defined ` TxoutType ` 's except ` TxoutType::NONSTANDARD ` can be
303+ created. All defined ` TxoutType ` 's except ` TxoutType::NONSTANDARD ` and
304+ ` TxoutType::WITNESS_UNKNOWN ` are allowed to be spent (although it's
305+ impossible to spend ` TxoutType::NULL_DATA ` )."
306+ a2link="https://bitcoincore.reviews/30352#l-42 "
307+
308+ q3="Define _ anchor output_ , without mentioning Lightning Network
309+ transactions (try to be more general)."
310+ a3="An anchor output is an extra output created on presigned
311+ transactions to allow fees to be added via CPFP at the time of
312+ broadcasting. See also [ topic anchor outputs] for more information."
313+ a3link="https://bitcoincore.reviews/30352#l-48 "
314+
315+ q4="Why does the size of the output script of an anchor output
316+ matter?"
317+ a4="A large output script makes it costlier to relay and prioritize
318+ the transaction."
319+ a4link="https://bitcoincore.reviews/30352#l-66 "
320+
321+ q5="How many virtual bytes are needed to create and spend a P2A
322+ output?"
323+ a5="Creating a P2A output requires 13 vbytes. Spending it requires 41
324+ vbytes."
325+ a5link="https://bitcoincore.reviews/30352#l-120 "
326+
327+ q6="The 3rd commit [ adds] [ gh 30352 3rd commit ] `if
328+ (prevScript.IsPayToAnchor()) return false` to ` IsWitnessStandard`.
329+ What does this do, and why is it needed?"
330+ a6="It ensures that an anchor output can only be spent without witness
331+ data. This prevents an attacker from taking an honest spending
332+ transaction, adding witness data to it and then propagating it at a
333+ higher absolute fee but lower feerate. This would force the honest
334+ user to pay increasingly higher fees to replace it."
335+ a6link="https://bitcoincore.reviews/30352#l-154 "
276336%}
277337
278338## Releases and release candidates
@@ -409,3 +469,9 @@ repo], and [BINANAs][binana repo]._
409469[ news306 testnet4 ] : /en/newsletters/2024/07/12/#bitcoin-core-pr-review-club
410470[ news311 testnet4 ] : /en/newsletters/2024/06/07/#bip-and-experimental-implementation-of-testnet4
411471[ news277 p2a ] : /en/newsletters/2023/11/15/#eliminating-malleability-from-ephemeral-anchor-spends
472+ [ review club 30352 ] : https://bitcoincore.reviews/30352
473+ [ gh instagibbs ] : https://github.com/instagibbs
474+ [ mempool bc1pfeessrawgf ] : https://mempool.space/address/bc1pfeessrawgf
475+ [ gh isstandard ] : https://github.com/bitcoin/bitcoin/blob/fa0b5d68823b69f4861b002bbfac2fd36ed46356/src/policy/policy.cpp#L7
476+ [ gh areinputsstandard ] : https://github.com/bitcoin/bitcoin/blob/fa0b5d68823b69f4861b002bbfac2fd36ed46356/src/policy/policy.cpp#L177
477+ [ gh 30352 3rd commit ] : https://github.com/bitcoin-core-review-club/bitcoin/commit/ccad5a5728c8916f8cec09e838839775a6026293#diff-ea6d307faa4ec9dfa5abcf6858bc19603079f2b8e110e1d62da4df98f4bdb9c0R228-R232
0 commit comments