|
From: Spencer Jr., M. <sp...@ac...> - 2000-08-07 14:47:40
|
My thoughts on a simulator:
BLOCKS IS TWO LAYERS
currently Blocks is a two-layer system: network and protocol. (I'm trying
to borrow from OSI names here, and I may have picked the wrong ones. My
names are not set in stone.) The network layer manages client connections,
routes file ads, new-connection ads, and blocks. (Right?) The protocol
layer does intelligent things with the network-layer data: figures out what
to do with file adverts, when to create new ones...and knows when to send
and receive blocks and what to do with the data (reconstruct a file, etc.)
(Just because it's my pet project, I will add: the web-of-trust, when it's
finally implemented, would be another couple layers on top of that.)
SIMULATE THE LAYERS SEPARATELY
I think we can simplify the problem if we analyze and harden the two layers
independently -- both layers are necessary for the whole to operate, and
either layer can fail without the presence of a design flaw in the other
layer. If the network layer is weak but the protocol layer is strong, then
we'll find we have a problem establishing and maintaining connections...but
what few connections we can keep up route files very effectively.
Conversely, if the network layer is strong but the protocol layer is weak,
then we'll be able to communicate packets very effectively but we'll have
problems helping content producers and content consumers find each other.
NETWORK THREAT MODEL
I think this one is the biggie: will the network scale as you add more
permanent hosts, temporary/transient hosts, and malicious hosts...and how
many of the last two does it take to break the network?
The successful attacks against the network will probably be things we've
never thought of...but offhand I can think of floods, constantly connecting
and disconnecting from hosts, putting a low-bandwidth server in a central
'hub' location...
NETWORK SIMULATOR
To simulate a large network I believe this can best be done as a collection
of nodes, where each node is a fixed-length structure...and the structures
can be stacked neatly in a flat file. You'd probably need separate files
and data structures for the network traffic...but the turn-based flow would
probably go: in-queue, process, out-queue, delivery.
This is a programming task probably beyond my ability, but I'll be glad to
spec out a big complicated mess and make a ton of work for somebody else.
I suppose you would need to make a list of client-types, where each client
would have 'program behavior' and 'user behavior'. Most of the network (80%
at least, I hope) would consist of a few thousand long-term
standard-behavior clients. Then we would custom-code other client types: a
fickle temporary/transient host, and whatever malicious host types we could
dream up.
The simulation would run through the node list file once per turn...and I
suppose the file could be closed after every turn, so an external program
could map and analyze the structure of the network.
I don't know most of this stuff -- my mind feels all swimmy. Isn't there a
branch of mathemetics that prepares you for this stuff?
PROTOCOL THREAT MODEL
OK, assuming we have a working network, how can someone abuse the protocol?
We'd have to define the protocol's goals, and how we can measure whether or
not the protocol is being successful.
I suppose a successful protocol lets people publish information widely, and
lets people find and retrieve published information easily.
How do you abuse the protocol? You can obviously spam the network with
false file adverts...but how do you differentiate between someone flooding
with bogus file adverts...someone sharing and broadcasting tens of thousands
of adverts for little 10 K text files...and someone sharing and broadcasting
tens of thousands of adverts for little 10 K text files with actual useful
information in there somewhere.
You could consider me personally to be an attacker against the protocol: if
you don't believe in this web of trust stuff, and suddenly one day you
search for * and find 50 or so interesting files, and 150 or so 70-letter
filenames saying pk- and cs- and ks- and a few dozen random hex
digits...then you could probably accuse me of spamming everyone's file
adverts.
So this needs to be carefully defined, probably by someone else. :)
PROTOCOL SIMULATION
I have no earthly idea how to do this. :) Can someone else step forward?
IMPLEMENTATION
Java would be nice...an interpreted run-time language for custom coding of
malicious client behavior would also be nice...but maybe not practical.
Perhaps after we build the client, we should have a coder in one hand and an
ideas person in the other, and they work together to do tests?
Again...I don't know how to do this, because I'm not that good a coder...but
I'll be glad to dream up crazy ideas and make work for someone else. :)
--Michael Spencer
bl...@ms...
-----Original Message-----
From: Erik Moeller [mailto:mo...@sc...]
Sent: Saturday, August 05, 2000 2:14 PM
To: blo...@li...
Subject: [Blocks-development] Sim Blocks
It would be very useful to have a simulator for testing the
scalability and vulnerability of BlockNets. I talked already with
Michael about this. We could simulate various changes to the protocol
without actually implementing them, simply by adding or changing a
few numbers here and there. We could also do very-large-scale tests
with 100,000 nodes and more. Basically, if we don't do this it's a
"fire & forget" strategy -- we don't really know the outcome.
So a simulator would be excellent and if we intend this program to be
more than a short proof-of-concept, it would be very useful for the
further development. It's obvious that Peter can at best look over
it, since he's far too busy to implement it. So anyone who can
"speak" Java and is willing to contribute to this should speak up.
- - -
Here's a more detailed proposal:
- turn based simulation
- everything that's unique (adverts, files etc.)
should also have unique representations in the
simulation
- Java, AWT GUI (for visual representation:
canvas with 1 pixel per node, 1 pixel between
each, lines between pixels visualize file
transfers / routes)
- Reason for Java: cross-platform, easy to use
Required data:
global:
- number of good nodes
- readvertising frequency
- individual advert size
- optional: number of bad nodes
- flooders
- DoSers (don't use Blocks, but
attack a certain IP-can't be
locked out, might focus on
prominent nodes)
- fakers
- filters
- analyzers / hoppers
- ?
individual:
for these numbers we need a distribution table,
e.g.: 56 kbps; 5%; 64 kbps: 10% ..
or randomly picked from a range:
0-4h:10%; 4-12h:25%
- speed of nodes
- uptime
- number of local files
- file requests / hour
- cache size
- non-ad-routing: how many % don't route ads?
- "prominence":
how well the nodes are known, e.g.
50-100% know this node:1%
30-50% know this node:4%
10-30% know this node:10%
0-10% know this node:85%
(when a node reconnects, the prominent
connection points are connected to more
often).
- cancel frequency: when and how likely
will the user cancel the download?
when=at which speed threshold, e.g.
at <50% of maximum speed: 1%
at 40-50% of max speed: 3%
..
at 5-10% of max speed: 40%
at 0-5% of max speed: 60%
- ?
Optional:
frustration - after a certain number of cancels
and failed downloads, the user is frustrated
and quits the network. A threshold for this
could be defined.
Implementation:
The nodes are generated as a vector of objects.
In a loop, each nodes can generate several
actions (request, upload, disconnect, continue
downloading of a requested file, cancel, send
advert, send file etc.), actions that regard
other nodes are put in their event queue which
is processed as soon as possible, according to
the bandwidth that the node can use per turn.
Afer one loop is complete, a number of new nodes
is generated randomly and added to the vector.
The display is updated. Repeat on user request
(step by step) or automatically.
Gatherable data:
How many nodes d/l at x % of their max speed?
How many d/ls fail?
What is the average bandwidth required by adverts?
How is it distributed?
Which regions of the network are congested and how
could this be alleviated?
How many evil nodes can we tolerate?
etc.
Comments welcome.
Regards,
Erik
PS: Yes, these proposals will eventually be put on the web as soon as
I have an FTP account.
--
Scientific Reviewer, Freelancer, Humanist -- Berlin/Germany
Phone: +49-30-45491008 - Web: <http://www.humanist.de/erik>
The Origins of Peace and Violence: <http://www.violence.de>
Please donate free food NOW: <http://www.thehungersite.com>
_______________________________________________
Blocks-development mailing list
Blo...@li...
http://lists.sourceforge.net/mailman/listinfo/blocks-development
|