Blocknet service nodes setup


#262

life.is.too.shor (Discord): ?


#263

Fattox (Discord): does the fee add to the amount you want to send if you uncheck "substract fee from total"
Yes, like it says… if you check it, the fee will come off the total (of the amount you tell it to send)


#264

Fattox (Discord): If you don’t check it, then the fee is added to the total sent, EG for sending 1 BLOCK


#265

Fattox (Discord): you can try zero fee but if the network is busy it might not go through and would come back eventually as failed (as far as i’m aware) but i’ve never to date had a zero-fee transaction fail, since the network isn’t that busy


#266

bisky (Discord): did canibulls question get answered?


#267

86b (Discord): Yes <@399251519976898570> - encrypting snode supported wallets is not required


#268

hanniabu (Discord): #faq


#269

Fattox (Discord): Since a few people asked me, here’s a basic node check/script instruction from the perspective of the ‘root’ user.
Just adjust paths as necessary, if you’re using another login than ‘root’.

  1. In your terminal on your VPS (Linux) type vi ~/check-nodes.sh and press Enter.
  2. Press “Insert” to enter insert-mode (should appear in the bottom left) then paste the script contents:
#!/bin/bash

if ./block/bin/blocknetdx-cli servicenode status | grep success &> /dev/null; then
    exit # Node working.
else # Node not working - restart it.
    ./block/bin/blocknetdx-cli stop
    sleep 10
    killall -9 blocknetdxd
    sleep 5
    ./block/bin/blocknetdxd &
    date >> /var/log/check-nodes.log
    echo "Node restarted" >> /var/log/check-nodes.log
fi

Note - You will need to check and adjust the above paths to match your own location of your blocknet files.
/block/bin/ is just what i use…

  1. Press “Escape” to exit insert-mode.
  2. Type :wq (should appear in the bottom left) and press Enter, to save and exit the file.
  3. Back in the terminal, type chmod +x ~/check-nodes.sh to make the script executable.
  4. Type crontab -e and press Enter… choose the option for ‘vi (basic)’ if it asks.
  5. Press Insert, scroll to the end of the file, and paste in a run-time plus the path to your script, above example being:
    */5 * * * * /root/check-nodes.sh
    … which runs the check every 5 minutes.
  6. You can run the script with ~/check-nodes.sh to see if it works.

Obviously i can’t account for every single different VPS, config, environment. So if you want to use this there may be some experimentation and editing required on your part! :wink:


#270

Fattox (Discord): If i made any typos/errors above someone feel free to let me know, i wrote it up in haste since 3 people PM’d me at once about it. <:fuggg:478360057122390016>


#271

ishkb1 (Discord): <@181639123306545152> it is also on my to do list to add this code to the block-node website where all other bash code is also already available if you are ok with that?


#272

Fattox (Discord): yeah use however you like


#273

Fattox (Discord): that was just something i whipped up, can probably be done a better way


#274

ishkb1 (Discord): possibly but the idea is welcome and needed. So one way or another needed:)


#275

life.is.too.shor (Discord): Error opening block database.

Do you want to rebuild the block database now?


#276

life.is.too.shor (Discord): how do you say “yes”


#277

life.is.too.shor (Discord): figured it out


#278

life.is.too.shor (Discord): ./blocknetdxd -reindex


#279

life.is.too.shor (Discord): posting for my own future reference


#280

life.is.too.shor (Discord): <@408290925576585218> where is bash code on blode node info?


#281

life.is.too.shor (Discord): For those trying to install Fattox’s script as a non root user this is what worked for me:

change everywhere it says /block/bin to /blocknetdx-3.9.22/bin
just change the 3.9.22 your version
and the where is says root replace with /home/<username>
to check the log type cd /var/log
then ls
then cat /var/log/check-nodes.log
it will only show something under log if there was a restart