-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.html
1504 lines (1421 loc) · 78.2 KB
/
README.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 8.6.10" />
<title>Blockchain - Technical and business perspective</title>
<style type="text/css">
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
/* Default font. */
body {
font-family: Georgia,serif;
}
/* Title font. */
h1, h2, h3, h4, h5, h6,
div.title, caption.title,
thead, p.table.header,
#toctitle,
#author, #revnumber, #revdate, #revremark,
#footer {
font-family: Arial,Helvetica,sans-serif;
}
body {
margin: 1em 5% 1em 5%;
}
a {
color: blue;
text-decoration: underline;
}
a:visited {
color: fuchsia;
}
em {
font-style: italic;
color: navy;
}
strong {
font-weight: bold;
color: #083194;
}
h1, h2, h3, h4, h5, h6 {
color: #527bbd;
margin-top: 1.2em;
margin-bottom: 0.5em;
line-height: 1.3;
}
h1, h2, h3 {
border-bottom: 2px solid silver;
}
h2 {
padding-top: 0.5em;
}
h3 {
float: left;
}
h3 + * {
clear: left;
}
h5 {
font-size: 1.0em;
}
div.sectionbody {
margin-left: 0;
}
hr {
border: 1px solid silver;
}
p {
margin-top: 0.5em;
margin-bottom: 0.5em;
}
ul, ol, li > p {
margin-top: 0;
}
ul > li { color: #aaa; }
ul > li > * { color: black; }
.monospaced, code, pre {
font-family: "Courier New", Courier, monospace;
font-size: inherit;
color: navy;
padding: 0;
margin: 0;
}
pre {
white-space: pre-wrap;
}
#author {
color: #527bbd;
font-weight: bold;
font-size: 1.1em;
}
#email {
}
#revnumber, #revdate, #revremark {
}
#footer {
font-size: small;
border-top: 2px solid silver;
padding-top: 0.5em;
margin-top: 4.0em;
}
#footer-text {
float: left;
padding-bottom: 0.5em;
}
#footer-badges {
float: right;
padding-bottom: 0.5em;
}
#preamble {
margin-top: 1.5em;
margin-bottom: 1.5em;
}
div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
}
div.admonitionblock {
margin-top: 2.0em;
margin-bottom: 2.0em;
margin-right: 10%;
color: #606060;
}
div.content { /* Block element content. */
padding: 0;
}
/* Block element titles. */
div.title, caption.title {
color: #527bbd;
font-weight: bold;
text-align: left;
margin-top: 1.0em;
margin-bottom: 0.5em;
}
div.title + * {
margin-top: 0;
}
td div.title:first-child {
margin-top: 0.0em;
}
div.content div.title:first-child {
margin-top: 0.0em;
}
div.content + div.title {
margin-top: 0.0em;
}
div.sidebarblock > div.content {
background: #ffffee;
border: 1px solid #dddddd;
border-left: 4px solid #f0f0f0;
padding: 0.5em;
}
div.listingblock > div.content {
border: 1px solid #dddddd;
border-left: 5px solid #f0f0f0;
background: #f8f8f8;
padding: 0.5em;
}
div.quoteblock, div.verseblock {
padding-left: 1.0em;
margin-left: 1.0em;
margin-right: 10%;
border-left: 5px solid #f0f0f0;
color: #888;
}
div.quoteblock > div.attribution {
padding-top: 0.5em;
text-align: right;
}
div.verseblock > pre.content {
font-family: inherit;
font-size: inherit;
}
div.verseblock > div.attribution {
padding-top: 0.75em;
text-align: left;
}
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
div.verseblock + div.attribution {
text-align: left;
}
div.admonitionblock .icon {
vertical-align: top;
font-size: 1.1em;
font-weight: bold;
text-decoration: underline;
color: #527bbd;
padding-right: 0.5em;
}
div.admonitionblock td.content {
padding-left: 0.5em;
border-left: 3px solid #dddddd;
}
div.exampleblock > div.content {
border-left: 3px solid #dddddd;
padding-left: 0.5em;
}
div.imageblock div.content { padding-left: 0; }
span.image img { border-style: none; vertical-align: text-bottom; }
a.image:visited { color: white; }
dl {
margin-top: 0.8em;
margin-bottom: 0.8em;
}
dt {
margin-top: 0.5em;
margin-bottom: 0;
font-style: normal;
color: navy;
}
dd > *:first-child {
margin-top: 0.1em;
}
ul, ol {
list-style-position: outside;
}
ol.arabic {
list-style-type: decimal;
}
ol.loweralpha {
list-style-type: lower-alpha;
}
ol.upperalpha {
list-style-type: upper-alpha;
}
ol.lowerroman {
list-style-type: lower-roman;
}
ol.upperroman {
list-style-type: upper-roman;
}
div.compact ul, div.compact ol,
div.compact p, div.compact p,
div.compact div, div.compact div {
margin-top: 0.1em;
margin-bottom: 0.1em;
}
tfoot {
font-weight: bold;
}
td > div.verse {
white-space: pre;
}
div.hdlist {
margin-top: 0.8em;
margin-bottom: 0.8em;
}
div.hdlist tr {
padding-bottom: 15px;
}
dt.hdlist1.strong, td.hdlist1.strong {
font-weight: bold;
}
td.hdlist1 {
vertical-align: top;
font-style: normal;
padding-right: 0.8em;
color: navy;
}
td.hdlist2 {
vertical-align: top;
}
div.hdlist.compact tr {
margin: 0;
padding-bottom: 0;
}
.comment {
background: yellow;
}
.footnote, .footnoteref {
font-size: 0.8em;
}
span.footnote, span.footnoteref {
vertical-align: super;
}
#footnotes {
margin: 20px 0 20px 0;
padding: 7px 0 0 0;
}
#footnotes div.footnote {
margin: 0 0 5px 0;
}
#footnotes hr {
border: none;
border-top: 1px solid silver;
height: 1px;
text-align: left;
margin-left: 0;
width: 20%;
min-width: 100px;
}
div.colist td {
padding-right: 0.5em;
padding-bottom: 0.3em;
vertical-align: top;
}
div.colist td img {
margin-top: 0.3em;
}
@media print {
#footer-badges { display: none; }
}
#toc {
margin-bottom: 2.5em;
}
#toctitle {
color: #527bbd;
font-size: 1.1em;
font-weight: bold;
margin-top: 1.0em;
margin-bottom: 0.1em;
}
div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
margin-top: 0;
margin-bottom: 0;
}
div.toclevel2 {
margin-left: 2em;
font-size: 0.9em;
}
div.toclevel3 {
margin-left: 4em;
font-size: 0.9em;
}
div.toclevel4 {
margin-left: 6em;
font-size: 0.9em;
}
span.aqua { color: aqua; }
span.black { color: black; }
span.blue { color: blue; }
span.fuchsia { color: fuchsia; }
span.gray { color: gray; }
span.green { color: green; }
span.lime { color: lime; }
span.maroon { color: maroon; }
span.navy { color: navy; }
span.olive { color: olive; }
span.purple { color: purple; }
span.red { color: red; }
span.silver { color: silver; }
span.teal { color: teal; }
span.white { color: white; }
span.yellow { color: yellow; }
span.aqua-background { background: aqua; }
span.black-background { background: black; }
span.blue-background { background: blue; }
span.fuchsia-background { background: fuchsia; }
span.gray-background { background: gray; }
span.green-background { background: green; }
span.lime-background { background: lime; }
span.maroon-background { background: maroon; }
span.navy-background { background: navy; }
span.olive-background { background: olive; }
span.purple-background { background: purple; }
span.red-background { background: red; }
span.silver-background { background: silver; }
span.teal-background { background: teal; }
span.white-background { background: white; }
span.yellow-background { background: yellow; }
span.big { font-size: 2em; }
span.small { font-size: 0.6em; }
span.underline { text-decoration: underline; }
span.overline { text-decoration: overline; }
span.line-through { text-decoration: line-through; }
div.unbreakable { page-break-inside: avoid; }
/*
* xhtml11 specific
*
* */
div.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
}
div.tableblock > table {
border: 3px solid #527bbd;
}
thead, p.table.header {
font-weight: bold;
color: #527bbd;
}
p.table {
margin-top: 0;
}
/* Because the table frame attribute is overriden by CSS in most browsers. */
div.tableblock > table[frame="void"] {
border-style: none;
}
div.tableblock > table[frame="hsides"] {
border-left-style: none;
border-right-style: none;
}
div.tableblock > table[frame="vsides"] {
border-top-style: none;
border-bottom-style: none;
}
/*
* html5 specific
*
* */
table.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
}
thead, p.tableblock.header {
font-weight: bold;
color: #527bbd;
}
p.tableblock {
margin-top: 0;
}
table.tableblock {
border-width: 3px;
border-spacing: 0px;
border-style: solid;
border-color: #527bbd;
border-collapse: collapse;
}
th.tableblock, td.tableblock {
border-width: 1px;
padding: 4px;
border-style: solid;
border-color: #527bbd;
}
table.tableblock.frame-topbot {
border-left-style: hidden;
border-right-style: hidden;
}
table.tableblock.frame-sides {
border-top-style: hidden;
border-bottom-style: hidden;
}
table.tableblock.frame-none {
border-style: hidden;
}
th.tableblock.halign-left, td.tableblock.halign-left {
text-align: left;
}
th.tableblock.halign-center, td.tableblock.halign-center {
text-align: center;
}
th.tableblock.halign-right, td.tableblock.halign-right {
text-align: right;
}
th.tableblock.valign-top, td.tableblock.valign-top {
vertical-align: top;
}
th.tableblock.valign-middle, td.tableblock.valign-middle {
vertical-align: middle;
}
th.tableblock.valign-bottom, td.tableblock.valign-bottom {
vertical-align: bottom;
}
/*
* manpage specific
*
* */
body.manpage h1 {
padding-top: 0.5em;
padding-bottom: 0.5em;
border-top: 2px solid silver;
border-bottom: 2px solid silver;
}
body.manpage h2 {
border-style: none;
}
body.manpage div.sectionbody {
margin-left: 3em;
}
@media print {
body.manpage div#toc { display: none; }
}
</style>
<script type="text/javascript">
/*<![CDATA[*/
var asciidoc = { // Namespace.
/////////////////////////////////////////////////////////////////////
// Table Of Contents generator
/////////////////////////////////////////////////////////////////////
/* Author: Mihai Bazon, September 2002
* http://students.infoiasi.ro/~mishoo
*
* Table Of Content generator
* Version: 0.4
*
* Feel free to use this script under the terms of the GNU General Public
* License, as long as you do not remove or alter this notice.
*/
/* modified by Troy D. Hanson, September 2006. License: GPL */
/* modified by Stuart Rackham, 2006, 2009. License: GPL */
// toclevels = 1..4.
toc: function (toclevels) {
function getText(el) {
var text = "";
for (var i = el.firstChild; i != null; i = i.nextSibling) {
if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
text += i.data;
else if (i.firstChild != null)
text += getText(i);
}
return text;
}
function TocEntry(el, text, toclevel) {
this.element = el;
this.text = text;
this.toclevel = toclevel;
}
function tocEntries(el, toclevels) {
var result = new Array;
var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
// Function that scans the DOM tree for header elements (the DOM2
// nodeIterator API would be a better technique but not supported by all
// browsers).
var iterate = function (el) {
for (var i = el.firstChild; i != null; i = i.nextSibling) {
if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
var mo = re.exec(i.tagName);
if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
}
iterate(i);
}
}
}
iterate(el);
return result;
}
var toc = document.getElementById("toc");
if (!toc) {
return;
}
// Delete existing TOC entries in case we're reloading the TOC.
var tocEntriesToRemove = [];
var i;
for (i = 0; i < toc.childNodes.length; i++) {
var entry = toc.childNodes[i];
if (entry.nodeName.toLowerCase() == 'div'
&& entry.getAttribute("class")
&& entry.getAttribute("class").match(/^toclevel/))
tocEntriesToRemove.push(entry);
}
for (i = 0; i < tocEntriesToRemove.length; i++) {
toc.removeChild(tocEntriesToRemove[i]);
}
// Rebuild TOC entries.
var entries = tocEntries(document.getElementById("content"), toclevels);
for (var i = 0; i < entries.length; ++i) {
var entry = entries[i];
if (entry.element.id == "")
entry.element.id = "_toc_" + i;
var a = document.createElement("a");
a.href = "#" + entry.element.id;
a.appendChild(document.createTextNode(entry.text));
var div = document.createElement("div");
div.appendChild(a);
div.className = "toclevel" + entry.toclevel;
toc.appendChild(div);
}
if (entries.length == 0)
toc.parentNode.removeChild(toc);
},
/////////////////////////////////////////////////////////////////////
// Footnotes generator
/////////////////////////////////////////////////////////////////////
/* Based on footnote generation code from:
* http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
*/
footnotes: function () {
// Delete existing footnote entries in case we're reloading the footnodes.
var i;
var noteholder = document.getElementById("footnotes");
if (!noteholder) {
return;
}
var entriesToRemove = [];
for (i = 0; i < noteholder.childNodes.length; i++) {
var entry = noteholder.childNodes[i];
if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
entriesToRemove.push(entry);
}
for (i = 0; i < entriesToRemove.length; i++) {
noteholder.removeChild(entriesToRemove[i]);
}
// Rebuild footnote entries.
var cont = document.getElementById("content");
var spans = cont.getElementsByTagName("span");
var refs = {};
var n = 0;
for (i=0; i<spans.length; i++) {
if (spans[i].className == "footnote") {
n++;
var note = spans[i].getAttribute("data-note");
if (!note) {
// Use [\s\S] in place of . so multi-line matches work.
// Because JavaScript has no s (dotall) regex flag.
note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
spans[i].innerHTML =
"[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
"' title='View footnote' class='footnote'>" + n + "</a>]";
spans[i].setAttribute("data-note", note);
}
noteholder.innerHTML +=
"<div class='footnote' id='_footnote_" + n + "'>" +
"<a href='#_footnoteref_" + n + "' title='Return to text'>" +
n + "</a>. " + note + "</div>";
var id =spans[i].getAttribute("id");
if (id != null) refs["#"+id] = n;
}
}
if (n == 0)
noteholder.parentNode.removeChild(noteholder);
else {
// Process footnoterefs.
for (i=0; i<spans.length; i++) {
if (spans[i].className == "footnoteref") {
var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
href = href.match(/#.*/)[0]; // Because IE return full URL.
n = refs[href];
spans[i].innerHTML =
"[<a href='#_footnote_" + n +
"' title='View footnote' class='footnote'>" + n + "</a>]";
}
}
}
},
install: function(toclevels) {
var timerId;
function reinstall() {
asciidoc.footnotes();
if (toclevels) {
asciidoc.toc(toclevels);
}
}
function reinstallAndRemoveTimer() {
clearInterval(timerId);
reinstall();
}
timerId = setInterval(reinstall, 500);
if (document.addEventListener)
document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
else
window.onload = reinstallAndRemoveTimer;
}
}
asciidoc.install(4);
/*]]>*/
</script>
</head>
<body class="article">
<div id="header">
<h1>Blockchain - Technical and business perspective</h1>
<div id="toc">
<div id="toctitle">Table of contents</div>
<noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
</div>
</div>
<div id="content">
<div class="sect1">
<h2 id="_introduction">Introduction</h2>
<div class="sectionbody">
<div class="paragraph"><p>Blockchain, the keyword itself implied series of blocks and assumed that blocks would have some information added to them. Distributed Ledger Technology
The blockchain is not a strange keyword anymore in this era; everyone talks about it in their daily life.
However, not everyone can understand blockchain clearly and explain the whole concept, so in a line, it is - "Series of blocks with linked cryptographic hashes in a chronological way."</p></div>
<div class="paragraph"><p>Most of the people think - center Blockchain and Bitcoin are same! Yes, they feel like that. Well, it’s not the case they different, blockchain is an underlying concept of Bitcoin.
Bitcoin made debut in 2009 and got attention from every tech-savvy over the globe as it was a system using blockchain and p2p network, and proposing a solution to resolve double spending problem[2] and enable borderless electronic payment transactions. It was a classic peer to peer transaction system owned and supported by the developer community and public. After 2009, when Bitcoin was struggling yet rising in the market, other incubator projects were in progress which could overcome potential problems faced in bitcoin system and provide faster transactions for electronic payment transactions. Also, tech pioneers started implementing blockchain in other fields such as real estate, healthcare, and education, etc. I will explain all these as we go through this document.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_blockchain_origins">Blockchain origins</h2>
<div class="sectionbody">
<div class="paragraph"><p>The origins of blockchain technology can be traced to 1991 when Stuart Haber and W. Scott Stornetta represented the initial effort on a cryptographically secured series of blocks. In 1992, they took advantage of Merkle trees (explained in the later section) and combined it into the design resulting in a new enhanced system which allowed to collect several documents in a block, and several blocks are linked together building a chain.</p></div>
<div class="paragraph"><p>Well, that was long ago. At present, it wouldn’t be wrong to say that the blockchain technology gained significance in 2008 when a mysterious person named "Satoshi Nakamoto" came up with the Bitcoin white paper. Satoshi Nakamoto proposed a practical approach to solving the problem of double spending using same blockchain technology. Another fact which still amazes people is that nobody knows who Satoshi Nakamoto was and its still a mystery.</p></div>
<div class="paragraph"><p>In 1991, Stuart Haber and W. Scott Stornetta did the first work on a cryptographically secured chain of blocks. To improve the efficiency of collecting several documents into one block, Bayer, Haber, and Stornetta in 1992, integrated Merkle trees (explained in the later section) to the blockchain. In the year 1998, Nick Szabo presented bit gold as an instrument for decentralized digital currency and smart contracts. Stefan Konst in the year 2000, introduced a general cryptographic theory of secured chain. An anonymous person or group was known as Satoshi Nakamoto (2008) in 2008 visualized the first distributed blockchain. In the year 2009, executed the distributed blockchain as the core element for digital currency bitcoin where it serves as an open ledger for all transactions. A blockchain database is handled autonomously with the help of peer-to-peer network and a distributed timestamping server. The double spending problem has resolved with the help of bitcoin implementation, without needing a trusted organization or an administrator. The bitcoin design has been a model and inspiration for other applications. The bitcoin blockchain file size reached 20 gigabytes in August 2014. The volume had grown to 30 gigabytes on January 2015, and from January 2016 to January 2017, the proportion has increased from 50 to 100 gigabytes. To refer to new applications of the distributed blockchain database, Blockchain 2.0 is used. The Blockchain 2.0 technologies go beyond transactions. They allow the value exchange without any influential intermediaries acting as arbiters of money and information. As of 2016, the implementations of Blockchain 2.0 requires an off-chain oracle to access any data which is external or to access any events based on the time or market conditions that need to interact with the blockchain. To investigate blockchain-based automated voting systems, the central securities depository of the Russian Federation(NSD) proclaimed a pilot project based on Nxt Blockchain 2.0 platform in 2016. IBM has opened a blockchain research center in Singapore in July 2016. The World Economic Forum met to discuss the development of governance models related to blockchain in November 2016 and also a Global Blockchain Forum is created by the industry trade groups which was an initiative of the Chamber of Digital Commerce.</p></div>
<div class="sect2">
<h3 id="_the_concept">The concept</h3>
<div class="sect3">
<h4 id="_distributed_ledger_technology_dlt">Distributed Ledger Technology (DLT)</h4>
<div class="paragraph"><p>The key term is distributed ledger technology (DLT), which includes <strong>blockchain</strong> and <strong>smart contracts</strong>. Distributed ledger is a type of data structure within a block.</p></div>
</div>
<div class="sect3">
<h4 id="_blockchain">Blockchain</h4>
<div class="paragraph"><p>The blockchain is a chronological chain of blocks, in which each block had a set of multiple transactions and added to the chain including timestamp and cryptographic hash, ultimately providing immutable records for all the transactions.</p></div>
<div class="imageblock" style="text-align:center;">
<div class="content">
<img src="./imgs/https://upload.wikimedia.org/wikipedia/commons/a/ab/Blockchain_landscape.svg" alt="caption="Figure 1: "" />
</div>
<div class="title">Figure 1. Blockchain (licensed under Creative Commons Attribution-Share-Alike 3.0 Unported, retrieved from Wikipedia)"Blockchain formation. The main chain (black) consists of the longest series of blocks from the genesis block (green) to the current block. Orphan blocks (purple) exist outside of the main chain."[Wikipedia]</div>
</div>
</div>
<div class="sect3">
<h4 id="_blockchain_block_and_datastorage">Blockchain - Block and DataStorage</h4>
<div class="paragraph"><p>The block contains <strong>bundled transaction records</strong>, a reference to the <strong>previous block</strong>, <strong>proof of work</strong> and <strong>timestamp</strong>. The blockchain can reside across multiple computing devices (<em>generally referred as nodes in the network</em>), generally spread across locations or regions to form a distributed peer to peer network and it uses consensus algorithm to provide immutability.</p></div>
<div class="paragraph"><p>We will have a look at blockchain and block data depiction as below -</p></div>
<div class="imageblock" style="text-align:center;">
<div class="content">
<img src="./imgs/https://upload.wikimedia.org/wikipedia/commons/thumb/5/55/Bitcoin_Block_Data.svg/900px-Bitcoin_Block_Data.svg.png" alt="caption="Figure 2: "" />
</div>
<div class="title">Figure 2. Bitcoin Block Data (licensed under Creative Commons Attribution-Share-Alike 3.0 Unported, retrieved from Wikipedia)</div>
</div>
<div class="paragraph"><p>The block data gives us an overview of all the things inside a block. As you can see that block 11 contains transactions that are hashed and bundled called <strong>tx_root</strong>, previous hash to block 10, a <strong>timestamp</strong> and <strong>nonce</strong> (<em>proof of work</em>). <strong>Tx_root</strong> is a <strong>Merkle tree</strong>, which contains hashes of all the transactions.</p></div>
<div class="admonitionblock">
<table><tr>
<td class="icon">
<img src="./images/icons/note.png" alt="Note" />
</td>
<td class="content">According to Andreas M. Antonopoulos, in the Bitcoin protocol, "<strong>Merkle trees</strong> are used to summarize all the transactions in a block, producing an overall digital fingerprint of the entire set of transactions, providing a very efficient process to verify whether a transaction is included in a block."</td>
</tr></table>
</div>
</div>
<div class="sect3">
<h4 id="_blockchain_data_distribution">Blockchain - Data Distribution</h4>
<div class="paragraph"><p>Distributed ledger technologies like blockchain work on the peer to peer (p2p) network models, meaning every peer has same data and updates will be applied to all of them.</p></div>
<div class="paragraph"><p>Aforementioned is more efficient than client-server architecture and no central control over changing states of the ledger.</p></div>
<div class="imageblock">
<div class="content">
<img src="./imgs/https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/P2P-network.svg/119px-P2P-network.svg.png" alt="align="center"" />
</div>
<div class="title">Figure 3. A peer-to-peer (P2P) network in which interconnected nodes ("peers") share resources amongst each other without the use of a centralized administrative system(licensed under Creative Commons Attribution-Share-Alike 3.0 Unported, retrieved from Wikipedia)</div>
</div>
</div>
<div class="sect3">
<h4 id="_blockchain_consensus">Blockchain - Consensus</h4>
<div class="paragraph"><p>The consensus is the process of achieving agreement among the network participants as to the correct <strong>state of data on the system</strong>, and it has been studied for many years from the distributed system’s perspective.</p></div>
<div class="paragraph"><p>In the blockchain, as multiple participants are adding blocks, it may be you see different versions of the same block. For resolving these conflicts, the consensus algorithm varies with varying implementations of the blockchain. In Bitcoin, its determined by using the <strong>most extended chain rule</strong>, i.e., Proof of Work. There are others, like the <strong>Proof of Burn</strong>, <strong>Proof of Stake</strong>, <strong>Proof of Capacity</strong>, <strong>Proof of Elapsed Time</strong>, and many others, it all depends on the unique requirements of that blockchain system. Let’s have an in-depth look into all of them -</p></div>
<div class="paragraph"><p>Before we start looking at the different algorithm, we need to understand few terms as follows -</p></div>
<div class="paragraph"><p>====== Network & Nodes</p></div>
<div class="paragraph"><p>Blockchain network (follows classic p2p network approach) is group computers directly connected to each other via the Internet and does not have any central server.</p></div>
<div class="paragraph"><p>Peers also known as nodes in the network, provide the computing power and storage that is needed for the upkeep of the whole network. Such network is considered to be more secure than centralized networks because they do not have a single point of attack.</p></div>
<div class="imageblock">
<div class="content">
<img src="./imgs/https://upload.wikimedia.org/wikipedia/commons/b/b2/Distributed-networks.svg" alt="align="center"" />
</div>
<div class="title">Figure 4. Communication on distributed netwokrs(licensed under Creative Commons Attribution-Share-Alike 3.0 Unported, retrieved from Wikipedia)</div>
</div>
<div class="paragraph"><p>====== Hashing power</p></div>
<div class="paragraph"><p>Hashing power or hash rate directly refers to the computing power of a node in the network, which is used to calculate and solve the math problem for creating and verifying a block in the blockchain. A higher hash power is better when mining(explained in the later section) as it increases the individual peers' opportunity of finding the next block and receiving the reward.</p></div>
<div class="paragraph"><p>====== Mining</p></div>
<div class="paragraph"><p>Mining is the backbone of the entire blockchain network. The mining process creates new blocks and verifies all transactions in blockchain network. Peers in the network compete for creating new blocks in blockchain and verifying the transactions and collect a reward. This reward is a "newly mined" coin or part of the coin which was never issued before, thus its also a way to produce new coins in the network. Also, the mining process helps in maintaining security.</p></div>
<div class="paragraph"><p>====== Accounting rights</p></div>
<div class="paragraph"><p>Blockchain uses various consensus algorithms to distribute accounting rights to peers. Miners (nodes or peers in the network) with better hashing power and performance gets the accounting rights to solve the cryptographic hash problem easily and entitled for reward (New coin or part of the coin). However, accounting rights are allocated using a different algorithm in another consensus algorithms, such as for Proof of Stake, priority is given to nodes which own more coins in the network and retain them for a long time.</p></div>
<div class="paragraph"><p>====== Reward</p></div>
<div class="paragraph"><p>The reward is new coin or part of a coin issued to miners as the result of the mining process.</p></div>
<div class="sect4">
<h5 id="_proof_of_work_pow">Proof of work (PoW)</h5>
<div class="paragraph"><p>PoW is used in bitcoin, and the core design is to share the <strong>accounting rights</strong> and rewards through the <strong>hashing power rivalry</strong> (hash rate) between the nodes in the peer network.
Based on the data of the prior block, the various nodes calculate the explicit solution of a mathematical problem. It’s challenging to solve the math problem. The first node that solves this math problem can produce the following block and get a specific amount of
Bitcoin reward.</p></div>
<div class="paragraph"><p>Satoshi Nakamoto studied HashCash and designed
this mathematics problem in bitcoin. Steps in this process are as follows -</p></div>
<div class="ulist"><ul>
<li>
<p>
Get the difficulty: Mining algorithm will see the hash rate of the whole network and adjust difficulty value accordingly.
</p>
</li>
<li>
<p>
Collect transactions: Bundle all pending transactions and calculate the Merkle Root of these transactions. And put this in a new block with the 256-bit hash value of the preceding block, the current target hash value, Nonce arbitrary number and other required information.
</p>
</li>
<li>
<p>
Calculating: Produce double SHA 256 in collect transactions steps by traversing the nonce number between 0 to 232 in step 2. The block can be announced if the calculated hash is less than or equal to the target value. Later verification with others nodes take place, and accounting is done.
</p>
</li>
<li>
<p>
Restarting: Restarting is the way to calculate the hash again by previous step(collect transactions) if node can’t do it in given time. If any other node does this already, a process begins from the first step(Get difficulty) then.
</p>
</li>
</ul></div>
<div class="paragraph"><p>Proof of work requires a lot of energy, and the possible threat to the blockchain system, because it can alter blockchain if some peers in the network own 51% of the ledger as all nodes trust the most extended chain in the network.</p></div>
<div class="imageblock">
<div class="content">
<img src="./imgs//imgs/pow.jpeg" alt="align="center"" />
</div>
</div>
</div>
<div class="sect4">
<h5 id="_proof_of_stake_pos">Proof of Stake (PoS)</h5>
<div class="paragraph"><p>PoS was mentioned in the first bitcoin project, but it
wasn’t used because of the robustness and other reasons.
The initial application of PoS is PPCoin. The concept of this PoS algorithm is based on the age of coin. The coin age is calculated by multiplying its value by the period after it was produced.
The longer any node keeps the coins, the more advantages it can get in the peer network. Coin holders will also receive a specific reward according to the how long they hold these coins.</p></div>
<div class="paragraph"><p>PoS promotes the coins dwellers to increase the holding time. With the idea of coin age, the blockchain is no longer entirely relying on the PoW and efficiently solves problems of PoW. Ultimately, PoS improves the security of blockchain with the increasing value in the blockchain. The hackers or malicious peers need to acquire a massive number of coins and hold them long enough to attack.</p></div>
<div class="imageblock">
<div class="content">
<img src="./imgs//imgs/pos.png" alt="align="center"" />
</div>
</div>
</div>
<div class="sect4">
<h5 id="_delegated_proof_of_stake_dpos">Delegated proof of stake (DPOS )</h5>
<div class="paragraph"><p>Satoshi Nakamoto initially designed bitcoin in such a way that participants could use the CPU power to mine and hashing power could match the peer nodes in the network. The idea behind this was to give each node equal opportunity to participate in the decision-making of the blockchain. As the technology evolved and bitcoin is rising, people came up with special mining machines. Owning multiple of such machine gives you more hashing power, and ordinary miners can rarely create any new blocks.</p></div>
<div class="paragraph"><p>Top N nodes are elected in the network which has higher stakes and hashing power(At least 50% stakeholders would believe that enough decentralization is there)to have accounting rights and create blocks.
The DPoS seems to be more power-saving and efficient than PoS and PoW.</p></div>
<div class="imageblock">
<div class="content">
<img src="./imgs//imgs/dpos.png" alt="align="center"" />
</div>
</div>
</div>
<div class="sect4">
<h5 id="_practical_byzantine_fault_tolerance_pbft">Practical Byzantine Fault Tolerance (PBFT)</h5>
<div class="paragraph"><p>Practical Byzantine Fault Tolerance could be an excellent method to resolve the transmission errors. This consensus algorithm works on communication between the master node and client node, and has five stages as below -</p></div>
<div class="ulist"><ul>
<li>
<p>
Request
</p>
</li>
</ul></div>
<div class="paragraph"><p>The master node creates a timestamp for the request coming from the client node.</p></div>
<div class="ulist"><ul>
<li>
<p>
Pre-Prepare
</p>
</li>
</ul></div>
<div class="paragraph"><p>The master node registers the request message came from the client node, assign an order number and broadcasts a pre-prepared message to other server nodes. They determine whether to accept or reject the request.</p></div>
<div class="ulist"><ul>
<li>
<p>
Prepare
</p>
</li>
</ul></div>
<div class="paragraph"><p>If any node accepts the request, it broadcasts a prepare message to all the other nodes and receives the prepare messages from the other nodes. If the majority of nodes accept the invitation, they will move to commit stage.</p></div>
<div class="ulist"><ul>
<li>
<p>
Commit
</p>
</li>
</ul></div>
<div class="paragraph"><p>All nodes in commit state will send commit message to each other. In the meantime, if a server node receives 2f+1 commit messages, it could consider that maximum nodes agree to accept the request, and executes the instructions within request message.</p></div>
<div class="ulist"><ul>
<li>
<p>
Reply
</p>
</li>
</ul></div>
<div class="paragraph"><p>Once instructions are executed, server node needs to respond to the client node. If the client could not get the reply due to network delay server nodes will have the request held, or if instructions have been executed already, server nodes only need to transmit the reply message repeatedly.</p></div>
<div class="imageblock">
<div class="content">
<img src="./imgs//imgs/pbft.png" alt="align="center"" />
</div>
</div>
</div>
<div class="sect4">
<h5 id="_raft">Raft</h5>
<div class="paragraph"><p>Raft algorithm was proposed in 2013 by Standford’s Ongaro and others. Raft attains the same effect as Paxos(which was hard to understand in 90’s) and is more suitable for engineering implementation.</p></div>
<div class="paragraph"><p>Raft cluster contains five server nodes, and each node will have three states, i.e., leader, follower, and candidate. The leader handles all requests from clients. Out of five, maximum two nodes can crash at the same time, and three will work in the cluster.</p></div>
<div class="imageblock">
<div class="content">
<img src="./imgs//imgs/raft.png" alt="#pow" />
</div>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_blockchain_read_write">Blockchain - Read/Write</h4>
<div class="paragraph"><p>As its a distributed ledger, everyone, who owns a decent computer with enough power, is allowed to use the source code and read-write ledger state.</p></div>
<div class="paragraph"><p>However, these can be controlled based on what kind of blockchain you are using, i.e., permissioned or permissionless. Bitcoin is a permissionless blockchain technology; anyone can download and start using it.</p></div>
<div class="sect4">
<h5 id="_permissionless_blockchain">Permissionless blockchain</h5>
<div class="paragraph"><p>The permissionless blockchain is publicly owned blockchain network, where anyone and can join the network without any signup process or verification and start contributing to reading/writing process of the ledger. Bitcoin is widely known case for such blockchain, and there are more.</p></div>
</div>
<div class="sect4">
<h5 id="_permissioned_blockchain">Permissioned blockchain</h5>
<div class="paragraph"><p>The permissioned blockchain is private blockchain where membership is required in some form. To use permissioned blockchain network, we need to meet some predefined criteria.
Permissioned blockchains are generally company owned.</p></div>
</div>
<div class="sect4">
<h5 id="_public_vs_private">Public vs Private</h5>
<div class="paragraph"><p>Now we know that two kinds of blockchains are there already. These can be further categorized based on the access provided to users in the network. A Permissionless blockchain may be public or private. Similarly, a permissioned blockchain can be public or private.</p></div>
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_bitcoin">Bitcoin</h2>
<div class="sectionbody">
<div class="paragraph"><p><span class="image">
<img src="./imgs/https://use.fontawesome.com/releases/v5.0.13/svgs/brands/bitcoin.svg" alt="eth" />
</span></p></div>
<div class="sect2">
<h3 id="_history">History</h3>
<div class="paragraph"><p>Bitcoin, the name is well suited and catch attention from tech-savvy people. I have already discussed a little bitcoin earlier in this paper.</p></div>
<div class="paragraph"><p>Bitcoin tales started in 2008 when Satoshi Nakamoto, proposed a solution to solve double spending problem and ditch central authorities those who take over the transaction from our very hands and take much time to process along with a fee.</p></div>
</div>
<div class="sect2">
<h3 id="_why_did_we_need_it_or_not">Why did we need it? or not</h3>
<div class="paragraph"><p>Earlier when we did not have any currency, people used to trade stuff like crops, goods, etc. and fulfill their daily needs. But later on, the concept of currency was developed. It evolved and led to paper money in exchange for gold with world bank. Later on, keeping gold was not an option anymore, and government can print currency whenever in need. Printing money wasn’t a problem, but it caused to inflection and became invaluable over time. What we could purchase with 1 Unit is way costly nowadays.</p></div>
<div class="paragraph"><p>Another problem was that people were stacking money in banks and banks could lend the same money up to 90% back to people. These financial institutions were acting as a central authority to circulate cash within society, and all the transactions, going through the are chargeable. This ultimate business model was efficient for financial institutions but not good for people who need privacy and security.
Satoshi Nakamoto, rescued us by proving a practical approach to solve these problems.</p></div>
<div class="paragraph"><p>In the financial sector, Bitcoin is the very first application to demonstrate tremendous potential. However, it also attracts government authorities to utilize such powerful technology and implement blockchain in a centralized manner. It may be for currency or maintaining other government affairs. Similarly, other tech giants and financial institutes are also exploring blockchain.</p></div>
<div class="paragraph"><p>Bitcoin solves two problems - Double spending and Byzantine Generals problem. Double spending refers to idea where people or any institute reuses the currency in more than one transaction at the same time. When using the traditional money, double spending isn’t happening but if financial institutions maintain their ledgers and can produce this scenario all the time. Double spending can also be solved by internet transactions where centralized trusted institutions are used.</p></div>
<div class="paragraph"><p>The other problem - Byzantine generals problem is related to distributed systems. In a distributed network, data amongst nodes can be distributed in peer to peer network, but there are chances that data could be attacked by hackers or malicious users to alter contents of data, compromising data consistency on nodes in the peer network. Normal nodes would have to validate this data across other nodes to identify tempered information, resulting in the need for corresponding consensus algorithm.</p></div>
<div class="ulist"><div class="title">Other things to consider -</div><ul>
<li>
<p>
<strong>Privacy?</strong>
</p>
</li>
</ul></div>
<div class="paragraph"><p>Its okay to trade with cash as you don’t need to tell anybody how much or less you are paying. But with if you want to pay the more significant amount, you would probably need to use banks or any other institution to make that transaction. Suppose I want to pay $2000 to my friend, using bank and banks will know how much I have paid to whom.</p></div>
<div class="paragraph"><p><strong>No privacy at all…</strong></p></div>
<div class="paragraph"><p><em>But, bitcoin others provides pseudonymous privacy making it hard to figure out anything except two parties involved in the exchange.</em></p></div>
<div class="ulist"><ul>
<li>