Building and running Steemd v0.19.0 natively in Windows 10

in #steem7 years ago

Windows 10 has a built-in Windows Subsystem for Linux (WSL). Currently, the subsystem is in beta and Ubuntu based, but in the Fall Creators Update, this will be expanded to SUSE and Fedora. Installing it will be as simple as a single click from the Store. A month ago, I experimented with cli_wallet and discovered it truly works. I used pre-compiled binaries, and only had a chance to test cli_wallet.

Now, with the release candidate of the much anticipated v0.19.0 out, I'm going to attempt running a steemd note natively on Windows 10 from scratch. We'll stay in Windows 10 throughout the complete process. Check out my previous post for instructions to set up WSL and Bash on Ubuntu on Windows. The minimum requirement is Windows 10 1607, but I recommend 1703.

To be clear, I don't expect or recommend anyone to run a full time node on Windows. You'll be best off on Ubuntu 16.04. However, if you use Windows but constantly have to run Steemd in Docker or VM - this is for you. This could indeed be very useful for Windows users and developers who may want to run a script, run cli_wallet, etc.

Building

I'm going to follow the guide exactly as described on GitHub as I would on Ubuntu. I shall install on my Windows C: which is a fast SSD. To do this, you need to simply cd into /mnt/c.

Installed the pre-requisites and cloned Steem without a hitch.

Steem-2.PNG

Building steemd...

Screenshot (7).png

Both steemd and cli_wallet were built without any issues. It took 16:44 (mm:ss) to build steemd on my AMD Ryzen 7 machine. On the same PC inside a VM, it took approximately 19:30. WSL has a clear performance advantage over using a VM here. The RAM usage was also at least 2-3 GB lower.

Configuring steemd

First run on steemd, all good, generates the witness_node_data_dir as expected.

You can edit the config.ini file in Notepad! Or Vim in Bash, if that's your speed. Personally, I use Notepad++. I'll keep the config as default, add seed nodes, but remove account_history. Curiously, the shared-file-size default shows up as 32 GB. That's clearly not enough to run a node with the default config! Unlike on Linux, the whole 32GB was allocated the moment I ran steemd - something to keep an eye out for. (No, I haven't tried using /dev/shm)

Steem-5.PNG

Running steemd

Before running steemd, I downloaded the latest blockchain provided by @gtg at https://gtg.steem.house/get/blockchain/

Copy pasted the block_log file into the blockchain folder using File Explorer, and now it's showdown time.

Steem-6.PNG

Syncing just fine! I neglected to time the sync as I was away for a bit, but the first 10 minutes did feel faster than in a VM. Using a Samsung 960 EVO, the SSD was barely taxed, hovering under the 10% disk usage mark. Instead, the bottleneck was single thread, with steemd pegging just 1 of the 16 threads. You'll notice it's not quite 100%, not sure what that's about. Maybe some learnings from EOS' multi-threaded approach could help speed things up by an order of magnitude here.

Steem-7.PNG

Steem node up and running

I forgot to add the rpc-endpoint to config.ini. I also had to set a custom p2p-endpoint, otherwise it was throwing up " Exception binding outgoing connection to desired local endpoint", which are evidently REUSEPORT errors. With those set, steemd is ready to go!

Steem-8.PNG

Here's proof, folks - the latest version Steem node up and running natively on Windows 10! Needless to say, cli_wallet works just fine too off the local node. Also working are a couple of Python scripts I ran. The only minor hitch is when you close steemd for a while, it takes some time to get synced up again. Certainly more than on a VM. Not sure what that's about - I'll look into that in the future.

Ultimately, there seems to be little difference between running Windows 10 and Ubuntu. I'm sure a native Ubuntu install probably offers better performance, but WSL is definitely faster than running an Ubuntu VM in Windows.

Do note that WSL is still in Beta. It'll leave Beta in the Fall Creators Update releasing in September, at which point installing Ubuntu, Fedora or SUSE would be the matter of a single click in the Windows Store. If you run into issues, feel free to ask here - https://github.com/Microsoft/BashOnWindows/issues

Sort:  

Did you send a STEEMIT wallet?

Not sure what you mean?

cool and thank you for the info

Saving for when I get home - thanks for this :)

Good post!

Where can I find a custom p2p-endpoint? What is a custom p2p endpoint exactly?

That is for seed nodes, so other people can access your node. You can leave that blank in the config file unless you are interested in running a seed node.

How did you install boost1.58 ? Default commands install boost1.54 for me.

How much RAM is it using? I also have an AMD Ryzen 7 machine but only 16GB of RAM. I plan on upgrading it to 32GB soon.

I was using 32 GB RAM. 16 should be fine if you have a fast SSD.

Thanks. I'm using 32GB as well. I did all of the steps but I'm stuck at "Started witness node on a chain with 13xxxx blocks"

Is this normal or am I doing something wrong? I can see steemd is trying to open connections to other nodes when I take a look in the Resources Monitor, and it strangely seems to download a few blocks only altough it doesn't tell when it downloads them. I have opened the port in the router as well.

Thanks for your help.

It does take several hours to several days, depending on what plugins you have enabled, how fast your SSD is etc.

Mine is a Crucial M4 128GB SSD. I only have the Witness plugin enabled as it takes a lot of RAM with the other plugins activated (more than the 32GB I currently have in the system). Well, thanks for letting me know that it will take a few hours or days. Will monitor it to see how it goes.

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63156.23
ETH 2560.33
USDT 1.00
SBD 2.83