datdotorg / datdot-service

datdot service
https://playproject.io/datdot-service
MIT License
15 stars 9 forks source link

DatDot

a p2p solution for hosting files with Hypercore protocol (...more)

Community

Join our discord

Build

This version is work in progress (to try previous verisons of the code, see milestone-1 and milestone-2 branches)

Clone

git clone https://github.com/datdotorg/datdot-service.git cd datdot-service

Install dependencies

npm install

1. Run bootstrapping nodes and each scenario separately

Start the bootstrapping nodes

npm run bootstrap

Run the scenario which also spawns the chain

npm run simulation -- -s 1 -p bootstrap.json

Run the additional scenario and connect to already running chain (optional)

npm run simulation -- -s 2 -c 10000 -p bootstrap.json -t

2. Run a simulation (simsim.js) where you can customize how many simulations you want to run and when

Start the bootstrapping nodes

npm run bootstrap

Run custom logic

node demo/simsim.js

3. Run the simulation and store logs in the logs.txt which you can monitor live

Start the bootstrapping nodes

npm run bootstrap

Save logs in a logs.txt file

node demo/simsim.js &>> logs/logs.txt

Monitor i.e.:

tail -f logs/logs.txt | grep -i 'Hoster successfully completed performance challenge' -C 2

tail -f logs/logs.txt | grep -i 'Storage challenge analysis' -C 4

tail -f logs/logs.txt | grep -i 'error' -C 5

For custom commands:

Research

See our research repo

Organization

https://github.com/datdotorg

License

MIT