Bitcoin Forum
July 18, 2018, 12:18:45 AM *
News: Latest stable version of Bitcoin Core: 0.16.1  [Torrent]. (New!)
   Home   Help Search Donate Login Register  
Pages: [1]
Author Topic: A Hierarchical Data Storage System For Hierchical Addresses and Keys  (Read 2340 times)
Full Member
Offline Offline

Activity: 180
Merit: 100

View Profile
June 27, 2014, 01:59:21 PM

I would like to throw this idea out there to the developer community.

I've used a data base system for years called the "Modified Preordered Tree Traversal System" and when all the talk came out about Hierarchical Deterministic Wallets it sounded like a perfect fit.

I installed BIP32 PHP librarary on a local server along with the LAMP stack. Here is a screen shot of the crude GUI its got but from it I can explain some of its potential uses that I've seen so far. I can't get it to work on the shared server for this demo but it functions locally to produce all the users and their addresses and private keys (I don't have it producing a "public key only" user yet but I think it has a simple solution.

I used fictitious user names out of a typical corporate structure to create the hierarchy. Each could create lower levels but with a login authorization script lower levels could be blocked from seeing levels above theirs quite easily.

The hierarchy depicted is based on a user hierarchy and then, from that base, the users get allocated an address and key pair from the hierarchical deterministic wallet. There is now a bridge between the hierarchy of the corporation and the hierarchy of the addresses. The hierarchies are bridged, but can still operate independently. For example supposed salesman Mike gets promoted to lead salesman. He would still want all the addresses to the accounts he services (suppose he regularly issues public keys to customers). His entire account along with the addresses and keys could be moved up the hierarchy to the same level of his former supervisor Lead Salesman Jack. The data would no longer be viewable by Jack (but he could have copies of the public and private keys stashed) so salesman Mike's new supervisor District Manager 2 issues Mike a new private key capability that Jack can no longer see or have access too. The District Manager 2 manager has access to the entire tree of Jack and Mike both before the promotion and after.

The advantage of this data storage system (ie. the Modified Preordered Tree Traversal method) vs. the more typical relational data base method is, to quote Sitepoint
Recursion can be slow, so we would rather not use a recursive function. We’d also like to minimize the number of database queries. Preferably, we’d have just one query for each activity.
(see for code and methodology of the method if you are not already familiar with it).

In addition, the logic behind the Modified Preorder tree traversal system (MPOTTS if I may) and the hierarchical deterministic one  are nearly the same.

Once one gets used to MPOTTS there is no problem in using it as a bridge into the more normal relational database system. Each member of the hierarchy has its own unique identity can can be used to create other relations to.

I've played around with it to get it working to a degree and think it has some potential so I figured I'd post it here to see what others think. Maybe it could become a BIP?

Pages: [1]
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!