Published on: 2021-04-05T00:35:14+00:00
A proposal has been made to introduce a new version of Partially Signed Bitcoin Transactions (PSBTs) called PSBT v1. This new version addresses deficiencies in the current PSBT v0 and allows for inputs and outputs to be added to the transaction after its creation. The primary change is that all input and output data will be contained in their respective maps, eliminating the need to parse an unsigned transaction. Several new fields will be added to support this change, including PSBT_GLOBAL_PREFERRED_LOCKTIME, PSBT_GLOBAL_INPUT_COUNT, and PSBT_GLOBAL_UNDER_CONSTRUCTION.Andrew Chow has also proposed another version called PSBTv2, which is a backward-incompatible update to the PSBT protocol. It introduces fields like Transaction Version, Fallback Locktime, Input Count, Output Count, and Transaction Modifiable Flags. Additionally, the process of determining the nLockTime field of a transaction is explained in detail.Rusty Russell and Andrew Chow discuss the addition of a new global field called PSBT_GLOBAL_UNDER_CONSTRUCTION in an email exchange. This field is used to signal whether inputs and outputs can be added to the PSBT. Rusty suggests flagging this by omitting redundant fields, but Andrew explains that those fields are necessary to determine the number of input and output maps. They also discuss the possibility of signed inputs being added to transactions and the complexity of allowing modification of inputs and outputs after the Creator role is done.Overall, these proposed changes aim to improve the usability and functionality of the PSBT format, allowing for easier construction of transactions and the addition of inputs and outputs as needed.Andrew Chow has proposed a new version of Partially Signed Bitcoin Transactions (PSBT), called PSBT v1, to address the deficiencies in the current PSBT v0. The primary change in the new version is to have all input and output data for each contained within their respective maps, disallowing PSBT_GLOBAL_UNSIGNED_TX. Several new fields are added for Global, Input, and Output, including PSBT_GLOBAL_TX_VERSION, PSBT_GLOBAL_PREFERRED_LOCKTIME, PSBT_GLOBAL_INPUT_COUNT, PSBT_GLOBAL_OUTPUT_COUNT, PSBT_IN_PREVIOUS_TXID, PSBT_IN_OUTPUT_INDEX, PSBT_IN_SEQUENCE, PSBT_IN_REQUIRED_LOCKTIME, PSBT_OUT_VALUE, and PSBT_OUT_OUTPUT_SCRIPT.These changes allow for PSBT to be used in the construction of transactions, with inputs and outputs being added as needed. However, care must be taken to ensure that adding additional inputs and outputs will not invalidate existing signatures. Finalizers must choose the maximum of all the *_LOCKTIME fields to choose the locktime for the transaction.PSBT v1 also introduces two lock time fields - one for a time-based lock time and the other for a height-based lock time. This is necessary because all inputs must use the same type of lock time (height or time). Additionally, a new global field, PSBT_GLOBAL_UNDER_CONSTRUCTION, is added to signal whether inputs and outputs can be added to the PSBT. Rules must be followed to ensure that adding new inputs and outputs does not invalidate existing signatures.To uniquely identify transactions for combiners, a txid can be computed from the information present in the PSBT. Combiners can create an unsigned transaction given the transaction version, input prevouts, outputs, and computed locktime, which can then be used as a way to identify PSBTs.As the changes disallow the PSBT_GLOBAL_UNSIGNED_TX field, PSBT v1 needs a version number bump to enforce backward incompatibility. However, once the inputs and outputs are decided, a PSBT can be downgraded back to v0 by creating an unsigned transaction from the fields mentioned above and dropping these new fields.Andrew Chow has proposed these changes in BIP 174 and is willing to write a pull request to modify it if the changes are deemed reasonable.A new version of Partially Signed Bitcoin Transaction (PSBT) has been proposed to address the deficiencies in the current PSBT v0. The main change in this proposal is to store all input and output data for each in their respective maps, eliminating the need to parse an unsigned transaction and perform a lookup for data. This change would disallow the use of the PSBT_GLOBAL_UNSIGNED_TX field in the new version.To implement these changes, several fields are suggested to be added to both the Global and Input/Output sections of PSBT. One notable addition is the PSBT_GLOBAL_PREFERRED_LOCKTIME, which specifies the locktime to use if no inputs require a specific locktime. Another important field is the PSBT_IN_REQUIRED_LOCKTIME, which is necessary for inputs involving OP_CHECKLOCKTIMEVERIFY. This field allows finalizers to choose a locktime that meets the minimum requirement without needing to understand the scripts involved.It is worth mentioning that a Bitcoin transaction only has a single locktime, while a PSBT may have multiple locktimes.
Updated on: 2023-08-02T02:54:05.328979+00:00