summaryrefslogtreecommitdiff
path: root/bip-0370.mediawiki
diff options
context:
space:
mode:
Diffstat (limited to 'bip-0370.mediawiki')
-rw-r--r--bip-0370.mediawiki12
1 files changed, 8 insertions, 4 deletions
diff --git a/bip-0370.mediawiki b/bip-0370.mediawiki
index bb6ffd6..bacfd16 100644
--- a/bip-0370.mediawiki
+++ b/bip-0370.mediawiki
@@ -103,7 +103,7 @@ The new global types for PSBT Version 2 are as follows:
| None
| No key data
| <tt><8-bit uint></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.
+| An 8 bit unsigned integer as a bitfield for various transaction modification flags. Bit 0 is the Inputs Modifiable Flag, set to 1 to indicate whether inputs can be added or removed. Bit 1 is the Outputs Modifiable Flag, set to 1 to indicate whether outputs can be added or removed. Bit 2 is the Has SIGHASH_SINGLE flag, set to 1 to indicate 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 or remove an input.
|
| 0
| 2
@@ -167,7 +167,7 @@ The new per-input types for PSBT Version 2 are defined as follows:
| None
| No key data
| <tt><32-bit uiht></tt>
-| 32 bit unsigned little endian integer less than 500000000 representing the minimum block height that this input requires to be set as the transaction's lock time.
+| 32 bit unsigned little endian integer greater than 0 and less than 500000000 representing the minimum block height that this input requires to be set as the transaction's lock time.
|
| 0
| 2
@@ -213,11 +213,15 @@ The nLockTime field of a transaction is determined by inspecting the PSBT_GLOBAL
If none of the inputs have a PSBT_IN_REQUIRED_TIME_LOCKTIME and PSBT_IN_REQUIRED_HEIGHT_LOCKTIME, then PSBT_GLOBAL_FALLBACK_LOCKTIME must be used.
If PSBT_GLOBAL_FALLBACK_LOCKTIME is not provided, then it is assumed to be 0.
-If one or more inuts have a PSBT_IN_REQUIRED_TIME_LOCKTIME or PSBT_IN_REQUIRED_HEIGHT_LOCKTIME, then the field chosen is the one which is supported by all of the inputs.
+If one or more inputs have a PSBT_IN_REQUIRED_TIME_LOCKTIME or PSBT_IN_REQUIRED_HEIGHT_LOCKTIME, then the field chosen is the one which is supported by all of the inputs.
This can be determined by looking at all of the inputs which specify a locktime in either of those fields, and choosing the field which is present in all of those inputs.
Inputs not specifying a lock time field can take both types of lock times, as can those that specify both.
The lock time chosen is then the maximum value of the chosen type of lock time.
+If a PSBT has both types of locktimes possible because one or more inputs specify both PSBT_IN_REQUIRED_TIME_LOCKTIME and PSBT_IN_REQUIRED_HEIGHT_LOCKTIME, then locktime determined by looking at the PSBT_IN_REQUIRED_HEIGHT_LOCKTIME fields of the inputs must be chosen.<ref>'''Why choose the height based locktime?'''
+In the event of a tie for the locktime type, signers need to be able to know which locktime to use as their signatures will commit to the locktime in the transaction, so choosing the wrong one will result in an invalid transaction.
+Height based locktime is preferred over time based as Bitcoin's unit of time is the block height, so a height makes more sense in the context of Bitcoin.</ref>
+
===Unique Identification===
PSBTv2s can be uniquely identified by constructing an unsigned transaction given the information provided in the PSBT and computing the transaction ID of that transaction.
@@ -261,7 +265,7 @@ If it changes the transaction's locktime when there are existing signatures, it
If the Has SIGHASH_SINGLE flag is True, then the Constructor must iterate through the inputs and find the inputs which have signatures that use SIGHASH_SINGLE.
The same number of inputs and outputs must be added before those inputs and their corresponding outputs.
-A Constructor may choose to declare that no further inputs and outputs can be added to the transaction by setting the booleans in PSBT_GLOBAL_TX_MODIFIABLE to False or by removing this field entirely.
+A Constructor may choose to declare that no further inputs and outputs can be added to the transaction by setting the appropriate bits in PSBT_GLOBAL_TX_MODIFIABLE to 0 or by removing the field entirely.
A single entity is likely to be both a Creator and Constructor.