Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: PixelPaul on May 28, 2018, 06:30:58 AM



Title: CHECKSEQUENCEVERIFY After x time of last transaction
Post by: PixelPaul on May 28, 2018, 06:30:58 AM
Hello all,
I am just doing some research on bitcoin and some features. And i came accross CHECKSEQUENCEVERIFY Which seems likes a great feature.
I was just wanting to know if anyone can help... is it possible to use it with the time you specify to be relative to the last transaction on the selected address?

So if i had...

Code:
 IF
        2 <Alice's pubkey> <Bob's pubkey> <Escrow's pubkey> 3 CHECKMULTISIG
    ELSE
        "30d" CHECKSEQUENCEVERIFY DROP
        <Alice's pubkey> CHECKSIG
    ENDIF

I could make it so not just 30 days, but 30 days from last transaction.


Title: Re: CHECKSEQUENCEVERIFY After x time of last transaction
Post by: achow101 on May 28, 2018, 04:46:36 PM
I could make it so not just 30 days, but 30 days from last transaction.
No, you cannot.


Title: Re: CHECKSEQUENCEVERIFY After x time of last transaction
Post by: PixelPaul on May 29, 2018, 12:34:16 AM
I could make it so not just 30 days, but 30 days from last transaction.
No, you cannot.

That’s a shame.
Do you know of any way where i can have a multi-sig address which will allow one of the signers to use only their single key after a set amount of time after each transaction/update on the address?

I want to have an address that requires 2 people to sign for outgoing transactions. But if after 30 days nothing has been done with the address at all a single user can sign a transaction. But if there is ever anything such as an incoming or outgoing transaction the 30 days is reset.


Title: Re: CHECKSEQUENCEVERIFY After x time of last transaction
Post by: achow101 on May 29, 2018, 01:26:35 AM
That’s a shame.
Do you know of any way where i can have a multi-sig address which will allow one of the signers to use only their single key after a set amount of time after each transaction/update on the address?

I want to have an address that requires 2 people to sign for outgoing transactions. But if after 30 days nothing has been done with the address at all a single user can sign a transaction. But if there is ever anything such as an incoming or outgoing transaction the 30 days is reset.
That is impossible to do. Bitcoin does not work that way. First of all, Bitcoin does not actually use addresses or accounts on the technical level. It is just UTXOs, and UTXOs have a script that is generated from an address. A UTXO is not aware of any other UTXO and finding other UTXOs that have the same script (i.e. the same address) is computationally expensive.


Title: Re: CHECKSEQUENCEVERIFY After x time of last transaction
Post by: pebwindkraft on May 29, 2018, 08:01:56 AM
as mentioned before, there is no direct possibility, so one could think about a workaround. I had already provided a response to your request on bitcoin.SE, before seeing the post here:

https://bitcoin.stackexchange.com/questions/75650/checksequenceverify-after-x-time-of-last-transaction/75659#75659 (https://bitcoin.stackexchange.com/questions/75650/checksequenceverify-after-x-time-of-last-transaction/75659#75659)