Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Z646I-0004Pq-DN for bitcoin-development@lists.sourceforge.net; Fri, 19 Jun 2015 21:45:26 +0000 X-ACL-Warn: Received: from 2.7a.be.static.xlhost.com ([209.190.122.2] helo=mail.envrin.com) by sog-mx-1.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1Z646G-0003S5-G3 for bitcoin-development@lists.sourceforge.net; Fri, 19 Jun 2015 21:45:26 +0000 Received: from [192.168.1.2] (unknown [223.205.8.105]) by mail.envrin.com (Postfix) with ESMTPA id 9E2DA619EB; Fri, 19 Jun 2015 17:59:15 -0400 (EDT) Message-ID: <558488D0.50904@envrin.com> Date: Sat, 20 Jun 2015 04:25:36 +0700 From: "Matt @ Envrin Group" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Matt Smith , bitcoin-development@lists.sourceforge.net References: <55847E98.3050307@gem.co> In-Reply-To: <55847E98.3050307@gem.co> Content-Type: multipart/alternative; boundary="------------050807080204030006080704" X-Spam-Score: 1.0 (+) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 1.0 HTML_MESSAGE BODY: HTML included in message X-Headers-End: 1Z646G-0003S5-G3 Subject: Re: [Bitcoin-development] Alternate HD path structure: BIP, blog, or wat? 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: Fri, 19 Jun 2015 21:45:26 -0000 This is a multi-part message in MIME format. --------------050807080204030006080704 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Matt, I think your best bet is probably just push it out privately via blog post / Github, and see if it gains any traction with other developers. I'm a little uncertain as to the relevance though. All those variables (purpose, network, asset_type, account, change, index) need to be stored internally within the wallet database, as there's no way to retrieve the path used from just the address, correct? In that case, what's the meaning of that exact path structure when a) it can't be retrieved from just the address, and b) the values will be stored internally within the wallet when you lookup the address. Matt On 06/20/2015 03:42 AM, Matt Smith wrote: > Hey guys, > > The crew at Gem is considering a new HD wallet path structure for our > wallets, which are coin-agnostic, that separates the coin_type field > into two fields as such: > > m / purpose' / network' / asset_type' / account' / change / index > > where network refers to the blockchain (0 - bitcoin, 1 - testnet3, 2 - > litecoin, etc) and the new asset_type refers to the kind of asset to be > held in accounts below that path (Open Assets, Omni, Counterparty). > > The intent is to allow us to validate the address format, select the > appropriate daemon to scan for tokenized assets, and choose multiple > blockchain data sources (that may not know anything about token systems > running on the blockchain they expose) relevant to an HDNode in the > wallet using only information in the HDNode's path -- without having to > maintain an explicit mapping of coin_type -> network. > > For example, we already have the issue of mapping network identifiers > because of the lack of standardization across cryptocurrency libraries > which ends up being ugly and obnoxious to maintain, i.e. > > netcode_map = { > testnet: testnet3, > bitcoin_testnet: testnet3, > testnet3: testnet3, > XTN: testnet3, ... > } > netcode_i_want = netcode_map[netcode_returned_by_libwhatever] > > We want to avoid maintaining a similar asset_type_to_blockchain mapping. > Additionally, it would be helpful for utxo selection to exclude utxos > tied to assets based on path. > > BIP43 seems to suggest that we request a BIP number and publish an > informational BIP specifying the new purpose. If that's not appropriate, > then maybe we just need to publish the information in a blog post to > allow any wallet developers who want to to implement > import_from_gem_structure. > > I was also wondering if anyone had previously suggested something > similar that I missed when cruising the mailing list archives on the > subject. > > Thanks, > -- > Matt Smith | Gem > https://gem.co | GH: @thedoctor > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Bitcoin-development mailing list > Bitcoin-development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bitcoin-development --------------050807080204030006080704 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
Hi Matt,

I think your best bet is probably just push it out privately via blog post / Github, and see if it gains any traction with other developers.

I'm a little uncertain as to the relevance though.  All those variables (purpose, network, asset_type, account, change, index) need to be stored internally within the wallet database, as there's no way to retrieve the path used from just the address, correct?  In that case, what's the meaning of that exact path structure when a) it can't be retrieved from just the address, and b) the values will be stored internally within the wallet when you lookup the address.

Matt



On 06/20/2015 03:42 AM, Matt Smith wrote:
Hey guys,

The crew at Gem is considering a new HD wallet path structure for our
wallets, which are coin-agnostic, that separates the coin_type field
into two fields as such:

m / purpose' / network' / asset_type' / account' / change / index

where network refers to the blockchain (0 - bitcoin, 1 - testnet3, 2 -
litecoin, etc) and the new asset_type refers to the kind of asset to be
held in accounts below that path (Open Assets, Omni, Counterparty).

The intent is to allow us to validate the address format, select the
appropriate daemon to scan for tokenized assets, and choose multiple
blockchain data sources (that may not know anything about token systems
running on the blockchain they expose) relevant to an HDNode in the
wallet using only information in the HDNode's path -- without having to
maintain an explicit mapping of coin_type -> network.

For example, we already have the issue of mapping network identifiers
because of the lack of standardization across cryptocurrency libraries
which ends up being ugly and obnoxious to maintain, i.e.

netcode_map = {
  testnet: testnet3,
  bitcoin_testnet: testnet3,
  testnet3: testnet3,
  XTN: testnet3, ...
}
netcode_i_want = netcode_map[netcode_returned_by_libwhatever]

We want to avoid maintaining a similar asset_type_to_blockchain mapping.
Additionally, it would be helpful for utxo selection to exclude utxos
tied to assets based on path.

BIP43 seems to suggest that we request a BIP number and publish an
informational BIP specifying the new purpose. If that's not appropriate,
then maybe we just need to publish the information in a blog post to
allow any wallet developers who want to to implement
import_from_gem_structure.

I was also wondering if anyone had previously suggested something
similar that I missed when cruising the mailing list archives on the
subject.

Thanks,
–
Matt Smith | Gem
https://gem.co | GH: @thedoctor


------------------------------------------------------------------------------


_______________________________________________
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development

--------------050807080204030006080704--