Skip to content

Comments

BIP128: Timelock-Recovery Storage Format#2068

Open
oren-z0 wants to merge 17 commits intobitcoin:masterfrom
oren-z0:new-bip-timelock-recovery-storage-format
Open

BIP128: Timelock-Recovery Storage Format#2068
oren-z0 wants to merge 17 commits intobitcoin:masterfrom
oren-z0:new-bip-timelock-recovery-storage-format

Conversation

@oren-z0
Copy link

@oren-z0 oren-z0 commented Dec 29, 2025

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.

@oren-z0 oren-z0 force-pushed the new-bip-timelock-recovery-storage-format branch 3 times, most recently from 6e47c4c to 067d49e Compare December 29, 2025 17:00
@bitcoin bitcoin deleted a comment from josepcory30-droid Dec 30, 2025
@oren-z0 oren-z0 force-pushed the new-bip-timelock-recovery-storage-format branch from 067d49e to fb26c74 Compare January 2, 2026 19:26
@murchandamus murchandamus changed the title New BIP: Timelock Recovery storage format BIP Draft: Timelock-Recovery Storage Format Jan 2, 2026
@oren-z0 oren-z0 force-pushed the new-bip-timelock-recovery-storage-format branch 5 times, most recently from 9e85b42 to 039c54c Compare January 2, 2026 19:42
@murchandamus murchandamus self-requested a review January 2, 2026 19:52
@oren-z0 oren-z0 force-pushed the new-bip-timelock-recovery-storage-format branch 2 times, most recently from b244daa to d3a4845 Compare January 3, 2026 07:50
Copy link
Member

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, with a reference to BIP 140 instead of BIP 62.

@oren-z0 oren-z0 force-pushed the new-bip-timelock-recovery-storage-format branch from 6eb64d2 to 60fee7c Compare January 27, 2026 21:10
@murchandamus murchandamus added the PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author label Jan 27, 2026
@oren-z0 oren-z0 requested a review from murchandamus January 27, 2026 22:34
oren-z0 and others added 8 commits January 28, 2026 01:11
@oren-z0 oren-z0 force-pushed the new-bip-timelock-recovery-storage-format branch from 50606a5 to 4cbfb1e Compare January 27, 2026 23:11

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

@oren-z0 oren-z0 Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

oren-z0 and others added 2 commits January 29, 2026 23:36
Co-authored-by: Mark "Murch" Erhardt <murch@murch.one>
@oren-z0 oren-z0 requested a review from murchandamus January 29, 2026 23:10
@oren-z0 oren-z0 force-pushed the new-bip-timelock-recovery-storage-format branch 2 times, most recently from a879627 to 0bb24ea Compare January 29, 2026 23:27
@oren-z0 oren-z0 force-pushed the new-bip-timelock-recovery-storage-format branch from 0bb24ea to 38acc9d Compare January 29, 2026 23:46
Copy link
Member

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@murchandamus murchandamus added Needs number assignment and removed PR Author action required Needs updates, has unaddressed review comments, or is otherwise waiting for PR author labels Feb 3, 2026
@oren-z0
Copy link
Author

oren-z0 commented Feb 3, 2026

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 we have a small market of less-technical Bitcoiners who don't want to switch to a multisig wallet and use one of the "collaborative custody" solutions. It's also more secure in my opinion (no 3rd party key that could leak), but with the downside of not being able to touch that wallet (without re-signing new transactions).

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 testmempoolaccept anyways.

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".

@murchandamus
Copy link
Member

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 murchandamus changed the title BIP Draft: Timelock-Recovery Storage Format BIP128: Timelock-Recovery Storage Format Feb 5, 2026
@oren-z0
Copy link
Author

oren-z0 commented Feb 5, 2026

@murchandamus Pushed the changes. BIP 2^7 🤓

@oren-z0 oren-z0 force-pushed the new-bip-timelock-recovery-storage-format branch from 3bfb9c8 to 6ce8e77 Compare February 5, 2026 22:02
@murchandamus
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants