Author Topic: Litecoin Supernodes'  (Read 16650 times)

Offline losh11

  • Litecoin Association Member
  • Sr. Member
  • ***
  • Posts: 1265
  • Litecoin is Platinum Isotope 190 to Bitcoin's Gold
    • Bitch, here's my site.
Re: Litecoin Supernodes'
« Reply #45 on: February 09, 2015, 01:16:34 PM »
Just curious, does a high number of supernodes make clients sync faster? Litecoin is syncing WAY faster than Bitcoin, Doge, Via. I sync my wallets every day, but Litecoin is ready after just 30 seconds orso.

I believe that Bitcoin transactions are slightly larger in size.
Also probably because there are a lot more clients connected to the blockchain that is trying to sync.

Offline v3ra1ynn

  • Jr. Member
  • **
  • Posts: 58
Re: Litecoin Supernodes'
« Reply #46 on: February 09, 2015, 07:56:11 PM »
Just curious, does a high number of supernodes make clients sync faster? Litecoin is syncing WAY faster than Bitcoin, Doge, Via. I sync my wallets every day, but Litecoin is ready after just 30 seconds orso.

I believe that Bitcoin transactions are slightly larger in size.
Also probably because there are a lot more clients connected to the blockchain that is trying to sync.

That and Bitcoin has a lot more total transactions.

Offline Mr Fusion

  • Jr. Member
  • **
  • Posts: 107
Re: Litecoin Supernodes'
« Reply #47 on: February 09, 2015, 10:44:36 PM »
But Doge is also very very slow syncing...

Offline losh11

  • Litecoin Association Member
  • Sr. Member
  • ***
  • Posts: 1265
  • Litecoin is Platinum Isotope 190 to Bitcoin's Gold
    • Bitch, here's my site.
Re: Litecoin Supernodes'
« Reply #48 on: February 10, 2015, 01:12:54 PM »
But Doge is also very very slow syncing...

That's most probably due to the very small number of supernodes and a high number of clients attempting to connecting to the network.

Offline AmDD

  • Full Member
  • ***
  • Posts: 486
  • I like coins
Re: Litecoin Supernodes'
« Reply #49 on: February 12, 2015, 11:31:51 PM »
So I had a thought but before I go and put forth the effort, I assume this wouldnt work so well on a normal residential internet connection. One where everytime the power goes out you get assigned a different IP address, correct?

Offline losh11

  • Litecoin Association Member
  • Sr. Member
  • ***
  • Posts: 1265
  • Litecoin is Platinum Isotope 190 to Bitcoin's Gold
    • Bitch, here's my site.
Re: Litecoin Supernodes'
« Reply #50 on: February 12, 2015, 11:57:04 PM »
So I had a thought but before I go and put forth the effort, I assume this wouldnt work so well on a normal residential internet connection. One where everytime the power goes out you get assigned a different IP address, correct?

Depends, some internet providers assign you static IPs, but most do give you dynamic (changing) IP addresses. I think as long as you are willing to give up around 1mbps upload speed, then it should be fine.

What I am trying to do is create a one line command, in which you copy and paste one line of data to start the server. It should save you time and make it easier for people like you to test if you can run it. I currently do have the script up on GitHub, but haven't had the time to test it. If all goes well, I should have it tested by Saturday. I should also probably have a working Windows script you can use by Sunday, but due to my horrible experience with windows cmd and other terminals, it might take a bit longer.

Offline AmDD

  • Full Member
  • ***
  • Posts: 486
  • I like coins
Re: Litecoin Supernodes'
« Reply #51 on: February 13, 2015, 12:42:34 AM »
So I had a thought but before I go and put forth the effort, I assume this wouldnt work so well on a normal residential internet connection. One where everytime the power goes out you get assigned a different IP address, correct?

Depends, some internet providers assign you static IPs, but most do give you dynamic (changing) IP addresses. I think as long as you are willing to give up around 1mbps upload speed, then it should be fine.

What I am trying to do is create a one line command, in which you copy and paste one line of data to start the server. It should save you time and make it easier for people like you to test if you can run it. I currently do have the script up on GitHub, but haven't had the time to test it. If all goes well, I should have it tested by Saturday. I should also probably have a working Windows script you can use by Sunday, but due to my horrible experience with windows cmd and other terminals, it might take a bit longer.

Should be fine with a static IP or either?

I've got an old desktop setup with Ubuntu, installed litecoin and forwarded the port on the router, I've got 16 active connections at the moment so that tells me it's working.

Offline losh11

  • Litecoin Association Member
  • Sr. Member
  • ***
  • Posts: 1265
  • Litecoin is Platinum Isotope 190 to Bitcoin's Gold
    • Bitch, here's my site.
Re: Litecoin Supernodes'
« Reply #52 on: February 13, 2015, 01:06:34 AM »

Should be fine with a static IP or either?

I've got an old desktop setup with Ubuntu, installed litecoin and forwarded the port on the router, I've got 16 active connections at the moment so that tells me it's working.

Great! It doesn't really matter if you have a dynamic ip connection.
The thing is that if anyone has actually checked what open connections that Litecoin-QT usually uses, they might have noticed that it would usually be something like this: 192.168.0.1:50720
It does use random unused/assigned ports, so it still works.
You can actually check how many clients are connected to you, that are not full nodes, this is done by typing "getpeerinfo" into the console, which should return all clients with and without port 9333 forwarded, the ones which don't are most probably normal clients.

Point is, yeah, dynamic IPs are fine for hosting full nodes.
« Last Edit: February 19, 2015, 01:06:21 AM by losh11 »

Offline losh11

  • Litecoin Association Member
  • Sr. Member
  • ***
  • Posts: 1265
  • Litecoin is Platinum Isotope 190 to Bitcoin's Gold
    • Bitch, here's my site.
Re: Litecoin Supernodes'
« Reply #53 on: February 19, 2015, 01:07:23 AM »
Just added the one line code that works on Debian distros (e.g. ubuntu...)

ONE line code - make sure you are logged in as root (type 'sudo su' first)
confirmed to work on Ubuntu 14.04 LTS and Amazon's latest Linux distro.

Code: [Select]
wget https://raw.githubusercontent.com/losh11/Supernode-One-Liners/master/UNIX.sh ; bash UNIX.sh

Please test this out and confirm if it works.
« Last Edit: February 19, 2015, 03:16:11 PM by losh11 »

Offline crazik

  • Administrator
  • Sr. Member
  • *****
  • Posts: 606
    • great humour zone
Re: Litecoin Supernodes'
« Reply #54 on: February 19, 2015, 06:48:08 AM »
Just added the one line code that works on Debian distros (e.g. ubuntu...)

ONE line code - make sure you are logged in as root (type 'sudo su' first)
confirmed to work on Ubuntu 14.04 LTS and Amazon's latest Linux distro.

Code: [Select]
wget https://raw.githubusercontent.com/losh11/Supernode-One-Liners/master/UNIX.sh ; sudo bash UNIX.sh

Please test this out and confirm if it works.

losh: If you are root, then you don't need to run 'sudo bash'....
btw: I strongly advice to do NOT launch any commandlines from internet, before checking what is inside...

Offline losh11

  • Litecoin Association Member
  • Sr. Member
  • ***
  • Posts: 1265
  • Litecoin is Platinum Isotope 190 to Bitcoin's Gold
    • Bitch, here's my site.
Re: Litecoin Supernodes'
« Reply #55 on: February 19, 2015, 03:10:01 PM »
losh: If you are root, then you don't need to run 'sudo bash'....
btw: I strongly advice to do NOT launch any commandlines from internet, before checking what is inside...

True, just quickly wrote that at 3:00am, didn't really look.

If anyone is wondering what is in that script, you just have to copy and paste that github link into your prefered web browser.
Or just click on this hyperlink:- https://raw.githubusercontent.com/losh11/Supernode-One-Liners/master/UNIX.sh
The most suspicious thing in the script is probably the web server that bootstrap.dat is being downloaded from, but that is an old link from litecoin.info. I was trying to use the actual torrent, but rtorrent is horrible with magnet links, and it seemed like the links weren't working. Might just be me, but I am trying to get it resolved.

Also more features coming up, like a web server which shows details about your node (you do have the choice to disable it).

And for the lazy ones, here is the actual current code:-

