From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 9F5C11429 for ; Sun, 26 May 2019 17:54:22 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 90C57A9 for ; Sun, 26 May 2019 17:54:21 +0000 (UTC) Received: by mail-oi1-f182.google.com with SMTP id u64so10416322oib.1 for ; Sun, 26 May 2019 10:54:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=0XhFa7ghePgXBp+rQ8mpR/fkicBEbJx28TZu3iSiJAM=; b=ft/bJPkm5j6vO73CPIPpmVfmyrRbyy9YSH33rhQ4UXbnnGE5kcQmcq8J/L9epPBnB3 GVxIqiqusxTJN0iVllDroz+2Dr17kBgmgYEopV5CW0yiPdowCZxDfFT+Vd4lZVikj1zG yeWDm3MLUD13rEHzQ2fNr9gdU8BVNBGgC+2BZrHISSFvGBEFggHZ9uSn9NGu3ANaQsdD Z8g/R7mSCZvC/xcwevLv6R9b7tKx/Eo4aQv6FV5lTAH7YX0lFx9riupgELSbrg9m4r54 zNNL/Ib7l+09L+ZbWXJmF8/rqcPYX8WhmVleEqSblyIgU1GnfTM9CcioBnn/00GpnJOw dfzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=0XhFa7ghePgXBp+rQ8mpR/fkicBEbJx28TZu3iSiJAM=; b=VLQBLKqYnMSGcyaA60XSeuGfNYYYUxRP0dhhHmbkG77gzHB/uJBWw5LVSYpWrZr3sI GtrYjbzA+L/RHgQCp+4yQaMVZVoH+/9PhHFpYpufB2Pjz5m+YicuoyNmgpxkDhOxMzKH Da3M5b0LBHKS4Q/ODgGoZaFSRgRpnrOXdKMpj/99FUMnEGB5nWkyqG06D8I3CGb1oy7E xDOmDn98Ez+Beznc/Ot9j9OKxdLfOR8uc38N/4Tb7YbzV27EVwz18SyXcJ3fEghrsBnY ww/Y8SzKbgahjHKLrrtR3WkM5YrEiL1Bv3QR+UBrDbGPFTBAN5CeUrdbRoJYu6865l/c +RmQ== X-Gm-Message-State: APjAAAWosI+zqraIts3k9m3F9ZMQdZo6o9LlT4hX83689k+lyEAmbVlT g7SpC7U+rlt33muSBQbqLdBSwV1gXCUif2Zr8gQ= X-Google-Smtp-Source: APXvYqyfyHbpK46WQq8d8qELRyFnPbhVjefPv/T3+menLaC9ZW0ohIvQE7WQJKyNUSh9iA3Y4/bqTcrxUMvA1kLrwY8= X-Received: by 2002:aca:f007:: with SMTP id o7mr12788483oih.59.1558893260458; Sun, 26 May 2019 10:54:20 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Pieter Wuille Date: Sun, 26 May 2019 10:54:08 -0700 Message-ID: To: Aymeric Vitte , Bitcoin Dev Content-Type: multipart/alternative; boundary="0000000000000851400589ce1f5d" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org X-Mailman-Approved-At: Mon, 27 May 2019 14:28:01 +0000 Subject: Re: [bitcoin-dev] Two questions about segwit implementation 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: Sun, 26 May 2019 17:54:22 -0000 --0000000000000851400589ce1f5d Content-Type: text/plain; charset="UTF-8" On Sun, May 26, 2019, 07:07 Aymeric Vitte via bitcoin-dev < bitcoin-dev@lists.linuxfoundation.org> wrote: > I realized recently that my segwit implementation was not correct, > basically some time ago, wrongly reading the specs (and misleaded by > what follows), I thought that scriptsig would go into witness data as it > was, but that's not the case, op_pushdata is replaced by varlen > > Now reading correctly the specs, they seem to be not totally correct, > then the first question is: why OP_0 is 00 in witness data and not 0100? > Does this apply to other op_codes? This does not look logical at all > > The second question is: why for non segwit inputs there is a 00 length > in segwit data, what is the rational for that? It should just be nothing > since you don't need this to reconciliate things > This is a question that belongs on https://bitcoin.stackexchange.com, not this list. Cheers, -- Pieter --0000000000000851400589ce1f5d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sun, May 26, 2019, 07:07 Aymeric Vitte via bitcoin-dev <= bitcoin-dev@lists.= linuxfoundation.org> wrote:
= I realized recently that my segwit implementation was not correct,
basically some time ago, wrongly reading the specs (and misleaded by
what follows), I thought that scriptsig would go into witness data as it was, but that's not the case, op_pushdata is replaced by varlen

Now reading correctly the specs, they seem to be not totally correct,
then the first question is: why OP_0 is 00 in witness data and not 0100? Does this apply to other op_codes? This does not look logical at all

The second question is: why for non segwit inputs there is a 00 length
in segwit data, what is the rational for that? It should just be nothing since you don't need this to reconciliate things
=

This is a question that= belongs on https://bitcoin.s= tackexchange.com, not this list.

Cheers,

--= =C2=A0
Pieter

--0000000000000851400589ce1f5d--