Subject: Re: [bitcoin-dev] BIP draft: OP_CHECKBLOCKATHEIGHT

From: Nathan Cook <[email-masked]>
Date: Wed, 5 Oct 2016 05:15:36 +0300

On 1 October 2016 at 08:02, Luke Dashjr via bitcoin-dev <
[email-masked]> wrote:

> On Saturday, October 01, 2016 4:01:04 AM Rusty Russell wrote:
>
> > - 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...

Why not use segwit versioning for all this stuff? That lets you re-enable
the bitwise operations like OP_AND, permitting arbitrary bit-masks.
Further, the "at least a certain difficulty" problem suggests a solution by
extending the validity of opcodes like OP_LESSTHAN etc. to 256-bit inputs.