create account

Tauchain Update: Significant code changes in Github and discussion of progress by dana-edwards

View this thread on: hive.blogpeakd.comecency.com
· @dana-edwards · (edited)
$40.54
Tauchain Update: Significant code changes in Github and discussion of progress
Just several hours ago lead developer and founder of the Tauchain project Ohad Asor released his most significant code update yet. This blog post will be to discuss some of those updates and put it into context. In order to make sense of the current codebase : ["Tauchain Codebase"](https://github.com/IDNI/tau) I will also discuss a bit about the makeup of the code. 


The significant breakthrough - Ohad implements the BDD
----

First some might be wondering what is BDD? BDD is a data structure called binary decision diagram. This data structure in my opinion is as significant to Tauchain as the "blockchain" data structure was to Bitcoin. For those who do not have a computer science degree I will elaborate on what exactly a data structure is below before discussing what a BDD is and why it is so significant.

Brief discussion on what a data structure is
---

In programming a data structure is a concept which represents a data organization method. For example [blockchain](https://en.wikipedia.org/wiki/Blockchain) is all about how records are stored as blocks. There are other similar data structures which represent decentralized data management and storage such as for instance the distributed hash table data structure.

A blockchain data structure looks like this for visualization:

<a title="By Matthäus Wander [CC BY-SA 3.0 
 (https://creativecommons.org/licenses/by-sa/3.0
)], from Wikimedia Commons" href="https://commons.wikimedia.org/wiki/File:Bitcoin_Block_Data.svg"><img width="512" alt="Bitcoin Block Data" src="https://upload.wikimedia.org/wikipedia/commons/thumb/5/55/Bitcoin_Block_Data.svg/512px-Bitcoin_Block_Data.svg.png"></a>
By Matthäus Wander [CC BY-SA 3.0  (https://creativecommons.org/licenses/by-sa/3.0)], from Wikimedia Commons

A hash table looks like this for a visual:

<a title="By Jorge Stolfi [CC BY-SA 3.0 
 (https://creativecommons.org/licenses/by-sa/3.0
) or GFDL (http://www.gnu.org/copyleft/fdl.html)], from Wikimedia Commons" href="https://commons.wikimedia.org/wiki/File:Hash_table_3_1_1_0_1_0_0_SP.svg"><img width="256" alt="Hash table 3 1 1 0 1 0 0 SP" src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Hash_table_3_1_1_0_1_0_0_SP.svg/256px-Hash_table_3_1_1_0_1_0_0_SP.svg.png"></a>
By Jorge Stolfi [CC BY-SA 3.0  (https://creativecommons.org/licenses/by-sa/3.0) or GFDL (http://www.gnu.org/copyleft/fdl.html)], from Wikimedia Commons


The really good programmers choose the appropriate data structure to meet the requirements of the project. BDD was chosen specifically by Ohad because it provides efficiency boosts in a key area necessary for Tauchain to function as intended. In specific we know Tauchain requires partial fixed point logic in order to have decidability in P-SPACE. We also know Tauchain requires decentralization and efficiency. Efficiency can be understood better in terms of the trade off between [time and space](https://en.wikipedia.org/wiki/Space%E2%80%93time_tradeoff). We do not have unlimited time or space so we must sacrifice one in order to get more of the other. 

Example:

- Compression saves space but increases processing time (this is also related to encryption which costs in processing time).
- A lookup table saves time but costs space.

When we look at the code base we know that Ohad can optimize the code either by sacrificing space in which the executable will be bigger (but the code runs faster) or he can choose to sacrifice time in which the code is a smaller executable to save memory but might run slightly slower.  This highlights the essential trade off between time and space when optimizing code but of course there is more to it because algorithms within a code base have to make similar trade offs.

Now what exactly is a BDD (binary decision diagram)?
----

Now that we understand the basics about efficiency and what a data structure is we can make a bit more sense of what a BDD is. In order to understand why BDD as a data structure is so important to Tauchain we have to remember that Tauchain is about logic. We can take the most basic example of Socrates:

> A predicate takes an entity or entities in the domain of discourse as input while outputs are either True or False. Consider the two sentences "Socrates is a philosopher" and "Plato is a philosopher". In propositional logic, these sentences are viewed as being unrelated and might be denoted, for example, by variables such as p and q. The predicate "is a philosopher" occurs in both sentences, which have a common structure of "a is a philosopher". The variable a is instantiated as "Socrates" in the first sentence and is instantiated as "Plato" in the second sentence. While first-order logic allows for the use of predicates, such as "is a philosopher" in this example, propositional logic does not.[5]

Based on the rules of first order logic we can have our inputs and receive our outputs. In the most basic example above we an see a bit about how logic works. To elaborate further:

> Relationships between predicates can be stated using logical connectives. Consider, for example, the first-order formula "if a is a philosopher, then a is a scholar". This formula is a conditional statement with "a is a philosopher" as its hypothesis and "a is a scholar" as its conclusion. The truth of this formula depends on which object is denoted by a, and on the interpretations of the predicates "is a philosopher" and "is a scholar".

> A truth table has one column for each input variable (for example, P and Q), and one final column showing all of the possible results of the logical operation that the table represents (for example, P XOR Q). Each row of the truth table contains one possible configuration of the input variables (for instance, P=true Q=false), and the result of the operation for those values. See the examples below for further clarification. Ludwig Wittgenstein is often credited with inventing the truth table in his Tractatus Logico-Philosophicus,[1] though it appeared at least a year earlier in a paper on propositional logic by Emil Leon Post.[2]

When we are dealing with logic we may find that a [truth table](https://en.wikipedia.org/wiki/Truth_table) helps with visualization. 

Now with this knowledge we have the most basic Socrates example:

- All men are mortal.
- Socrates is a man.
- Socrates must be mortal.

This can be represented via truth table and is called a syllogism. To solve this we simply apply a kind of reasoning called [deductive reasoning](https://en.wikipedia.org/wiki/Deductive_reasoning). This would indicate that if All men are mortal is true and if Socrates is a man is also true then Socrates is a mortal must be true. If we were to say all men are mortal but Socrates is immortal then Socrates cannot be a man. So if Socrates is a man he must be moral or there is what we call a contradiction. Logic is all about avoiding these sorts of contradictions and in specific binary or boolean logic is to reach a conclusion which always must be one of two possible values.

If I ask you to play a game which we want to guarantee will end with either one of two possible outcomes then we have a good example of a boolean function.  1 or 0, true or false, on or off, a or b.

Some of you may be familiar with data structure we call a DAG ([directed ayclic graph](https://en.wikipedia.org/wiki/Directed_acyclic_graph)). For those of you who understand this concept you can visualize a BDD as being very similar to a propositional DAG. 

<a title="By David Eppstein [CC0], from Wikimedia Commons" href="https://commons.wikimedia.org/wiki/File:Topological_Ordering.svg"><img width="256" alt="Topological Ordering" src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/Topological_Ordering.svg/256px-Topological_Ordering.svg.png"></a>
By David Eppstein [CC0], from Wikimedia Commons

We know from DAGs that it's a finite amount of vertices, edges, etc. We may also be able to visualize topological ordering and if you remember my [post on transitive closure](https://steemit.com/tauchain/@dana-edwards/transitive-closure-in-a-simple-visual) you might also remember the visuals on how that can work:

A: https://steemitimages.com/0x0/https://i.imgur.com/LDO14uu.png

B:  https://steemitimages.com/0x0/https://i.imgur.com/jK7yFW1.png

A binary decision diagram can represent a truth table:

<a title="By The original uploader was IMeowbot at English Wikipedia. (Transferred from en.wikipedia to Commons.) [GFDL (http://www.gnu.org/copyleft/fdl.html) or CC-BY-SA-3.0 (http://creativecommons.org/licenses/by-sa/3.0/)], via Wikimedia Commons" href="https://commons.wikimedia.org/wiki/File:BDD.png"><img width="512" alt="BDD" src="https://upload.wikimedia.org/wikipedia/commons/9/91/BDD.png"></a>
By The original uploader was IMeowbot at English Wikipedia. (Transferred from en.wikipedia to Commons.) [GFDL (http://www.gnu.org/copyleft/fdl.html) or CC-BY-SA-3.0 (http://creativecommons.org/licenses/by-sa/3.0/)], via Wikimedia Commons

And from these visuals now it should be abundantly clear how this is critical to the functioning of Tauchain.  The BDD data structure allows for efficient model checking as well. To understand we have to consider the [boolean satisfiability problem](https://en.wikipedia.org/wiki/Boolean_satisfiability_problem).

https://youtu.be/K_Me_Z3Omtg

This highlights the fact that BDD can be used to create a SAT solver. 

For [example](https://en.wikipedia.org/wiki/Boolean_satisfiability_problem#Algorithms_for_solving_SAT):

> A DPLL SAT solver employs a systematic backtracking search procedure to explore the (exponentially sized) space of variable assignments looking for satisfying assignments. The basic search procedure was proposed in two seminal papers in the early 1960s (see references below) and is now commonly referred to as the Davis–Putnam–Logemann–Loveland algorithm ("DPLL" or "DLL").[18][19] Theoretically, exponential lower bounds have been proved for the DPLL family of algorithms.

Without getting overwhelmed by technical details the key points are below:

- BDD is a data structure of immense importance to the Tauchain project.
- BDD enables Tauchain to "come alive" by allowing for even the basic truth table to be applied or the SAT solver to be implemented.
- BDD + PFP is what we see in the Github code base. We see that Ohad has implemented BDD for PFP (binary decision diagram for partial fixed point logic).


To read the code for yourself and track the progress of Tauchain development take a look at Github:
https://github.com/IDNI/tau
https://github.com/IDNI/tau/blob/master/pfp.cpp
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 177 others
properties (23)
authordana-edwards
permlinktauchain-update-significant-code-changes-in-github-and-discussion-of-progress
categorytauchain
json_metadata{"tags":["tauchain","crypto-news","blockchain"],"image":["https://upload.wikimedia.org/wikipedia/commons/thumb/5/55/Bitcoin_Block_Data.svg/512px-Bitcoin_Block_Data.svg.png","https://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Hash_table_3_1_1_0_1_0_0_SP.svg/256px-Hash_table_3_1_1_0_1_0_0_SP.svg.png","https://upload.wikimedia.org/wikipedia/commons/thumb/c/c6/Topological_Ordering.svg/256px-Topological_Ordering.svg.png","https://steemitimages.com/0x0/https://i.imgur.com/LDO14uu.png","https://steemitimages.com/0x0/https://i.imgur.com/jK7yFW1.png","https://upload.wikimedia.org/wikipedia/commons/9/91/BDD.png","https://img.youtube.com/vi/K_Me_Z3Omtg/0.jpg"],"links":["https://github.com/IDNI/tau","https://en.wikipedia.org/wiki/Blockchain","https://commons.wikimedia.org/wiki/File:Bitcoin_Block_Data.svg","https://creativecommons.org/licenses/by-sa/3.0","https://commons.wikimedia.org/wiki/File:Hash_table_3_1_1_0_1_0_0_SP.svg","http://www.gnu.org/copyleft/fdl.html","https://en.wikipedia.org/wiki/Space%E2%80%93time_tradeoff","https://en.wikipedia.org/wiki/Truth_table","https://en.wikipedia.org/wiki/Deductive_reasoning","https://en.wikipedia.org/wiki/Directed_acyclic_graph","https://commons.wikimedia.org/wiki/File:Topological_Ordering.svg","https://steemit.com/tauchain/@dana-edwards/transitive-closure-in-a-simple-visual","https://commons.wikimedia.org/wiki/File:BDD.png","http://creativecommons.org/licenses/by-sa/3.0/","https://en.wikipedia.org/wiki/Boolean_satisfiability_problem","https://youtu.be/K_Me_Z3Omtg","https://en.wikipedia.org/wiki/Boolean_satisfiability_problem#Algorithms_for_solving_SAT","https://github.com/IDNI/tau/blob/master/pfp.cpp"],"app":"steemit/0.1","format":"markdown"}
created2018-09-30 22:06:57
last_update2018-09-30 22:18:33
depth0
children9
last_payout2018-10-07 22:06:57
cashout_time1969-12-31 23:59:59
total_payout_value30.896 HBD
curator_payout_value9.641 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length10,589
author_reputation353,623,611,191,427
root_title"Tauchain Update: Significant code changes in Github and discussion of progress"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id72,376,581
net_rshares20,568,652,195,898
author_curate_reward""
vote details (241)
@bobinson ·
$0.26
I was reading about TML and wondering what are the plans for verification. Curious and it will be helpful if you can share your thoughts.
👍  ,
properties (23)
authorbobinson
permlinkre-dana-edwards-tauchain-update-significant-code-changes-in-github-and-discussion-of-progress-20181002t165632093z
categorytauchain
json_metadata{"tags":["tauchain"],"app":"steemit/0.1"}
created2018-10-02 16:56:33
last_update2018-10-02 16:56:33
depth1
children4
last_payout2018-10-09 16:56:33
cashout_time1969-12-31 23:59:59
total_payout_value0.193 HBD
curator_payout_value0.063 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length137
author_reputation55,343,141,313,811
root_title"Tauchain Update: Significant code changes in Github and discussion of progress"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id72,493,001
net_rshares136,716,867,219
author_curate_reward""
vote details (2)
@dana-edwards ·
$0.26
If you mean formal verification this is covered by the "model checking" capacity of BDD.
https://youtu.be/SLmK-W6inZI

https://youtu.be/-CTNS2D-kbY

https://youtu.be/-KZY15tItgQ
References
---
1. https://en.wikipedia.org/wiki/Model_checking
👍  
properties (23)
authordana-edwards
permlinkre-bobinson-re-dana-edwards-tauchain-update-significant-code-changes-in-github-and-discussion-of-progress-20181002t195959372z
categorytauchain
json_metadata{"tags":["tauchain"],"image":["https://img.youtube.com/vi/SLmK-W6inZI/0.jpg","https://img.youtube.com/vi/-CTNS2D-kbY/0.jpg","https://img.youtube.com/vi/-KZY15tItgQ/0.jpg"],"links":["https://youtu.be/SLmK-W6inZI","https://youtu.be/-CTNS2D-kbY","https://youtu.be/-KZY15tItgQ","https://en.wikipedia.org/wiki/Model_checking"],"app":"steemit/0.1"}
created2018-10-02 20:00:00
last_update2018-10-02 20:00:00
depth2
children3
last_payout2018-10-09 20:00:00
cashout_time1969-12-31 23:59:59
total_payout_value0.192 HBD
curator_payout_value0.063 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length240
author_reputation353,623,611,191,427
root_title"Tauchain Update: Significant code changes in Github and discussion of progress"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id72,501,314
net_rshares136,106,760,046
author_curate_reward""
vote details (1)
@bobinson ·
By formal verification I meant "program verification" 

Quoting the paper below, "the runtime safety and the functional correctnes"


https://www.cs.umd.edu/~aseem/solidetherplas.pdf
properties (22)
authorbobinson
permlinkre-dana-edwards-re-bobinson-re-dana-edwards-tauchain-update-significant-code-changes-in-github-and-discussion-of-progress-20181003t045433350z
categorytauchain
json_metadata{"tags":["tauchain"],"links":["https://www.cs.umd.edu/~aseem/solidetherplas.pdf"],"app":"steemit/0.1"}
created2018-10-03 04:54:06
last_update2018-10-03 04:54:06
depth3
children2
last_payout2018-10-10 04:54:06
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_length182
author_reputation55,343,141,313,811
root_title"Tauchain Update: Significant code changes in Github and discussion of progress"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id72,523,057
net_rshares0
@kevinwong ·
Thanks, great explanation. I think BDD's simplicity will come with more surprises.. i dunno, have you watched this? Not sure if related at all but it sure made me think.

https://www.youtube.com/watch?v=F9RsOPZuh70
👍  
properties (23)
authorkevinwong
permlinkre-dana-edwards-tauchain-update-significant-code-changes-in-github-and-discussion-of-progress-20181001t130614022z
categorytauchain
json_metadata{"tags":["tauchain"],"image":["https://img.youtube.com/vi/F9RsOPZuh70/0.jpg"],"links":["https://www.youtube.com/watch?v=F9RsOPZuh70"],"app":"steemit/0.1"}
created2018-10-01 13:06:12
last_update2018-10-01 13:06:12
depth1
children1
last_payout2018-10-08 13:06:12
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_length214
author_reputation621,253,570,295,288
root_title"Tauchain Update: Significant code changes in Github and discussion of progress"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id72,412,256
net_rshares113,174,231
author_curate_reward""
vote details (1)
@dana-edwards · (edited)
$0.27
This too is interesting:
Sensarma, D., Banerjee, S., Basuli, K., Naskar, S., & Sarma, S. S. (2012). On an optimization technique using Binary Decision Diagram. arXiv preprint arXiv:1203.2505.
 https://arxiv.org/pdf/1203.2505.pdf
👍  ,
properties (23)
authordana-edwards
permlinkre-kevinwong-re-dana-edwards-tauchain-update-significant-code-changes-in-github-and-discussion-of-progress-20181001t135605025z
categorytauchain
json_metadata{"tags":["tauchain"],"links":["https://arxiv.org/pdf/1203.2505.pdf"],"app":"steemit/0.1"}
created2018-10-01 13:56:06
last_update2018-10-01 13:56:51
depth2
children0
last_payout2018-10-08 13:56:06
cashout_time1969-12-31 23:59:59
total_payout_value0.202 HBD
curator_payout_value0.066 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length228
author_reputation353,623,611,191,427
root_title"Tauchain Update: Significant code changes in Github and discussion of progress"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id72,415,183
net_rshares136,725,149,499
author_curate_reward""
vote details (2)
@sanmi ·
All their tokens were pre sold, can we buy the tokens now ?
properties (22)
authorsanmi
permlinkre-dana-edwards-tauchain-update-significant-code-changes-in-github-and-discussion-of-progress-20181001t134151681z
categorytauchain
json_metadata{"tags":["tauchain"],"app":"steemit/0.1"}
created2018-10-01 13:41:54
last_update2018-10-01 13:41:54
depth1
children1
last_payout2018-10-08 13:41:54
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_reputation21,594,529,204,577
root_title"Tauchain Update: Significant code changes in Github and discussion of progress"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id72,414,290
net_rshares0
@dana-edwards ·
$0.45
Yes you can. You can find AGRS on either the Bitshares exchange if you're in the USA or if you're in an acceptable country you can use the foreign exchange. Why isn't it on more US exchanges? I'm asking the same question but I suppose until it's more decentralized it will be where it is.

Why isn't it on Coinmarketcap? The only answer I have for that one is politics. It should be on Coinmarketcap at this point.

I would say  this though, do not buy the token at the current stage if you think it's some kind of investment. It's right now in the very early stages and not yet decentralized. You're taking a risk and unless you really believe in supporting what the project is about it is not recommended that you put in more than you can afford to lose.  I speak for myself, I'm definitely in. I believe in the potential of the technology. I've been in since before anyone knew where the technology would go and have decided to consider it a moon shot project where I'll stay in and see where it leads. I see it similar to Bitcoin 2008 or Ethereum 2015. It could end up being the next great crypto project on technology alone but it's also very ambitious so we have to simply put our money into it on faith at this point and this includes faith in our own ability to understand what is being worked on.

I try to elucidate in my posts what is being worked on to help people understand what I understand. 

1. https://openledger.io/market/AGRS_BTC
2. https://www.bcex.top/trade/agrs2btc
👍  , , ,
properties (23)
authordana-edwards
permlinkre-sanmi-re-dana-edwards-tauchain-update-significant-code-changes-in-github-and-discussion-of-progress-20181001t230656819z
categorytauchain
json_metadata{"tags":["tauchain"],"links":["https://openledger.io/market/AGRS_BTC","https://www.bcex.top/trade/agrs2btc"],"app":"steemit/0.1"}
created2018-10-01 23:06:57
last_update2018-10-01 23:06:57
depth2
children0
last_payout2018-10-08 23:06:57
cashout_time1969-12-31 23:59:59
total_payout_value0.340 HBD
curator_payout_value0.112 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,488
author_reputation353,623,611,191,427
root_title"Tauchain Update: Significant code changes in Github and discussion of progress"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id72,442,689
net_rshares234,225,694,037
author_curate_reward""
vote details (4)