Polkadot. Parachains. Moonbeam
I think that each of you has heard about Polkadot, about its parachains, but I often come across the fact that people are limited only by the knowledge of the name of these terms. I would like to provide basic information in the abstract, as well as tell you how you can run your node.
I will try to convey the information in simple words, so if you basically understand what a blockchain is, then everything will be clear to you.
If you are not familiar with the term blockchain at all, then I can advise you to go my way. Start here: https://en.wikipedia.org/wiki/Blockchain As soon as you see a word that is unfamiliar to you, Google it!
So, Polkadot is a blockchain platform that combines other blockchains into a common ecosystem. Within this ecosystem, blockchains can operate with each other: exchange messages, tokens, and share their unique functions, while maintaining overall security, due to the fact that the load on the network is distributed among all blockchains operating within the Polkadot ecosystem.
Globally, the entire ecosystem consists of three different components:
- Parachains. One of the key terms in the Polkadot network. Parachains are exactly the blockchains that work in parallel, in one common Polkadot ecosystem. They solve both their own tasks and the general tasks of the entire chain. Each parachain is usually a blockchain (although not necessarily) that pursues its own goals and objectives. At the same time, it works in the overall Polkadot ecosystem, helping this system to work under any load.
- Relay Chain. It is the center of the entire ecosystem. It ensures the exchange of transactions between the parachains, guarantees the achievement of consensus between them and the overall security of the system.
- Bridges. Blockchain projects that have their own blockchain and for some reason cannot or do not want to transfer it to Polkadot, but want to work within the ecosystem — they can use special bridges for this.
I have briefly described the basic concepts so that you have an idea about the ecosystem as a whole. If you want to learn more here is all the information: https://wiki.polkadot.network/en/
Moonbeam is a blockchain platform for creating smart contracts. Developers can quickly create applications that work with users and assets on remote blockchains, using the compatibility of Moonbeam smart contracts with Ethereum web tools. One of the main features is that any DApp on solidity from the ethereum network can be transferred to the polkadot network. Thus, solidity developers, who are still the majority in the crypto industry at the moment, will be able to easily launch their applications in the polkadot ecosystem, using moonbeam. All this contributes to the development of the entire crypto industry as a whole. You can easily become a participant in this process, to begin with, you run your own node.
Among many validators with experience, you can often find the opinion that it is better for beginners not to do this. Like, they ask stupid questions and can generally ruin the entire network : — D. I strongly disagree with this, because the more nodes are launched, the more decentralization we can achieve and the more people will understand the work of the blockchain from the inside.
I will provide you with a basic FAQ, for beginners. Of course, if you want to do this further, you need to learn the basics of linux. But while we are in the test network — you can experiment as you like =).
So. If you have never encountered the launch of a node, then the first block of information is for you.
1. Register an account www.hetzner.com and create a new project.
As part of the testnet, this configuration will suffice.
You will receive an email with a password to access the server, and while we are waiting for it, we will install the Putty program to connect to the server: https://www.putty.org/
Install and run it. You will see such window:
It’s time to check our e-mail. There will be an IP address, which we will enter in the window that I highlighted in the previous picture.
A black window will open, where you will need to enter login: root, then the password that you received in the email. The password will not be displayed when you enter it — don’t worry, this is a linux security system :-)
After that, you will be asked to enter the password sent to the email again, and then come up with your own and repeat it.
Next, enter the following commands in turn, one at a time, and after each press “ Enter”.
- Install the necessary updates
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install build-essential -y
apt install git -y
apt install fail2ban -y
2. Install the substrate platform and directly compile the moonbeam sources.
git clone https://github.com/PureStake/moonbeam
git checkout tags/$(git tag | tail -1)
curl https://getsubstrate.io -sSf | bash -s -- --fast
Log out and log back in to the server.
cargo build --release
When the process will finish, you’ll see something like this:
Next, we will run the node in systemctl
adduser moonbase_service --system --no-create-home
chmod 0755 /var/lib/alphanet-data
chown moonbase_service /var/lib/alphanet-data
cp ./target/release/moonbeam /var/lib/alphanet-data
Next, create the moonbeam.service file
Copy all this text there, after replacing the nickname with your own in two places <YOUR_USERNAME>:
Description="Moonbase Alpha systemd service"
--parachain-id 1000 \
--port 30333 \
--rpc-port 9933 \
--ws-port 9944 \
--rpc-cors all \
--log rpc=info \
--base-path /var/lib/alphanet-data \
--chain alphanet \
--name "YOUR_USERNAME" \
--port 30334 \
--rpc-port 9934 \
--ws-port 9945 \
This is what it should look like:
Press “Ctrl+x”, “Y”, “Enter”
And now let’s start!
systemctl enable moonbeam.service
systemctl start moonbeam.service
journalctl -f -u moonbeam.service
You’ll see something like this:
The number of peers will increase, the node will synchronize. Now you are the part of Moonbeam!
For more information you can check official docs: https://docs.moonbeam.network/node-operators/networks/full-node/