SlideShare a Scribd company logo
32 analysis of bitcoin
(h(xi) > A for i < k) but the last (h(xk) < A). The probability of
finding a solution exactly in the kth attempt follows a geometric
distribution. Let X be the number of attempts until a success, then
P(X = k) = (1 - p)k-1p, where p = A
2256 . Also, we have
P(X 6 k) = 1 - (1 - p)k. The average number of attempts is
E(X) = 1/p and the variance is V(X) = 1-p
p2 .
In the Bitcoin protocol, the given number A is adjusted so that
the network would find a new a block every 10 minutes, on average.
Suppose that the Bitcoin network is able to calculate H hashes per
second — H is the total hash rate of the network. The time required
to find a solution would be T = X/H, and E(T) = E(X)/H would
be the average number of seconds to find a new block. So, the rule
of finding a new block every 10 minutes (⌘ = 600 seconds) — on
average — leads to the following equation: E(T) = ⌘ = 600. So, E(T) =
E(X)/H = 1
pH = ⌘ = 600 ) p = 1
⌘H . Finally, E(X) = ⌘H, E(T) = ⌘,
V(X) = (⌘H)2 - ⌘H, and V(T) = ⌘2 - ⌘/H.
The cumulative distribution function (CDF) of T is P(T 6 t) =
P(X/H 6 t) = P(X 6 tH) = 1 - (1 - p)tH = 1 -
⇣
1 - 1
⌘H
⌘tH
. But, as
the Bitcoin network hash rate is really large, we may approximate the
CDF of T by limH!1 P(T 6 t) = 1 - e- t
⌘ , which is equal to the CDF
of the exponential distribution with parameter = 1
⌘ .
Theorem 1. When H ! +1, the time between blocks follows an
exponential distribution with parameter = 1
⌘ , i.e.,
limH!+1 P(T 6 t) = 1 - e- t
⌘ .
Proof.
P(T 6 t) = 1 - (1 - p)tH
= 1 -
✓
1 -
1
⌘H
◆tH
Replacing u = ⌘H,
lim
H!+1
P(T 6 t) = lim
u!+1
1 -
✓
1 -
1
u
◆tu
⌘
= lim
u!+1
1 -
✓
1 -
1
u
◆u t
⌘
= 1 - (1/e)
t
⌘
= 1 - e- t
⌘
Now, we would like to understand from which value of H it is
reasonable to assume that T follows an exponential distribution.
Theorem 2. x > M ) |(1 + 1/x)x - e| < e/M.
5.3 mining several blocks 33
Proof. Let’s use the classical inequality x
1+x < log(1 + x) < x for x >
-1. So, 1/x
1+1/x < log(1 + x) < 1/x. Simplifying, 1/x
1+1/x = 1/(1 + x).
Thus, 1/(1 + x) < log(1 + 1/x) < 1/x ) x/(1 + x) < x log(1 + 1/x) < 1.
As log(1 + 1
M ) > 0 and 1 < 1 + log(1 + 1
M).
x > M ) 1/x < 1/M ) 1 + 1/x < 1 + 1/M ) 1/(1 + 1/x) >
1/(1 + 1/M) ) x/(1 + x) > M/(1 + M).
Again, log(1 + x) < x ) log(1 - 1/M) < -1/M ) 1 + log(1 -
1/M) < (M - 1)/M < M/(1 + M), since (x - 1)/x < x/(x + 1).
Hence, 1 + log(1 - 1/M) < M/(1 + M) < x/(1 + x) < x log(1 + 1/x),
and x log(1 + 1/x) < 1 < 1 + log(1 + 1
M).
Finally,
1 + log(1 - 1/M) < x log(1 + 1/x) < 1 + log(1 +
1
M
)
e1+log(1-1/M)
< ex log(1+1/x)
< e1+log(1+ 1
M )
e · elog(1-1/M)
< elog((1+1/x)x)
< e · elog(1+ 1
M )
e(1 - 1/M) < (1 + 1/x)x
< e(1 +
1
M
)
e - e/M < (1 + 1/x)x
< e + e/M
-e/M < (1 + 1/x)x
- e < e/M
Therefore, |(1 + 1/x)x
- e| < e/M.
We may consider H big enough to say that T follows an exponential
distribution when e/H < ✏, where ✏ is the maximum approximation
error. When ✏ = 10-6 ) H > e · 106. So, when H > 2.6Mh/s, our
approximation is good enough.
The symmetrical confidence interval with level ↵ would be [t0, t1],
where P(t0 < T < t1) = 1 - ↵, P(T < t0) = ↵/2, and P(T > t1) = ↵/2.
These conditions give the following equations: 1 - e-t0/⌘ = ↵/2, and
e-t1/⌘ = ↵/2. Solving these equations, we have t0 = -⌘ ln (1 - ↵/2),
and t1 = -⌘ ln (↵/2).
For instance, if ↵ = 10%, then t0 = 30.77 and t1 = 1797.44 (or
[0.51, 30.76] in minutes). Thus, 90% of the time the intervals between
blocks are between 30 seconds and 30 minutes, with average of 10
minutes.
The fact that the time between blocks follows an exponential
distribution with = 1/⌘ = pH may be used to estimate the total
network’s hash rate (or a miner’s hash rate). For further information,
see [155].
5.3 mining several blocks
Let T1, T2, T3, . . . , Tn be the time to find the first block (T1), then the
time to find the second block (T2), and so on. Let’s analyze the dis-
34 analysis of bitcoin
tribution of Yn =
Pn
i=1 Ti which is the total time to find the next n
blocks. As Yn is the sum of random variables which follow an expo-
nential distribution with same = 1
⌘, then Yn ⇠ Erlang(n, 1
⌘ ). Thus,
the CDF of Y would be P(Yn < t) = 1 -
Pn-1
k=0
1
k! e- t( t)k.
Many exchanges require at least six confirmations in order to
accept a deposit in Bitcoin. So, for n = 6,
P(Y6 < 1 hour) = P(Y6 < 3600) = 0.5543, i.e., only 55% of the
deposits will be accepted in one hour. The symmetrical confidence
interval with ↵ = 10% is [27, 105] in minutes. Thus, 90% of the times,
it will take between 27 minutes and 1 hour and 45 minutes to have
your deposit accepted — assuming that your transaction will be
confirmed in the very next block. The pdf of Y6 is shown in Figure 5,
in which the 10% symmetrical confidence interval is shown in the
white area. The average total time of six confirmations is
E(Y6) = 6 · 600 = 3600 = 60 minutes.
Figure 5: Probability density function of Y6, i.e., probability of finding 6
blocks after time t. The shaded areas shows the lower 5% and
upper 5% of the pdf.
5.4 mining for a miner
Let’s analyze the probability of finding a new block for a miner who
has ↵ percent of the network’s total hash rate. Let T↵ = X
↵H be the
time required for the miner to find a new block. As T↵ = 1
↵ T, when
H ! +1, T↵ also follows an exponential with parameter ↵ = ↵
⌘ .
Hence, we confirm the intuition that the miner with ↵ percent of the
network’s total hash power will find ↵ percent of the blocks.
Theorem 3. When the miner with ↵ percent of the network’s total hash rate
is part of the mining network, P(next block is from T↵) = ↵.
5.6 analysis of network’s hash rate change 39
d
ds
L{fT (t)} = -
nX
k=0
✓
n
k
◆
bk
k!
d
ds
s
(s + a)k+1
= -
nX
k=0
✓
n
k
◆
bk
k!

