Skip to content

Run a POA node on Windows (Simple)

franssl edited this page Apr 22, 2020 · 26 revisions

Running a POA node on Catalyst in Depth Guide

This is a simplified and visually explained guide for running a node. If you feel confident with installing software and running commands through command prompt please find the the general guide here:

Run a POA node on Windows

NOTE:

If at any point you have issues please check our FAQ which we will be constantly updating: FAQ

If the answers can not be found there then feel free to add a new issue to the repository here: Issues and one of our team members or members of the community will be able to assist you.

Step 1: Software installation.

To begin this process there are three pieces of software that must be installed. These are:

  • .Net Framework
  • Rust
  • MongoDB

We will go through these in turn.

Firstly however we must explain some of the tools we will be using to install the pieces of software.

Some elements of this guide will require the use of the Command Prompt, this comes pre-installed on all Windows distributions. You can find command prompt by using the search bar which is generally found at the bottom of your screen.

alt text

Once opened, the window should look like this:

alt text

Step 1A: Installing .Net SDK

.Net is installed via the link:

.Net Core 3.1 SDK.

Clicking this link should automatically download the SDK needed. If it does not, please click the link as shown in the below photo.

alt text

The .Net SDK can then be installed by double clicking its download icon on the bottom bar:

alt text

CLicking this should bring up an installation screen:

alt text

Proceed through the steps indicated in the the software installation. The installation may at points ask for permission to allow the app to make changes to your computer, if this happens select the yes option. Once the installation is complete select the close option.

Step 1B: Installing Rust

Firstly we must install the C++ build tools for Visual Studio. To do this click on the link:

Build tools for visual studio

Then you must select the option displayed below.

alt text

Rust Download for Windows

This should automatically begin the download of rust. If this does not work, use the link shown here:

alt text

Run the installer once it has downloaded. Several options should be available for the installation. We must select the highlighted option in the below image.

alt text

After this option is checked press install. This installation may take a while. Once it is complete you will be required to restart your PC.

The download for Rust can be found at the link:

Install Rust

Then select the Download Rustup-init.exe (64-bit) as seen in the below image.

alt text

Once the download has completed run the downloaded installation package. This will open your command prompt. This will ask you whether you wish to proceed, continue by typing y and then enter.

alt text

The installation will then ask what kind of install you wish to perform, select option 1 by typing 1 and then enter.

alt text

Once the download is complete the command prompt will look as below, press enter to complete the install.

alt text

Step 1C: Installing MongoDB

Use the following link to download the MongoDB installer:

MongoDB Community Installer

If that does not work use the link:

MongoDB Download Center

Select Windows under the operating system tab and MSI under the package.

alt text

Then open the installer which should open a window that looks like this:

alt text

Follow the links pressing next and accept the End-User License agreement. You will then be asked what kind of download you would like, select complete.

alt text

The installer will ask about Service configuration, leave as default as seen in the below image.

alt text

At the next step the installer will ask if you wish to install MongoDB compass, check the box that says Install MongoDB Compass as seen in the below image and click next.

alt text

On the final box select install, at this point the app may request permissions you must allow these to complete the download. This download may take a while.

Step 1D: Installing Git

Start by downloading the git installer using the following link:

git Installer

The download should automatically start if it does not click the link in the image below.

alt text

Run the installer once the download is complete to bring up a window like below.

alt text

Use the settings in the following images (most are default settings):

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

alt text

Git is now installed on your PC

Step 2: Checking and updating installations.

We must now change some of the settings manually within the applications that we have installed. Furthermore, we'll show steps on how to check that the software has been installed correctly.

All of this step will take place using the command prompt, getting access to this is described at the top of the page.

Firstly we wish to update the settings for Rust that we installed earlier this requires two commands, the first is:

rustup toolchain install nightly

Then click enter, then use:

rustup default nightly

This will update the rust settings. We can now check that we have installed everything correctly. We run each of the following commands in turn.

  • Git - git --version
  • Rust - rust --version
  • .Net - dotnet --version

This will give us an input that looks like:

alt text

If your output looks like this then the software is installed correctly.

Step 3: Cloning the Catalyst Repository

We can now clone the repository that contains the Catalyst project, this is done using the command git clone https://github.com/catalyst-network/Catalyst.git in the command prompt.

The output should look like:

alt text

This means that the repository has been downloaded successfully

Step 4: Update the Repository Sub-Modules

