Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Forging Simulation

Simulation tool for Nxt-like 100% Proof-of-Stake forging

Compile & Run

To compile you need:

  1. GHC haskell compiler. sudo apt-get install ghc

  2. cabal-install for external haskell packages installation sudo apt-get install cabal-install

  3. ConfigFile package, which can be locally installed cabal install ConfigFile SHA

  4. Then run compile.sh shell-script for Linux to compile the sources

  5. The executable name is launcher unless another name is manually specified

CONFIGURATION

Configuration file 'params.conf' (the name is statically defined in launcher.hs, after changing re-compilation is needed) consists of the following parameters:

  • outdir - folder results will be put into. Will be created if not exists

  • duration - test duration, in seconds. Please note, performance is not very good at the moment, so better start with default value on an unknown machine

  • simulation-id - being using as seed value for random number generator. Results for same simulation-id & duration values are the same from run to run, so change this value to start new experiment. other researcher can follow your results by using the same simulation-id value

  • max-connections-per-node - max number of outgoing connections a node could has. please note we use one-directional connections, so sometimes oldest connection being dropped to avoid network clusterization

  • add-node-avg-gap - average gap between node creation events, e.g. if add-node-avg-gap == 1000 && duration = 100000 then ~100 nodes will be created during the test

Results

After finishing simulation program dumps out some results to files in output directory set by outdir parameter (out by default):

  • nodeX - final state of node X

  • chainX - chain of node X at final moment

  • commonX - common chain for nodes X and X+1

  • txsX - confirmed transactions presenting in a blockchain of node X

  • cons - network connections in final moment of a test in format nodeId -> [otherNodeId1...otherNodeIdN]

  • network - very big file with whole network's final state

  • commons - lengths of common chains for all nodes

Also some information being printing after test to the console:

  • final self-balances for all nodes(i.e. every node prints balance from it's own point of view)

  • lengths of common chains for all nodes(the same goes to commons file)

CONTACTS & Discussion

Please contact kushti, kushtech@yahoo.com for any reasonable questions or suggestions about the program. Also please visit our subforum @ Nxt forum : https://nxtforum.org/consensus-research/

About

Simulation tool for Nxt-like 100% Proof-of-Stake forging

Resources

License

Packages

No packages published
You can’t perform that action at this time.