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 C71AFBAE for ; Thu, 7 Sep 2017 19:36:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from blaine.gmane.org (unknown [195.159.176.226]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 42C20113 for ; Thu, 7 Sep 2017 19:36:58 +0000 (UTC) Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dq2b5-0000Qx-OR for bitcoin-dev@lists.linuxfoundation.org; Thu, 07 Sep 2017 21:36:19 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bitcoin-dev@lists.linuxfoundation.org From: Andreas Schildbach Date: Thu, 7 Sep 2017 21:35:49 +0200 Message-ID: References: <0d405f5d-c0a4-bad7-b6c3-08ba4424bf17@satoshilabs.com> <8b4831a4-791e-c03e-baa4-16d9e5ead442@electrum.org> <84f4a4b8-fcbd-433b-9556-174ec5475f61@satoshilabs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@blaine.gmane.org User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 In-Reply-To: <84f4a4b8-fcbd-433b-9556-174ec5475f61@satoshilabs.com> Content-Language: en-US X-Spam-Status: No, score=2.4 required=5.0 tests=DKIM_ADSP_ALL,RDNS_NONE autolearn=disabled version=3.3.1 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: Re: [bitcoin-dev] Proposal: Extended serialization format for BIP-32 wallets 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: Thu, 07 Sep 2017 19:36:58 -0000 On 09/07/2017 06:23 PM, Pavol Rusnak via bitcoin-dev wrote: > On 07/09/17 06:29, Thomas Voegtlin via bitcoin-dev wrote: >> A solution is still needed to wallets who do not wish to use BIP43 > > What if we added another byte field OutputType for wallets that do not > follow BIP43? > > 0x00 - P2PKH output type > 0x01 - P2WPKH-in-P2SH output type > 0x02 - native Segwit output type > > Would that work for you? I think that would work. > The question is whether this field should be present only if depth==0x00 > or at all times. What is your suggestion, Thomas? In case of Bitcoin Wallet, the depth is not null (m/0'/[0,1]) and still we need this field. I think it should always be present if a chain is limited to a certain script type. There is however the case where even on one chain, script types are mixed. In this case the field should be omitted and the wallet needs to scan for all (known) types. Afaik Bitcoin Core is taking this path.