<oembed><type>rich</type><version>1.0</version><author_name>npub10f96gqrsu4qpygfgvuvzce47aavjvql703egfde0l2hua8dzpszs67ej47</author_name><author_url>https://nostr.ae/npub10f96gqrsu4qpygfgvuvzce47aavjvql703egfde0l2hua8dzpszs67ej47</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2014-03-27&#xA;📝 Original message:Le 27/03/2014 00:37, Andreas Schildbach a écrit :&#xA;&gt; Thanks for starting the discussion on finding a better structure.&#xA;&gt;&#xA;&gt; For me, the most important thing is either we&#39;re 100% interoperable or&#xA;&gt; 0%. There should not be anything inbetween, as users will delete seeds&#xA;&gt; without knowing there is still money in them on another implementation.&#xA;&#xA;I believe you have a good point here: we should not advertise wallets as&#xA;compatible if they are not 100% compatible.&#xA;&#xA;One issue that I have is bandwidth: Electrum (and mycelium) cannot&#xA;watch as many addresses as they want, because this will create too&#xA;much traffic on the servers. (especially when servers send utxo merkle&#xA;proofs for each address, which is not the case yet, but is planned)&#xA;&#xA;For this reason Electrum imposes a constraint on the number of virgin&#xA;addresses provided to the user. Although the current strategy used by&#xA;Electrum can certainly be improved, it will not scale up to having every&#xA;client watching thousands of addresses.&#xA;&#xA;This constraint is not so important for bloom-filter clients. So I guess &#xA;that&#xA;it makes sense for Multibit to provide hundreds, or even thousands of &#xA;virgin&#xA;addresses to the user, regardless of how they are used. Such a wallet will&#xA;in general not be recoverable in Electrum, unless the user &#34;helps&#34; the&#xA;recovery procedure. (or the seed has metadata telling the software that&#xA;this is a Multibit wallet). So we have a problem here, if we advertise &#xA;these&#xA;wallets as compatible.&#xA;&#xA;My opinion, as far as Electrum is concerned, is that merchant accounts&#xA;should behave differently from regular user accounts: While merchants&#xA;need to generate an unlimited number of receiving addresses, it is also&#xA;acceptable for them to have a slightly more complex wallet recovery &#xA;procedure&#xA;(for example, the wallet might show an option to &#34;search for more &#xA;addresses&#34;,&#xA;and it might not need to watch &#34;old&#34; addresses anymore)&#xA;&#xA;OTOH, I don&#39;t think we can ask regular users to do this, not only &#xA;because it&#xA;adds complexity to the wallet recovery procedure (which makes it scarier),&#xA;but also because we want fully automated synchronization between different&#xA;instances of a wallet, using only no other source of information than &#xA;the blockchain.&#xA;&#xA;The first versions of Electrum allowed users to set the &#34;gap limit&#34; &#xA;parameter&#xA;in their GUI preferences, but I removed it from GUI after I realized it &#xA;was a bad&#xA;idea (users messed with it and did not understand what happened..)&#xA;&#xA;With bloom filter clients I guess the distinction between these two use &#xA;cases&#xA;is not really necessary, because watching addresses is cheap. So it &#xA;would be&#xA;good to hear what you and Mike think about this problem. If you decide &#xA;to let&#xA;the user create hundreds of unused addresses (and I think it perfectly &#xA;makes&#xA;sense for you), then I guess it would be better for Electrum to give up on&#xA;compatibility, rather than running the risk of seeing only a subset of &#xA;addresses.&#xA;Another option is to handle these seeds as &#34;merchant&#34; accounts.&#xA;&#xA;&#xA;&#xA;&#xA;&gt; I heard from multiple sources that using this standard some wallets will&#xA;&gt; only see a subset of the addresses/keys of some other wallets.&#xA;&gt; Implementation differences can always happen (and should addresses as&#xA;&gt; bugs), but I think its unacceptable that this source of issues is by design.&#xA;&gt;&#xA;&gt; I suggest we agree on an even simpler least common denominator and&#xA;&gt; wallets that want to implement some feature on top of that can do but&#xA;&gt; are encouraged to pick a totally different &#34;cointype&#34;. I guess that&#xA;&gt; would mean removing reserved and account.&#xA;&#xA;&gt;&#xA;&gt; I&#39;m still thinking it might be a good idea to have a separate chain for&#xA;&gt; &#34;refunds&#34;. Refunds will be rarely used and thus need a much slower&#xA;&gt; moving window than receiving addresses or change.&#xA;&gt;&#xA;&gt;&#xA;&gt; On 03/26/2014 09:49 PM, Mike Hearn wrote:&#xA;&gt;&gt; Myself, Thomas V (Electrum) and Marek (Trezor) got together to make sure&#xA;&gt;&gt; our BIP32 wallet structures would be compatible - and I discovered that&#xA;&gt;&gt; only I was planning to use the default structure.&#xA;&gt;&gt;&#xA;&gt;&gt; Because I&#39;m hopeful that we can get a lot of interoperability between&#xA;&gt;&gt; wallets with regards to importing 12-words paper wallets, we&#xA;&gt;&gt; brainstormed to find a structure acceptable to everyone and ended up with:&#xA;&gt;&gt;&#xA;&gt;&gt;    /m/cointype/reserved&#39;/account&#39;/change/n&#xA;&gt;&gt;&#xA;&gt;&gt; The extra levels require some explanation:&#xA;&gt;&gt;&#xA;&gt;&gt;    * cointype:  This is zero for Bitcoin. This is here to support two&#xA;&gt;&gt;      things, one is supporting alt coins based off the same root seed.&#xA;&gt;&gt;      Right now nobody seemed very bothered about alt coins but sometimes&#xA;&gt;&gt;      feature requests do come in for this. Arguably there is no need and&#xA;&gt;&gt;      alt coins could just use the same keys as Bitcoin, but it may help&#xA;&gt;&gt;      avoid confusion if they don&#39;t.&#xA;&gt;&gt;&#xA;&gt;&gt;      More usefully, cointype can distinguish between keys intended for&#xA;&gt;&gt;      things like multisig outputs, e.g. for watchdog services. This means&#xA;&gt;&gt;      if your wallet does not know about the extra protocol layers&#xA;&gt;&gt;      involved in this, it can still import the &#34;raw&#34; money and it will&#xA;&gt;&gt;      just ignore/not see the keys used in more complex transactions.&#xA;&gt;&gt;&#xA;&gt;&gt;    * reserved is for &#34;other stuff&#34;. I actually don&#39;t recall why we ended&#xA;&gt;&gt;      up with this. It may have been intended to split out multisig&#xA;&gt;&gt;      outputs etc from cointype. Marek, Thomas?&#xA;&gt;&gt;&#xA;&gt;&gt;    * account is for keeping essentially wallets-within-a-wallet to avoid&#xA;&gt;&gt;      mixing of coins. If you want that.&#xA;&gt;&gt;&#xA;&gt;&gt;    * change is 0 for receiving addresses, 1 for change addresses.&#xA;&gt;&gt;&#xA;&gt;&gt;    * n is the actual key index&#xA;&gt;&gt;&#xA;&gt;&gt; For bitcoinj we&#39;re targeting a deliberately limited feature set for hdw&#xA;&gt;&gt; v1 so I would just set the first three values all to zero and that is a&#xA;&gt;&gt; perfectly fine way to be compatible.&#xA;&gt;&gt;&#xA;&gt;&gt; The goal here is that the same seed can be written down once, and meet&#xA;&gt;&gt; all the users needs, whilst still allowing some drift between what&#xA;&gt;&gt; wallets support.&#xA;&gt;&gt;&#xA;&gt;&gt; Pieter made the I think valid point that you can&#39;t really encode how&#xA;&gt;&gt; keys are meant to be used into just an HDW hierarchy and normally you&#39;d&#xA;&gt;&gt; need some metadata as well. However, I feel interop between wallets is&#xA;&gt;&gt; more important than arriving at the most perfect possible arrangement,&#xA;&gt;&gt; which feels a little like bikeshedding, so I&#39;m happy to just go with the&#xA;&gt;&gt; flow on this one.&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; ------------------------------------------------------------------------------&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt;&#xA;&gt;&gt; _______________________________________________&#xA;&gt;&gt; Bitcoin-development mailing list&#xA;&gt;&gt; Bitcoin-development at lists.sourceforge.net&#xA;&gt;&gt; https://lists.sourceforge.net/lists/listinfo/bitcoin-development&#xA;&gt;&gt;&#xA;&gt;&#xA;&gt;&#xA;&gt; ------------------------------------------------------------------------------&#xA;&gt; _______________________________________________&#xA;&gt; Bitcoin-development mailing list&#xA;&gt; Bitcoin-development at lists.sourceforge.net&#xA;&gt; https://lists.sourceforge.net/lists/listinfo/bitcoin-development&#xA;&gt;</html></oembed>