1
(s + a )k+1
-
s(k + 1)
(s + a )k+1
d
ds
L{fT (t)}|s=0 = -
nX
k=0
✓
n
k
◆
bk
k!
1
( a)k+1
= -
1
a
nX
k=0
✓
n
k
◆
k!
✓
b
a
◆k
= -
1
a
nX
k=0
n!
(n - k)!
✓
b
a
◆k
= -
1
a
"
n!
nX
k=0
1
(n - k)!
✓
b
a
◆k
#
= -
1
a
"
n!
nX
k=0
1
k!
✓
b
a
◆n-k
#
(k ! n - k)
= -
1
a
"
n!
✓
b
a
◆n nX
k=0
1
k!
✓
b
a
◆-k
#
= -
1
a
"
n!
✓
b
a
◆n nX
k=0
1
k!
✓
a
b
◆k
#
Finally, as E[T] = - d
dsL{fT (t)}|s=0,
E[T] =
1
a
"
n!
✓
b
a
◆n nX
k=0
1
k!
✓
a
b
◆k
#
, where n =
(a - 1)
b
Let’s check this equation for already known scenarios. When a = 1,
then n = 0 and E[T] = 1/ . When b ! +1, it reduces to the case
in which the hash rate is multiplied by a, which we have already
studied. In fact, b ! +1 yields n ! 0, u(t) ! a, and E[T] = 1
a.
Theorem 5.
a > 1 and x > M )
1 + abx
1 + bx
- a <
a - 1
1 + bM
Proof. x > M ) 1
1+bx < 1
1+bM. As 1 - a < 0, 1-a
1+bx > 1-a
1+bM. Thus,
1-a
1+bM < 1-a
1+bx + a - a = 1+abx
1+bx - a < 0 < a-1
1+bM . Hence, - a-1
1+bM <
1+abx
1+bx - a < a-1
1+bM .
For instance, if we would like to know the impact of smoothly
double the hash rate in the next week, then the parameters would be
= 1/600, a = 2, M = 1 week = 3600 · 24 · 7 = 604, 800, b can be
calculated using ✏ = a-1
1+bM < 0.01, which yields b > 0.000163690
8.1 confirmation time 63
blk4
genesis0
blk6
tx3
blk8
tx1
blk16
tx13
tx15
blk29
tx28
blk33
tx17
tx32
blk36
tx24
tx35
blk37
tx19
blk42
tx30
blk44
tx25
blk48
tx38
blk56
tx41tx55
blk57
tx47
blk58
tx53
tx54
blk60
tx43
tx59
blk63
tx61
tx62
blk66
tx64
tx65
blk67
blk69
tx52
tx68
blk71
blk72
blk75
tx70
tx2
tx5
tx7
tx9
tx10
tx11
tx12
tx14
tx18
tx20
tx21
tx22
tx23
tx26
tx27
tx31
tx34
tx39
tx40
tx45
tx46 tx49
tx50
tx51
tx73
tx74
tx76 tx78
tx79
tx80
tx82
tx81
tx86
tx77
tx85 tx83
tx84
Figure 16: Visualization of a Hathor’s graph with transactions and blocks.
Red boxes are blocks; green circles are confirmed transactions;
white circles are in-progress transactions; yellow circles are un-
confirmed transactions (tips); and grey circles are transactions
solving the proof-of-work which have not been propagated yet.
The arrows show the confirmation chain. Block’s arrows are in
bold.
82 sparse distributed memory
(a) Q3 (b) Q7
(c) Q10
Figure 20: Here we have Qn, for n 2 {3, 7, 10}. Each node corresponds to
a bitstring in {0, 1}n, and two nodes are linked iff the bitstrings
differ by a single dimension. A number of observations can be
made here. First, the number of nodes grows as O(2n); which
makes the space rapidly intractable. Another interesting observa-
tion, better seen in the figures below, is that most of the space
lies ‘at the center’, at a distance of around n/2 from any given
vantage point.
13.3 counters 105
1 __kernel
2 void single_scan6(
3 __constant const uchar *bitcount_table,
4 __global const ulong *bitstrings,
5 const uint bs_len,
6 const uint sample,
7 __constant const ulong *bs,
8 const uint radius,
9 __global uint *counter,
10 __global uint *selected,
11 __local uint *partial_dist)
12 {
13 uint dist;
14 ulong a;
15 uint j;
16
17 for (uint id = get_group_id(0); id < sample; id += get_num_groups(0)) {
18 const __global ulong *row = bitstrings + id*bs_len;
19
20 dist = 0;
21 j = get_local_id(0);
22 if (j < bs_len) {
23 a = row[j] ^ bs[j];
24 dist = popcount(a);
25 }
26 partial_dist[get_local_id(0)] = dist;
27
28 uint old_stride = get_local_size(0);
29 uint stride;
30 __local uint extra;
31 extra = 0;
32 for(stride = get_local_size(0)/2; stride > 32; stride /= 2) {
33 barrier(CLK_LOCAL_MEM_FENCE);
34 if ((old_stride&1) == 1 && get_local_id(0) == old_stride-1) {
35 extra += partial_dist[get_local_id(0)];
36 }
37 if (get_local_id(0) < stride) {
38 partial_dist[get_local_id(0)] +=
39 partial_dist[get_local_id(0) + stride];
40 }
41 old_stride = stride;
42 }
43 barrier(CLK_LOCAL_MEM_FENCE);
44 for(/**/; stride > 0; stride /= 2) {
45 if ((old_stride&1) == 1 && get_local_id(0) == old_stride-1) {
46 extra += partial_dist[get_local_id(0)];
47 }
48 if (get_local_id(0) < stride) {
49 partial_dist[get_local_id(0)] +=
50 partial_dist[get_local_id(0) + stride];
51 }
52 old_stride = stride;
53 }
54
55 if (get_local_id(0) == 0) {
56 if (partial_dist[0] + extra <= radius) {
57 selected[atomic_inc(counter)] = id;
58 }
59 }
60 barrier(CLK_LOCAL_MEM_FENCE);
61 }
62 }
Listing 8: OpenCL kernel single_scan6. This kernel is just like single_scan5, but
it works with any number of workers per work. The tradeoff is an
additional step in the parallel reduction algorithm.
194 results (ix): information-theoretical write operation
(a) Write process weighted by the amount of information
contained in the distance between the written bitstring
and each hard location
(b) Zoom in Figure 92a
(c) Behavior of weighted write operation according to the
distance from the center and the number of items previ-
ously stored in the memory
Figure 92: Behavior of the critical distance under the information-theoretic
weighted write operation when n = 1, 000, H = 1, 000, 000 and
r = 451.
Alexandre Linhares 

FGV/EBAPE
1975: I lost the microcomputer revolution
1985 (-1): I lost the GUI revolution
1995: I lost the web revolution
2005: I lost the Web 2.0 revolution
~2015: the semantic revolution
Want to see something
unsustainable?
Ethereum is basically
tokenization
Hathor is about
tokenization.
100 times better.
Da mesma forma que chamamos
investimento hoje de “papel” ---
esse papel rende muito, esse papel
não rende nada, este papel está
barato… --- Juntamos contratos,
ações, fundos, derivativos, etc, na
palavra "papel".
Me parece que vamos em breve
trocar pelo termo “token”.
O que considero
“sucesso"?
Uma visão de sucesso
O Valor de Mercado do Hathor
tornar-se MAIOR do que
o Patrimônio Líquido da Fundação Getulio Vargas.
Insanidade é achar que nada vai mudar
• Quando se olha os números, vê-se que é bastante
plausível que o projeto seja bem-sucedido nos próximos
10 anos

• O Bitcoin, por exemplo, é hoje:

• 13 vezes maior que o DeutscheBank

