summaryrefslogtreecommitdiff
path: root/bip-0370.mediawiki
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2022-06-01 19:56:23 -0400
committerAndrew Chow <achow101-github@achow101.com>2022-06-01 21:13:53 -0400
commit1c8afe6ea4769c3efd42bd7c10b738fbe5263d7f (patch)
tree4889082de70893bd8f0dc2915873d0e742cee471 /bip-0370.mediawiki
parentb1791c24aa163eb6578d0bfaadcf44997484eeaf (diff)
370: Describe locktime type tiebreaker
Diffstat (limited to 'bip-0370.mediawiki')
-rw-r--r--bip-0370.mediawiki6
1 files changed, 5 insertions, 1 deletions
diff --git a/bip-0370.mediawiki b/bip-0370.mediawiki
index 263fd13..89a435b 100644
--- a/bip-0370.mediawiki
+++ b/bip-0370.mediawiki
@@ -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.