Bitcoin Forum
May 08, 2024, 05:23:30 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: A Hierarchical Data Storage System For Hierchical Addresses and Keys  (Read 2432 times)
Bungeebones (OP)
Full Member
***
Offline Offline

Activity: 178
Merit: 100



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

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
Quote
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 http://www.sitepoint.com/hierarchical-data-database-2/ 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]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!