Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id DB6E3725 for ; Sat, 1 Oct 2016 04:10:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 5BFEC100 for ; Sat, 1 Oct 2016 04:10:53 +0000 (UTC) Received: by ozlabs.org (Postfix, from userid 1011) id 3smFGd5JW7z9sdn; Sat, 1 Oct 2016 14:10:49 +1000 (AEST) From: Rusty Russell To: Luke Dashjr , Bitcoin Protocol Discussion , Bitcoin Protocol Discussion In-Reply-To: <201609230957.03138.luke@dashjr.org> References: <201609230957.03138.luke@dashjr.org> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Sat, 01 Oct 2016 13:31:04 +0930 Message-ID: <87oa34d8fz.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: Re: [bitcoin-dev] BIP draft: OP_CHECKBLOCKATHEIGHT X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2016 04:10:54 -0000 Luke Dashjr via bitcoin-dev writes: > This BIP describes a new opcode (OP_CHECKBLOCKATHEIGHT) for the Bitcoin > scripting system to address reissuing bitcoin transactions when the coins they > spend have been conflicted/double-spent. > > https://github.com/luke-jr/bips/blob/bip-cbah/bip-cbah.mediawiki > > Does this seem like a good idea/approach? Prefer a three-arg version (gbits-to-compare, blocknum, hash): - If is 0 or > 256, invalid. - If the hash length is not ( + 7) / 8, invalid. - If the hash unused bits are not 0, invalid. - Otherwise of hash is compared to lower of blockhash. This version also lets you play gambling games on-chain! Or maybe I've just put another nail in CBAH's coffin? Cheers, Rusty.