BlockChain (for example Bitcoin, Etherum, etc.) is just a ‘k=0’ special subtype of BlockDAG, that’s why they suffer from the highly restrictive throughput. DAG is the future!
Blue set selection algorithm is the base of the BlockDAG technology. Thanks Go Playground, to create a new example DAG and run it online to see the DAG blue behaviour, it’s quite easy now. For example, to test a DAG in this figure ‘Fig.4’, just add a piece of codes like this:
1 | ChainAddBlock("Genesis", []string{}, chain) |
Run your own BlockDag example online
Click it will open the Go Playground: Click me to run You can edit your own blockDAG example and run it online!
The output will be like this:1
2
3- BlockDAG Algorithms Simulation - Algorithm 1: Selection of a blue set. -
chainInitialize(): done. blocks= 20
blue set selection done. blue blocks = (G).B.C.D.F.I.J.K.O.P.M.R.(V). total blue: 13
The full open source project
The full source code is here: go-dag.