Skip to content

Commit 1b7590e

Browse files
committed
bip-0115: Include best practices for wallets, and explain difference from lock-time in Rationale
1 parent 0fbeba8 commit 1b7590e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

bip-0115.mediawiki

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,20 @@ In the event of a persistent blockchain split, some mechanism is desired by whic
6262

6363
This can be guaranteed by choosing a block which exists only on either side of the split, and pinning (using <code>OP_CHECKBLOCKATHEIGHT</code>) common UTXOs to be spent only on chains based on that block.
6464

65+
==Best practices for wallets==
66+
67+
To avoid unnecessary conflicts when a chain is reorganized, wallets should always avoid specifying the last 100 blocks when practical.
68+
Wallets that use recent blocks when unavoidable SHOULD actively monitor the network and re-create transactions that are reorganised out with updated block hashes.
69+
Unless it conflicts with local/user security policies, wallets SHOULD retain the private key in memory to re-sign such transactions until the pinned block is at least 100 blocks deep into the chain.
70+
71+
For ordinary usage, wallets SHOULD specify the ParamBlockHash as 16 bytes.
72+
6573
==Rationale==
6674

75+
How is this different from the transaction's lock-time?
76+
77+
* The lock-time specifies a time or block height before a transaction becomes valid. <code>OP_CHECKBLOCKATHEIGHT</code>, on the other hand, specifies a specific block's hash.
78+
6779
Why are block heights required to be absolute, rather than relative?
6880

6981
* A relative block height would allow for creation of transactions which are valid at block N, but not N+1. This is carefully avoided by Bitcoin to ensure that if any given block is reorganised out, non-malicious transactions can be simply re-confirmed in a later block.

0 commit comments

Comments
 (0)