• 2,3 vezes maior que a Petrobras
32 analysis of bitcoin
(h(xi) > A for i < k) but the last (h(xk) < A). The probability of
finding a solution exactly in the kth attempt follows a geometric
distribution. Let X be the number of attempts until a success, then
P(X = k) = (1 - p)k-1p, where p = A
2256 . Also, we have
P(X 6 k) = 1 - (1 - p)k. The average number of attempts is
E(X) = 1/p and the variance is V(X) = 1-p
p2 .
In the Bitcoin protocol, the given number A is adjusted so that
the network would find a new a block every 10 minutes, on average.
Suppose that the Bitcoin network is able to calculate H hashes per
second — H is the total hash rate of the network. The time required
to find a solution would be T = X/H, and E(T) = E(X)/H would
be the average number of seconds to find a new block. So, the rule
of finding a new block every 10 minutes (⌘ = 600 seconds) — on
average — leads to the following equation: E(T) = ⌘ = 600. So, E(T) =
E(X)/H = 1
pH = ⌘ = 600 ) p = 1
⌘H . Finally, E(X) = ⌘H, E(T) = ⌘,
V(X) = (⌘H)2 - ⌘H, and V(T) = ⌘2 - ⌘/H.
The cumulative distribution function (CDF) of T is P(T 6 t) =
P(X/H 6 t) = P(X 6 tH) = 1 - (1 - p)tH = 1 -
⇣
1 - 1
⌘H
⌘tH
. But, as
the Bitcoin network hash rate is really large, we may approximate the
CDF of T by limH!1 P(T 6 t) = 1 - e- t
⌘ , which is equal to the CDF
of the exponential distribution with parameter = 1
⌘ .
Theorem 1. When H ! +1, the time between blocks follows an
exponential distribution with parameter = 1
⌘ , i.e.,
limH!+1 P(T 6 t) = 1 - e- t
⌘ .
Proof.
P(T 6 t) = 1 - (1 - p)tH
= 1 -
✓
1 -
1
⌘H
◆tH
Replacing u = ⌘H,
lim
H!+1
P(T 6 t) = lim
u!+1
1 -
✓
1 -
1
u
◆tu
⌘
= lim
u!+1
1 -
✓
1 -
1
u
◆u t
⌘
= 1 - (1/e)
t
⌘
= 1 - e- t
⌘
Now, we would like to understand from which value of H it is
reasonable to assume that T follows an exponential distribution.
Theorem 2. x > M ) |(1 + 1/x)x - e| < e/M.
5.3 mining several blocks 33
Proof. Let’s use the classical inequality x
1+x < log(1 + x) < x for x >
-1. So, 1/x
1+1/x < log(1 + x) < 1/x. Simplifying, 1/x
1+1/x = 1/(1 + x).
Thus, 1/(1 + x) < log(1 + 1/x) < 1/x ) x/(1 + x) < x log(1 + 1/x) < 1.
As log(1 + 1
M ) > 0 and 1 < 1 + log(1 + 1
M).
x > M ) 1/x < 1/M ) 1 + 1/x < 1 + 1/M ) 1/(1 + 1/x) >
1/(1 + 1/M) ) x/(1 + x) > M/(1 + M).
Again, log(1 + x) < x ) log(1 - 1/M) < -1/M ) 1 + log(1 -
1/M) < (M - 1)/M < M/(1 + M), since (x - 1)/x < x/(x + 1).
Hence, 1 + log(1 - 1/M) < M/(1 + M) < x/(1 + x) < x log(1 + 1/x),
and x log(1 + 1/x) < 1 < 1 + log(1 + 1
M).
Finally,
1 + log(1 - 1/M) < x log(1 + 1/x) < 1 + log(1 +
1
M
)
e1+log(1-1/M)
< ex log(1+1/x)
< e1+log(1+ 1
M )
e · elog(1-1/M)
< elog((1+1/x)x)
< e · elog(1+ 1
M )
e(1 - 1/M) < (1 + 1/x)x
< e(1 +
1
M
)
e - e/M < (1 + 1/x)x
< e + e/M
-e/M < (1 + 1/x)x
- e < e/M
Therefore, |(1 + 1/x)x
- e| < e/M.
We may consider H big enough to say that T follows an exponential
distribution when e/H < ✏, where ✏ is the maximum approximation
error. When ✏ = 10-6 ) H > e · 106. So, when H > 2.6Mh/s, our
approximation is good enough.
The symmetrical confidence interval with level ↵ would be [t0, t1],
where P(t0 < T < t1) = 1 - ↵, P(T < t0) = ↵/2, and P(T > t1) = ↵/2.
These conditions give the following equations: 1 - e-t0/⌘ = ↵/2, and
e-t1/⌘ = ↵/2. Solving these equations, we have t0 = -⌘ ln (1 - ↵/2),
and t1 = -⌘ ln (↵/2).
For instance, if ↵ = 10%, then t0 = 30.77 and t1 = 1797.44 (or
[0.51, 30.76] in minutes). Thus, 90% of the time the intervals between
blocks are between 30 seconds and 30 minutes, with average of 10
minutes.
The fact that the time between blocks follows an exponential
distribution with = 1/⌘ = pH may be used to estimate the total
network’s hash rate (or a miner’s hash rate). For further information,
see [155].
5.3 mining several blocks
Let T1, T2, T3, . . . , Tn be the time to find the first block (T1), then the
time to find the second block (T2), and so on. Let’s analyze the dis-
34 analysis of bitcoin
tribution of Yn =
Pn
i=1 Ti which is the total time to find the next n
blocks. As Yn is the sum of random variables which follow an expo-
nential distribution with same = 1
⌘, then Yn ⇠ Erlang(n, 1
⌘ ). Thus,
the CDF of Y would be P(Yn < t) = 1 -
Pn-1
k=0
1
k! e- t( t)k.
Many exchanges require at least six confirmations in order to
accept a deposit in Bitcoin. So, for n = 6,
P(Y6 < 1 hour) = P(Y6 < 3600) = 0.5543, i.e., only 55% of the
deposits will be accepted in one hour. The symmetrical confidence
interval with ↵ = 10% is [27, 105] in minutes. Thus, 90% of the times,
it will take between 27 minutes and 1 hour and 45 minutes to have
your deposit accepted — assuming that your transaction will be
confirmed in the very next block. The pdf of Y6 is shown in Figure 5,
in which the 10% symmetrical confidence interval is shown in the
white area. The average total time of six confirmations is
E(Y6) = 6 · 600 = 3600 = 60 minutes.
Figure 5: Probability density function of Y6, i.e., probability of finding 6
blocks after time t. The shaded areas shows the lower 5% and
upper 5% of the pdf.
5.4 mining for a miner
Let’s analyze the probability of finding a new block for a miner who
has ↵ percent of the network’s total hash rate. Let T↵ = X
↵H be the
time required for the miner to find a new block. As T↵ = 1
↵ T, when
H ! +1, T↵ also follows an exponential with parameter ↵ = ↵
⌘ .
Hence, we confirm the intuition that the miner with ↵ percent of the
network’s total hash power will find ↵ percent of the blocks.
Theorem 3. When the miner with ↵ percent of the network’s total hash rate
is part of the mining network, P(next block is from T↵) = ↵.
5.6 analysis of network’s hash rate change 39
d
ds
L{fT (t)} = -
nX
k=0
✓
n
k
◆
bk
k!
d
ds
s
(s + a)k+1
= -
nX
k=0
✓
n
k
◆
bk
k!

1
(s + a )k+1
-
s(k + 1)
(s + a )k+1
d
ds
L{fT (t)}|s=0 = -
nX
k=0
✓
n
k
◆
bk
k!
1
( a)k+1
= -
1
a
nX
k=0
✓
n
k
◆
k!
✓
b
a
◆k
= -
1
a
nX
k=0
n!
(n - k)!
✓
b
a
◆k
= -
1
a
"
n!
nX
k=0
1
(n - k)!
✓
b
a
◆k
#
= -
1
a
"
n!
nX
k=0
1
k!
✓
b
a
◆n-k
#
(k ! n - k)
= -
1
a
"
n!
✓
b
a
◆n nX
k=0
1
k!
✓
b
a
◆-k
#
= -
1
a
"
n!
✓
b
a
◆n nX
k=0
1
k!
✓
a
b
◆k
#
Finally, as E[T] = - d
dsL{fT (t)}|s=0,
E[T] =
1
a
"
n!
✓
b
a
◆n nX
k=0
1
k!
✓
a
b
◆k
#
, where n =
(a - 1)
b
Let’s check this equation for already known scenarios. When a = 1,
then n = 0 and E[T] = 1/ . When b ! +1, it reduces to the case
in which the hash rate is multiplied by a, which we have already
studied. In fact, b ! +1 yields n ! 0, u(t) ! a, and E[T] = 1
a.
Theorem 5.
a > 1 and x > M )
1 + abx
1 + bx
- a <
a - 1
1 + bM
Proof. x > M ) 1
1+bx < 1
1+bM. As 1 - a < 0, 1-a
1+bx > 1-a
1+bM. Thus,
1-a
1+bM < 1-a
1+bx + a - a = 1+abx
1+bx - a < 0 < a-1
1+bM . Hence, - a-1
1+bM <
1+abx
1+bx - a < a-1
1+bM .
For instance, if we would like to know the impact of smoothly
double the hash rate in the next week, then the parameters would be
= 1/600, a = 2, M = 1 week = 3600 · 24 · 7 = 604, 800, b can be
calculated using ✏ = a-1
1+bM < 0.01, which yields b > 0.000163690
8.1 confirmation time 63
blk4
genesis0
blk6
tx3
blk8
tx1
blk16
tx13
tx15
blk29
tx28
blk33
tx17
tx32
blk36
tx24
tx35
blk37
tx19
blk42
tx30
blk44
tx25
blk48
tx38
blk56
tx41tx55
blk57
tx47
blk58
tx53
tx54
blk60
tx43
tx59
blk63
tx61
tx62
blk66
tx64
tx65
blk67
blk69
tx52
tx68
blk71
blk72
blk75
tx70
tx2
tx5
tx7
tx9
tx10
tx11
tx12
tx14
tx18
tx20
tx21
tx22
tx23
tx26
tx27
tx31
tx34
tx39
tx40
tx45
tx46 tx49
tx50
tx51
tx73
tx74
tx76 tx78
tx79
tx80
tx82
tx81
tx86
tx77
tx85 tx83
tx84
Figure 16: Visualization of a Hathor’s graph with transactions and blocks.
Red boxes are blocks; green circles are confirmed transactions;
white circles are in-progress transactions; yellow circles are un-
confirmed transactions (tips); and grey circles are transactions
solving the proof-of-work which have not been propagated yet.
The arrows show the confirmation chain. Block’s arrows are in
bold.
82 sparse distributed memory
(a) Q3 (b) Q7
(c) Q10
Figure 20: Here we have Qn, for n 2 {3, 7, 10}. Each node corresponds to
a bitstring in {0, 1}n, and two nodes are linked iff the bitstrings
differ by a single dimension. A number of observations can be
made here. First, the number of nodes grows as O(2n); which
makes the space rapidly intractable. Another interesting observa-
tion, better seen in the figures below, is that most of the space
lies ‘at the center’, at a distance of around n/2 from any given
vantage point.
13.3 counters 105
1 __kernel
2 void single_scan6(
3 __constant const uchar *bitcount_table,
4 __global const ulong *bitstrings,
5 const uint bs_len,
6 const uint sample,
7 __constant const ulong *bs,
8 const uint radius,
9 __global uint *counter,
10 __global uint *selected,
11 __local uint *partial_dist)
12 {
13 uint dist;
14 ulong a;
15 uint j;
16
17 for (uint id = get_group_id(0); id < sample; id += get_num_groups(0)) {
18 const __global ulong *row = bitstrings + id*bs_len;
19
20 dist = 0;
21 j = get_local_id(0);
22 if (j < bs_len) {
23 a = row[j] ^ bs[j];
24 dist = popcount(a);
25 }
26 partial_dist[get_local_id(0)] = dist;
27
28 uint old_stride = get_local_size(0);
29 uint stride;
30 __local uint extra;
31 extra = 0;
32 for(stride = get_local_size(0)/2; stride > 32; stride /= 2) {
33 barrier(CLK_LOCAL_MEM_FENCE);
34 if ((old_stride&1) == 1 && get_local_id(0) == old_stride-1) {
35 extra += partial_dist[get_local_id(0)];
36 }
37 if (get_local_id(0) < stride) {
38 partial_dist[get_local_id(0)] +=
39 partial_dist[get_local_id(0) + stride];
40 }
41 old_stride = stride;
42 }
43 barrier(CLK_LOCAL_MEM_FENCE);
44 for(/**/; stride > 0; stride /= 2) {
45 if ((old_stride&1) == 1 && get_local_id(0) == old_stride-1) {
46 extra += partial_dist[get_local_id(0)];
47 }
48 if (get_local_id(0) < stride) {
49 partial_dist[get_local_id(0)] +=
50 partial_dist[get_local_id(0) + stride];
51 }
52 old_stride = stride;
53 }
54
55 if (get_local_id(0) == 0) {
56 if (partial_dist[0] + extra <= radius) {
57 selected[atomic_inc(counter)] = id;
58 }
59 }
60 barrier(CLK_LOCAL_MEM_FENCE);
61 }
62 }
Listing 8: OpenCL kernel single_scan6. This kernel is just like single_scan5, but
it works with any number of workers per work. The tradeoff is an
additional step in the parallel reduction algorithm.
194 results (ix): information-theoretical write operation
(a) Write process weighted by the amount of information
contained in the distance between the written bitstring
and each hard location
(b) Zoom in Figure 92a
(c) Behavior of weighted write operation according to the
distance from the center and the number of items previ-
ously stored in the memory
Figure 92: Behavior of the critical distance under the information-theoretic
weighted write operation when n = 1, 000, H = 1, 000, 000 and
r = 451.

