Re: [Bitcoin-development] Relative CHECKLOCKTIMEVERIFY (was CLTV proposal)

2015-05-06 Thread Tier Nolan
On Wed, May 6, 2015 at 8:37 AM, Jorge Timón wrote: > > This gives you less flexibility and I don't think it's necessary. > Please let's try to avoid this if it's possible. It is just a switch that turns on and off the new mode. In retrospect, it would be better to just up the transaction versi

Re: [Bitcoin-development] Relative CHECKLOCKTIMEVERIFY (was CLTV proposal)

2015-05-06 Thread Jorge Timón
On Tue, May 5, 2015 at 10:38 PM, Tier Nolan wrote: > I think that should be greater than in the comparison? You want it to fail > if the the height of the UTXO plus the sequence number is greater than the > spending block's height. Yes, sorry, I changed it just before sending from "what needs to

Re: [Bitcoin-development] Relative CHECKLOCKTIMEVERIFY (was CLTV proposal)

2015-05-05 Thread Tier Nolan
I think that should be greater than in the comparison? You want it to fail if the the height of the UTXO plus the sequence number is greater than the spending block's height. There should be an exception for final inputs. Otherwise, they will count as relative locktime of 0x. Is this ch

Re: [Bitcoin-development] Relative CHECKLOCKTIMEVERIFY (was CLTV proposal)

2015-05-05 Thread Jorge Timón
Well, apparently the timestamp can be make compatible with Mark's nSequence-based RCLTV by adding an additional check at the block level but I was only explaining the concept using heights (which is the most interesting part IMO). I'm also not sure I understood the details and I don't want to confu

Re: [Bitcoin-development] Relative CHECKLOCKTIMEVERIFY (was CLTV proposal)

2015-05-04 Thread Btc Drak
On Mon, May 4, 2015 at 12:24 PM, Jorge Timón wrote: > What I was describing was an attempt to fix a similar proposal by Mark > Friedenbach, but it didn't needed fixing: I was simply > misunderstanding it. > Mark's RCLTV is completely reorg safe, so there's no need for the 100 > block restriction.

Re: [Bitcoin-development] Relative CHECKLOCKTIMEVERIFY (was CLTV proposal)

2015-05-04 Thread Jorge Timón
What I was describing was an attempt to fix a similar proposal by Mark Friedenbach, but it didn't needed fixing: I was simply misunderstanding it. Mark's RCLTV is completely reorg safe, so there's no need for the 100 block restriction. It also keeps the script validation independent from the utxo.

Re: [Bitcoin-development] Relative CHECKLOCKTIMEVERIFY (was CLTV proposal)

2015-05-03 Thread Matt Corallo
On 04/21/15 07:59, Peter Todd wrote: > On Mon, Mar 16, 2015 at 10:22:13PM +, Matt Corallo wrote: >> In building some CLTV-based contracts, it is often also useful to have a >> method of requiring, instead of locktime-is-at-least-N, >> locktime-is-at-least-N-plus-the-height-of-my-input. ie you

Re: [Bitcoin-development] Relative CHECKLOCKTIMEVERIFY (was CLTV proposal)

2015-04-28 Thread Jorge Timón
Even if it's new and has not received any feedback, I think my solution to op_maturity is quite clean. But anyway, yes, the non-relative cltv is much simpler in design and doesn't have to wait for the other. On the other hand, I would upgrade it to absolute cltv like you suggested and take the curr

Re: [Bitcoin-development] Relative CHECKLOCKTIMEVERIFY (was CLTV proposal)

2015-04-27 Thread Peter Todd
On Sun, Apr 26, 2015 at 02:20:04PM +0200, Jorge Timón wrote: > On Sun, Apr 26, 2015 at 1:35 PM, Jorge Timón wrote: > > And a new softfork rule could enforce that all new CTxIn set nHeight > > to the correct height in which its corresponding prevout got into the > > chain. > > That would remove the

Re: [Bitcoin-development] Relative CHECKLOCKTIMEVERIFY (was CLTV proposal)

2015-04-26 Thread Jorge Timón
On Sun, Apr 26, 2015 at 1:35 PM, Jorge Timón wrote: > There's another possibility that could keep the utxo out of Script > verification: > > class CTxIn > { > public: > COutPoint prevout; > CScript scriptSig; > uint32_t nSequence; > } > > could turn into: > > class CTxIn > { > public:

Re: [Bitcoin-development] Relative CHECKLOCKTIMEVERIFY (was CLTV proposal)

2015-04-26 Thread Jorge Timón
On Tue, Apr 21, 2015 at 9:59 AM, Peter Todd wrote: > Thus we have a few possibilities: > > 1) RCLTV against nLockTime > > Needs a minimum age > COINBASE_MATURITY to be safe. > > > 2) RCLTV against current block height/time > > Completely reorg safe. Yes, can we call this one OP_MATURITY to distin

Re: [Bitcoin-development] Relative CHECKLOCKTIMEVERIFY (was CLTV proposal)

2015-04-21 Thread Peter Todd
On Mon, Mar 16, 2015 at 10:22:13PM +, Matt Corallo wrote: > In building some CLTV-based contracts, it is often also useful to have a > method of requiring, instead of locktime-is-at-least-N, > locktime-is-at-least-N-plus-the-height-of-my-input. ie you could imagine > an OP_RELATIVECHECKLOCKTIME

Re: [Bitcoin-development] Relative CHECKLOCKTIMEVERIFY (was CLTV proposal)

2015-03-19 Thread Zooko Wilcox-OHearn
I'm in favor of relative CHECKLOCKTIMEVERIFY, but I don't have a very specific reason. I just have a vague worry that there can be "race conditions" in which a txn with an absolute CHECKLOCKTIMEVERIFY goes into the blockchain later than one of its signers expected that it would, and therefore there

[Bitcoin-development] Relative CHECKLOCKTIMEVERIFY (was CLTV proposal)

2015-03-16 Thread Matt Corallo
In building some CLTV-based contracts, it is often also useful to have a method of requiring, instead of locktime-is-at-least-N, locktime-is-at-least-N-plus-the-height-of-my-input. ie you could imagine an OP_RELATIVECHECKLOCKTIMEVERIFY that reads (does not pop) the top stack element, adds the heigh