diff --git a/docs/node/initial.mdx b/docs/node/initial.mdx deleted file mode 100644 index a263870aa..000000000 --- a/docs/node/initial.mdx +++ /dev/null @@ -1,274 +0,0 @@ ---- -id: initial -sidebar_label: Initial node runners ---- - -# Installing an Initial Node - -Congratulations ! -If your address has non-zero initial rolls [in this listing](https://github.com/Massa-Foundation/genesis-ledger/blob/main/node_initial_setup/initial_rolls.json) -then you are among the happy initial node runners that were chosen to support the mainnet from day zero. - -This means that you will be running a node BEFORE the planned genesis that will happen January 15th, which implies that: -* your node needs to be set up as soon as possible, at most on January 14th -* there are no blocks before genesis, so no operations/transactions, and therefore no roll buys / roll sells. This means that the setup procedure is just slightly different compared to testnet. -* only initial node runners like you will be present, so you will most likely have a lot of block production and rewards - -## Requirements - -You need to have a wallet for which the address has non-zero coins here [in this listing](https://github.com/Massa-Foundation/genesis-ledger/blob/main/node_initial_setup/initial_rolls.json). -You will be using this wallet. - -You need a computer with 8 cores, 16 GB RAM, 1TB disk and a decent internet connection. -More info in the [FAQ](/docs/node/faq). - -## Step 1: Installation - -### Installing from binaries (simple installation) - -If you just wish to run a Massa node without compiling it yourself, you can simply download the latest binary below: - -- [Windows executable](https://github.com/massalabs/massa/releases/download/MAIN.2.0/massa_MAIN.2.0_release_windows.zip) -- [Linux binary](https://github.com/massalabs/massa/releases/download/MAIN.2.0/massa_MAIN.2.0_release_linux.tar.gz) - -only works with libc2.28 and higher (for example Ubuntu 20.04 and higher) -- [MacOS binary](https://github.com/massalabs/massa/releases/download/MAIN.2.0/massa_MAIN.2.0_release_macos_aarch64.tar.gz) -- Other binaries can be found on https://github.com/massalabs/massa/releases/tag/MAIN.2.0 - -### Installing from source code (advanced installation) - -Otherwise, if you wish to run a Massa node from source code, here are the steps to follow: - -#### On Ubuntu / MacOS - -- on Ubuntu, these libs must be installed: ```sudo apt install pkg-config curl git build-essential libssl-dev libclang-dev cmake``` -- on MacOS: ```brew install llvm cmake``` -- install [rustup](https://www.rust-lang.org/tools/install): ```curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh``` -- configure path: ```source $HOME/.cargo/env``` -- check rust version: ```rustc --version``` -- install rust stable version: ```rustup toolchain install 1.74.1``` -- set it as default: ```rustup default 1.74.1``` -- check rust version: ```rustc --version``` -- clone this repo: ```git clone https://github.com/massalabs/massa.git``` - -#### On Windows - -**Set up your Rust environment**: -- On Windows, you should first follow the indications from Microsoft to be able to run on a Rust environment [here](https://docs.microsoft.com/en-gb/windows/dev-environment/rust/setup). - - Install Visual Studio (recommended) or the Microsoft C++ Build Tools. - - Once Visual Studio is installed, click on C++ Build Tool. Select on the right column called "installation details" the following packages: - - MSCV v142 -- VS 2019 - - Windows 10 SDK - - C++ CMake tools for Windows - - Testing Tools Core Feature - - Click install on the bottom right to download and install those packages -- Install NASM: https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/ choose win32 or win64 folder depending on your architecture and download then launch the installer. -- Install Chocolatey and run: ```choco install llvm cmake``` -- Install Rust, to be downloaded [here](https://www.rust-lang.org/tools/install) -- Install Git for windows, to be downloaded [here](https://git-scm.com/download/win) - -**Clone the Massa Git Repository**: -- Open Windows Power Shell - - Clone the latest distributed version: ```git clone https://github.com/massalabs/massa.git``` - - Change default Rust to the following stable version: ```rustup default 1.74.1``` - -## Step 2: Configuration - -Now that your node is installed, you need to configure it. - -### Routability - -Please configure your node as indicated [here](routability#how-to-make-your-node-routable). - -Without it, your node will be unstable through lack of connectivity. - -## Step 3: Launch your node - -### If your node was installed from binaries (simple installation) - -Simply run the binaries you downloaded in the previous step: - -- Open the massa-node folder and run the massa-node executable -- Open the massa-client folder and run the massa-client executable - -#### On Ubuntu / MacOS - -**Start the node** - -In a first window: - -```shell -cd massa/massa-node/ -``` - -Launch the node, on Ubuntu: - -```shell -./massa-node -p <PASSWORD> |& tee logs.txt -``` - -Replace `<PASSWORD>` with a password that you will need to keep to restart your node. You should leave the window open. - -**Start the client** - -In a second window: - -```shell -cd massa/massa-client/ -``` - -Then: - -```shell -./massa-client -p <PASSWORD> -``` - -Replace `<PASSWORD>` with a password that you will need to keep to restart your client - -### If your node was installed from source code (advanced installation) - -#### On Ubuntu / MacOS - -**Start the node** - -In a first window: - -```shell -cd massa/massa-node/ -``` - -Launch the node, on Ubuntu: - -```shell -RUST_BACKTRACE=full cargo run --release -- -p <PASSWORD> |& tee logs.txt -``` - -Replace `<PASSWORD>` with a password that you will need to keep to restart your node - -Or, on MacOS: - -```shell -RUST_BACKTRACE=full cargo run --release -- -p <PASSWORD> > logs.txt 2>&1 -``` - -Replace `<PASSWORD>` with a password that you will need to keep to restart your node. You should leave the window open. - -**Start the client** - -On a second window: - -```shell -cd massa/massa-client/ -``` - -Then: - -```shell -cargo run --release -- -p <PASSWORD> -``` - -Replace `<PASSWORD>` with a password. You will need this password to restart your client. Please wait until the -directories are built before moving to the next step. - -#### On Windows - -**Start the Node** - -- Open Windows Power Shell or Command Prompt on a first window - - Type: ```cd massa``` - - Type: ```cd massa-node``` - - Type: ```cargo run --release -- -p <PASSWORD>``` - -Replace `<PASSWORD>` with a password. You will need this password to restart your node. You should leave the window -opened. - -**Start the Client** - -- Open Windows Power Shell or Command Prompt on a second window - - Type: cd massa - - Type: cd massa-client - - Type: ```cargo run --release -- -p <PASSWORD>``` - -Replace `<PASSWORD>` with a password. You will need this password to restart your client. Please wait until the -directories are built before moving to the next step. - -:::caution - -In case of crash of the Rust compiler or at runtime, please do not report bugs to the rustlang/rust repository, but -[open an issue](https://github.com/massalabs/massa/issues/new/choose) on the Massa repository instead. We will triage -the issues and open them on the Rust side if they are valid. This avoids polluting the main Rust repository with many -reports of the same error. - -::: - -## Step 4: Activating the staking wallet - -Now that your node and client are running, you need to activate the staking wallet matching the one that has initial rolls. - -### Importing your wallet in the client - -You need to provide the wallet that matches your staking address (the one that has initial rolls) to the client. -Any other wallet would result in your node not staking. - -The procedure depends on how you have saved your wallet in the first place. - -#### If you have saved your secret/private key - -Then you can import it in the client using the following command: -```shell -wallet_add_secret_keys <your_secret_key> -``` - -#### If you have saved an encrypted wallet file - -Then you can import it in the client by placing the corresponding `.yaml` file in the `massa/massa-client/wallets` folder. -Make sure it is the only wallet in the folder. - -### Enabling staking on your node - -You now need to tell your node that it needs to stake using your initial staking wallet. - -Get the address that has initial rolls in your wallet: - -```shell -wallet_info -``` - -Register your address so that your node start to stake with it: - -```shell -node_start_staking <your_address> -``` - -To check whether the address is registered for staking, you can run: - -```shell -node_get_staking_addresses -``` - -Now you can leave the node running, and it will start producing blocks just after Genesis! - -## Step 5: Checking your node's status - -### Check your routability status - -You can use a service such as https://portchecker.co to check that the ports 31244 and 31245 are both opened for your public IP address. - -Additionally, in your massa-client, you can check that the `get_status` command shows your `Node's IP: <your_public_ip_address>`. -If it shows `No routable IP set` instead, please check again your configuration. - -### Check your node staking address - -You can check that the staking address you obtain with the following command in massa-client: - -```shell -node_get_staking_addresses -``` - -is present in the initial staker lists, available in `massa/massa-node/base_config/initial_rolls.json`. - -### Make sure you are connected to peers - -In order for your node to be running properly, you have to make sure you are connected to other peers on the network. - -The `get_status` command will show you which nodes you are connected too. -You need to have both IN and OUT connections. diff --git a/sidebars.js b/sidebars.js index fec04ebc3..f19b269b1 100644 --- a/sidebars.js +++ b/sidebars.js @@ -408,11 +408,6 @@ const sidebars = { id: "node/all-configs", label: "Node and client configuration", }, - { - type: "doc", - id: "node/initial", - label: "Initial node runners", - }, { type: "html", value: "<hr/>",