From 64bdf04aaa12497f9ab7d7777e01ae9ac8329f99 Mon Sep 17 00:00:00 2001 From: Adrien Date: Sat, 13 Jan 2024 23:04:20 +0100 Subject: [PATCH 1/3] fix link --- docusaurus.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 9544fa9ea..14d8d0f85 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -55,7 +55,7 @@ const config = { sidebarPath: require.resolve("./sidebars.js"), // Please change this to your repo. // Remove this to remove the "edit this page" links. - editUrl: "https://github.com/massalabs/docu-dev/tree/main/", + editUrl: "https://github.com/massalabs/docs/tree/main/", showLastUpdateAuthor: true, showLastUpdateTime: true, remarkPlugins: [math, remarkGridTables], From 37d0a1a51d3160b48899048b95dbdee656f4e6d0 Mon Sep 17 00:00:00 2001 From: Adrien Date: Sat, 13 Jan 2024 23:34:43 +0100 Subject: [PATCH 2/3] fix names --- .../{architecture.drawio.svg => architecture.svg} | 0 docs/learn/architecture/basic-concepts.mdx | 4 ++-- .../{block_parents.drawio.svg => block_parents.svg} | 0 .../architecture/{cliques.drawio.svg => cliques.svg} | 0 ...lity_graph.drawio.svg => incompatibility_graph.svg} | 0 docs/learn/architecture/node-architecture.mdx | 10 +++++----- docs/learn/architecture/operation-lifecycle.mdx | 2 +- ...on_lifecycle.drawio.svg => operation_lifecycle.svg} | 0 .../architecture/{selector.drawio.svg => selector.svg} | 0 .../{structure.drawio.svg => structure.svg} | 0 ...locks_set.drawio.svg => unfinalized_blocks_set.svg} | 0 11 files changed, 8 insertions(+), 8 deletions(-) rename docs/learn/architecture/{architecture.drawio.svg => architecture.svg} (100%) rename docs/learn/architecture/{block_parents.drawio.svg => block_parents.svg} (100%) rename docs/learn/architecture/{cliques.drawio.svg => cliques.svg} (100%) rename docs/learn/architecture/{incompatibility_graph.drawio.svg => incompatibility_graph.svg} (100%) rename docs/learn/architecture/{operation_lifecycle.drawio.svg => operation_lifecycle.svg} (100%) rename docs/learn/architecture/{selector.drawio.svg => selector.svg} (100%) rename docs/learn/architecture/{structure.drawio.svg => structure.svg} (100%) rename docs/learn/architecture/{unfinalized_blocks_set.drawio.svg => unfinalized_blocks_set.svg} (100%) diff --git a/docs/learn/architecture/architecture.drawio.svg b/docs/learn/architecture/architecture.svg similarity index 100% rename from docs/learn/architecture/architecture.drawio.svg rename to docs/learn/architecture/architecture.svg diff --git a/docs/learn/architecture/basic-concepts.mdx b/docs/learn/architecture/basic-concepts.mdx index 24ca015d9..40d1ad5a0 100644 --- a/docs/learn/architecture/basic-concepts.mdx +++ b/docs/learn/architecture/basic-concepts.mdx @@ -22,7 +22,7 @@ enabling parallelization and improved block-creation performance. Instead of one chain, there are exactly 32 **threads** of chains running in parallel, with blocks equally spread on each thread over time, and stored inside **slots** that are spaced at fixed time intervals: -![](structure.drawio.svg) +![](structure.svg) The time between two slots located on the same thread is called a **period** and lasts 16s (conventionally called $t_0$). Corresponding slots in threads are slightly shifted in time relative to one another, by one period divided by the number @@ -41,7 +41,7 @@ In traditional blockchains, blocks are simply referencing their unique parent, f Massa, each block is referencing one parent block in each thread (so, 32 parents). Here is an example illustrated with one particular block: -![](block_parents.drawio.svg) +![](block_parents.svg) Let’s introduce some relevant definitions and concepts generally necessary to understand how the Massa network operates. We will then explain the node architecture and how the whole system works. diff --git a/docs/learn/architecture/block_parents.drawio.svg b/docs/learn/architecture/block_parents.svg similarity index 100% rename from docs/learn/architecture/block_parents.drawio.svg rename to docs/learn/architecture/block_parents.svg diff --git a/docs/learn/architecture/cliques.drawio.svg b/docs/learn/architecture/cliques.svg similarity index 100% rename from docs/learn/architecture/cliques.drawio.svg rename to docs/learn/architecture/cliques.svg diff --git a/docs/learn/architecture/incompatibility_graph.drawio.svg b/docs/learn/architecture/incompatibility_graph.svg similarity index 100% rename from docs/learn/architecture/incompatibility_graph.drawio.svg rename to docs/learn/architecture/incompatibility_graph.svg diff --git a/docs/learn/architecture/node-architecture.mdx b/docs/learn/architecture/node-architecture.mdx index 75bdb816a..73cf9c3e2 100644 --- a/docs/learn/architecture/node-architecture.mdx +++ b/docs/learn/architecture/node-architecture.mdx @@ -18,7 +18,7 @@ The pool and factories, referred to as “factory”, can be potentially running Overall, each of the modules described here runs inside one or more threads attached to their respective executable process (NB: the factory/node separation is not yet implemented, but will be soon). -![](architecture.drawio.svg) +![](architecture.svg) We will explain below the different modules present in this diagram, and simulate the production of an operation to show how it navigates through the different modules to better understand how blocks are produced and propagated. @@ -85,7 +85,7 @@ weighted by the amount of stake (=rolls) they hold. The schema below illustrates are built, based on past cycles (two cycles are needed for the distribution update to ensure that the balance finalization has occurred and the amount of rolls is accurate): -![](selector.drawio.svg) +![](selector.svg) The Selector Module is in charge of computing the formula and replying to requests regarding what node is elected for any given slot in the present or the past. The Execution Module (see below) is in charge of feeding the Selector Module with @@ -114,7 +114,7 @@ Here is a simplified example of a graph of pending blocks over two threads, with as a result of a multistaking attack where the block producer decided to create competing blocks for the same slot). Here the letter of a slot identifies it, while the number refers to its thread number: -![](unfinalized_blocks_set.drawio.svg) +![](unfinalized_blocks_set.svg) In this illustration we have shown only relevant parent links in blue, to make the whole diagram more readable, but in reality, each block has 32 parents, one in each of the 32 threads. @@ -134,7 +134,7 @@ You will find a more formal mathematical definition of these incompatibility not From these definitions, you can build another graph, called the incompatibility graph, which connects any two blocks that have any form of incompatibility together: -![](incompatibility_graph.drawio.svg) +![](incompatibility_graph.svg) As you can see, some blocks are isolated and therefore compatible with any other, while some are linked, because they have a form of incompatibility. @@ -144,7 +144,7 @@ members are incompatible with each other (so, no internal link within the clique to the set without introducing incompatibilities. In the above example, there are three maximal cliques that can be built, as illustrated below: -![](cliques.drawio.svg) +![](cliques.svg) They represent candidates to extend the set of already finalized blocks into a coherent set of new blocks. All we need to add to be able to build a consensus rule now is to introduce a deterministic metric to rank those candidates so that nodes diff --git a/docs/learn/architecture/operation-lifecycle.mdx b/docs/learn/architecture/operation-lifecycle.mdx index 4395ad83a..38405da2d 100644 --- a/docs/learn/architecture/operation-lifecycle.mdx +++ b/docs/learn/architecture/operation-lifecycle.mdx @@ -20,7 +20,7 @@ Let’s assume we just got a code execution operation from an external client. L particular node, which is running its block factory on the same machine, and sends the operation to this node. These are the different steps of the operation processing that will occur, as illustrated in the schema below: -![](operation_lifecycle.drawio.svg) +![](operation_lifecycle.svg) 1. The operation enters the node via the API Module (the operation path is marked in blue) diff --git a/docs/learn/architecture/operation_lifecycle.drawio.svg b/docs/learn/architecture/operation_lifecycle.svg similarity index 100% rename from docs/learn/architecture/operation_lifecycle.drawio.svg rename to docs/learn/architecture/operation_lifecycle.svg diff --git a/docs/learn/architecture/selector.drawio.svg b/docs/learn/architecture/selector.svg similarity index 100% rename from docs/learn/architecture/selector.drawio.svg rename to docs/learn/architecture/selector.svg diff --git a/docs/learn/architecture/structure.drawio.svg b/docs/learn/architecture/structure.svg similarity index 100% rename from docs/learn/architecture/structure.drawio.svg rename to docs/learn/architecture/structure.svg diff --git a/docs/learn/architecture/unfinalized_blocks_set.drawio.svg b/docs/learn/architecture/unfinalized_blocks_set.svg similarity index 100% rename from docs/learn/architecture/unfinalized_blocks_set.drawio.svg rename to docs/learn/architecture/unfinalized_blocks_set.svg From ccbf6224e59eab35045beb2dbf0f6274d6cc9c82 Mon Sep 17 00:00:00 2001 From: Damir Vodenicarevic Date: Mon, 15 Jan 2024 15:40:24 +0100 Subject: [PATCH 3/3] remove initial node runner tutorial --- docs/node/initial.mdx | 274 ------------------------------------------ sidebars.js | 5 - 2 files changed, 279 deletions(-) delete mode 100644 docs/node/initial.mdx 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 |& tee logs.txt -``` - -Replace `` 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 -``` - -Replace `` 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 |& tee logs.txt -``` - -Replace `` with a password that you will need to keep to restart your node - -Or, on MacOS: - -```shell -RUST_BACKTRACE=full cargo run --release -- -p > logs.txt 2>&1 -``` - -Replace `` 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 -``` - -Replace `` 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 ``` - -Replace `` 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 ``` - -Replace `` 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 -``` - -#### 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 -``` - -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: `. -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: "
",