More Related Content

What's hot

MLP輪読スパース8章 トレースノルム正則化
MLP輪読スパース8章 トレースノルム正則化MLP輪読スパース8章 トレースノルム正則化
MLP輪読スパース8章 トレースノルム正則化Akira Tanimoto
 
Estimating structured vector autoregressive models
Estimating structured vector autoregressive modelsEstimating structured vector autoregressive models
Estimating structured vector autoregressive modelsAkira Tanimoto
 
Ning_Mei.ASSIGN02
Ning_Mei.ASSIGN02Ning_Mei.ASSIGN02
Ning_Mei.ASSIGN02宁 梅
 
Lab: Foundation of Concurrent and Distributed Systems
Lab: Foundation of Concurrent and Distributed SystemsLab: Foundation of Concurrent and Distributed Systems
Lab: Foundation of Concurrent and Distributed SystemsRuochun Tzeng
 
Specific Finite Groups(General)
Specific Finite Groups(General)Specific Finite Groups(General)
Specific Finite Groups(General)Shane Nicklas
 
Specific Finite Groups(General)
Specific Finite Groups(General)Specific Finite Groups(General)
Specific Finite Groups(General)Shane Nicklas
 
Specific Finite Groups(General)
Specific Finite Groups(General)Specific Finite Groups(General)
Specific Finite Groups(General)Shane Nicklas
 
Bachelor_Defense
Bachelor_DefenseBachelor_Defense
Bachelor_DefenseTeja Turk
 
Accelerating Pseudo-Marginal MCMC using Gaussian Processes
Accelerating Pseudo-Marginal MCMC using Gaussian ProcessesAccelerating Pseudo-Marginal MCMC using Gaussian Processes
Accelerating Pseudo-Marginal MCMC using Gaussian ProcessesMatt Moores
 
Result and screen shots
Result and screen shotsResult and screen shots
Result and screen shotsMukesh M
 
Python in 90mins
Python in 90minsPython in 90mins
Python in 90minsLarry Cai
 
Time and space complexity
Time and space complexityTime and space complexity
Time and space complexityAnkit Katiyar
 
Tensor train to solve stochastic PDEs
Tensor train to solve stochastic PDEsTensor train to solve stochastic PDEs
Tensor train to solve stochastic PDEsAlexander Litvinenko
 
Transaction Timestamping in Temporal Databases
Transaction Timestamping in Temporal DatabasesTransaction Timestamping in Temporal Databases
Transaction Timestamping in Temporal DatabasesGera Shegalov
 

What's hot (19)

MLP輪読スパース8章 トレースノルム正則化
MLP輪読スパース8章 トレースノルム正則化MLP輪読スパース8章 トレースノルム正則化
MLP輪読スパース8章 トレースノルム正則化
 
Estimating structured vector autoregressive models
Estimating structured vector autoregressive modelsEstimating structured vector autoregressive models
Estimating structured vector autoregressive models
 
Ning_Mei.ASSIGN02
Ning_Mei.ASSIGN02Ning_Mei.ASSIGN02
Ning_Mei.ASSIGN02
 
Lab: Foundation of Concurrent and Distributed Systems
Lab: Foundation of Concurrent and Distributed SystemsLab: Foundation of Concurrent and Distributed Systems
Lab: Foundation of Concurrent and Distributed Systems
 
Specific Finite Groups(General)
Specific Finite Groups(General)Specific Finite Groups(General)
Specific Finite Groups(General)
 
Specific Finite Groups(General)
Specific Finite Groups(General)Specific Finite Groups(General)
Specific Finite Groups(General)
 
ENFPC 2010
ENFPC 2010ENFPC 2010
ENFPC 2010
 
Specific Finite Groups(General)
Specific Finite Groups(General)Specific Finite Groups(General)
Specific Finite Groups(General)
 
Bachelor_Defense
Bachelor_DefenseBachelor_Defense
Bachelor_Defense
 
big_oh
big_ohbig_oh
big_oh
 
Accelerating Pseudo-Marginal MCMC using Gaussian Processes
Accelerating Pseudo-Marginal MCMC using Gaussian ProcessesAccelerating Pseudo-Marginal MCMC using Gaussian Processes
Accelerating Pseudo-Marginal MCMC using Gaussian Processes
 
Result and screen shots
Result and screen shotsResult and screen shots
Result and screen shots
 
Python in 90mins
Python in 90minsPython in 90mins
Python in 90mins
 
Time and space complexity
Time and space complexityTime and space complexity
Time and space complexity
 
Tensor train to solve stochastic PDEs
Tensor train to solve stochastic PDEsTensor train to solve stochastic PDEs
Tensor train to solve stochastic PDEs
 
Transaction Timestamping in Temporal Databases
Transaction Timestamping in Temporal DatabasesTransaction Timestamping in Temporal Databases
Transaction Timestamping in Temporal Databases
 
Signals and Systems Assignment Help
Signals and Systems Assignment HelpSignals and Systems Assignment Help
Signals and Systems Assignment Help
 
Signals and Systems Assignment Help
Signals and Systems Assignment HelpSignals and Systems Assignment Help
Signals and Systems Assignment Help
 
Project Paper
Project PaperProject Paper
Project Paper
 

Similar to Hathor@FGV: Introductory notes by Dr. A. Linhares

Newton raphson halley_householder_simpleexplanation
Newton raphson halley_householder_simpleexplanationNewton raphson halley_householder_simpleexplanation
Newton raphson halley_householder_simpleexplanationmuyuubyou
 
Get Accurate and Reliable Statistics Assignment Help - Boost Your Grades!
Get Accurate and Reliable Statistics Assignment Help - Boost Your Grades!Get Accurate and Reliable Statistics Assignment Help - Boost Your Grades!
Get Accurate and Reliable Statistics Assignment Help - Boost Your Grades!Statistics Assignment Help
 
Martingales Stopping Time Processes
Martingales Stopping Time ProcessesMartingales Stopping Time Processes
Martingales Stopping Time ProcessesIOSR Journals
 
LINEAR SYSTEMS
LINEAR SYSTEMSLINEAR SYSTEMS
LINEAR SYSTEMSJazzieJao1
 
Semi-Classical Transport Theory.ppt
Semi-Classical Transport Theory.pptSemi-Classical Transport Theory.ppt
Semi-Classical Transport Theory.pptVivekDixit100
 
A Note on “   Geraghty contraction type mappings”
A Note on “   Geraghty contraction type mappings”A Note on “   Geraghty contraction type mappings”
A Note on “   Geraghty contraction type mappings”IOSRJM
 
MathCAD - Synchronicity Algorithm.pdf
MathCAD - Synchronicity Algorithm.pdfMathCAD - Synchronicity Algorithm.pdf
MathCAD - Synchronicity Algorithm.pdfJulio Banks
 
Ray : modeling dynamic systems
Ray : modeling dynamic systemsRay : modeling dynamic systems
Ray : modeling dynamic systemsHouw Liong The
 
Stat150 spring06 markov_cts
Stat150 spring06 markov_ctsStat150 spring06 markov_cts
Stat150 spring06 markov_ctsmbfrosh
 
