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
|
Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193]
helo=mx.sourceforge.net)
by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76)
(envelope-from <christophe.biocca@gmail.com>) id 1ViFzT-0002dC-IC
for bitcoin-development@lists.sourceforge.net;
Mon, 18 Nov 2013 03:59:11 +0000
Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of gmail.com
designates 209.85.220.50 as permitted sender)
client-ip=209.85.220.50;
envelope-from=christophe.biocca@gmail.com;
helo=mail-pa0-f50.google.com;
Received: from mail-pa0-f50.google.com ([209.85.220.50])
by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128)
(Exim 4.76) id 1ViFzS-0008BL-Gi
for bitcoin-development@lists.sourceforge.net;
Mon, 18 Nov 2013 03:59:11 +0000
Received: by mail-pa0-f50.google.com with SMTP id kp14so4512811pab.23
for <bitcoin-development@lists.sourceforge.net>;
Sun, 17 Nov 2013 19:59:04 -0800 (PST)
MIME-Version: 1.0
X-Received: by 10.68.13.104 with SMTP id g8mr19072380pbc.33.1384747144692;
Sun, 17 Nov 2013 19:59:04 -0800 (PST)
Received: by 10.68.146.72 with HTTP; Sun, 17 Nov 2013 19:59:04 -0800 (PST)
In-Reply-To: <63B3BF21-C487-4D62-8BB8-18C90F2C3F4C@rbrune.de>
References: <63B3BF21-C487-4D62-8BB8-18C90F2C3F4C@rbrune.de>
Date: Sun, 17 Nov 2013 22:59:04 -0500
Message-ID: <CANOOu=9CwTOi37FJXXNjMirN9RhYdF=W21DV0BzKV9HCCksJBg@mail.gmail.com>
From: Christophe Biocca <christophe.biocca@gmail.com>
To: bitcoin-development@lists.sourceforge.net
Content-Type: multipart/alternative; boundary=bcaec520ea79a9ced604eb6b9116
X-Spam-Score: -0.6 (/)
X-Spam-Report: Spam Filtering performed by mx.sourceforge.net.
See http://spamassassin.org/tag/ for more details.
0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked.
See
http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
for more information. [URIs: doubleclick.net]
-1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for
sender-domain
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
(christophe.biocca[at]gmail.com)
-0.0 SPF_PASS SPF: sender matches SPF record
1.0 HTML_MESSAGE BODY: HTML included in message
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
author's domain
0.1 DKIM_SIGNED Message has a DKIM or DK signature,
not necessarily valid
-0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
X-Headers-End: 1ViFzS-0008BL-Gi
Subject: Re: [Bitcoin-development] Bitcoin Network Simulator
X-BeenThere: bitcoin-development@lists.sourceforge.net
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <bitcoin-development.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
<mailto:bitcoin-development-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bitcoin-development>
List-Post: <mailto:bitcoin-development@lists.sourceforge.net>
List-Help: <mailto:bitcoin-development-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/bitcoin-development>,
<mailto:bitcoin-development-request@lists.sourceforge.net?subject=subscribe>
X-List-Received-Date: Mon, 18 Nov 2013 03:59:11 -0000
--bcaec520ea79a9ced604eb6b9116
Content-Type: text/plain; charset=ISO-8859-1
Beat me to it. My own implementation is here:
https://github.com/christophebiocca/bitcoin-network-simulator
Same basic principles, but I've been following the protocol message
structure as much as possible/Theoretical support for transaction
propagation (I really want to see zero-conf stuff, and whether it works).
Running a network of 1000 full nodes (with 100 miners) for a week of
simulated time (with a normal hashrate) and empty blocks (except for the
coinbase transaction) takes about 30-60 seconds.
Uses nodejs, with the ultimate goal of having a network/chain visualization
running in the browser (with the actual simulation running on a WebWorker
to keep things responsive).
On Sun, Nov 17, 2013 at 11:43 AM, Rafael Brune <mail@rbrune.de> wrote:
> Over the last days I spent some time working on a simple Bitcoin network
> simulator.
> It is a stochastic event-based continuous-time simulation of Bitcoin miners
> exchanging messages and building block chains. It simulates latency,
> bandwidth
> and also verification speed but it currently does not simulate
> propagation/inclusion
> of transactions and instead uses random block sizes.
>
> The simulator includes two examples, one for a 51% attack and the other is
> an
> implementation of selfish mining (pretty much 1:1 as described in the
> paper).
> With the random parameters I picked it seems like it pays off to mine
> selfish with
> >=30% of the hashing power - but take this with a huge grain of salt as
> this
> is with a very small network and randomly chosen parameters. And of course
> it
> is not a perfect replica of the real world network.
>
> Since this is based on my understanding of the Bitcoin network and
> protocol it
> would be great if others would take a look and help improve it.
>
> The project can be found on my github:
> https://github.com/rbrune/btcsim
>
> Regards,
> Rafael Brune
>
> ------------------------------------------------------------------------------
> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
> Free app hosting. Or install the open source package on any LAMP server.
> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
> _______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>
--bcaec520ea79a9ced604eb6b9116
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div><div><div>Beat me to it. My own implementation is her=
e: <a href=3D"https://github.com/christophebiocca/bitcoin-network-simulator=
">https://github.com/christophebiocca/bitcoin-network-simulator</a><br></di=
v>
Same basic principles, but I've been following the protocol message str=
ucture as much as possible/Theoretical support for transaction propagation =
(I really want to see zero-conf stuff, and whether it works).<br></div>
Running a network of 1000 full nodes (with 100 miners) for a week of simula=
ted time (with a normal hashrate) and empty blocks (except for the coinbase=
transaction) takes about 30-60 seconds.<br>Uses nodejs, with the ultimate =
goal of having a network/chain visualization running in the browser (with t=
he actual simulation running on a WebWorker to keep things responsive).<br>
</div></div><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">O=
n Sun, Nov 17, 2013 at 11:43 AM, Rafael Brune <span dir=3D"ltr"><<a href=
=3D"mailto:mail@rbrune.de" target=3D"_blank">mail@rbrune.de</a>></span> =
wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Over the last days I spent some time working=
on a simple Bitcoin network simulator.<br>
It is a stochastic event-based continuous-time simulation of Bitcoin miners=
<br>
exchanging messages and building block chains. It simulates latency, bandwi=
dth<br>
and also verification speed but it currently does not simulate propagation/=
inclusion<br>
of transactions and instead uses random block sizes.<br>
<br>
The simulator includes two examples, one for a 51% attack and the other is =
an<br>
implementation of selfish mining (pretty much 1:1 as described in the paper=
).<br>
With the random parameters I picked it seems like it pays off to mine selfi=
sh with<br>
>=3D30% of the hashing power - but take this with a huge grain of salt a=
s this<br>
is with a very small network and randomly chosen parameters. And of course =
it<br>
is not a perfect replica of the real world network.<br>
<br>
Since this is based on my understanding of the Bitcoin network and protocol=
it<br>
would be great if others would take a look and help improve it.<br>
<br>
The project can be found on my github:<br>
<a href=3D"https://github.com/rbrune/btcsim" target=3D"_blank">https://gith=
ub.com/rbrune/btcsim</a><br>
<br>
Regards,<br>
=A0Rafael Brune<br>
---------------------------------------------------------------------------=
---<br>
DreamFactory - Open Source REST & JSON Services for HTML5 & Native =
Apps<br>
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access<br>
Free app hosting. Or install the open source package on any LAMP server.<br=
>
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!<br=
>
<a href=3D"http://pubads.g.doubleclick.net/gampad/clk?id=3D63469471&iu=
=3D/4140/ostg.clktrk" target=3D"_blank">http://pubads.g.doubleclick.net/gam=
pad/clk?id=3D63469471&iu=3D/4140/ostg.clktrk</a><br>
_______________________________________________<br>
Bitcoin-development mailing list<br>
<a href=3D"mailto:Bitcoin-development@lists.sourceforge.net">Bitcoin-develo=
pment@lists.sourceforge.net</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/bitcoin-development=
" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/bitcoin-de=
velopment</a><br>
</blockquote></div><br></div>
--bcaec520ea79a9ced604eb6b9116--
|