Code: [Select]
#!/bin/bash
echo "logging in..."
echo "updating server"
apt-get update -y
apt-get upgrade -y
echo "getting front-side package for iptable"
apt-get install ufw -y
echo "If asked yes or no, please reply with 'yes' (most probably a 'y' should do)"
ufw enable allow ssh
ufw allow ssh
echo "allowed ssh access"
ufw allow 9333/tcp
echo "allowed port 9333 (required to run a supernode)"
iptables -A INPUT -p tcp --syn --dport 9333 -m connlimit --connlimit-above 8 --connlimit-mask 24 -j REJECT --reject-with tcp-reset
iptables -A INPUT -p tcp --syn --dport 9333 -m connlimit --connlimit-above 2 -j REJECT --reject-with tcp-reset
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 9333 -j ACCEPT
echo "created rules to protect from DDoS attacks"
wget https://download.litecoin.org/litecoin-0.8.7.5/linux/litecoin-0.8.7.5-linux.tar.xz
echo "downloaded litecoin 0.8.7.5"
tar xvfJ litecoin-0.8.7.5-linux.tar.xz
cd litecoin-0.8.7.5-linux/bin/64
mkdir /root/.litecoin
# echo "downloading BitTorrent Sync for bootstrap"
# echo "cd ~/watch || exit    # set your watch directory here" >> magnet.sh
# echo "[[ "$1" =~ xt=urn:btih:([^&/]+) ]] || exit" >> magnet.sh
# echo "echo "d10:magnet-uri${#1}:${1}e" > "meta-${BASH_REMATCH[1]}.torrent"" >> magnet.sh
# echo "xmessage -nearmouse 'torrent added to rtorrent'" >> magnet.sh
# chmod 0755 magnet.sh
# ./magnet.sh "magnet:?xt=urn:btih:FCC23B19F4BF15E77AB668900C2B82523CC9872A"
echo "downloading bootstrap.dat making the block sync faster."
wget http://192.3.159.171/files/bootstrap/bootstrap.dat.xz -P /root/.litecoin/
cd /root/.litecoin/
rm /bootstrap.dat.xz
echo "extracted bootstrap.dat"
echo "begining to modify litecoin.conf"
echo "creating random username and password for rpc"
rpcusername=`< /dev/urandom tr -dc A-Za-z0-9 | head -c30`
rpcpass=`< /dev/urandom tr -dc A-Za-z0-9 | head -c30`
echo "rpcuser=$rpcusername" >> /root/.litecoin/litecoin.conf
echo "rpcpassword=$rpcpass" >> /root/.litecoin/litecoin.conf
echo "sucessful username and passcode creation"
echo "just adding some extra things..."
echo "addnode=ltc.lurkmore.com" >> /root/.litecoin/litecoin.conf
echo "daemon=1" >> /root/.litecoin/litecoin.conf
echo "disablewallet=1" >> /root/.litecoin/litecoin.conf
echo "maxconnections=150" >> /root/.litecoin/litecoin.conf
echo "litecoin.conf has been modified"
echo "attempting to start server"
# sudo bash
# cd litecoin-0.8.7.5-linux/bin/64
# ./litecoind -reindex
find / -iname litecoind -exec cp {} /usr \;
cd /usr
./litecoind -reindex
echo "************************************************************************************************************************************************************************************************************************************"
echo " "
echo " "
echo " "
echo "If you can't enter more commands, press the return/enter key."
echo "Congrats on running a Litecoin Supernode using losh11's one-line script! If you had encountered any issues during this process, please contact me on GitHub."
echo "Please remember that the litecoind client is being ran from '/etc/' and not from your home/root directory."
echo "Most of the solutions to your technical problems can be solved by entering the command 'sudo su' - giving yourself administrator rights - and running this script again by typing 'sudo bash UNIX.sh'"
echo "You can find my GitHub account at:- https://github.com/losh11"
echo " "
echo " "
echo " "
echo "************************************************************************************************************************************************************************************************************************************"

Offline crazik

  • Administrator
  • Sr. Member
  • *****
  • Posts: 606
    • great humour zone
Re: Litecoin Supernodes'
« Reply #56 on: February 19, 2015, 03:43:51 PM »
Thank you losh11 :)
p.s.
That wasn't a personal thing, but a general rule (about not launching directly commands), so no offence :)

Offline losh11

  • Litecoin Association Member
  • Sr. Member
  • ***
  • Posts: 1265
  • Litecoin is Platinum Isotope 190 to Bitcoin's Gold
    • Bitch, here's my site.
Re: Litecoin Supernodes'
« Reply #57 on: February 19, 2015, 05:02:14 PM »
Thank you losh11 :)
p.s.
That wasn't a personal thing, but a general rule (about not launching directly commands), so no offence :)

Yeah, I knew what you meant.
People in the crypto world should really be careful about running scripts in root, especially if they don't know what it has in it.

Offline LitecoinNode

  • Newbie
  • *
  • Posts: 5
Re: Litecoin Supernodes'
« Reply #58 on: February 27, 2015, 10:08:14 PM »
I had some free time and was inspired by losh11's post so I made a small project for this! Here is what I came up with so far.

http://litecoinnode.org/
Project website. Small and simple but does the job.

https://github.com/LitecoinNode/DeploymentScripts/
A GitHub repository with an "improved" version of the deployment script Losh11 made at the top of this post. Currently tested on Ubuntu 14.04 LTS. Testers for other distributions are welcome!

Here is how to deploy a node. Run this as root. Please review the code before running it so you know what you are doing!

Code: [Select]
wget https://raw.githubusercontent.com/LitecoinNode/DeploymentScripts/master/ubuntu-setup.sh -P /root/ ; bash /root/ubuntu-setup.sh 2>&1 | tee /root/nodesetup.log
Here is the status page of a node deployed with the above script.
http://apple.litecoinnode.org/

If I have more time I will try to make deployment scripts for other platforms and distributions as well.

Feedback, help and comments are welcome!

Offline kyrio

  • Litecoin Association Member
  • Full Member
  • ***
  • Posts: 434
  • lurkmore
    • intern3ts
Re: Litecoin Supernodes'
« Reply #59 on: February 27, 2015, 10:33:51 PM »
Anyone running his client will seed the network; the point of a supernode is to be able to quickly seed the network to many users rather than just a maximum of eight users. Running a supernode on a low speed home connection won't really help the network, so keep that in mind. If you have a VPS or server with free resources, running the Litecoin client will be very helpful. By default the client will connect to a maximum of 250 (I believe that's the number) others as long as the port is open (setting the number higher in the config, to 400, would be even better).

TL;DR: if you want to help the network, just keep your Litecoin client running all the time, but if you have a VPS or server with extra RAM and HDD, run the client and make sure the port is open/not blocked by iptables or whatever else.