/ODNPublish

Primary LanguageJavaScript

ODNPublish

Currently, SSL needs disabled to use this script.

Running Origintrail V6 Beta 1 testnode required.

-----PUBLISH-----
Run: sudo git clone https://github.com/CosmiCloud/ODNPublish.git && cd ODNPublish && sudo npm install prompts && sudo npm install dkg-client@beta.1 && sudo node publish.js

-----ADVANCED PUBLISH-----
This pulls down a random json dataset from wikidata to publish.
Large datasets may slow down your node. It is not recommended to stress test with this script- Run: sudo git clone https://github.com/CosmiCloud/ODNPublish.git && cd ODNPublish && sudo npm install prompts && sudo npm install dkg-client@beta.1 && sudo npm install axios && sudo node publish_adv.js

-----STRESS TESTING-----
Help stress test! Max out your node to see how it performs under pressure. These cronjobs will initiate a publish every 6 seconds. If you have less RAM you can reduce the frequency and bring the demand within your nodes limits. The dbwipe script will start a new db every 2 hours to make sure your node can keep publishing. Feel free to comment it out if you want to hold onto test data.

At least 2cpu and 6gb RAM required. 1 publish every 6 seconds means you will use .2858 test matic per hour. You can fill up easily if you run out here: https://faucet.polygon.technology/. Check out your node wallet to see your publishes onchain.

Run: crontab -e

Paste the following:

* * * * * ( /usr/bin/node /root/ODNPublish/publish.js )
* * * * * ( sleep 6 ; /usr/bin/node /root/ODNPublish/publish.js )
* * * * * ( sleep 12 ; /usr/bin/node /root/ODNPublish/publish.js )
* * * * * ( sleep 18 ; /usr/bin/node /root/ODNPublish/publish.js )
* * * * * ( sleep 24 ; /usr/bin/node /root/ODNPublish/publish.js )
* * * * * ( sleep 30 ; /usr/bin/node /root/ODNPublish/publish.js )
* * * * * ( sleep 36 ; /usr/bin/node /root/ODNPublish/publish.js )
* * * * * ( sleep 42 ; /usr/bin/node /root/ODNPublish/publish.js )
* * * * * ( sleep 48 ; /usr/bin/node /root/ODNPublish/publish.js )
* * * * * ( sleep 54 ; /usr/bin/node /root/ODNPublish/publish.js )
0 */2 * * * /root/ODNPublish/dbwipe.sh