Hi AdamSZ, list,
Thanks for showing interest in the BIP and happy new year.
> Btw, do you think you should address directly the philosophy found in Liana, and what setups they have decided to expose? (i.e. what's the delta, here).
Yes, I think it's a good idea to talk about the advantages and disadvantages of pre-signed transactions vs script-based wallets. I'll add it to the Motivation section.
> Should the BIP actually be something with more flexibility in transaction structure, so as to cover more use-cases?
I think it's good to limit the structure of the transactions, so that different services could easily integrate this feature.
One guy that I talked to suggested building a more sophisticated sequence of transactions with multiple wallets, for example that after 90 days the Bitcoin will move to his wife's wallet, from which there will be another pre-signed transaction that moves the Bitcoin to his brother's wallet after 180 days, etc.
But after all, trying to support all custom logics and use-cases will end up in a service that compiles general-purpose "code" instead of something useful for standard users.
> Is there a case for requesting a feature in Core that one could do a 'testmempoolaccept' with a conditional setting of the time/block height as argument?
I've asked for a
testmempoolaccept RPC that ignores nSequence/nLocktime here:
https://github.com/bitcoin/bitcoin/issues/32142 It's a problem even in transactions with a single nLocktime.
testmempoolaccept breaks on the first problem that it finds. Suppose you are signing a transaction with a future nLocktime, and
testmempoolaccept breaks on "non-final" - how do you know that there are no other problems in the transaction? How can you tell that the cryptographic signatures are good, and what if it's a script-based wallet?
Some worry that complicate the testmempoolaccept RPC diverge from how transactions are checked in
sendrawtransaction, and I somewhat agree with that.
Checking the signatures of P2WPKH wallets is straight-forward, but in order to build a service that verifies the Recovery transaction of a complicated wallet (i.e. multisig, taproot, etc.), without initiating the plan - I guess you would need to run a node with patched code for
testmempoolaccept.
> I'm probably being an idiot, but: since you're defining alert_inputs as just txid:vout, what's the point of including it since that data is already in alert_tx, no?
I did mention that the JSON has some information duplicated. Even the alert_txid can be calculated from the raw transaction.
This is useful for displaying the information to the user for review. For example, a webpage to which you drag-n-drop the JSON file, shows you its information and has a button saying "Upload for Monitoring".
This will allow the frontend to show the user the list of UTXOs covered by the recovery-plan, without complicated frontend-code to parse the raw transaction.
Of course, if the user clicks "Upload for Monitoring" and the backend finds out that the alert_inputs mismatch the raw transaction, the whole process should be rejected with a warning that the file was corrupt (possibly maliciously).
> One last thing, that 388 day limit is a little unfortunate, no? I certainly think a year is a good, reasonable "long time", but still, all the same.
388 days is just the maximal value that you get from BIP-68:
After setting the correct bit flags, the relative-locktime is calculated from the lowest 16 bits, in units of 512 seconds.
This gives a maximal value of (2^16 - 1) * 512 seconds = 33,553,920 seconds = 388 days, 8 hours and 32 minutes.
Users can obviously choose a shorter cancellation-window.
Regards,
Oren