How to create your own BitShares node for better access to the DEX
And bring down your latency to the hundreds or even tens of milliseconds.
This is just a simple guide based on how I did it. Feel free to copy and improve. I'm assuming that you go with default settings and need more than 8GB of RAM. You can probably configure it to use much less.
Find some cheap hardware
You can use most any old computer as long as it supports enough RAM. I use a 7 years old Lenovo X220 laptop with a i5 CPU. You can find one for less than $200.
SSD
60GB should be enough.
Insert RAM
8GB seems to be enough today, but it could change in the future. I would actually test it first with 2-4GB plus a SWAP space, and buy the RAM only if it's too slow.
Install Xubuntu 16.04 LTS
Don't use newer versions unless you want problems with compiling bitshares-core. You can find all necessary instructions on the Xubuntu website.
Make sure your time is synchronized by typing: timedatectl status
in the command line. Observe the output.
Update the operating system.
Compile bitshares-core
The software and instructions are in the GitHub repository. I won't copy-paste here as they might change, and it's better to read instructions from their original source in any case.
The correct steps can be found under "Getting Started". You can create a folder for the purpose or just do it directly in your home folder.
After running the software and letting it sync the blockchain, you terminate it by typing ctrl + c
in the terminal where it is running. It will take a minute to shut down gracefully. Then go on to edit the config file in witness_node_data_dir/config.ini
. nano witness_node_data_dir/config.ini
should do the trick. If you don't know how to use nano, feel free to ask for guidance in some chat. Change the line with rpc-endpoint
to look like this: rpc-endpoint = 0.0.0.1:8090
. This exposes the node to your LAN (and any other network too).
Start the node software again just like before.
Take note of the computers ip-address. You can see it in Xubuntu by clicking the LAN (of WLAN) icon, then Connection Information.
If you know how to do it, make your ip-address static, so that it doesn't change every time you reboot.
Add your personal node to the node list in the BitShares client.
Go to settings -> Access. Click the blue Add Node. Type in ws://192.168.1.123
but with the correct ip-address. Make sure there's only on 's' in the 'ws', unless you know how to create a secure connection.
You don't need to keep the node running
Of course if you use BitShares always in the same location, keeping the node running will let you connect to it at any time. But shutting it down for a while is no problem at all. It even appears to work if you put the laptop on standby and open it up again in another network. I have used it even by connecting it to an Android hotspot simultaneously with another computer.
Configure to use less or more RAM.
The Wiki contains a guide on how to reduce memory usage. You can also use it to make the software follow only your accounts, and then make it remember 100x more or your transactions. I haven't succeeded at it yet though.
Nice! Is there any guide for Windows?
What size is the blockchain download?
The Blockchain directory appears to be 14.3GB at the moment. However I don't know if it downloads the same amount.
Thanks, always good to have good tuto for BTS !
Great info and easy to follow but I was wondering where the max is:
What are the specs of some of the full nodes? Like in Hongkong? That one was fast even when carnage broke out and I couldn't connect to any node in Europe!
Max what?
Are you looking to make a public node? If you make a node just for yourself, specs won't matter much.
Yes, a public node. Basically I'm asking how to make money with BitShares because I love it and I want to support it here in Prague.
Technical support for making a public node can be found on Telegram, but you need to make money by other means. Here are some ideas:
Can you explain your 5th point? To open a market you need to have a coin or asset right? or is there something I am missing?
Yes. Rather than having the coins you have gather dust, you can provide liquidity with them. There's a group dedicated to just that.
Thx
Thats a useful tutorial, thanks buddy
good tuto
i wanna try it