public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Luke Dashjr <luke@dashjr•org>
To: Rusty Russell <rusty@rustcorp•com.au>
Cc: Bitcoin Protocol Discussion <bitcoin-dev@lists•linuxfoundation.org>
Subject: Re: [bitcoin-dev] BIP draft: OP_CHECKBLOCKATHEIGHT
Date: Sat, 1 Oct 2016 05:02:09 +0000	[thread overview]
Message-ID: <201610010502.09524.luke@dashjr.org> (raw)
In-Reply-To: <87oa34d8fz.fsf@rustcorp.com.au>

On Saturday, October 01, 2016 4:01:04 AM Rusty Russell wrote:
> Prefer a three-arg version (gbits-to-compare, blocknum, hash):
> - If <bits> is 0 or > 256, invalid.
> - If the hash length is not (<bits> + 7) / 8, invalid.

This means zero padding on-chain, which would be undesirable.
Rather "at most" and have the consensus implementation do the padding.

> - If the hash unused bits are not 0, invalid.

Why?

> - Otherwise <bits> of hash is compared to lower <bits> of blockhash.

Lower in what endian? Why only that endian? Why only lower? I can see a 
possible use case where one wants to look at only the high bits to ensure 
their transaction is only valid in a block with at least a certain 
difficulty...

> This version also lets you play gambling games on-chain!
> 
> Or maybe I've just put another nail in CBAH's coffin?

Or maybe resurrected it...

Luke


  reply	other threads:[~2016-10-01  5:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-23  9:57 Luke Dashjr
2016-09-23 13:43 ` Russell O'Connor
     [not found]   ` <CAAS2fgQGC695mkyze+mVTZZoQN1mh+1y32u-D6Yv1R7nXWPDcg@mail.gmail.com>
2016-09-23 18:57     ` Gregory Maxwell
2016-09-23 20:02       ` Peter Todd
2016-09-23 22:20   ` Luke Dashjr
2016-09-23 23:43     ` Gregory Maxwell
2016-09-23 14:37 ` Tom
2016-09-23 22:34   ` Luke Dashjr
2016-09-24  0:08     ` Dave Scotese
2016-09-24  9:37     ` Tom
2016-09-23 16:18 ` Peter Todd
2016-10-01  4:01 ` Rusty Russell
2016-10-01  5:02   ` Luke Dashjr [this message]
2016-10-05  2:15     ` Nathan Cook

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=201610010502.09524.luke@dashjr.org \
    --to=luke@dashjr$(echo .)org \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    --cc=rusty@rustcorp$(echo .)com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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