The tau-leap method for simulating stochastic kinetic models
The tau-leap method for simulating stochastic kinetic modelsThe tau-leap method for simulating stochastic kinetic models
The tau-leap method for simulating stochastic kinetic modelsColin Gillespie
 
Fibonacci_Hubble
Fibonacci_HubbleFibonacci_Hubble
Fibonacci_HubbleMarc King
 
Response Surface in Tensor Train format for Uncertainty Quantification
Response Surface in Tensor Train format for Uncertainty QuantificationResponse Surface in Tensor Train format for Uncertainty Quantification
Response Surface in Tensor Train format for Uncertainty QuantificationAlexander Litvinenko
 
Recent developments on unbiased MCMC
Recent developments on unbiased MCMCRecent developments on unbiased MCMC
Recent developments on unbiased MCMCPierre Jacob
 
Stochastic Calculus, Summer 2014, July 22,Lecture 7Con.docx
Stochastic Calculus, Summer 2014, July 22,Lecture 7Con.docxStochastic Calculus, Summer 2014, July 22,Lecture 7Con.docx
Stochastic Calculus, Summer 2014, July 22,Lecture 7Con.docxdessiechisomjj4
 
Bayesian Experimental Design for Stochastic Kinetic Models
Bayesian Experimental Design for Stochastic Kinetic ModelsBayesian Experimental Design for Stochastic Kinetic Models
Bayesian Experimental Design for Stochastic Kinetic ModelsColin Gillespie
 

Similar to Hathor@FGV: Introductory notes by Dr. A. Linhares (20)

Newton raphson halley_householder_simpleexplanation
Newton raphson halley_householder_simpleexplanationNewton raphson halley_householder_simpleexplanation
Newton raphson halley_householder_simpleexplanation
 
Get Accurate and Reliable Statistics Assignment Help - Boost Your Grades!
Get Accurate and Reliable Statistics Assignment Help - Boost Your Grades!Get Accurate and Reliable Statistics Assignment Help - Boost Your Grades!
Get Accurate and Reliable Statistics Assignment Help - Boost Your Grades!
 
Martingales Stopping Time Processes
Martingales Stopping Time ProcessesMartingales Stopping Time Processes
Martingales Stopping Time Processes
 
LINEAR SYSTEMS
LINEAR SYSTEMSLINEAR SYSTEMS
LINEAR SYSTEMS
 
Semi-Classical Transport Theory.ppt
Semi-Classical Transport Theory.pptSemi-Classical Transport Theory.ppt
Semi-Classical Transport Theory.ppt
 
kactl.pdf
kactl.pdfkactl.pdf
kactl.pdf
 
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
Program on Quasi-Monte Carlo and High-Dimensional Sampling Methods for Applie...
 
A Note on “   Geraghty contraction type mappings”
A Note on “   Geraghty contraction type mappings”A Note on “   Geraghty contraction type mappings”
A Note on “   Geraghty contraction type mappings”
 
MathCAD - Synchronicity Algorithm.pdf
MathCAD - Synchronicity Algorithm.pdfMathCAD - Synchronicity Algorithm.pdf
MathCAD - Synchronicity Algorithm.pdf
 
05_AJMS_332_21.pdf
05_AJMS_332_21.pdf05_AJMS_332_21.pdf
05_AJMS_332_21.pdf
 
Ray : modeling dynamic systems
Ray : modeling dynamic systemsRay : modeling dynamic systems
Ray : modeling dynamic systems
 
002 ray modeling dynamic systems
002 ray modeling dynamic systems002 ray modeling dynamic systems
002 ray modeling dynamic systems
 
Stat150 spring06 markov_cts
Stat150 spring06 markov_ctsStat150 spring06 markov_cts
Stat150 spring06 markov_cts
 
The tau-leap method for simulating stochastic kinetic models
The tau-leap method for simulating stochastic kinetic modelsThe tau-leap method for simulating stochastic kinetic models
The tau-leap method for simulating stochastic kinetic models
 
Fibonacci_Hubble
Fibonacci_HubbleFibonacci_Hubble
Fibonacci_Hubble
 
Response Surface in Tensor Train format for Uncertainty Quantification
Response Surface in Tensor Train format for Uncertainty QuantificationResponse Surface in Tensor Train format for Uncertainty Quantification
Response Surface in Tensor Train format for Uncertainty Quantification
 
Recent developments on unbiased MCMC
Recent developments on unbiased MCMCRecent developments on unbiased MCMC
Recent developments on unbiased MCMC
 
Stochastic Calculus, Summer 2014, July 22,Lecture 7Con.docx
Stochastic Calculus, Summer 2014, July 22,Lecture 7Con.docxStochastic Calculus, Summer 2014, July 22,Lecture 7Con.docx
Stochastic Calculus, Summer 2014, July 22,Lecture 7Con.docx
 
Bayesian Experimental Design for Stochastic Kinetic Models
Bayesian Experimental Design for Stochastic Kinetic ModelsBayesian Experimental Design for Stochastic Kinetic Models
Bayesian Experimental Design for Stochastic Kinetic Models
 
Sect5 4
Sect5 4Sect5 4
Sect5 4
 

More from Alexandre Linhares (20)

Semantic Web, circa 2008
Semantic Web, circa 2008Semantic Web, circa 2008
Semantic Web, circa 2008
 
1. Graduacao 2008
1. Graduacao 20081. Graduacao 2008
1. Graduacao 2008
 
You only get one life
You only get one life You only get one life
You only get one life
 
6. Compile And Run
6. Compile And Run6. Compile And Run
6. Compile And Run
 
How to beat Jeff Hawkins
How to beat Jeff HawkinsHow to beat Jeff Hawkins
How to beat Jeff Hawkins
 
4. Serving Two Masters
4. Serving Two Masters4. Serving Two Masters
4. Serving Two Masters
 
(Slideshare Version) 3. The Nature Of Understanding
(Slideshare Version) 3. The Nature Of Understanding(Slideshare Version) 3. The Nature Of Understanding
(Slideshare Version) 3. The Nature Of Understanding
 
(Slideshare Version) 2. Emergence, Priming, And Understanding
(Slideshare Version) 2. Emergence, Priming, And Understanding(Slideshare Version) 2. Emergence, Priming, And Understanding
(Slideshare Version) 2. Emergence, Priming, And Understanding
 
1. The Game Of The Century
1. The Game Of The Century1. The Game Of The Century
1. The Game Of The Century
 
Taisa Secao3 A
Taisa Secao3 ATaisa Secao3 A
Taisa Secao3 A
 
The Club of Rome
The Club of Rome The Club of Rome
The Club of Rome
 
O Mundo é Plano Cap 8 B
O Mundo é Plano Cap 8 BO Mundo é Plano Cap 8 B
O Mundo é Plano Cap 8 B
 
A Cauda Longa Cap 1
A Cauda Longa Cap 1A Cauda Longa Cap 1
A Cauda Longa Cap 1
 
O Mundo é Plano Cap 9+Conclusao
O Mundo é Plano Cap 9+ConclusaoO Mundo é Plano Cap 9+Conclusao
O Mundo é Plano Cap 9+Conclusao
 
O Mundo é Plano Cap 7
O Mundo é Plano Cap 7O Mundo é Plano Cap 7
O Mundo é Plano Cap 7
 
O Mundo é Plano Cap 8 A
O Mundo é Plano Cap 8 AO Mundo é Plano Cap 8 A
O Mundo é Plano Cap 8 A
 
The business school myth
The business school mythThe business school myth
The business school myth
 
Outline of Globalization course at FGV/EBAPE
Outline of Globalization course at FGV/EBAPEOutline of Globalization course at FGV/EBAPE
Outline of Globalization course at FGV/EBAPE
 
test
testtest
test
 
Mighty Wal-Mart
Mighty Wal-MartMighty Wal-Mart
Mighty Wal-Mart
 

Recently uploaded

Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Product School
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCzechDreamin
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Product School
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityScyllaDB
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsExpeed Software
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...Product School
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoTAnalytics
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...Sri Ambati
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsPaul Groth
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomCzechDreamin
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyJohn Staveley
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesThousandEyes
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀DianaGray10
 

Recently uploaded (20)

Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 

