Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1WT80M-0000dA-Sd for bitcoin-development@lists.sourceforge.net; Thu, 27 Mar 2014 10:57:50 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of gmx.de designates 212.227.17.21 as permitted sender) client-ip=212.227.17.21; envelope-from=thomasv1@gmx.de; helo=mout.gmx.net; Received: from mout.gmx.net ([212.227.17.21]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) id 1WT80L-0003AD-Bd for bitcoin-development@lists.sourceforge.net; Thu, 27 Mar 2014 10:57:50 +0000 Received: from [192.168.1.27] ([84.101.32.222]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MJXEd-1WWAH71kDr-0038X5 for ; Thu, 27 Mar 2014 11:57:43 +0100 Message-ID: <53340426.4040208@gmx.de> Date: Thu, 27 Mar 2014 11:57:42 +0100 From: Thomas Voegtlin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: bitcoin-development@lists.sourceforge.net References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:NjugstUkjL+nIiI1EBEoZysxHY78qdoJs+AH6hoByVMXbMHoOq3 IZbW9kUatuvKl1W5osi6ReSxSJM3Jut8eyHMg+jwvnXPR8LjOPOapo99+DE/pBetC9yTXYS PoR9r7JdChIfJqr3zormIsq3TYmkeDYGXNBTagDUxB6yqXTCiRWwPKFi/whPElUwGkvZO+E HsdaRWT5jd7DIslfZXVvw== X-Spam-Score: -1.2 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.17.21 listed in list.dnswl.org] -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (thomasv1[at]gmx.de) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (thomasv1[at]gmx.de) X-Headers-End: 1WT80L-0003AD-Bd Subject: Re: [Bitcoin-development] New BIP32 structure X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 10:57:51 -0000 Le 27/03/2014 00:37, Andreas Schildbach a écrit : > Thanks for starting the discussion on finding a better structure. > > For me, the most important thing is either we're 100% interoperable or > 0%. There should not be anything inbetween, as users will delete seeds > without knowing there is still money in them on another implementation. I believe you have a good point here: we should not advertise wallets as compatible if they are not 100% compatible. One issue that I have is bandwidth: Electrum (and mycelium) cannot watch as many addresses as they want, because this will create too much traffic on the servers. (especially when servers send utxo merkle proofs for each address, which is not the case yet, but is planned) For this reason Electrum imposes a constraint on the number of virgin addresses provided to the user. Although the current strategy used by Electrum can certainly be improved, it will not scale up to having every client watching thousands of addresses. This constraint is not so important for bloom-filter clients. So I guess that it makes sense for Multibit to provide hundreds, or even thousands of virgin addresses to the user, regardless of how they are used. Such a wallet will in general not be recoverable in Electrum, unless the user "helps" the recovery procedure. (or the seed has metadata telling the software that this is a Multibit wallet). So we have a problem here, if we advertise these wallets as compatible. My opinion, as far as Electrum is concerned, is that merchant accounts should behave differently from regular user accounts: While merchants need to generate an unlimited number of receiving addresses, it is also acceptable for them to have a slightly more complex wallet recovery procedure (for example, the wallet might show an option to "search for more addresses", and it might not need to watch "old" addresses anymore) OTOH, I don't think we can ask regular users to do this, not only because it adds complexity to the wallet recovery procedure (which makes it scarier), but also because we want fully automated synchronization between different instances of a wallet, using only no other source of information than the blockchain. The first versions of Electrum allowed users to set the "gap limit" parameter in their GUI preferences, but I removed it from GUI after I realized it was a bad idea (users messed with it and did not understand what happened..) With bloom filter clients I guess the distinction between these two use cases is not really necessary, because watching addresses is cheap. So it would be good to hear what you and Mike think about this problem. If you decide to let the user create hundreds of unused addresses (and I think it perfectly makes sense for you), then I guess it would be better for Electrum to give up on compatibility, rather than running the risk of seeing only a subset of addresses. Another option is to handle these seeds as "merchant" accounts. > I heard from multiple sources that using this standard some wallets will > only see a subset of the addresses/keys of some other wallets. > Implementation differences can always happen (and should addresses as > bugs), but I think its unacceptable that this source of issues is by design. > > I suggest we agree on an even simpler least common denominator and > wallets that want to implement some feature on top of that can do but > are encouraged to pick a totally different "cointype". I guess that > would mean removing reserved and account. > > I'm still thinking it might be a good idea to have a separate chain for > "refunds". Refunds will be rarely used and thus need a much slower > moving window than receiving addresses or change. > > > On 03/26/2014 09:49 PM, Mike Hearn wrote: >> Myself, Thomas V (Electrum) and Marek (Trezor) got together to make sure >> our BIP32 wallet structures would be compatible - and I discovered that >> only I was planning to use the default structure. >> >> Because I'm hopeful that we can get a lot of interoperability between >> wallets with regards to importing 12-words paper wallets, we >> brainstormed to find a structure acceptable to everyone and ended up with: >> >> /m/cointype/reserved'/account'/change/n >> >> The extra levels require some explanation: >> >> * cointype: This is zero for Bitcoin. This is here to support two >> things, one is supporting alt coins based off the same root seed. >> Right now nobody seemed very bothered about alt coins but sometimes >> feature requests do come in for this. Arguably there is no need and >> alt coins could just use the same keys as Bitcoin, but it may help >> avoid confusion if they don't. >> >> More usefully, cointype can distinguish between keys intended for >> things like multisig outputs, e.g. for watchdog services. This means >> if your wallet does not know about the extra protocol layers >> involved in this, it can still import the "raw" money and it will >> just ignore/not see the keys used in more complex transactions. >> >> * reserved is for "other stuff". I actually don't recall why we ended >> up with this. It may have been intended to split out multisig >> outputs etc from cointype. Marek, Thomas? >> >> * account is for keeping essentially wallets-within-a-wallet to avoid >> mixing of coins. If you want that. >> >> * change is 0 for receiving addresses, 1 for change addresses. >> >> * n is the actual key index >> >> For bitcoinj we're targeting a deliberately limited feature set for hdw >> v1 so I would just set the first three values all to zero and that is a >> perfectly fine way to be compatible. >> >> The goal here is that the same seed can be written down once, and meet >> all the users needs, whilst still allowing some drift between what >> wallets support. >> >> Pieter made the I think valid point that you can't really encode how >> keys are meant to be used into just an HDW hierarchy and normally you'd >> need some metadata as well. However, I feel interop between wallets is >> more important than arriving at the most perfect possible arrangement, >> which feels a little like bikeshedding, so I'm happy to just go with the >> flow on this one. >> >> >> >> ------------------------------------------------------------------------------ >> >> >> >> _______________________________________________ >> Bitcoin-development mailing list >> Bitcoin-development@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/bitcoin-development >> > > > ------------------------------------------------------------------------------ > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development >