We can now enter the Catalyst repository, this is done with the command cd Catalyst

Catalyst relies on some external submodules that are built into the project, these must be updated and downloaded also, this is done using the command git submodule update --init --recursive --force. The output of which should look like.

alt text

Step 5: Build the Catalyst solution

We can now move into src file in the Catalyst repository, this is where the source code for the project is held. We do this by using cd src on the Command Prompt. Now we can build the solution, this is done by running the command dotnet build Catalyst.sln. The final lines of the output should look like:

alt text

Step 6: Set Node Passwords

Now we can run the node for the first time. During this process we must set 3 passwords for the node:

  • Node Password
  • IPFS Password
  • SSL Certificate Password

First we must change directory again, this time using cd Catalyst.Node.POA.CE from the command prompt. Then we use the command dotnet run. We will fist be asked to create the node password as below.

alt text

Enter your desired password and press enter. The console will then ask for you to provide your IPFS password.

alt text

Once again enter your desired password and press enter. Finally it will ask you to type in a password for your certificate.

alt text

Type in the password you want to set it too and press enter.

The node will now begin to run, however we want to stop it. This is done by pressing ctrl + c

Step 7: Setup Peer ID

Now that the node is no longer running we must set up the node with an identity so it can be communicated with by other nodes.

For this we will require three elements these are:

  • Public Key
  • Internal IP Address
  • External IP Address

Step 7A: Finding the Public Key

To find the Public Key we must access the .catalyst folder that is created when we run a node for the first time. On Windows generally the file path that it is stored in is C:\Users\YourUserNameHere\.catalyst .

Once within this folder, we must retrieve the log file from the first time we ran the node. This file is indicated below.

alt text

On your computer the numbers at the end of the filename may be different. Open this file in notepad, then we want to search the file (crtl +f for the phrase using PublicKey and it should come back with something similar to.

alt text

Copy the public key somewhere safe.

Note: You do not need the *, only the letters and numbers with no space before or after.

Step 7B: Finding the internal IP Address

The internal IP address can be found using the ipconfig command. This will return your IP Address settings. Make note of the entry under IPv4 Address.

Step 7C: Finding the external IP Address

Your external IP address can be found through the website found here External IP Address Finder, make note of the IPv4 Address given.

Step 7D: Editing the Devnet.json file

Within the .catalyst folder we were in to find the Public Key from step 7A is a file called devnet.json. (or just devnet). Open this file in notepad and it will look like this.

alt text

You will need to replace several elements with your details from steps 7 A, B and C.

The element that says "PublicKey": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" should replace the aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa with the Public Key from 7A.

The element that says "BindAddress": "127.0.0.1" should replace the 127.0.0.1 with your internal IP address. This field is in two places, both must be changed

The element that says "PublicIpAddress": "127.0.0.1" should replace the 127.0.0.1 with your external IP address.

Always keep the input values within the quotation marks (" ").

alt text

Save the file and exit.

Step 8: Port-Forwarding

Unfortunately port forwarding varies from router to router so it is not possible to give a definitive guide on how to do this. Generally most routers will have online guides on how to do this. There are three ports that we wish to forward these are:

  • 42076(udp)
  • 42066(tcp)
  • 4001(tcp)
  • 5005(tcp)

The link below contains a large list of routers and guides on how to port forward on then.

Port Forwarding Guides

Many routers will require you to log into the router using the admin password sometimes found on the back of the router.

Step 9: Run the Node

To run the node we must use the command prompt to go into the Catalyst.Node.POA.CE file and run the node again. If your Command prompt is still open from earlier and this is the file that you are in simply use dotnet run --reset. Otherwise open a new Command Prompt window and use the command, cd Catalyst/src/Catalyst.Node.POA.CE and then use dotnet run --reset.

The Node will begin running. To check that the node is running correctly there are three ways to determine this. Firstly go to C:\Users\YourUserNameHere\.catalyst\DFS\blocks , in this folder you should see files being added this is ledger being downloaded.

Secondly go to:

Catalyst Block Explorer

Click Network

alt text

and you should see your node syncing.

The final way to confirm that your node is connected and probably the easiest is by going to the Catalyst Node Dashboard found here:

Catalyst Node Dashboard

And using the public key you made note of in step 7A you should be able to see your node as online

alt text

If you have any issues with any of these steps contact us by making an issue here: Issues and one of our team members or members of the community will be able to assist you.

Clone this wiki locally