Hathor@FGV: Introductory notes by Dr. A. Linhares

  • 1. 32 analysis of bitcoin (h(xi) > A for i < k) but the last (h(xk) < A). The probability of finding a solution exactly in the kth attempt follows a geometric distribution. Let X be the number of attempts until a success, then P(X = k) = (1 - p)k-1p, where p = A 2256 . Also, we have P(X 6 k) = 1 - (1 - p)k. The average number of attempts is E(X) = 1/p and the variance is V(X) = 1-p p2 . In the Bitcoin protocol, the given number A is adjusted so that the network would find a new a block every 10 minutes, on average. Suppose that the Bitcoin network is able to calculate H hashes per second — H is the total hash rate of the network. The time required to find a solution would be T = X/H, and E(T) = E(X)/H would be the average number of seconds to find a new block. So, the rule of finding a new block every 10 minutes (⌘ = 600 seconds) — on average — leads to the following equation: E(T) = ⌘ = 600. So, E(T) = E(X)/H = 1 pH = ⌘ = 600 ) p = 1 ⌘H . Finally, E(X) = ⌘H, E(T) = ⌘, V(X) = (⌘H)2 - ⌘H, and V(T) = ⌘2 - ⌘/H. The cumulative distribution function (CDF) of T is P(T 6 t) = P(X/H 6 t) = P(X 6 tH) = 1 - (1 - p)tH = 1 - ⇣ 1 - 1 ⌘H ⌘tH . But, as the Bitcoin network hash rate is really large, we may approximate the CDF of T by limH!1 P(T 6 t) = 1 - e- t ⌘ , which is equal to the CDF of the exponential distribution with parameter = 1 ⌘ . Theorem 1. When H ! +1, the time between blocks follows an exponential distribution with parameter = 1 ⌘ , i.e., limH!+1 P(T 6 t) = 1 - e- t ⌘ . Proof. P(T 6 t) = 1 - (1 - p)tH = 1 - ✓ 1 - 1 ⌘H ◆tH Replacing u = ⌘H, lim H!+1 P(T 6 t) = lim u!+1 1 - ✓ 1 - 1 u ◆tu ⌘ = lim u!+1 1 - ✓ 1 - 1 u ◆u t ⌘ = 1 - (1/e) t ⌘ = 1 - e- t ⌘ Now, we would like to understand from which value of H it is reasonable to assume that T follows an exponential distribution. Theorem 2. x > M ) |(1 + 1/x)x - e| < e/M. 5.3 mining several blocks 33 Proof. Let’s use the classical inequality x 1+x < log(1 + x) < x for x > -1. So, 1/x 1+1/x < log(1 + x) < 1/x. Simplifying, 1/x 1+1/x = 1/(1 + x). Thus, 1/(1 + x) < log(1 + 1/x) < 1/x ) x/(1 + x) < x log(1 + 1/x) < 1. As log(1 + 1 M ) > 0 and 1 < 1 + log(1 + 1 M). x > M ) 1/x < 1/M ) 1 + 1/x < 1 + 1/M ) 1/(1 + 1/x) > 1/(1 + 1/M) ) x/(1 + x) > M/(1 + M). Again, log(1 + x) < x ) log(1 - 1/M) < -1/M ) 1 + log(1 - 1/M) < (M - 1)/M < M/(1 + M), since (x - 1)/x < x/(x + 1). Hence, 1 + log(1 - 1/M) < M/(1 + M) < x/(1 + x) < x log(1 + 1/x), and x log(1 + 1/x) < 1 < 1 + log(1 + 1 M). Finally, 1 + log(1 - 1/M) < x log(1 + 1/x) < 1 + log(1 + 1 M ) e1+log(1-1/M) < ex log(1+1/x) < e1+log(1+ 1 M ) e · elog(1-1/M) < elog((1+1/x)x) < e · elog(1+ 1 M ) e(1 - 1/M) < (1 + 1/x)x < e(1 + 1 M ) e - e/M < (1 + 1/x)x < e + e/M -e/M < (1 + 1/x)x - e < e/M Therefore, |(1 + 1/x)x - e| < e/M. We may consider H big enough to say that T follows an exponential distribution when e/H < ✏, where ✏ is the maximum approximation error. When ✏ = 10-6 ) H > e · 106. So, when H > 2.6Mh/s, our approximation is good enough. The symmetrical confidence interval with level ↵ would be [t0, t1], where P(t0 < T < t1) = 1 - ↵, P(T < t0) = ↵/2, and P(T > t1) = ↵/2. These conditions give the following equations: 1 - e-t0/⌘ = ↵/2, and e-t1/⌘ = ↵/2. Solving these equations, we have t0 = -⌘ ln (1 - ↵/2), and t1 = -⌘ ln (↵/2). For instance, if ↵ = 10%, then t0 = 30.77 and t1 = 1797.44 (or [0.51, 30.76] in minutes). Thus, 90% of the time the intervals between blocks are between 30 seconds and 30 minutes, with average of 10 minutes. The fact that the time between blocks follows an exponential distribution with = 1/⌘ = pH may be used to estimate the total network’s hash rate (or a miner’s hash rate). For further information, see [155]. 5.3 mining several blocks Let T1, T2, T3, . . . , Tn be the time to find the first block (T1), then the time to find the second block (T2), and so on. Let’s analyze the dis- 34 analysis of bitcoin tribution of Yn = Pn i=1 Ti which is the total time to find the next n blocks. As Yn is the sum of random variables which follow an expo- nential distribution with same = 1 ⌘, then Yn ⇠ Erlang(n, 1 ⌘ ). Thus, the CDF of Y would be P(Yn < t) = 1 - Pn-1 k=0 1 k! e- t( t)k. Many exchanges require at least six confirmations in order to accept a deposit in Bitcoin. So, for n = 6, P(Y6 < 1 hour) = P(Y6 < 3600) = 0.5543, i.e., only 55% of the deposits will be accepted in one hour. The symmetrical confidence interval with ↵ = 10% is [27, 105] in minutes. Thus, 90% of the times, it will take between 27 minutes and 1 hour and 45 minutes to have your deposit accepted — assuming that your transaction will be confirmed in the very next block. The pdf of Y6 is shown in Figure 5, in which the 10% symmetrical confidence interval is shown in the white area. The average total time of six confirmations is E(Y6) = 6 · 600 = 3600 = 60 minutes. Figure 5: Probability density function of Y6, i.e., probability of finding 6 blocks after time t. The shaded areas shows the lower 5% and upper 5% of the pdf. 5.4 mining for a miner Let’s analyze the probability of finding a new block for a miner who has ↵ percent of the network’s total hash rate. Let T↵ = X ↵H be the time required for the miner to find a new block. As T↵ = 1 ↵ T, when H ! +1, T↵ also follows an exponential with parameter ↵ = ↵ ⌘ . Hence, we confirm the intuition that the miner with ↵ percent of the network’s total hash power will find ↵ percent of the blocks. Theorem 3. When the miner with ↵ percent of the network’s total hash rate is part of the mining network, P(next block is from T↵) = ↵. 5.6 analysis of network’s hash rate change 39 d ds L{fT (t)} = - nX k=0 ✓ n k ◆ bk k! d ds s (s + a)k+1 = - nX k=0 ✓ n k ◆ bk k!  1 (s + a )k+1 - s(k + 1) (s + a )k+1 d ds L{fT (t)}|s=0 = - nX k=0 ✓ n k ◆ bk k! 1 ( a)k+1 = - 1 a nX k=0 ✓ n k ◆ k! ✓ b a ◆k = - 1 a nX k=0 n! (n - k)! ✓ b a ◆k = - 1 a " n! nX k=0 1 (n - k)! ✓ b a ◆k # = - 1 a " n! nX k=0 1 k! ✓ b a ◆n-k # (k ! n - k) = - 1 a " n! ✓ b a ◆n nX k=0 1 k! ✓ b a ◆-k # = - 1 a " n! ✓ b a ◆n nX k=0 1 k! ✓ a b ◆k # Finally, as E[T] = - d dsL{fT (t)}|s=0, E[T] = 1 a " n! ✓ b a ◆n nX k=0 1 k! ✓ a b ◆k # , where n = (a - 1) b Let’s check this equation for already known scenarios. When a = 1, then n = 0 and E[T] = 1/ . When b ! +1, it reduces to the case in which the hash rate is multiplied by a, which we have already studied. In fact, b ! +1 yields n ! 0, u(t) ! a, and E[T] = 1 a. Theorem 5. a > 1 and x > M ) 1 + abx 1 + bx - a < a - 1 1 + bM Proof. x > M ) 1 1+bx < 1 1+bM. As 1 - a < 0, 1-a 1+bx > 1-a 1+bM. Thus, 1-a 1+bM < 1-a 1+bx + a - a = 1+abx 1+bx - a < 0 < a-1 1+bM . Hence, - a-1 1+bM < 1+abx 1+bx - a < a-1 1+bM . For instance, if we would like to know the impact of smoothly double the hash rate in the next week, then the parameters would be = 1/600, a = 2, M = 1 week = 3600 · 24 · 7 = 604, 800, b can be calculated using ✏ = a-1 1+bM < 0.01, which yields b > 0.000163690 8.1 confirmation time 63 blk4 genesis0 blk6 tx3 blk8 tx1 blk16 tx13 tx15 blk29 tx28 blk33 tx17 tx32 blk36 tx24 tx35 blk37 tx19 blk42 tx30 blk44 tx25 blk48 tx38 blk56 tx41tx55 blk57 tx47 blk58 tx53 tx54 blk60 tx43 tx59 blk63 tx61 tx62 blk66 tx64 tx65 blk67 blk69 tx52 tx68 blk71 blk72 blk75 tx70 tx2 tx5 tx7 tx9 tx10 tx11 tx12 tx14 tx18 tx20 tx21 tx22 tx23 tx26 tx27 tx31 tx34 tx39 tx40 tx45 tx46 tx49 tx50 tx51 tx73 tx74 tx76 tx78 tx79 tx80 tx82 tx81 tx86 tx77 tx85 tx83 tx84 Figure 16: Visualization of a Hathor’s graph with transactions and blocks. Red boxes are blocks; green circles are confirmed transactions; white circles are in-progress transactions; yellow circles are un- confirmed transactions (tips); and grey circles are transactions solving the proof-of-work which have not been propagated yet. The arrows show the confirmation chain. Block’s arrows are in bold. 82 sparse distributed memory (a) Q3 (b) Q7 (c) Q10 Figure 20: Here we have Qn, for n 2 {3, 7, 10}. Each node corresponds to a bitstring in {0, 1}n, and two nodes are linked iff the bitstrings differ by a single dimension. A number of observations can be made here. First, the number of nodes grows as O(2n); which makes the space rapidly intractable. Another interesting observa- tion, better seen in the figures below, is that most of the space lies ‘at the center’, at a distance of around n/2 from any given vantage point. 13.3 counters 105 1 __kernel 2 void single_scan6( 3 __constant const uchar *bitcount_table, 4 __global const ulong *bitstrings, 5 const uint bs_len, 6 const uint sample, 7 __constant const ulong *bs, 8 const uint radius, 9 __global uint *counter, 10 __global uint *selected, 11 __local uint *partial_dist) 12 { 13 uint dist; 14 ulong a; 15 uint j; 16 17 for (uint id = get_group_id(0); id < sample; id += get_num_groups(0)) { 18 const __global ulong *row = bitstrings + id*bs_len; 19 20 dist = 0; 21 j = get_local_id(0); 22 if (j < bs_len) { 23 a = row[j] ^ bs[j]; 24 dist = popcount(a); 25 } 26 partial_dist[get_local_id(0)] = dist; 27 28 uint old_stride = get_local_size(0); 29 uint stride; 30 __local uint extra; 31 extra = 0; 32 for(stride = get_local_size(0)/2; stride > 32; stride /= 2) { 33 barrier(CLK_LOCAL_MEM_FENCE); 34 if ((old_stride&1) == 1 && get_local_id(0) == old_stride-1) { 35 extra += partial_dist[get_local_id(0)]; 36 } 37 if (get_local_id(0) < stride) { 38 partial_dist[get_local_id(0)] += 39 partial_dist[get_local_id(0) + stride]; 40 } 41 old_stride = stride; 42 } 43 barrier(CLK_LOCAL_MEM_FENCE); 44 for(/**/; stride > 0; stride /= 2) { 45 if ((old_stride&1) == 1 && get_local_id(0) == old_stride-1) { 46 extra += partial_dist[get_local_id(0)]; 47 } 48 if (get_local_id(0) < stride) { 49 partial_dist[get_local_id(0)] += 50 partial_dist[get_local_id(0) + stride]; 51 } 52 old_stride = stride; 53 } 54 55 if (get_local_id(0) == 0) { 56 if (partial_dist[0] + extra <= radius) { 57 selected[atomic_inc(counter)] = id; 58 } 59 } 60 barrier(CLK_LOCAL_MEM_FENCE); 61 } 62 } Listing 8: OpenCL kernel single_scan6. This kernel is just like single_scan5, but it works with any number of workers per work. The tradeoff is an additional step in the parallel reduction algorithm. 194 results (ix): information-theoretical write operation (a) Write process weighted by the amount of information contained in the distance between the written bitstring and each hard location (b) Zoom in Figure 92a (c) Behavior of weighted write operation according to the distance from the center and the number of items previ- ously stored in the memory Figure 92: Behavior of the critical distance under the information-theoretic weighted write operation when n = 1, 000, H = 1, 000, 000 and r = 451.
  • 3. 1975: I lost the microcomputer revolution
  • 4. 1985 (-1): I lost the GUI revolution
  • 5. 1995: I lost the web revolution
  • 6. 2005: I lost the Web 2.0 revolution
  • 7. ~2015: the semantic revolution
  • 8.
  • 9. Want to see something unsustainable?
  • 10.
  • 13. Da mesma forma que chamamos investimento hoje de “papel” --- esse papel rende muito, esse papel não rende nada, este papel está barato… --- Juntamos contratos, ações, fundos, derivativos, etc, na palavra "papel". Me parece que vamos em breve trocar pelo termo “token”.
  • 15. Uma visão de sucesso O Valor de Mercado do Hathor tornar-se MAIOR do que o Patrimônio Líquido da Fundação Getulio Vargas.
  • 16. Insanidade é achar que nada vai mudar • Quando se olha os números, vê-se que é bastante plausível que o projeto seja bem-sucedido nos próximos 10 anos • O Bitcoin, por exemplo, é hoje: • 13 vezes maior que o DeutscheBank • 2,3 vezes maior que a Petrobras
  • 17. 32 analysis of bitcoin (h(xi) > A for i < k) but the last (h(xk) < A). The probability of finding a solution exactly in the kth attempt follows a geometric distribution. Let X be the number of attempts until a success, then P(X = k) = (1 - p)k-1p, where p = A 2256 . Also, we have P(X 6 k) = 1 - (1 - p)k. The average number of attempts is E(X) = 1/p and the variance is V(X) = 1-p p2 . In the Bitcoin protocol, the given number A is adjusted so that the network would find a new a block every 10 minutes, on average. Suppose that the Bitcoin network is able to calculate H hashes per second — H is the total hash rate of the network. The time required to find a solution would be T = X/H, and E(T) = E(X)/H would be the average number of seconds to find a new block. So, the rule of finding a new block every 10 minutes (⌘ = 600 seconds) — on average — leads to the following equation: E(T) = ⌘ = 600. So, E(T) = E(X)/H = 1 pH = ⌘ = 600 ) p = 1 ⌘H . Finally, E(X) = ⌘H, E(T) = ⌘, V(X) = (⌘H)2 - ⌘H, and V(T) = ⌘2 - ⌘/H. The cumulative distribution function (CDF) of T is P(T 6 t) = P(X/H 6 t) = P(X 6 tH) = 1 - (1 - p)tH = 1 - ⇣ 1 - 1 ⌘H ⌘tH . But, as the Bitcoin network hash rate is really large, we may approximate the CDF of T by limH!1 P(T 6 t) = 1 - e- t ⌘ , which is equal to the CDF of the exponential distribution with parameter = 1 ⌘ . Theorem 1. When H ! +1, the time between blocks follows an exponential distribution with parameter = 1 ⌘ , i.e., limH!+1 P(T 6 t) = 1 - e- t ⌘ . Proof. P(T 6 t) = 1 - (1 - p)tH = 1 - ✓ 1 - 1 ⌘H ◆tH Replacing u = ⌘H, lim H!+1 P(T 6 t) = lim u!+1 1 - ✓ 1 - 1 u ◆tu ⌘ = lim u!+1 1 - ✓ 1 - 1 u ◆u t ⌘ = 1 - (1/e) t ⌘ = 1 - e- t ⌘ Now, we would like to understand from which value of H it is reasonable to assume that T follows an exponential distribution. Theorem 2. x > M ) |(1 + 1/x)x - e| < e/M. 5.3 mining several blocks 33 Proof. Let’s use the classical inequality x 1+x < log(1 + x) < x for x > -1. So, 1/x 1+1/x < log(1 + x) < 1/x. Simplifying, 1/x 1+1/x = 1/(1 + x). Thus, 1/(1 + x) < log(1 + 1/x) < 1/x ) x/(1 + x) < x log(1 + 1/x) < 1. As log(1 + 1 M ) > 0 and 1 < 1 + log(1 + 1 M). x > M ) 1/x < 1/M ) 1 + 1/x < 1 + 1/M ) 1/(1 + 1/x) > 1/(1 + 1/M) ) x/(1 + x) > M/(1 + M). Again, log(1 + x) < x ) log(1 - 1/M) < -1/M ) 1 + log(1 - 1/M) < (M - 1)/M < M/(1 + M), since (x - 1)/x < x/(x + 1). Hence, 1 + log(1 - 1/M) < M/(1 + M) < x/(1 + x) < x log(1 + 1/x), and x log(1 + 1/x) < 1 < 1 + log(1 + 1 M). Finally, 1 + log(1 - 1/M) < x log(1 + 1/x) < 1 + log(1 + 1 M ) e1+log(1-1/M) < ex log(1+1/x) < e1+log(1+ 1 M ) e · elog(1-1/M) < elog((1+1/x)x) < e · elog(1+ 1 M ) e(1 - 1/M) < (1 + 1/x)x < e(1 + 1 M ) e - e/M < (1 + 1/x)x < e + e/M -e/M < (1 + 1/x)x - e < e/M Therefore, |(1 + 1/x)x - e| < e/M. We may consider H big enough to say that T follows an exponential distribution when e/H < ✏, where ✏ is the maximum approximation error. When ✏ = 10-6 ) H > e · 106. So, when H > 2.6Mh/s, our approximation is good enough. The symmetrical confidence interval with level ↵ would be [t0, t1], where P(t0 < T < t1) = 1 - ↵, P(T < t0) = ↵/2, and P(T > t1) = ↵/2. These conditions give the following equations: 1 - e-t0/⌘ = ↵/2, and e-t1/⌘ = ↵/2. Solving these equations, we have t0 = -⌘ ln (1 - ↵/2), and t1 = -⌘ ln (↵/2). For instance, if ↵ = 10%, then t0 = 30.77 and t1 = 1797.44 (or [0.51, 30.76] in minutes). Thus, 90% of the time the intervals between blocks are between 30 seconds and 30 minutes, with average of 10 minutes. The fact that the time between blocks follows an exponential distribution with = 1/⌘ = pH may be used to estimate the total network’s hash rate (or a miner’s hash rate). For further information, see [155]. 5.3 mining several blocks Let T1, T2, T3, . . . , Tn be the time to find the first block (T1), then the time to find the second block (T2), and so on. Let’s analyze the dis- 34 analysis of bitcoin tribution of Yn = Pn i=1 Ti which is the total time to find the next n blocks. As Yn is the sum of random variables which follow an expo- nential distribution with same = 1 ⌘, then Yn ⇠ Erlang(n, 1 ⌘ ). Thus, the CDF of Y would be P(Yn < t) = 1 - Pn-1 k=0 1 k! e- t( t)k. Many exchanges require at least six confirmations in order to accept a deposit in Bitcoin. So, for n = 6, P(Y6 < 1 hour) = P(Y6 < 3600) = 0.5543, i.e., only 55% of the deposits will be accepted in one hour. The symmetrical confidence interval with ↵ = 10% is [27, 105] in minutes. Thus, 90% of the times, it will take between 27 minutes and 1 hour and 45 minutes to have your deposit accepted — assuming that your transaction will be confirmed in the very next block. The pdf of Y6 is shown in Figure 5, in which the 10% symmetrical confidence interval is shown in the white area. The average total time of six confirmations is E(Y6) = 6 · 600 = 3600 = 60 minutes. Figure 5: Probability density function of Y6, i.e., probability of finding 6 blocks after time t. The shaded areas shows the lower 5% and upper 5% of the pdf. 5.4 mining for a miner Let’s analyze the probability of finding a new block for a miner who has ↵ percent of the network’s total hash rate. Let T↵ = X ↵H be the time required for the miner to find a new block. As T↵ = 1 ↵ T, when H ! +1, T↵ also follows an exponential with parameter ↵ = ↵ ⌘ . Hence, we confirm the intuition that the miner with ↵ percent of the network’s total hash power will find ↵ percent of the blocks. Theorem 3. When the miner with ↵ percent of the network’s total hash rate is part of the mining network, P(next block is from T↵) = ↵. 5.6 analysis of network’s hash rate change 39 d ds L{fT (t)} = - nX k=0 ✓ n k ◆ bk k! d ds s (s + a)k+1 = - nX k=0 ✓ n k ◆ bk k!  1 (s + a )k+1 - s(k + 1) (s + a )k+1 d ds L{fT (t)}|s=0 = - nX k=0 ✓ n k ◆ bk k! 1 ( a)k+1 = - 1 a nX k=0 ✓ n k ◆ k! ✓ b a ◆k = - 1 a nX k=0 n! (n - k)! ✓ b a ◆k = - 1 a " n! nX k=0 1 (n - k)! ✓ b a ◆k # = - 1 a " n! nX k=0 1 k! ✓ b a ◆n-k # (k ! n - k) = - 1 a " n! ✓ b a ◆n nX k=0 1 k! ✓ b a ◆-k # = - 1 a " n! ✓ b a ◆n nX k=0 1 k! ✓ a b ◆k # Finally, as E[T] = - d dsL{fT (t)}|s=0, E[T] = 1 a " n! ✓ b a ◆n nX k=0 1 k! ✓ a b ◆k # , where n = (a - 1) b Let’s check this equation for already known scenarios. When a = 1, then n = 0 and E[T] = 1/ . When b ! +1, it reduces to the case in which the hash rate is multiplied by a, which we have already studied. In fact, b ! +1 yields n ! 0, u(t) ! a, and E[T] = 1 a. Theorem 5. a > 1 and x > M ) 1 + abx 1 + bx - a < a - 1 1 + bM Proof. x > M ) 1 1+bx < 1 1+bM. As 1 - a < 0, 1-a 1+bx > 1-a 1+bM. Thus, 1-a 1+bM < 1-a 1+bx + a - a = 1+abx 1+bx - a < 0 < a-1 1+bM . Hence, - a-1 1+bM < 1+abx 1+bx - a < a-1 1+bM . For instance, if we would like to know the impact of smoothly double the hash rate in the next week, then the parameters would be = 1/600, a = 2, M = 1 week = 3600 · 24 · 7 = 604, 800, b can be calculated using ✏ = a-1 1+bM < 0.01, which yields b > 0.000163690 8.1 confirmation time 63 blk4 genesis0 blk6 tx3 blk8 tx1 blk16 tx13 tx15 blk29 tx28 blk33 tx17 tx32 blk36 tx24 tx35 blk37 tx19 blk42 tx30 blk44 tx25 blk48 tx38 blk56 tx41tx55 blk57 tx47 blk58 tx53 tx54 blk60 tx43 tx59 blk63 tx61 tx62 blk66 tx64 tx65 blk67 blk69 tx52 tx68 blk71 blk72 blk75 tx70 tx2 tx5 tx7 tx9 tx10 tx11 tx12 tx14 tx18 tx20 tx21 tx22 tx23 tx26 tx27 tx31 tx34 tx39 tx40 tx45 tx46 tx49 tx50 tx51 tx73 tx74 tx76 tx78 tx79 tx80 tx82 tx81 tx86 tx77 tx85 tx83 tx84 Figure 16: Visualization of a Hathor’s graph with transactions and blocks. Red boxes are blocks; green circles are confirmed transactions; white circles are in-progress transactions; yellow circles are un- confirmed transactions (tips); and grey circles are transactions solving the proof-of-work which have not been propagated yet. The arrows show the confirmation chain. Block’s arrows are in bold. 82 sparse distributed memory (a) Q3 (b) Q7 (c) Q10 Figure 20: Here we have Qn, for n 2 {3, 7, 10}. Each node corresponds to a bitstring in {0, 1}n, and two nodes are linked iff the bitstrings differ by a single dimension. A number of observations can be made here. First, the number of nodes grows as O(2n); which makes the space rapidly intractable. Another interesting observa- tion, better seen in the figures below, is that most of the space lies ‘at the center’, at a distance of around n/2 from any given vantage point. 13.3 counters 105 1 __kernel 2 void single_scan6( 3 __constant const uchar *bitcount_table, 4 __global const ulong *bitstrings, 5 const uint bs_len, 6 const uint sample, 7 __constant const ulong *bs, 8 const uint radius, 9 __global uint *counter, 10 __global uint *selected, 11 __local uint *partial_dist) 12 { 13 uint dist; 14 ulong a; 15 uint j; 16 17 for (uint id = get_group_id(0); id < sample; id += get_num_groups(0)) { 18 const __global ulong *row = bitstrings + id*bs_len; 19 20 dist = 0; 21 j = get_local_id(0); 22 if (j < bs_len) { 23 a = row[j] ^ bs[j]; 24 dist = popcount(a); 25 } 26 partial_dist[get_local_id(0)] = dist; 27 28 uint old_stride = get_local_size(0); 29 uint stride; 30 __local uint extra; 31 extra = 0; 32 for(stride = get_local_size(0)/2; stride > 32; stride /= 2) { 33 barrier(CLK_LOCAL_MEM_FENCE); 34 if ((old_stride&1) == 1 && get_local_id(0) == old_stride-1) { 35 extra += partial_dist[get_local_id(0)]; 36 } 37 if (get_local_id(0) < stride) { 38 partial_dist[get_local_id(0)] += 39 partial_dist[get_local_id(0) + stride]; 40 } 41 old_stride = stride; 42 } 43 barrier(CLK_LOCAL_MEM_FENCE); 44 for(/**/; stride > 0; stride /= 2) { 45 if ((old_stride&1) == 1 && get_local_id(0) == old_stride-1) { 46 extra += partial_dist[get_local_id(0)]; 47 } 48 if (get_local_id(0) < stride) { 49 partial_dist[get_local_id(0)] += 50 partial_dist[get_local_id(0) + stride]; 51 } 52 old_stride = stride; 53 } 54 55 if (get_local_id(0) == 0) { 56 if (partial_dist[0] + extra <= radius) { 57 selected[atomic_inc(counter)] = id; 58 } 59 } 60 barrier(CLK_LOCAL_MEM_FENCE); 61 } 62 } Listing 8: OpenCL kernel single_scan6. This kernel is just like single_scan5, but it works with any number of workers per work. The tradeoff is an additional step in the parallel reduction algorithm. 194 results (ix): information-theoretical write operation (a) Write process weighted by the amount of information contained in the distance between the written bitstring and each hard location (b) Zoom in Figure 92a (c) Behavior of weighted write operation according to the distance from the center and the number of items previ- ously stored in the memory Figure 92: Behavior of the critical distance under the information-theoretic weighted write operation when n = 1, 000, H = 1, 000, 000 and r = 451.