public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Sergio Demian Lerner <sergio.d.lerner@gmail•com>
To: jl2012@xbt•hk
Cc: bitcoin-dev <bitcoin-dev@lists•linuxfoundation.org>
Subject: Re: [bitcoin-dev] BIP147 minor error
Date: Tue, 22 Mar 2016 07:39:51 -0300	[thread overview]
Message-ID: <CAKzdR-pZMR0vpu+T6a5n7RQeffDHmqrtw7doDEkAaPzkcpWWJg@mail.gmail.com> (raw)
In-Reply-To: <002e01d18406$e55554e0$affffea0$@xbt.hk>

[-- Attachment #1: Type: text/plain, Size: 1040 bytes --]

My mistake.
El mar 22, 2016 3:49 AM, <jl2012@xbt•hk> escribió:

> Do you mean BIP141?
>
>
>
> Your example is an error by BIP141:
>
>
>
> 1*4 + 79999*1 = 80003 > 80000
>
>
>
> *From:* bitcoin-dev-bounces@lists•linuxfoundation.org [mailto:
> bitcoin-dev-bounces@lists•linuxfoundation.org] *On Behalf Of *Sergio
> Demian Lerner via bitcoin-dev
> *Sent:* Monday, 21 March, 2016 10:51
> *To:* bitcoin-dev <bitcoin-dev@lists•linuxfoundation.org>
> *Subject:* [bitcoin-dev] BIP147 minor error
>
>
>
> The BIP147 reads:
>
> *Sigop cost* is defined. The cost of a sigop in traditional script is 4,
> while the cost of a sigop in witness program is 1.
>
> The new rule is total *sigop cost* ≤ 80,000.
>
> But the code implements:
>
> if (nSigOps + (nWitSigOps + 3) / 4 > MAX_BLOCK_SIGOPS)
>
>  ... error....
>
> Which is not the same.
>
>
> For example:
>
> nSigOps = 1
> nWitSigOps =79999
>
> Is not an error by BIP definition but it's an error by the implemented
> code.
>
> Regards, Sergio.
>

[-- Attachment #2: Type: text/html, Size: 2959 bytes --]

      reply	other threads:[~2016-03-22 10:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21  2:50 Sergio Demian Lerner
2016-03-22  6:48 ` jl2012
2016-03-22 10:39   ` Sergio Demian Lerner [this message]

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=CAKzdR-pZMR0vpu+T6a5n7RQeffDHmqrtw7doDEkAaPzkcpWWJg@mail.gmail.com \
    --to=sergio.d.lerner@gmail$(echo .)com \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    --cc=jl2012@xbt$(echo .)hk \
    /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