create account

A Simple Blockchain Project: A User Account Database by l0k1

View this thread on: hive.blogpeakd.comecency.com
· @l0k1 ·
$9.12
A Simple Blockchain Project: A User Account Database
<div class="pull-left"><h1>So</h1></div> <br />as I discussed previously, I am in the midst of a flurry of planning some software development. One of the core concepts I have is of isolating blockchains into parts based on a single data type. Blockchains use cryptography to keep account of who did what, by requiring a signature for every transaction.

Looking at the user account model used in Steem, I decided that this quite small database could be a good project for a very lightweight example of a blockchain system, that does not involve a ledger. That is, nobody can pay anyone with this database.

## A simple authentication database

![](https://s6.postimg.org/pftk96b69/image.jpg)

You can associate a username and a small collection of data (avatar, cover picture, location, blurbs), with a public key. Using the private key that goes with this public key, you can sign a transaction that alters any one of the fields in your account, your username, the key itself, or extra data as mentioned.

There is of course no fiduciary incentive to actually run this blockchain, however, it is a small and light application and is readily pliable towards a test network that lives inside a single computer, with a test framework that runs instances with different account private keys. Each instance then is randomly selected by a controlling terminal to be the block maker according to a traffic-based schedule (really, very unlikely such a database would get so busy that one PC could not handle most of the world's accounts amendments).

You can then test the network, and have each process producing a log that you can inspect to see how it works. You can stress test it by spewing hundreds of account registrations and amendments at it, and see how fast it can process it.

## Why do this?

The outcome of implementing this software concept is that you have then in the process built many of the core components involved in a blockchain. You have the executive that regulates by consensus right of a node to make a block, according to some arbitrary, agreed schedule, rules about how frequently an account can have updates done to it, and a protocol for querying the contents of the database, and an engine that takes the blockchain log and turns it into a collection of tables with indexes.

Building more sophisticated blockchains is just about refinements from this basic core. But this particular part of a multi-chain blockchain does not need much refinement except perhaps that the executive will have other ways of defining the block schedule. 

Without a reputation metric, only random selection works, and yes, that means that in its sequences the network will more resemble a Proof of Work blockchain, except for testing purposes trusting the random number generator is not a concern. There is not in this design a mechanism for devising a consensus, as I intend that to be derived from other data in related subchains (a Forum subchain with a reputation system).

We are working towards a Delegated Proof of Stake multi-chain system, and to that end, once we have a Ledger and a Forum built, we can devise ways for users to generate the schedule for us by how they get along with each other.

## From little things, big things grow

So it's a good target for a step-by-step process in building a theory of the practice of blockchain building. After all, sooner or later this moves from tinkering and becomes a type of engineering, once the general laws of operation are discovered.

Currently on the internet, there is a lot of sites implementing Open ID. This is basically a way of chaining other accounts to central accounts - in your, google, for example, account, you prove control by logging in, and then google tells the third party site that you validly logged in and indicated that you wanted google to tell blabla.com that session xyz at as requested has been identified with google account allyourbase@gmail.com.

Alone, this little blockchain, which could be run on even probably 5 year old smart phones, would replace the need for this kind of authentication. It is basically like a peer to peer version of the PGP keyservers. It could replace authentication on the whole internet tomorrow if enough people realised that it ends all the mystery about the security of websites login systems.

Assuming that there is some method for defining a sequence by which nodes get the right to produce a block during a given time period.

## PKI is the strongest authentication

When I first entered the Blockchain business, I had a fairly solid grounding in PKI cryptography, and the #bitcoin chatroom at freenode had an authentication bot that could use a signature from a bitcoin wallet address.

From a security perspective, it is the proper and perfect solution for identification. There is refinements you can make, like for example revocation certificates, which can be stored cold and used in case of account compromise, to invalidate and allow the record of the public key of the account to be changed to a new one. 

You could also add delegation accounts to the database so that some number of other users can be designated who if a minimum are signing, the account can be rekeyed.

Before you even get to putting a ledger together, there is a lot of neat features you can build out of just an account database.

I will be building a small system like the one I have described over the next month or two, I will keep you up to date with it.

<div class="pull-right">😎</div><br /><hr />

<center><h4>We can't stop here! This is Whale country!</h4><a href="https://steemit.com/@l0k1"><img src="http://s20.postimg.org/igf27v79p/signature_new_small.png" /></a></center>


> Written with [StackEdit](https://stackedit.io/).
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 102 others
properties (23)
authorl0k1
permlinka-simple-blockchain-project-a-user-account-database
categoryblockchain
json_metadata{"tags":["blockchain","development","education","bitcoin"],"image":["https://s6.postimg.org/pftk96b69/image.jpg","http://s20.postimg.org/igf27v79p/signature_new_small.png"],"links":["https://steemit.com/@l0k1","https://stackedit.io/"],"app":"steemit/0.1","format":"markdown"}
created2017-01-21 19:41:18
last_update2017-01-21 19:41:18
depth0
children8
last_payout2017-02-21 21:57:33
cashout_time1969-12-31 23:59:59
total_payout_value7.327 HBD
curator_payout_value1.796 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length5,749
author_reputation94,800,257,230,993
root_title"A Simple Blockchain Project: A User Account Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,307,409
net_rshares33,293,569,630,496
author_curate_reward""
vote details (166)
@mattclarke ·
Add me. I'll be great for your thing.
👍  
properties (23)
authormattclarke
permlinkre-l0k1-a-simple-blockchain-project-a-user-account-database-20170122t030459730z
categoryblockchain
json_metadata{"tags":["blockchain"],"app":"steemit/0.1"}
created2017-01-22 03:05:00
last_update2017-01-22 03:05:00
depth1
children3
last_payout2017-02-21 21:57:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length37
author_reputation127,494,657,382,255
root_title"A Simple Blockchain Project: A User Account Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,309,895
net_rshares58,288,732,617
author_curate_reward""
vote details (1)
@l0k1 ·
add you to what?
properties (22)
authorl0k1
permlinkre-mattclarke-re-l0k1-a-simple-blockchain-project-a-user-account-database-20170122t053641325z
categoryblockchain
json_metadata{"tags":["blockchain"],"app":"steemit/0.1"}
created2017-01-22 05:37:09
last_update2017-01-22 05:37:09
depth2
children2
last_payout2017-02-21 21:57:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length16
author_reputation94,800,257,230,993
root_title"A Simple Blockchain Project: A User Account Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,310,514
net_rshares0
@mattclarke ·
Your database.  I think I'd really brighten the place up :)
👍  
properties (23)
authormattclarke
permlinkre-l0k1-re-mattclarke-re-l0k1-a-simple-blockchain-project-a-user-account-database-20170122t053954034z
categoryblockchain
json_metadata{"tags":["blockchain"],"app":"steemit/0.1"}
created2017-01-22 05:39:54
last_update2017-01-22 05:39:54
depth3
children1
last_payout2017-02-21 21:57:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length59
author_reputation127,494,657,382,255
root_title"A Simple Blockchain Project: A User Account Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,310,526
net_rshares55,957,183,312
author_curate_reward""
vote details (1)
@steemvest17 ·
Resteemed this one. You're so cool bro!
👍  
properties (23)
authorsteemvest17
permlinkre-l0k1-a-simple-blockchain-project-a-user-account-database-20170121t195343614z
categoryblockchain
json_metadata{"tags":["blockchain"],"app":"steemit/0.1"}
created2017-01-21 19:53:45
last_update2017-01-21 19:53:45
depth1
children0
last_payout2017-02-21 21:57:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length39
author_reputation72,305,059,130,359
root_title"A Simple Blockchain Project: A User Account Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,307,488
net_rshares58,288,732,617
author_curate_reward""
vote details (1)
@veriphant ·
Maybe have a look at https://veriphant.com
👍  
properties (23)
authorveriphant
permlinkre-l0k1-a-simple-blockchain-project-a-user-account-database-20170122t015218767z
categoryblockchain
json_metadata{"tags":["blockchain"],"links":["https://veriphant.com"],"app":"steemit/0.1"}
created2017-01-22 01:52:42
last_update2017-01-22 01:52:42
depth1
children2
last_payout2017-02-21 21:57:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length42
author_reputation68,558,699,282
root_title"A Simple Blockchain Project: A User Account Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,309,607
net_rshares58,288,732,617
author_curate_reward""
vote details (1)
@l0k1 ·
> N.B — The demonstration Veriphant Ledger may possibly be recreated to combat illegal content.

Heh! What about when it's on a live network? People are so scurred of publishing irrevocably something that some tyrant claims is an excuse to take a chunk of flesh...
👍  
properties (23)
authorl0k1
permlinkre-veriphant-re-l0k1-a-simple-blockchain-project-a-user-account-database-20170122t053124762z
categoryblockchain
json_metadata{"tags":["blockchain"],"app":"steemit/0.1"}
created2017-01-22 05:31:54
last_update2017-01-22 05:31:54
depth2
children1
last_payout2017-02-21 21:57:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length264
author_reputation94,800,257,230,993
root_title"A Simple Blockchain Project: A User Account Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,310,487
net_rshares577,319,453
author_curate_reward""
vote details (1)
@veriphant · (edited)
Any data that enters a Veriphant Ledger is solidified and locked in place using the Bitcoin Blockchain and also using decentralised hosting facilities. This means once something is added, it's forever accessible with its proof of existence and creation. This could definitely be a problem when it comes to protecting chunks of flesh but you can make entries anonymous and you can also protect the contents of the entries using encryption methods.
properties (22)
authorveriphant
permlinkre-l0k1-re-veriphant-re-l0k1-a-simple-blockchain-project-a-user-account-database-20170122t123755581z
categoryblockchain
json_metadata{"tags":["blockchain"],"app":"steemit/0.1"}
created2017-01-22 12:38:24
last_update2017-01-22 12:40:18
depth3
children0
last_payout2017-02-21 21:57:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length446
author_reputation68,558,699,282
root_title"A Simple Blockchain Project: A User Account Database"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,312,276
net_rshares0