ExSan++
The ExSan Abstract Data Structure can be used to implement a complex blockchain structure.
Each ExSan Node can be considered a block in the chain, pointing to a binary tree
(Merkle Tree, which has already been implemented and coded).
In fact, each ExSan Node can point to any user-defined abstract data structure.
1 LEARNING BLOCKCHAIN
2
This a Computer Science topic quite interesting.
3
I have coded my first simulations using ExSan
4
It already has implemented binary tree in every block / node
Wikipedia Merkle Tree
5
This simulations tracks blockchains transactions without hashing.
6
Every row is a peer, when it reaches the end of the row it comes
7
back to the begining of the row and keeps on.
8
COURSERA Bitcoin and Cryptocurrency Technologies
9
ref:
My Profile #opentowork
10
Code and output of the simulation of simple transactions as depicted on the picture above
11
12
13
14
///----------CODE
15
/***********START***************/
16
void bckchxsn3() {
17
setJobID("bch3_");
18
string label = "BlockChainSimulator 3";
19
out("", label);
20
21
enum FLOAT { ppF };
22
enum BOOL { ppB };
23
enum USHORT { ppU };
24
enum STRING { ppW };
25
enum CHAR { ppC };
26
27
unsigned short int nProc{ 5 };
28
unsigned short wtext{ 7 }, counToMerkel{ 0 }, wdt{ 3 }; //wdt display first and last wdt c
29
unsigned short rows{ 10 }, cols{ 10 }; //always more than 1 here
30
31
///----
32
33
boost::random::uniform_int_distribution<> uniformRndIntNBitCoins{ 0, 7 }; //#include
34
boost::random::uniform_int_distribution<> uniformRndIntTrueFals{ 0, 1 }; //#include
35
boost::random::uniform_int_distribution<> uniformRndIntTx{ 1, 5 };
36
37
unsigned seed = chrono::system_clock::now().time_since_epoch().count();
38
default_random_engine generator(seed);
39
///----
40
41
NETPTR net{ nullptr };
42
CELLPTR ptr{ nullptr }, prevptr{ nullptr };
43
ROWPTR rptr{ nullptr };
44
45
net = net->exsan(rows, cols, ppF, ppB, ppU, ppW, ppC);
46
47
///----
48
unsigned short int rowCoord{ 0 }, colCoord{ 0 };
49
unsigned short int thisRow{ 0 }, thisCol{ 0 };
50
unsigned short int randRow(0), randRowTo{ 0 };
51
unsigned short int nBitCoinsTotal{ 0 }, nBitCoins{ 0 }, nBitCoinsTx{ 0 };
52
unsigned short int nRollTheDice{ 5 };
53
bool txRx{ 0 }, displayTxRx{ 0 };
54
55
for (unsigned short test = 1; test <= nRollTheDice; test++) {
56
57
boost::random::uniform_int_distribution<> RndIntRows{ 2, rows }; //#include
58
thisRow = RndIntRows(generator);
59
60
boost::random::uniform_int_distribution<> uniformRndInt{ 1, thisRow }; //#include
61
62
boost::random::uniform_int_distribution<> RndIntCols{ 2, cols }; //#include
63
thisCol = RndIntCols(generator);
64
65
net->set_work_sheet(net, ppF, thisRow, thisCol);
66
67
bool* aryRows = new bool[net->get_rows_in_page(ppF, 'f') + 1];
68
bool* aryCols = new bool[net->get_cols_in_page(ppF, 'f') + 1];
69
for (thisRow = 1; thisRow <= net->get_rows_in_page(ppF, 'f'); thisRow++) aryRows[thisRow
70
for (thisCol = 1; thisCol <= net->get_cols_in_page(ppF, 'f'); thisCol++) aryCols[thisCol
71
72
73
//prepares all rowptr to the first col
74
rptr = net->goto_row(net, ppF, 1, 'f');
75
for (thisRow = 1; thisRow <= net->get_rows_in_page(ppF, 'f'); thisRow++) {
76
rptr->tickInPoinTo(rptr->get_forward_ptr());
77
rptr = rptr->get_down_ptr();
78
}
79
80
fout << "\n\n\tTEST " << setw(3) << test << " out of " << nRollTheDice;
81
vector randIntVector; // every pool a new vector
82
nBitCoinsTotal = 0;
83
aryCols[1] = 1;
84
fout << "\n\tRANDOM GENERATED(peer in row, nBitcoins)";
85
for (unsigned short counter = 0; counter < net->get_rows_in_page(ppF); counter++) {
86
randRow = uniformRndInt(generator);
87
//fout << "\n\trandRow" << setw(3) << randRow;
88
if (std::find(randIntVector.begin(), randIntVector.end(), randRow) != randIntVector.end(
89
--counter;
90
//fout << "\tfound!!!!";
91
}
92
else {
93
randIntVector.push_back(randRow);
94
nBitCoins = uniformRndIntNBitCoins(generator);
95
nBitCoinsTotal += nBitCoins;
96
//fout << "\n\tNew entry row /peer " << setw(3) << randRow << "\tnrand Bitcoins assigned
97
rptr = net->goto_row(net, ppF, randRow, 'f');
98
99
ptr = rptr->get_ptrLasTick();
100
ptr->set_data(ppF, nBitCoins);
101
rptr->tickIn(ppF, ptr->get_data(ppF)); // next entry will be in col2
102
103
if (!nBitCoins) rptr->tickInPoinTo(rptr->get_forward_ptr()); //points to col 1
104
105
if (counter == 1 && nBitCoinsTotal) {//ok there is more than one active bitcoin holder
106
//fout << "\n\tAt this instant there are at least 2 peers in the layout that could sta
107
// \n\tat least one of them has no zero bitcoins";
108
109
}
110
//next line togheter
111
//aryRows[randRow] = 1;
112
//fout << "\n\tNew entry row /peer " << setw(3) << randRow << "\tnrand Bitcoins assigned
113
}
114
}
115
116
aryCols[1] = 1;
117
fout << "\n\tORIGINAL SEED Total Bitcoins available " << nBitCoinsTotal << " page " << p
118
119
for (thisRow = 1; thisRow <= net->get_rows_in_page(ppF, 'f'); thisRow++) aryRows[thisRow
120
for (thisCol = 1; thisCol <= net->get_cols_in_page(ppF, 'f'); thisCol++) aryCols[thisCol
121
122
//there is already a data in col 1==???? 0 ????
123
124
nProc = net->get_rows_in_page(ppF, 'f') * net->get_cols_in_page(ppF, 'f');
125
boost::random::uniform_int_distribution<> RndIntProc{ nProc, int(nProc * 1.33) }; //#incl
126
nProc = RndIntProc(generator);
127
128
if (displayTxRx)fout << "\n\tSimmulation random peer and bitcoins to traded nProc: " <<
129
for (unsigned short pro = 1; pro <= nProc; pro++) {
130
if (displayTxRx)fout.flush() << "\n\tProcess" << setw(3) << pro << " out of " << nProc;
131
//nBitCoins = uniformRndIntNBitCoins(generator);
132
randRow = uniformRndInt(generator);
133
rptr = net->goto_row(net, ppF, randRow, 'f');
134
ptr = rptr->get_ptrLasTick();
135
//fout << "\n\tPeer" << setw(3) << randRow << " next block: " << ptr->get_col();
136
137
nBitCoinsTx = nBitCoins = 0;
138
if (ptr->get_col() == 1) {
139
//fout << "\n\tptr to first col**";
140
nBitCoins = net->point_to(net, ppF, randRow, net->get_cols_in_page(ppF, 'f'), 'f')->get
141
if (nBitCoins) {
142
do {
143
randRowTo = uniformRndInt(generator);
144
} while (randRowTo == randRow);
145
boost::random::uniform_int_distribution<> uniformRndIntTx{ 1, nBitCoins }; //#include
146
nBitCoinsTx = uniformRndIntTx(generator);
147
if (displayTxRx)fout.flush() << "\n\tPeer" << setw(3) << randRow << " ---will transfer
148
//fout.flush() << "\n\tPeer[" << setw(3) << randRow << ", " << ptr->get_previous_ptr()
149
150
ptr->set_data(ppF, nBitCoins - nBitCoinsTx);
151
rptr->tickIn(ppF, ptr->get_data(ppF)); //updated pointer to next in row
152
}
153
else { if (displayTxRx) fout << "\n\tPeer[" << randRow << "] has no funds available to
154
}
155
else {
156
if (ptr->get_col() == net->get_cols_in_page(ppF, 'f')) {// fout << "\n\tlast col";
157
nBitCoins = net->point_to(net, ppF, randRow, net->get_cols_in_page(ppF, 'f'), 'f')->ge
158
if (nBitCoins) {
159
do {
160
randRowTo = uniformRndInt(generator);
161
} while (randRowTo == randRow);
162
boost::random::uniform_int_distribution<> uniformRndIntTx{ 1, nBitCoins }; //#include
163
nBitCoinsTx = uniformRndIntTx(generator);
164
//fout.flush() << "\n\tRow " << setw(3) << randRow << "\tBitcoins available: " << nBi
165
if (displayTxRx)fout.flush() << "\n\tPeer" << setw(3) << randRow << "\t will transfer
166
ptr->set_data(ppF, ptr->get_previous_ptr()->get_data(ppF) - nBitCoinsTx);
167
//rptr->tickIn(ppF, ptr->get_data(ppF)); //updated pointer to next in row???? there
168
169
rptr = net->goto_row(net, ppF, randRow, 'f');
170
rptr->tickInPoinTo(rptr->get_forward_ptr());
171
}
172
else { if (displayTxRx) fout << "\n\tPeer[" << randRow << "] has no funds available to
173
}
174
else {
175
if (displayTxRx)fout << "\n\tptr points not to the first neither to the last";
176
nBitCoins = ptr->get_previous_ptr()->get_data(ppF);
177
if (nBitCoins) {
178
do {
179
randRowTo = uniformRndInt(generator);
180
} while (randRowTo == randRow);
181
182
boost::random::uniform_int_distribution<> uniformRndIntTx{ 1, nBitCoins }; //#include
183
nBitCoinsTx = uniformRndIntTx(generator);
184
//fout.flush() << "\n\tRow " << setw(3) << randRow << "\tBitcoins available: " << nBi
185
if (displayTxRx)fout.flush() << "\n\tPeer[" << setw(3) << randRow << ", " << ptr->get
186
ptr->set_data(ppF, ptr->get_previous_ptr()->get_data(ppF) - nBitCoinsTx);
187
rptr->tickIn(ppF, ptr->get_data(ppF)); //updated pointer to next in row
188
189
ptr->set_bool(ppB, 1);
190
aryRows[randRowTo] = 1;
191
aryRows[randRow] = 1;
192
//fout << "\n\tTx Layout updated"; net->show_page(net, ppF, 'f', 0, 3, wtext, 4, ary
193
aryRows[randRowTo] = 0;
194
aryRows[randRow] = 0;
195
ptr->set_bool(ppB, 0);
196
197
}
198
else { if (displayTxRx) fout << "\n\tPeer[" << randRow << "] has no funds available to
199
200
}
201
}
202
if (nBitCoinsTx) {
203
//fout << "\n\tThere was a Tx, update Receptor new block ";
204
rptr = net->goto_row(net, ppF, randRowTo, 'f');
205
ptr = rptr->get_ptrLasTick();
206
//fout << "\n\tReceptor Peer: " << setw(3) << randRowTo << " next block: " << ptr->ge
207
208
if (ptr->get_col() == 1) {// fout << "\n\tRx first col";
209
if (displayTxRx)if (displayTxRx) fout.flush() << "\n\tPeer" << setw(3) << randRowTo <<
210
ptr->set_data(ppF, net->point_to(net, ppF, randRowTo, net->get_cols_in_page(ppF, 'f'),
211
rptr->tickIn(ppF, ptr->get_data(ppF)); //updated pointer to next in row
212
aryRows[randRowTo] = 1;
213
aryRows[randRow] = 1;
214
//fout << "\n\tRx Layout updated"; net->show_page(net, ppF, 'f', 0, 3, wtext, 4, aryR
215
aryRows[randRowTo] = 0;
216
aryRows[randRow] = 0;
217
}
218
else {
219
if (ptr->get_col() == net->get_cols_in_page(ppF, 'f')) { //fout << "\n\tptr in last co
220
if (displayTxRx)fout.flush() << "\n\tPeer[" << setw(3) << randRowTo << "]\taccepts tr
221
ptr->set_data(ppF, ptr->get_previous_ptr()->get_data(ppF) + nBitCoinsTx); //+ in RX
222
rptr = net->goto_row(net, ppF, randRowTo, 'f');
223
rptr->tickInPoinTo(rptr->get_forward_ptr()); //next to be filled in col 1
224
}
225
else {
226
if (displayTxRx) fout << "\n\tRx, ptr points not to the first neither to the last";
227
nBitCoins = ptr->get_previous_ptr()->get_data(ppF);
228
if (displayTxRx) fout.flush() << "\n\tPeer" << setw(3) << randRowTo << "\taccepts tra
229
ptr->set_data(ppF, ptr->get_previous_ptr()->get_data(ppF) + nBitCoinsTx);
230
rptr->tickIn(ppF, ptr->get_data(ppF)); //updated pointer to next in row
231
232
aryRows[randRowTo] = 1;
233
aryRows[randRow] = 1;
234
//fout << "\n\tLayout updated"; net->show_page(net, ppF, 'f', 0, 3, wtext, 4, aryRow
235
aryRows[randRowTo] = 0;
236
aryRows[randRow] = 0;
237
}
238
}
239
}
240
if (displayTxRx) {
241
aryRows[randRowTo] = 1;
242
aryRows[randRow] = 1;
243
fout << "\n\tLayout updated"; net->show_page(net, ppF, 'f', 0, 3, wtext, 4, aryRows);
244
aryRows[randRowTo] = 0;
245
aryRows[randRow] = 0;
246
}
247
}
248
249
//fout << "\n\tLayout at the end"; net->show_page(net, ppF, 'f', 0, 3, wtext, 4);
250
fout << "\n\tThere has been " << nProc << " transactions";
251
fout << "\tthe layout at the end looks like pp " << ppF; net->show_page(net, ppF, 'f', 0
252
253
fout << "\n\tAt the end, let's veryfiy Sum Up of bitCoins[peer, col] = val";
254
double bicoinCheck{ 0 };
255
//rptr = net->goto_row(net, ppF, 1, 'f');
256
if (1)
257
for (thisRow = 1; thisRow <= net->get_rows_in_page(ppF, 'f'); thisRow++) {
258
rptr = net->goto_row(net, ppF, thisRow, 'f');
259
ptr = rptr->get_ptrLasTick();
260
if (ptr->get_col() == 1) {
261
bicoinCheck += net->point_to(net, ppF, thisRow, net->get_cols_in_page(ppF, 'f'), 'f')-
262
fout << "\n\tLast block entry at the end of row [" << setw(2) << thisRow << ", " <<
263
fout << "\t current sum up = " << bicoinCheck;
264
}
265
else {
266
bicoinCheck += ptr->get_previous_ptr()->get_data(ppF);
267
fout << "\n\t\t\t\t\t\tLast block entry [" << setw(2) << thisRow << ", " << setw(2) <
268
fout << "\t current sum up = " << bicoinCheck;
269
}
270
//rptr = rptr->get_down_ptr();
271
}
272
273
fout << "\n\t\t\t\tLets see last entry and verify bitCoins sum up bicoinCheck = " << set
274
fout << "\n\t\t\t\tORIGINAL SEED Total Bitcoins available " << setw(3) << nBitCoinsTotal;
275
if (bicoinCheck != nBitCoinsTotal) {
276
fout << "\tERROR!!!\n\n\n\n";
277
Beep(1333, 440); //beep(1000, 1);
278
}
279
else fout << "\tOK SUM-UP OK!\n\n";
280
281
//before re-using the layout in this for-loop reset
282
283
rptr = net->goto_row(net, ppF, 1, 'u');
284
for (thisRow = 1; thisRow <= net->get_rows_in_page(ppF, 'f'); thisRow++) {
285
ptr = rptr->get_forward_ptr();
286
//fout << "\n\n\trptr row: " << rptr->get_n_row() << "\t(" << ptr->get_row() << ", " <<
287
for (thisCol = 1; thisCol <= net->get_cols_in_page(ppF, 'f'); thisCol++) {
288
ptr->set_data(ppF, 0);
289
ptr = ptr->get_next_ptr();
290
}
291
rptr = rptr->get_down_ptr();
292
}
293
294
//fout << "\n\n\tReset page: " << ppF; net->show_page(net, ppF, 'f', 0, 3, wtext, 4);
295
}
296
net->kill_exsan(net);
297
}
298
/***********END bkxsn3**********/
299
300
301
//////----------------output SIMPLE TRACKING OF TRANSACTIONS
302
| ExSan | C++ | ExSan | MSVSC2019_V16_11.23@01.11
303
Tue Jan 31 07:54 : 44 2023
304
305
exsan.plusplus@gmail.com https ://twitter.com/#!/ExSan_com
306
JOB: bch3_5444
307
308
BlockChainSimulator 3
309
Generate Exsan(5, 5)
310
311
TEST 1 out of 3
312
RANDOM GENERATED(peer in row, nBitcoins)
313
ORIGINAL SEED Total Bitcoins available 7 page 0
314
WORKSHEET 0 @[4, 3] FLOAT
315
A B C
316
> ---------------------<
317
1: 0 0 0
318
2 : 5 0 0
319
3 : 1 0 0
320
4 : 1 0 0
321
< --------------------->
322
323
Simmulation random peer and bitcoins to traded
324
Process 1 out of 5
325
Peer[3] Tx-- - : nBitcoins 1 -- - : > to Peer[2] then update ledger
326
Peer 2 accepts transfer : 1 in Col[2] then update ledger
327
Layout updated
328
WORKSHEET 0 @[3, 3] FLOAT
329
A B C
330
>---------------------<
331
2: 5 6 0
332
3 : 1 0 0
333
< --------------------->
334
335
Process 2 out of 5
336
Peer[4] Tx-- - : nBitcoins 1 -- - : > to Peer[1] then update ledger
337
Peer1 accepts transfer : 1 in Col[1] then update ledger
338
Layout updated
339
WORKSHEET 0 @[4, 3] FLOAT
340
A B C
341
>-------------------- - <
342
1: 1 0 0
343
4 : 1 0 0
344
< --------------------->
345
346
Process 3 out of 5
347
Peer[1] Tx-- - : nBitcoins 1 -- - : > to Peer[2] then update ledger
348
Peer[2]accepts transfer : 1 in Col[3] then update ledger
349
Layout updated
350
WORKSHEET 0 @[2, 3] FLOAT
351
A B C
352
>-------------------- - <
353
1: 1 0 0
354
2 : 5 6 7
355
< --------------------->
356
357
Process 4 out of 5
358
Peer[3] accepts transfer : 7 in Col[3] then update ledger
359
Layout updated
360
WORKSHEET 0 @[3, 3] FLOAT
361
A B C
362
>-------------------- - <
363
2: 0 6 7
364
3 : 1 0 7
365
< --------------------->
366
367
Process 5 out of 5
368
Peer[4] has no funds available to transfer : 0
369
Layout updated
370
WORKSHEET 0 @[4, 3] FLOAT
371
A B C
372
> -------------------- - <
373
3: 1 0 7
374
4 : 1 0 0
375
< --------------------->
376
377
Layout at the end
378
WORKSHEET 0 @[4, 3] FLOAT
379
A B C
380
> -------------------- - <
381
1: 1 0 0
382
2 : 0 6 7
383
3 : 1 0 7
384
4 : 1 0 0
385
< --------------------->
386
387
Boost version : 1.80.0
388
EXIT FROM EXSAN
389
390
391
//////----------------output
392
| ExSan | C++ | ExSan | MSVSC2019_V16_11.23@01.11
393
Tue Jan 31 09:59 : 40 2023
394
exsan.plusplus@gmail.com https ://twitter.com/#!/ExSan_com
395
JOB: bch3_5940
396
397
BlockChainSimulator 3
398
Generate Exsan(10, 10)
399
400
TEST 1 out of 5
401
RANDOM GENERATED(peer in row, nBitcoins)
402
ORIGINAL SEED Total Bitcoins available 12 page 0
403
WORKSHEET 0 @[5, 1] FLOAT
404
A
405
> ------ - <
406
1: 0
407
2 : 0
408
3 : 7
409
4 : 4
410
5 : 1
411
< ------->
412
413
There has been 26 transactions the layout at the end looks like pp 0
414
WORKSHEET 0 @[5, 4] FLOAT
415
A B C D
416
> ---------------------------- <
417
1: 3 8 2 0
418
2 : 3 4 2 1
419
3 : 2 3 2 8
420
4 : 4 2 1 0
421
5 : 0 1 1 2
422
< ---------------------------- >
423
424
At the end, let's veryfiy Sum Up of bitCoins[peer, col] = val
425
Last block entry at the end of row[1, 4] = 0 current sum up = 0
426
Last block entry[2, 1] = 3 current sum up = 3
427
Last block entry at the end of row[3, 4] = 8 current sum up = 11
428
Last block entry at the end of row[4, 4] = 0 current sum up = 11
429
Last block entry[5, 2] = 1 current sum up = 12
430
Lets see last entry and verify bitCoins sum up bicoinCheck = 12
431
ORIGINAL SEED Total Bitcoins available 12 OK SUM - UP OK!
432
433
434
435
TEST 2 out of 5
436
RANDOM GENERATED(peer in row, nBitcoins)
437
ORIGINAL SEED Total Bitcoins available 14 page 0
438
WORKSHEET 0 @[3, 1] FLOAT
439
A
440
>-------<
441
1: 4
442
2 : 6
443
3 : 4
444
< ------->
445
446
There has been 12 transactions the layout at the end looks like pp 0
447
WORKSHEET 0 @[3, 4] FLOAT
448
A B C D
449
>----------------------------<
450
1: 8 5 1 0
451
2 : 1 10 2 5
452
3 : 5 8 4 1
453
< ---------------------------- >
454
455
At the end, let's veryfiy Sum Up of bitCoins[peer, col] = val
456
Last block entry[1, 2] = 5 current sum up = 5
457
Last block entry[2, 1] = 1 current sum up = 6
458
Last block entry[3, 2] = 8 current sum up = 14
459
Lets see last entry and verify bitCoins sum up bicoinCheck = 14
460
ORIGINAL SEED Total Bitcoins available 14 OK SUM - UP OK!
461
462
463
464
TEST 3 out of 5
465
RANDOM GENERATED(peer in row, nBitcoins)
466
ORIGINAL SEED Total Bitcoins available 22 page 0
467
WORKSHEET 0 @[5, 1] FLOAT
468
A
469
>------ - <
470
1: 3
471
2 : 6
472
3 : 2
473
4 : 4
474
5 : 7
475
< ------->
476
477
There has been 11 transactions the layout at the end looks like pp 0
478
WORKSHEET 0 @[5, 2] FLOAT
479
A B
480
> -------------- <
481
1: 13 9
482
2 : 1 0
483
3 : 5 9
484
4 : 4 0
485
5 : 1 0
486
< -------------- >
487
488
At the end, let's veryfiy Sum Up of bitCoins[peer, col] = val
489
Last block entry[1, 1] = 13 current sum up = 13
490
Last block entry at the end of row[2, 2] = 0 current sum up = 13
491
Last block entry[3, 1] = 5 current sum up = 18
492
Last block entry[4, 1] = 4 current sum up = 22
493
Last block entry at the end of row[5, 2] = 0 current sum up = 22
494
Lets see last entry and verify bitCoins sum up bicoinCheck = 22
495
ORIGINAL SEED Total Bitcoins available 22 OK SUM - UP OK!
496
497
498
499
TEST 4 out of 5
500
RANDOM GENERATED(peer in row, nBitcoins)
501
ORIGINAL SEED Total Bitcoins available 10 page 0
502
WORKSHEET 0 @[2, 1] FLOAT
503
A
504
>-------<
505
1: 4
506
2 : 6
507
< ------->
508
509
There has been 14 transactions the layout at the end looks like pp 0
510
WORKSHEET 0 @[2, 6] FLOAT
511
A B C D E F
512
> ------------------------------------------<
513
1: 0 0 2 9 10 6
514
2 : 10 10 8 1 0 4
515
< ------------------------------------------ >
516
517
At the end, let's veryfiy Sum Up of bitCoins[peer, col] = val
518
Last block entry[1, 1] = 0 current sum up = 0
519
Last block entry[2, 1] = 10 current sum up = 10
520
Lets see last entry and verify bitCoins sum up bicoinCheck = 10
521
ORIGINAL SEED Total Bitcoins available 10 OK SUM - UP OK!
522
523
524
525
TEST 5 out of 5
526
RANDOM GENERATED(peer in row, nBitcoins)
527
ORIGINAL SEED Total Bitcoins available 21 page 0
528
WORKSHEET 0 @[7, 1] FLOAT
529
A
530
>------ - <
531
1: 7
532
2 : 0
533
3 : 3
534
4 : 1
535
5 : 6
536
6 : 2
537
7 : 2
538
< ------->
539
540
There has been 69 transactions the layout at the end looks like pp 0
541
WORKSHEET 0 @[7, 8] FLOAT
542
A B C D E F G H
543
> -------------------------------------------------------- <
544
1: 0 2 1 1 0 1 0 1
545
2 :10 2 7 12 0 3 3 12
546
3 : 2 3 0 2 10 8 6 1
547
4 : 0 4 2 6 8 18 17 1
548
5 : 1 13 10 0 1 0 10 6
549
6 : 2 0 1 0 0 0 0 0
550
7 : 2 16 11 14 17 8 10 12
551
< -------------------------------------------------------- >
552
553
At the end, let's veryfiy Sum Up of bitCoins[peer, col] = val
554
Last block entry[1, 3] = 1 current sum up = 1
555
Last block entry[2, 6] = 3 current sum up = 4
556
Last block entry[3, 2] = 3 current sum up = 7
557
Last block entry[4, 3] = 2 current sum up = 9
558
Last block entry[5, 3] = 10 current sum up = 19
559
Last block entry[6, 4] = 0 current sum up = 19
560
Last block entry[7, 1] = 2 current sum up = 21
561
Lets see last entry and verify bitCoins sum up bicoinCheck = 21
562
ORIGINAL SEED Total Bitcoins available 21 OK SUM - UP OK!
563
564
ENDS bch3_5940 Elapsed Time : 0.203 sec
565
Boost version : 1.80.0
566
567
EXIT FROM EXSAN
Polulating ExSan with Market Data Tick by Tick
+
+
C
E
x
S
a
n
C
+
+
D
o
N
o
t
A
c
c
e
p
t
D
e
f
a
u
l
t
s
T
h
i
n
k
D
i
f
f
e
r
e
n
t
Comments
Post a Comment