Skip to content

Instantly share code, notes, and snippets.

@lmars
Created April 19, 2017 09:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lmars/a0b90f0208b153ff313d9e0a1aeb3258 to your computer and use it in GitHub Desktop.
Save lmars/a0b90f0208b153ff313d9e0a1aeb3258 to your computer and use it in GitHub Desktop.
Swarm Simulation Scenarios

Simulation Scenarios

A simulaion scenario consists of the initial network description followed by a series of simulation steps.

Initial network description

This consists of:

  • the number of nodes in the network
  • what protocols / modules each node is running (e.g. bzz / pss)
  • which nodes are directly connected

Simulation step

A simulation step consists of:

  • an action to perform in the network
  • an expectation on a set of nodes

Example

An example pss simulation:

Network description:

10 nodes each running pss connected in a ring so that node1 is connected to node2,
node2 to node3, ..., node9 to node10, node10 to node1.

Steps:

Action:      node1 sends a message to node10
Expectation: node10 receives the message
Action:      node10 sends a reply to node1
Expectation: node1 receives the reply
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment