BIP128: Timelock-Recovery Storage Format#2068
BIP128: Timelock-Recovery Storage Format#2068oren-z0 wants to merge 17 commits intobitcoin:masterfrom
Conversation
6e47c4c to
067d49e
Compare
067d49e to
fb26c74
Compare
9e85b42 to
039c54c
Compare
b244daa to
d3a4845
Compare
murchandamus
left a comment
There was a problem hiding this comment.
Hi Oren, thanks for your submission. I did a first quick pass. From the formatting, this seems already a good start. I left a few comments and questions.
|
|
||
| Both transactions are expected to have an <code>nVersion</code> of at least 2, and an | ||
| <code>nLocktime</code> not higher than the current block height. | ||
| Both transactions should be non-malleable, as defined in [[bip-0062.mediawiki|BIP-62]]. |
There was a problem hiding this comment.
Since the Recovery Transaction appears to spend an output from the Alert Transaction, the Alert transaction is required to be non-malleable. Transactions with non-segwit inputs are always third-party malleable. It therefore seems clear that the Alert Transaction must only have segwit inputs. It’s not clear to me why non-malleability would be necessary for the Recovery Transaction.
Please note that BIP 62 was withdrawn in 2015 and therefore might not be the best choice to express the requirements for the transactions. Either way, it seems to me that it would be useful to be more specific here what exactly the requirements of the transactions are.
There was a problem hiding this comment.
Fixed, with a reference to BIP 140 instead of BIP 62.
6eb64d2 to
60fee7c
Compare
Co-authored-by: Mark "Murch" Erhardt <murch@murch.one>
Co-authored-by: Mark "Murch" Erhardt <murch@murch.one>
This is important in order to prevent users from creating recovery-plans that are hard to propagate.
50606a5 to
4cbfb1e
Compare
|
|
||
| A ''Timelock-Recovery plan'' consists of two transactions: | ||
|
|
||
| * ''Alert Transaction'': A mostly-consolidation transaction that keeps most funds in the original wallet, except for a fee and a small fixed amount that goes to ''anchor-addresses'' - addresses which can be used to accelerate the ''Alert Transaction'' via CPFP. The majority of funds should remain on the original wallet, in a new previously-unused address which we call the ''alert-address''. We use the term ''Alert Transaction'' because it should alert the user that the recovery-plan has been triggered, giving them a limited time to prevent the majority of the funds from moving to the secondary wallets. |
There was a problem hiding this comment.
Not speaking as an editor, but just as a reviewer, I am a bit on the fence regarding the idea of using an on-chain transaction to notify the user that their recovery transaction will reach maturity soon. Something has to broadcast that alert transaction upon maturity for it to be mined. For the user to see that notification, the user would need to actively monitor the wallet that is paid by the alert transaction. Under those two assumptions, why wouldn’t the daemon/service that broadcasts the alert transaction or the receiving app notify the user by a notification on their phone or send an email?
Perhaps you could expand your Rationale on why a transaction was chosen over other ways to notify the user.
There was a problem hiding this comment.
Monitoring the blockchain and looking for the alert-transaction is intended for unintentional broadcast, either by accident or by a malicious hacker.
I've added a new line to explain that using a reliable tool to monitor the blockchain and search for the alert transaction - users can keep one or more online backups of the presigned transactions (unlike seed phrases which should never go online).
Someone hacked the online backup and broadcast the Alert Transaction? Not a big deal, you have many days (depending on the Recovery Transaction nSeqeunce) to prevent the majority of funds from moving to the secondary wallet. An nSequence of ~90 days means that you can even monitor the blockchain manually, by setting a monthly reminder to check https://mempool.space/tx/<alert_txid>
Check our https://timelockrecovery.com for a list of services that can do the monitoring (plus I'm working on a new Android app + service that will let you create the presigned transactions and monitor them).
a879627 to
0bb24ea
Compare
0bb24ea to
38acc9d
Compare
murchandamus
left a comment
There was a problem hiding this comment.
I just looked this over again. From an editorial perspective this looks like it’s getting close to publication. Please consider whether your document introduces any potential incompabilities, and if so, add a Backwards Compatibility section.
Other than that, what are the next steps from your perspective? Are you working with any Bitcoin projects that are working on implementing this scheme? Are you expecting any other reviewers to take a look?
Thanks again for the thorough review. The current implementation in Electrum matches the BIP description. I also developed a similar plugin for Specter Desktop here, which I don't think matches exactly the BIP - but AFAIK Specter Desktop is not being maintained anymore (except for bug fixes). A friend and I founded https://ritrek.com based exactly on the BIP idea, and soon we'll release our Android app where users could create/upload recovery-plans and later initiate them, monitor them (get push-notifications on their status, or if the wallet "double-spent" them), and set a dead-man-switch to initiate them automatically after X months if the app hasn't been opened. I think the BIP is fine as is and doesn't need more reviewers. I have a small doubt whether we should add the Alert Transaction's inputs' amounts - and allow validating the segwit transaction without querying those UTXOs. On the other hand, any service that accepts such JSON should call In any case, if there will be major changes in the future to the json format, we can always add a "version" field, or change the "kind" from "timelock-recovery-plan" to "timelock-recovery-plan-v2". |
|
Assigned BIP 128. Please update the BIP and Assigned headers, the file name of the document, and add a table entry to the README for your BIP. |
|
@murchandamus Pushed the changes. BIP 2^7 🤓 |
3bfb9c8 to
6ce8e77
Compare
|
Thanks for the quick turnaround. I propose leaving this open for a few more days as often a number assignment will spur some additional review. Please feel free to remind me to take another look on 2026-02-12 or later, if this hasn’t gotten more review or been merged. |
This simple BIP explains what Timelock-Recovery plans are, and how they to store them In a standard JSON format, that services could parse and then monitor/execute.