Экосистемы
December 7, 2021

Moonbeam | Testnet (EN)

Let's Node!

⠀Moonbeam is a developer-oriented blockchain that strives to provide compatibility with the existing Ethereum developer toolchain and network.


Content


Information about the project

To the content

Description

⠀Moonbeam is a developer-oriented blockchain that strives to provide compatibility with the existing Ethereum developer toolchain and network.

⠀It does this by providing:

  • A full EVM implementation;
  • A Web3-compatible API
  • Bridges that connect Moonbeam to existing Ethereum networks.

⠀This allows developers to deploy existing Solidity smart contracts and DApp frontends to Moonbeam with minimal changes.


Server requirements

To the content

Minimal (VPS/VDS/DS):
8 CPU, 16 GB RAM, 250 GB SSD, Ubuntu 20.04

⠀As the network grows, the server requirements will increase too.


Launching

To the content

⠀Perform all actions as root user. Each subsection is a separate type of installation, you have to select one of them.

Linux (manually)

For beginners

⠀Update packages

sudo apt update && sudo apt upgrade -y

⠀Install the required packages

sudo apt install wget jq bc build-essential -y

⠀Install Docker

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/installers/docker.sh)

⠀Create a directory in which a data will be stored

mkdir -p $HOME/.moonbase-alpha

⠀Assign rights to use the directory

sudo chown -R $(id -u):$(id -g) $HOME/.moonbase-alpha

⠀Come up with a node moniker, run a command and enter the moniker, thereby adding it to the system as a variable

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n moonbeam_moniker

Collator (validator)

⠀Run a container with a collator node

docker run -dit --name moonbeam_node --restart always --network host -v $HOME/.moonbase-alpha:/data -u $(id -u ${USER}):$(id -g ${USER}) purestake/moonbeam \
  --base-path /data \
  --chain alphanet \
  --name "$moonbeam_moniker" \
  --validator \
  --execution wasm \
  --wasm-execution compiled \
  --pruning archive \
  --state-cache-size 1 \
  --db-cache `bc <<< "$(cat /proc/meminfo | awk 'NR == 1 {print $2}')/2024"` \
  -- \
  --execution wasm \
  --pruning archive \
  --name "$moonbeam_moniker (Embedded Relay)"

Full node

⠀Run a container with a full node

docker run -dit --name moonbeam_node --restart always --network host -v $HOME/.moonbase-alpha:/data -u $(id -u ${USER}):$(id -g ${USER}) purestake/moonbeam \
  --base-path /data \
  --chain alphanet \
  --name "$moonbeam_moniker" \
  --execution wasm \
  --wasm-execution compiled \
  --pruning archive \
  --state-cache-size 1 \
  --db-cache `bc <<< "$(cat /proc/meminfo | awk 'NR == 1 {print $2}')/2024"` \
  -- \
  --execution wasm \
  --pruning archive \
  --name "$moonbeam_moniker (Embedded Relay)"

Continued

⠀Add commands to the system as aliases:

  • To view the log of the node;
  • To view the information about the node.
. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n moonbeam_log -v "docker logs moonbeam_node -fn 100" -a
. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n moonbeam_node_info -v ". <(wget -qO- https://raw.githubusercontent.com/SecorD0/Moonbeam/main/node_info.sh) 2> /dev/null" -a

⠀Make sure that the node launched and started to synchronize

moonbeam_log

Linux (automatically)

For advanced

Collator (validator)

⠀Run the script, enter a node moniker and wait till the installation is done

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/Moonbeam/main/multi_tool.sh)

Full node

⠀Run the script, enter a node moniker and wait till the installation is done

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/Moonbeam/main/multi_tool.sh) -fn


Information about a node

To the content

Command Line Interface

⠀Add a command to view information about the node in the system as an alias

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n moonbeam_node_info -v ". <(wget -qO- https://raw.githubusercontent.com/SecorD0/Moonbeam/main/node_info.sh) 2> /dev/null" -a

⠀View information about the node

moonbeam_node_info

Browser

⠀Information about a node, such as the current height, can be obtained from the Polkadot telemetry website by starting to type node moniker on the keyboard.


Updating

To the content

Manually

⠀Update the image

docker pull purestake/moonbeam

⠀Stop the node

docker stop moonbeam_node

⠀Remove a container with the node

docker rm moonbeam_node

Collator (validator)

⠀Run a container with a collator node

docker run -dit --name moonbeam_node --restart always --network host -v $HOME/.moonbase-alpha:/data -u $(id -u ${USER}):$(id -g ${USER}) purestake/moonbeam \
  --base-path /data \
  --chain alphanet \
  --name "$moonbeam_moniker" \
  --validator \
  --execution wasm \
  --wasm-execution compiled \
  --pruning archive \
  --state-cache-size 1 \
  -- \
  --pruning archive \
  --name "$moonbeam_moniker (Embedded Relay)"

Full node

⠀Run a container with a full node

docker run -dit --name moonbeam_node --restart always --network host -v $HOME/.moonbase-alpha:/data -u $(id -u ${USER}):$(id -g ${USER}) purestake/moonbeam \
  --base-path /data \
  --chain alphanet \
  --name "$moonbeam_moniker" \
  --execution wasm \
  --wasm-execution compiled \
  --pruning archive \
  --state-cache-size 1 \
  -- \
  --pruning archive \
  --name "$moonbeam_moniker (Embedded Relay)"

Automatically

⠀Run the script and wait till the updating is done

. <(wget -qO- https://raw.githubusercontent.com/SecorD0/Moonbeam/main/multi_tool.sh) -u


Community contribution

To the content

Our team is not responsible for any possible negative consequences, as we cannot guarantee the safety of the tools presented

How to get here?

⠀To get into this honorable section, you should write a message to SecorD with information about the tool:

  • Project name;
  • A short title in 2-3 words (to be used as a headline);
  • Description to be added to the article (what it's for, functionality, how to use it, other useful information, preferably with screenshots).

⠀What does it give?

  • Benefits to the community;
  • Opportunity to make a statement;
  • An additional opportunity to present evidence of the contribution in various projects.

Useful commands

To the content

⠀Available variables (remove echo while using)

echo $moonbeam_moniker

⠀To view the node's log

moonbeam_log
docker logs moonbeam_node -fn 100

⠀To view the information about the node

moonbeam_node_info
. <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/miscellaneous/insert_variable.sh) -n moonbeam_node_info -v ". <(wget -qO- https://raw.githubusercontent.com/SecorD0/Moonbeam/main/node_info.sh) 2> /dev/null" -a

⠀To restart the node

docker restart moonbeam_node

Useful links

To the content

Official WebSite | Official Telegram group

Discord | Twitter | Reddit | GitHub

Official documentation | Телеметрия


Acknowledgments

To the content

To everyone from the «Community contribution» section

Let’s Node! Team — studying the project, writing the article

Express your gratitude