The six taproot input fields say "Finalizers should remove this field
after PSBT_IN_FINAL_SCRIPTWITNESS is constructed", and so does the
output field PSBT_OUT_TAP_BIP32_DERIVATION. An output has no
PSBT_IN_FINAL_SCRIPTWITNESS, the clause names no input, and its two
neighbours in the output table carry no such clause. Drop it; Bitcoin
Core does not clear output fields on finalization.
BIP 174 tells the Input Finalizer to clear all other data except the
UTXO and unknown fields from a finalized input. It was written when the
unsigned transaction was a global field. PSBTv2 moves the data that
defines the input into the input map, and a finalizer that follows the
sentence literally removes it: without PSBT_IN_PREVIOUS_TXID or
PSBT_IN_OUTPUT_INDEX the result is invalid, and without
PSBT_IN_SEQUENCE and the locktime fields the Transaction Extractor
builds a different transaction.
BIP 370 amends Creator, Updater, Signer and Transaction Extractor for
PSBTv2, adds the Constructor, and says nothing about the Input
Finalizer. Add the section: the five fields are kept. Bitcoin Core
does this today: at 19b0ff2fa0, PSBTInput::Serialize in src/psbt.h
writes them for every PSBTv2 input, finalized or not.
Record this branch's clarifications and test vectors under draft document
version 0.1.1. Keep the initial-publication entry in the shared first commit.
Make change_descriptor explicitly optional for non-multipath descriptors.
Add a receive-only document vector with no change descriptor or optional
metadata; the existing vectors cover a receive/change pair and multipath.
create_outputs and scanning declare expected with a default of None but
dereference it unconditionally (expected.get(...)), so calling either
without it raises AttributeError, although the parameter is documented
optional. Guard the expected-value checks with `if expected is not None:`.
The self-test, which always passes expected, is unaffected.
* bip-89, bip-114, bip-441: add missing <references/> tag
These three BIPs use <ref> footnotes but never place a <references/>
tag, so GitHub's mediawiki renderer drops the footnote text entirely and
the [n] superscripts link to anchors that do not exist.
Add a Footnotes section as well, so the notes are rendered.
---------
Co-authored-by: Kanan M <kanan@MacBook-Pro-Sanan.local>
- Specification was a level-3 heading and therefore rendered as a
subsection of Motivation; Backward Compatibility, Implementation and
Related Work were one level too deep as well.
- Drop the stray '<' in front of the testnet address tb1pfees9rn5nz.
- 'typea' -> 'type', 'ineherent' -> 'inherent'.
- Add the Copyright section required by BIP 3, matching the
BSD-3-Clause License header.
Line 57 uses a closing </pre> where the opening tag was intended, so
the example TxDP that follows (up to the real </pre> on line 90) is
rendered as prose instead of a preformatted block.