BIP174: Deduplicate type definitions by introducing registry file#2135
BIP174: Deduplicate type definitions by introducing registry file#2135murchandamus wants to merge 4 commits intobitcoin:masterfrom
Conversation
210088c to
3070d4b
Compare
|
Copncept ACK |
nymius
left a comment
There was a problem hiding this comment.
Concept ACK
From the specification perspective this is less prone to errors.
On the other side, I think I'm still going to paste all the fields in a single table when checking implementations. But there is no reason for it to be done in this repository.
bip-0174.mediawiki
Outdated
There was a problem hiding this comment.
These lines conflict with the proposal.
bip-0174.mediawiki
Outdated
There was a problem hiding this comment.
This line conflicts with the proposal.
d87c733 to
d6ff1be
Compare
|
ACK d6ff1be |
|
Concept ACK, nice cleanup |
| | <tt>PSBT_IN_WITNESS_SCRIPT = 0x05</tt> | ||
| | [[bip-0174.mediawiki|174]] | ||
| |- | ||
| | BIP 32 Derivation Path |
There was a problem hiding this comment.
Pico-nit, with SHA256, RIPEMD160, HASH256, etc, written without a space separator, might be better here in the same table to write BIP 32 (and the other BIP citations) as BIP32 (also without a space separator). Feel free to ignore.
| | None | ||
| | No key data | ||
| | <tt><8-bit uint flags></tt> | ||
| | An 8 bit little endian unsigned integer as a bitfield for various transaction modification flags. Bit 0 is the Inputs Modifiable Flag and indicates whether inputs can be modified. Bit 1 is the Outputs Modifiable Flag and indicates whether outputs can be modified. Bit 2 is the Has SIGHASH_SINGLE flag and indicates whether the transaction has a SIGHASH_SINGLE signature who's input and output pairing must be preserved. Bit 2 essentially indicates that the Constructor must iterate the inputs to determine whether and how to add an input. |
There was a problem hiding this comment.
Echoing the PR description, in case a reviewer of this change wonders if we're losing information by removing text like this: the text already exists in the parent BIP, in this case, BIP370.
| ** Introduce type registry auxiliary file | ||
| ** Add changelog | ||
| * '''1.4.1''' (2021-01-14): | ||
| ** Mark Final |
There was a problem hiding this comment.
Per BIP3, statuses are now one of Draft | Complete | Deployed | Closed.
So far, each BIP defining new PSBT types or fields has included the new definitions both in its own BIP text and then replicated them in BIP174. This violates the Single Source of Truth paradigm and presents an obvious vector for mismatching information across BIPs.
This PR proposes to make each BIP the sole authoritative source for the PSBT fields and types it introduces and extracts only the Name,
keytype, and "Parent BIP" columns from BIP174 to a registry file that tracks all existing definitions to prevent clashes.This PR builds on BIP376’s #2089 which is anticipated to be published soon, and will be rebased thereafter.