public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Matt Whitlock <bip@mattwhitlock.name>
To: Peter Todd <pete@petertodd.org>
Cc: bitcoin-development@lists.sourceforge.net,
	Flavien Charlon <flavien.charlon@coinprism.com>
Subject: Re: [Bitcoin-development] [BIP draft] CHECKLOCKTIMEVERIFY - Prevent a txout from being spent until an expiration time
Date: Fri, 03 Oct 2014 10:30:45 -0400	[thread overview]
Message-ID: <2245970.WQSVoH38ra@crushinator> (raw)
In-Reply-To: <1987325.zKPNeYyO8K@crushinator>

Oops, sorry. I meant: replace the top stack item with the block height of the txin doing the redeeming. (So the script can calculate the "current time" to some reference time embedded in the script.)


On Friday, 3 October 2014, at 10:28 am, Matt Whitlock wrote:
> Is there a reason why we can't have the new opcode simply replace the top stack item with the block height of the txout being redeemed? Then arbitrary logic could be implemented, including "output cannot be spent until a certain time" and also "output can ONLY be spent until a certain time," as well as complex logic with alternative key groups with differing time constraints.
> 
> OP_CHECKLOCKTIMEVERIFY, as conceived, seems too limited, IMHO.
> 
> 
> On Thursday, 2 October 2014, at 4:05 pm, Flavien Charlon wrote:
> > Very good, I like the proposal.
> > 
> > A question I have: can it be used to do the opposite, i.e. build a script
> > that can only be spent up until block X?
> > 
> > On Thu, Oct 2, 2014 at 2:09 AM, Peter Todd <pete@petertodd.org> wrote:
> > 
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA256
> > >
> > >
> > >
> > > On 1 October 2014 17:55:36 GMT-07:00, Luke Dashjr <luke@dashjr.org> wrote:
> > > >On Thursday, October 02, 2014 12:05:15 AM Peter Todd wrote:
> > > >> On 1 October 2014 11:23:55 GMT-07:00, Luke Dashjr <luke@dashjr.org>
> > > >wrote:
> > > >> >Thoughts on some way to have the stack item be incremented by the
> > > >> >height at
> > > >> >which the scriptPubKey was in a block?
> > > >>
> > > >> Better to create a GET-TXIN-BLOCK-(TIME/HEIGHT)-EQUALVERIFY operator.
> > > >> scriptPubKey would be:
> > > >>     GET-TXIN-BLOCKHEIGHT-EQUALVERIFY
> > > >> (fails unless top stack item is equal to the txin block height)
> > > >>     <delta height> ADD
> > > >> (top stack item is now txin height + delta height)
> > > >>     CHECKLOCKTIMEVERIFY
> > > >
> > > >This sounds do-able, although it doesn't address using timestamps.
> > >
> > > For timestamps replace "height" with "time" in the above example; the
> > > minimum block time rule will prevent gaming it.
> > >
> > >
> > > >> You'd want these sacrifices to unlock years into the future to
> > > >thoroughly
> > > >> exceed any reasonable business cycle; that's so far into the future
> > > >that
> > > >> miners are almost certain to just mine them and collect the fees.
> > > >
> > > >For many use cases, short maturity periods are just as appropriate IMO.
> > >
> > > Very easy to incentivise mining centralisation with short maturities. I
> > > personally think just destroying coins is better, but it doesn't sit well
> > > with people so this is the next best thing.
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: APG v1.1.1
> > >
> > > iQFQBAEBCAA6BQJULKWsMxxQZXRlciBUb2RkIChsb3cgc2VjdXJpdHkga2V5KSA8
> > > cGV0ZUBwZXRlcnRvZGQub3JnPgAKCRAZnIM7qOfwhcg8CACueZNGfWaZR+xyG9/o
> > > JwDBCnqOtwr6Bnosg3vNcRIDUnmsh+Qkk5dk2JpqYNYw7C3duhlwHshgsGOFkHEV
> > > f5RHDwkzGLJDLXrBwxxcIDdm3cJL8UVpQzJ7dD7aSnfj7MU/0aru3HaIU2ZfymUb
> > > 63jhul6FGbXH3K6p3bOoNrfIrCCGOv8jOIzeAgxNPydk8MVPgRhlYLAKBJxu8nMr
> > > 1oJGeaKVSGSPSrRdgS8tI4uOs0F4Q49APrLPGxGTERlATmWrr+asHGJTIxsB2IEm
> > > vrNgVRpkaN4Of9k96qzD9ReKfBfqm0WQKLolcXCVqGpdoHcvXh2AeWdjB/EFTyOq
> > > SOgO
> > > =WybM
> > > -----END PGP SIGNATURE-----
> > >
> > >
> > >
> > > ------------------------------------------------------------------------------
> > > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> > > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> > > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> > > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
> > >
> > > http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> > > _______________________________________________
> > > Bitcoin-development mailing list
> > > Bitcoin-development@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/bitcoin-development
> > >



  reply	other threads:[~2014-10-03 14:30 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-01 13:08 [Bitcoin-development] [BIP draft] CHECKLOCKTIMEVERIFY - Prevent a txout from being spent until an expiration time Peter Todd
2014-10-01 15:01 ` Gavin Andresen
2014-10-02  1:06   ` Peter Todd
2014-10-01 15:29 ` Sergio Lerner
2014-10-01 17:06   ` Peter Todd
2014-10-01 18:23 ` Luke Dashjr
2014-10-01 20:58   ` Gavin Andresen
2014-10-01 21:04     ` Alan Reiner
2014-10-01 21:34       ` Gavin Andresen
2014-10-02  0:12         ` Peter Todd
2014-10-02  0:05   ` Peter Todd
2014-10-02  0:55     ` Luke Dashjr
2014-10-02  1:09       ` Peter Todd
2014-10-02 15:05         ` Flavien Charlon
2014-10-03 14:28           ` Matt Whitlock
2014-10-03 14:30             ` Matt Whitlock [this message]
2014-10-03 16:17             ` Gregory Maxwell
2014-10-03 17:50             ` Luke Dashjr
2014-10-03 20:58               ` Mike Hearn
2014-10-03 23:12                 ` Jeff Garzik
2014-10-04  0:38                   ` Peter Todd
2014-10-04 12:58                     ` Mike Hearn
2014-10-07 15:50                       ` Gavin Andresen
2014-10-07 16:08                         ` Mike Hearn
2014-10-08 10:26                           ` Wladimir
2014-10-09  3:13                             ` Alan Reiner
2014-10-09  6:14                               ` Adam Back
2014-10-09  6:28                                 ` Gregory Maxwell
2014-10-09  6:33                                   ` Peter Todd
2014-10-09  6:40                                     ` Gregory Maxwell
2014-10-08  4:07                         ` Tom Harding
2014-10-08 10:15                           ` Mike Hearn
2015-03-16 22:22 ` [Bitcoin-development] Relative CHECKLOCKTIMEVERIFY (was CLTV proposal) Matt Corallo
2015-03-19 17:39   ` Zooko Wilcox-OHearn
2015-04-21  7:59   ` Peter Todd
2015-04-26 11:35     ` Jorge Timón
2015-04-26 12:20       ` Jorge Timón
2015-04-27 19:35         ` Peter Todd
2015-04-28  7:44           ` Jorge Timón
2015-05-04  2:15     ` Matt Corallo
2015-05-04 11:24       ` Jorge Timón
2015-05-05  0:41         ` Btc Drak
2015-05-05 19:19           ` Jorge Timón
2015-05-05 20:38         ` Tier Nolan
2015-05-06  7:37           ` Jorge Timón
2015-05-06 22:09             ` Tier Nolan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2245970.WQSVoH38ra@crushinator \
    --to=bip@mattwhitlock.name \
    --cc=bitcoin-development@lists.sourceforge.net \
    --cc=flavien.charlon@coinprism.com \
    --cc=pete@petertodd.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox