From a2d91a6049fafcc97c53e0ccd373c9e5b8ddd045 Mon Sep 17 00:00:00 2001 From: Dr-Electron Date: Tue, 16 Jan 2024 15:04:21 +0100 Subject: [PATCH 1/5] Remove deprecated version --- .../docs/getting_started/getting_started.md | 73 -- .../1.2/docs/how_tos/post_installation.md | 146 --- .../1.2/docs/how_tos/run_as_a_verifier.md | 38 - .../hornet/1.2/docs/how_tos/using_docker.md | 235 ----- .../1.2/docs/references/api_reference.md | 18 - .../1.2/docs/references/configuration.md | 858 ------------------ .../hornet/1.2/docs/references/peering.md | 152 ---- docs/maintain/hornet/1.2/docs/welcome.md | 29 - docs/maintain/hornet/1.2/sidebars.js | 72 -- versionedConfig.js | 4 - 10 files changed, 1625 deletions(-) delete mode 100644 docs/maintain/hornet/1.2/docs/getting_started/getting_started.md delete mode 100644 docs/maintain/hornet/1.2/docs/how_tos/post_installation.md delete mode 100644 docs/maintain/hornet/1.2/docs/how_tos/run_as_a_verifier.md delete mode 100644 docs/maintain/hornet/1.2/docs/how_tos/using_docker.md delete mode 100644 docs/maintain/hornet/1.2/docs/references/api_reference.md delete mode 100644 docs/maintain/hornet/1.2/docs/references/configuration.md delete mode 100644 docs/maintain/hornet/1.2/docs/references/peering.md delete mode 100644 docs/maintain/hornet/1.2/docs/welcome.md delete mode 100644 docs/maintain/hornet/1.2/sidebars.js diff --git a/docs/maintain/hornet/1.2/docs/getting_started/getting_started.md b/docs/maintain/hornet/1.2/docs/getting_started/getting_started.md deleted file mode 100644 index 559b9f3a39a..00000000000 --- a/docs/maintain/hornet/1.2/docs/getting_started/getting_started.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -description: Getting started with the recommended requirements and installation links. -image: /img/banner/banner_hornet_getting_started.png -keywords: - - IOTA Node - - Hornet Node - - Linux - - macOS - - Windows - - Docker - - reference - - Requirements ---- - -# Getting Started - -![Hornet Node getting started](/img/banner/banner_hornet_getting_started.png) - -Running a node is an efficient way to use IOTA. By doing so, you have direct access to the Tangle instead of having to -connect to and trust someone else's node. Additionally, you help the IOTA network to become more distributed and resilient. - -The node software is the backbone of the network. For an overview of tasks a node is responsible for, please -see our [Node 101](/develop/nodes/explanations/nodes_101) section. - -To make sure that your device meets the minimum security requirements for running a node, please -see our [Security 101](/develop/nodes/explanations/security_101) section. - -:::note - -Make sure you install Hornet version 0.6.0+ since it is the minimum version that targets IOTA 1.5 (Chrysalis) network. -Versions below 0.6.0 (such as 0.5.x) target the legacy IOTA network which is not the focus of this documentation. - -::: - -## Recommended Requirements - -To handle a potential high rate of messages per second, nodes need enough computational power to run reliably, and -should have the minimum specs: - -- 4 cores or 4 vCPU. -- 8 GB RAM. -- SSD storage. -- A public IP address. - -The amount of storage you need will depend on whether and how often you plan on pruning old data from your local -database. - -Hornet exposes different functionality on different ports: - -- `15600 TCP` - Gossip protocol port. -- `14626 UDP` - Autopeering port (optional). -- `14265 TCP` - REST HTTP API port (optional). -- `8081 TCP` - Dashboard (optional). -- `8091 TCP` - Faucet website (optional). -- `1883 TCP` - MQTT (optional). - -These ports are important for flawless node operation. The REST HTTP API port is optional and is only needed if -you want to offer access to your node's API. All ports can be customized inside -the [`config.json`](../how_tos/post_installation.md) file. - -## Operating System - -Hornet is written in Go and can be deployed on all major platforms. -The [recommended setup](../how_tos/using_docker.md) uses Docker to run Hornet secured behind a [Traefik](https://traefik.io) SSL reverse proxy. - -## Configuration - -Hornet uses two JSON configuration files that you can tweak based on your deployment requirements: - -- `config.json` - Includes all core configuration parameters. -- `peering.json` - Includes connection details to node neighbors (peers). - -You can read more about the configuration in the [post installation](../how_tos/post_installation.md) article. diff --git a/docs/maintain/hornet/1.2/docs/how_tos/post_installation.md b/docs/maintain/hornet/1.2/docs/how_tos/post_installation.md deleted file mode 100644 index 8e746971222..00000000000 --- a/docs/maintain/hornet/1.2/docs/how_tos/post_installation.md +++ /dev/null @@ -1,146 +0,0 @@ ---- -description: Introducing the Hornet nodes configuration files and their settings. -image: /img/logo/HornetLogo.png -keywords: - - IOTA Node - - Hornet Node - - Configuration - - REST API - - Dashboard - - how to ---- - -# Post-installation - -Once you have deployed Hornet, you can set all the parameters using configuration files. - -## Configuration Files - -The most important configuration files are: - -- `config.json` - Includes all configuration flags and their values. -- `peering.json` - Includes all connection details to your static peers (neighbors). - -:::note - -Hornet version 0.5.x targets the legacy IOTA 1.0 network. Hornet version 1.x.x targets the IOTA 1.5 network, also known as [Chrysalis](/introduction/explanations/update/what_is_chrysalis), which is the focus of this documentation. - -::: - -Depending on the installation path you selected, default configuration files may also be part of the installation process. So, you may see the following configuration files in your deployment directory: - -```bash -config.json -config_devnet.json -peering.json -profiles.json -``` - -## Default Configuration - -By default, Hornet searches for configuration files in the working directory and expects default names, such as `config.json` and `peering.json`. - -You can change this behavior by running Hornet with some altering arguments. - -Please see the [config.json](../references/configuration.md) article for more information regarding the respective configuration file. - -Once you have executed Hornet, it will output all loaded configuration parameters to `stdout` to show what configuration Hornet actually loaded (omitting sensitive values for things like passwords). - -You can see a list of all the other altering command line parameters by running: - -```bash -hornet --help -``` - -If you want a more detailed output you can run: - -```bash -hornet --help --full -``` - -## Dashboard - -By default, an admin dashboard (web interface) plugin is available on port 8081. This provides useful information regarding the node's health, peering/neighbors, overall network health, and consumed system resources. - -The dashboard plugin only listens on localhost:8081 by default. If you want to make it accessible from the Internet, you will need to change the default configuration. It can be changed using the following `config.json` file section: - -```json{2} -"dashboard": { - "bindAddress": "localhost:8081", - "auth": { - "sessionTimeout": "72h", - "username": "admin", - "passwordHash": "0000000000000000000000000000000000000000000000000000000000000000", - "passwordSalt": "0000000000000000000000000000000000000000000000000000000000000000" - } -} -``` - -Change `dashboard.bindAddress` to either `0.0.0.0:8081` to listen on all available interfaces, or the specific interface address accordingly. - -Even if it is accessible from the Internet, any visitor will still need a valid username and password combination to access the management section of the dashboard. - -The password, hash, and _salt_ can be generated using the integrated `pwd-hash` CLI tool: - -```bash -./hornet tools pwd-hash -``` - -Output example: - -```plaintext -Enter a password: -Re-enter your password: -Success! -Your hash: 24c832e35dc542901b90888321dbfc4b1d9617332cbc124709204e6edf7e49f9 -Your salt: 6c71f4753f6fb52d7a4bb5471281400c8fef760533f0589026a0e646bc03acd4 -``` - -:::note - -The `pwd-hash` tool outputs the `passwordHash` and `passwordSalt` based on your input password. - -::: - -Copy both values to their corresponding configuration options: `dashboard.auth.passwordHash` and -`dashboard.auth.passwordSalt` respectively. - -For the new password to take effect, you must restart Hornet. - -## Configuring HTTP REST API - -One of the tasks the the node is responsible for is exposing [API](../references/api_reference.md) to clients that would like to interact with the IOTA network, such as crypto wallets, exchanges, IoT devices, etc. - -By default, Hornet will expose the [REST API](../references/api_reference.md) on port `14265`. -If you use the [recommended setup](using_docker.md) the API will be exposed on the default HTTPS port (`443`) and secured using an SSL certificate. - -Since offering the HTTP REST API to the public can consume your node's resources, there are options to restrict which routes can be called and other request limitations: - -### Routes - -- `restAPI.publicRoutes` defines which routes can be called without JWT authorization. -- `restAPI.protectedRoutes` defines which routes require JWT authorization. -- All other routes will not be exposed. - -### JWT Auth - -To generate a JWT-token to be used with the protected routes you can run: - -```sh -./hornet tool jwt-api --databasePath --salt -``` - -If you are running our [recommended setup](using_docker.md) then see [here](using_docker.md#tools). - -### Proof-of-Work - -If you are concerned with resource consumption, consider turning off `restAPI.pow.enabled`. -This way, the clients must perform proof of work locally before submitting a block for broadcast. -If you would like to offer proof of work to clients, consider increasing the `restAPI.pow.workerCount` to provide a faster block submission experience. - -### Reverse Proxy - -We recommend that you provide your HTTP REST API behind a reverse proxy, such as [HAProxy](http://www.haproxy.org/), [Traefik](https://traefik.io/), [Nginx](https://www.nginx.com/), or [Apache](https://www.apache.org/) configured with TLS. -When using our [recommended setup](using_docker.md) this is done for you automatically. - -You can explore more details regarding different API calls at the [IOTA client library documentation](/iota.rs/welcome). diff --git a/docs/maintain/hornet/1.2/docs/how_tos/run_as_a_verifier.md b/docs/maintain/hornet/1.2/docs/how_tos/run_as_a_verifier.md deleted file mode 100644 index 4d66facd294..00000000000 --- a/docs/maintain/hornet/1.2/docs/how_tos/run_as_a_verifier.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -description: How to configure a Hornet node as a verifier node. -image: /img/logo/HornetLogo.png -keywords: - - IOTA Node - - Hornet Node - - verifier - - Chrysalis Phase 2 - - receipts - - how to ---- - -# How to Run Hornet as a Verifier Node - -A verifier node is a node which validates receipts. Receipts are an integral component of the migration mechanism used to migrate funds from the legacy network into the Chrysalis Phase 2 network. You can find a more detailed explanation on how the migration mechanism works in the [Chrysalis documentation](/introduction/explanations/update/migration_mechanism). - -This guide explains how to configure a Hornet node as a verifier node: - -1. Make sure you enabled the `Receipts` plugin under `node.enablePlugins`. -2. Set : - - `receipts.validator.validate` to `true`. This enables the verification logic in your node. - - `receipts.validator.ignoreSoftErrors` to `true` or `false`. - - Set it to `true`, if you don't want the verifier node to panic if it can not query a legacy node for data. - - Set it to `false` if you want to make sure that your verifier node panics if it can not query for data from a legacy node. - - An invalid receipt will always result in a panic. `ignoreSoftErrors` only controls API call failures to the legacy node. - - `receipts.validator.api.timeout` to something sensible like `10s` (meaning 10 seconds). - - `receipts.validator.api.address` to the URI of your legacy node. Note that this legacy node must have the `getWhiteFlagConfirmation` and `getNodeInfo` API commands whitelisted. - - `receipts.validator.coordinator.address` to the Coordinator address in the legacy network. - - `receipts.validator.coordinator.merkleTreeDepth` to the correct used Merkle tree depth in the legacy network. -3. Run your Hornet verifier node and let it validate receipts. - -:::note - -We recommend that you use a load balanced endpoint to multiple legacy nodes for `receipts.validator.api.address` to obtain high availability. - -::: - -After this, if your verifier node panics because of an invalid receipt, it is clear that one of the produced receipts is not valid. In this case, as a verifier node operator, you are invited to inform the community and the IOTA Foundation of your findings. This is, by the way, the same result as when the Coordinator issues a _milestone_, which diverges from a consistent _ledger state_. diff --git a/docs/maintain/hornet/1.2/docs/how_tos/using_docker.md b/docs/maintain/hornet/1.2/docs/how_tos/using_docker.md deleted file mode 100644 index ed4e45e7f41..00000000000 --- a/docs/maintain/hornet/1.2/docs/how_tos/using_docker.md +++ /dev/null @@ -1,235 +0,0 @@ ---- -description: Learn how to install and run a Hornet node using Docker. It is recommended for macOS and Windows. -image: /img/banner/banner_hornet_using_docker.png -keywords: - - IOTA Node - - Hornet Node - - Docker - - Install - - Run - - macOS - - Windows - - how to ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -# Install Hornet using Docker - -![Hornet Node using Docker](/img/banner/banner_hornet_using_docker.png) - -This guide represents the recommended setup to run a Hornet node. -It includes everything required to setup a public node accessible by wallets and applications: - -- [Hornet](https://github.com/iotaledger/hornet) -- [Traefik](https://traefik.io) - Reverse proxy using SSL certificates to secure access to the node API and dashboard. -- [Prometheus](https://prometheus.io) - Metrics scraper configured to collect all metrics from Hornet and INX extensions. -- [Grafana](https://grafana.com) - Data visualizer that can be used to display the metrics collected by Prometheus. - -We only recommend running a node on hosted servers and not on personal computers. -Please take into consideration the points explained in the [Security 101](/develop/nodes/explanations/security_101#securing-your-device). - -Hornet Docker images (amd64/x86_64 and arm64 architecture) are available at the [iotaledger/hornet](https://hub.docker.com/r/iotaledger/hornet) Docker hub. - -## Requirements - -1. A recent release of Docker enterprise or community edition. You can find installation instructions in the [official Docker documentation](https://docs.docker.com/engine/install/). -2. [Docker Compose CLI plugin](https://docs.docker.com/compose/install/linux/). -3. A registered domain name pointing to the public IP address of your server. _(optional if not using HTTPS)_ -4. Opening up the following ports in your servers firewall: - -- `15600 TCP` - Used for Hornet gossip. -- `14626 UDP` - Used for Hornet autopeering. -- `80 TCP` - Used for HTTP. _(can be changed, see below)_ -- `443 TCP` - Used for HTTPS. _(optional if not using HTTPS)_ - -5. [curl](https://curl.se/). - -## Download the latest release - -> **NOTE**: The commands assume you are using Linux. - -Once you have completed all the installation [requirements](#requirements), you can download the latest release by running: - -```sh -mkdir hornet -cd hornet -curl -L -O "https://github.com/iotaledger/node-docker-setup/releases/download/v1.0.0-rc.16/node-docker-setup_chrysalis-v1.0.0-rc.16.tar.gz" -tar -zxf node-docker-setup_chrysalis-v1.0.0-rc.16.tar.gz -``` - -## Prepare - -### 1. Setup Environment - -You can configure your node to either use HTTP or HTTPS. For publicly exposed nodes we heavily recommend using HTTPS. - - - - -Create a file named `.env` add the following to the file: - -``` -COMPOSE_FILE=docker-compose.yml:docker-compose-https.yml - -ACME_EMAIL=your-email@example.com - -NODE_HOST=node.your-domain.com -``` - -- Replace `your-email@example.com` with the e-mail used for issuing a [Let's Encrypt](https://letsencrypt.org) SSL certificate. -- Replace `node.your-domain.com` with the domain pointing to your public IP address as described in the [requirements](#requirements). - - - - -By default this setup will expose the Traefik reverse proxy on the default HTTP port `80`. -If you want to change the port to a different value you can create a file named `.env` and add the following to e.g. expose it over port `9000`: - -``` -HTTP_PORT=9000 -``` - - - - -### 2. Setup neighbors - -Add your Hornet neighbor addresses to the `peering.json` file. - -:::note -This step is recommended, but optional if you are using autopeering. -::: - -### 3. Create the `data` folder - -All files used by Hornet, Traefik & co will be stored in a directory called `data`. -Docker image runs under user with user id 65532 and group id 65532, so this directory needs to have the correct permissions to be accessed by the containers. -To create this directory with correct permissions run the contained script: - -```sh -./prepare_docker.sh -``` - -### 4. Set dashboard credentials - -To access your Hornet dashboard, a set of credentials need to be configured. -Run the following command to generate a password hash and _salt_ for the dashboard: - -``` -docker compose run hornet tool pwd-hash -``` - -Create a file named `.env` if you did not create it already and add the following lines: - -``` -DASHBOARD_PASSWORD=0000000000000000000000000000000000000000000000000000000000000000 -DASHBOARD_SALT=0000000000000000000000000000000000000000000000000000000000000000 -``` - -- Update the `DASHBOARD_PASSWORD` and `DASHBOARD_SALT` values in the `.env` file with the result of the previous command. - -If you want to change the default `admin` username, you can add this line to your `.env` file: - -``` -DASHBOARD_USERNAME=someotherusername -``` - -### 5. Enable additional monitoring - -To enable additional monitoring (cAdvisor, Prometheus, Grafana), the docker compose profile needs to be configured. -Create a file named `.env` if you did not create it already and add the following line: - -``` -COMPOSE_PROFILES=monitoring -``` - -## Run - -### Starting the node - -You can start the Hornet node by running: - -```sh -docker compose up -d -``` - -- `-d` Instructs Docker to start the containers in the background. - -#### HTTPS - -After starting the node you will be able to access your services at the following endpoints: - -- API: `https://node.your-domain.com/api/routes` -- Hornet Dashboard: `https://node.your-domain.com/dashboard` -- Grafana: `https://node.your-domain.com/grafana` _(optional if using "monitoring" profile)_ - -:::warning -After starting your node for the first time, please change the default grafana credentials
-User: `admin`
-Password: `admin` -::: - -You can configure your wallet software to use `https://node.your-domain.com` - -#### HTTP - -After starting the node you will be able to access your services at the following endpoints: - -- API: `http://localhost/api/routes` -- Hornet Dashboard: `http://localhost/dashboard` -- Grafana: `http://localhost/grafana` _(optional if using "monitoring" profile)_ - -:::note -If you changed the default `HTTP_PORT` value, you will need to add the port to the urls. -::: - -You can configure your wallet software to use `http://localhost` - -### Displaying Log Output - -You can display the Hornet logs by running: - -```sh -docker compose logs -f hornet -``` - -- `-f` - Instructs Docker to continue displaying the log to `stdout` until CTRL+C is pressed. - -### Stopping the node - -You can stop the Hornet node by running: - -```sh -docker compose down -``` - -### Tools - -To access the tools provided inside Hornet you can use: - -```sh -docker compose run hornet tool -``` - -To see the list of tools included run: - -```sh -docker compose run hornet tool -h -``` - -## JWT Auth - -To generate a JWT token to be used to access protected routes you can run: - -```sh -docker compose run hornet tool jwt-api --databasePath data/p2pstore -``` - -- If you changed the `restAPI.jwtAuth.salt` value in the `config.json`, then you need to pass that value as a parameter as `--salt ` - -# More Information - -For more information look at the [Github repository](https://github.com/iotaledger/node-docker-setup) diff --git a/docs/maintain/hornet/1.2/docs/references/api_reference.md b/docs/maintain/hornet/1.2/docs/references/api_reference.md deleted file mode 100644 index f3abe6e0acb..00000000000 --- a/docs/maintain/hornet/1.2/docs/references/api_reference.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -description: Links to the REST API reference and the Node event API reference. -image: /img/logo/HornetLogo.png -keywords: - - IOTA Node - - Hornet Node - - REST API - - Node Event API - - API - - Reference ---- - -# API Reference - -You can find specifications of the APIs exposed by Hornet in the the links below: - -- [IOTA REST API reference](https://editor.swagger.io/?url=https://raw.githubusercontent.com/iotaledger/tips/main/tips/TIP-0013/rest-api.yaml). -- [Node event API reference](https://studio.asyncapi.com/?load=https://raw.githubusercontent.com/iotaledger/tips/main/tips/TIP-0016/event-api.yml). diff --git a/docs/maintain/hornet/1.2/docs/references/configuration.md b/docs/maintain/hornet/1.2/docs/references/configuration.md deleted file mode 100644 index 40a1c93083f..00000000000 --- a/docs/maintain/hornet/1.2/docs/references/configuration.md +++ /dev/null @@ -1,858 +0,0 @@ ---- -description: This section describes the configuration parameters and their types for your Hornet node. -image: /img/banner/banner_hornet_configuration.png -keywords: - - IOTA Node - - Hornet Node - - Configuration - - JSON - - Customize - - Config - - reference ---- - -# Core Configuration - -![Hornet Node Configuration](/img/banner/banner_hornet_configuration.png) - -Hornet uses a JSON standard format as a config file. If you are unsure about JSON syntax, you can find more information in the [official JSON specs](https://www.json.org). - -The default config file is `config.json`. You can change the path or name of the config file by using the `-c` or `--config` argument while executing `hornet` executable. - -For example: - -```bash -hornet -c config_example.json -``` - -You can always get the most up-to-date description of the config parameters by running: - -```bash -hornet -h --full -``` - -## 1. REST API - -| Name | Description | Type | -| :------------------- | :----------------------------------------------------------------------------------------------- | :--------------- | -| bindAddress | The bind address on which the REST API listens on | string | -| [jwtAuth](#jwt-auth) | Config for JWT auth | object | -| publicRoutes | The HTTP REST routes which can be called without authorization. Wildcards using \* are allowed. | array of strings | -| protectedRoutes | The HTTP REST routes which need to be called with authorization. Wildcards using \* are allowed. | array of strings | -| powEnabled | Whether the node does PoW if messages are received via API | bool | -| powWorkerCount | The amount of workers used for calculating PoW when issuing messages via API | integer | -| [limits](#limits) | Configuration for api limits | object | - -### JWT Auth - -| Name | Description | Type | -| :--- | :-------------------------------------------------------------------------------------------------------------------------------------- | :----- | -| salt | Salt used inside the JWT tokens for the REST API. Change this to a different value to invalidate JWT tokens not matching this new value | string | - -### Limits - -| Name | Description | Type | -| :--------- | :------------------------------------------------------------------------ | :------ | -| bodyLength | The maximum number of characters that the body of an API call may contain | string | -| maxResults | The maximum number of results that may be returned by an endpoint | integer | - -Example: - -```json - "restAPI": { - "bindAddress": "0.0.0.0:14265", - "jwtAuth": { - "salt": "HORNET" - }, - "publicRoutes": [ - "/health", - "/mqtt", - "/api/routes", - "/api/v1/info", - "/api/v1/tips", - "/api/v1/messages*", - "/api/v1/transactions*", - "/api/v1/milestones*", - "/api/v1/outputs*", - "/api/v1/addresses*", - "/api/v1/treasury", - "/api/v1/receipts*" - ], - "protectedRoutes": [ - "/api/v1/*", - "/api/plugins/*" - ], - "powEnabled": true, - "powWorkerCount": 1, - "limits": { - "bodyLength": "1M", - "maxResults": 1000 - } - }, -``` - -## 2. Dashboard - -| Name | Description | Type | -| :------------ | :----------------------------------------------------------- | :----- | -| bindAddress | The bind address on which the dashboard can be accessed from | string | -| dev | Whether to run the dashboard in dev mode | bool | -| [auth](#auth) | Configuration for dashboard auth | object | - -### Auth - -| Name | Description | Type | -| :------------- | :---------------------------------------------------- | :----- | -| sessionTimeout | How long the auth session should last before expiring | string | -| username | The auth username (max 25 chars) | string | -| passwordHash | The auth password+salt as a scrypt hash | string | -| passwordSalt | The auth salt used for hashing the password | string | - -Example: - -```json - "dashboard": { - "bindAddress": "localhost:8081", - "dev": false, - "auth": { - "sessionTimeout": "72h", - "username": "admin", - "passwordHash": "0000000000000000000000000000000000000000000000000000000000000000", - "passwordSalt": "0000000000000000000000000000000000000000000000000000000000000000" - } - }, -``` - -## 3. DB - -| Name | Description | Type | -| :------------------------ | :---------------------------------------------------------------------------------- | :----- | -| engine | The used database engine (pebble/rocksdb/mapdb) | string | -| path | The path to the database folder | string | -| autoRevalidation | Whether to automatically start revalidation on startup if the database is corrupted | bool | -| checkLedgerStateOnStartup | Whether to check if the ledger state matches the total supply on startup | bool | - -Example: - -```json - "db": { - "engine": "rocksdb", - "path": "mainnetdb", - "autoRevalidation": false, - "checkLedgerStateOnStartup": false - }, -``` - -## 4. Snapshots - -| Name | Description | Type | -| :---------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------- | -| enabled | whether to generate snapshot files | bool | -| depth | The depth, respectively the starting point, at which a snapshot of the ledger is generated | integer | -| interval | Interval, in milestones, at which snapshot files are created (snapshots are only created if the node is synced) | integer | -| fullPath | Path to the full snapshot file | string | -| deltaPath | Path to the delta snapshot file | string | -| deltaSizeThresholdPercentage | Create a full snapshot if the size of a delta snapshot reaches a certain percentage of the full snapshot (0.0 = always create delta snapshot to keep ms diff history) | float | -| [downloadURLs](#downloadurls) | URLs to load the snapshot files from. | array of objects | - -### DownloadURLs - -| Name | Description | Type | -| :---- | :--------------------------------------- | :----- | -| full | Download link to the full snapshot file | string | -| delta | Download link to the delta snapshot file | string | - -Example: - -```json - "snapshots": { - "enabled": false, - "depth": 50, - "interval": 200, - "fullPath": "snapshots/mainnet/full_snapshot.bin", - "deltaPath": "snapshots/mainnet/delta_snapshot.bin", - "deltaSizeThresholdPercentage": 50.0, - "downloadURLs": [ - { - "full": "https://source1.example.com/full_snapshot.bin", - "delta": "https://source1.example.com/delta_snapshot.bin" - }, - { - "full": "https://source2.example.com/full_snapshot.bin", - "delta": "https://source2.example.com/delta_snapshot.bin" - } - ] - }, -``` - -## 5. Pruning - -| Name | Description | Type | -| :------------------------ | :---------------------------------------------------- | :----- | -| [milestones](#milestones) | Milestones based pruning | object | -| [size](#size) | Database size based pruning | object | -| pruneReceipts | Whether to delete old receipts data from the database | bool | - -### Milestones - -| Name | Description | Type | -| :------------------ | :--------------------------------------------------------------------------------------- | :------ | -| enabled | Whether to delete old message data from the database based on maximum milestones to keep | bool | -| maxMilestonesToKeep | Maximum amount of milestone cones to keep in the database | integer | - -### Size - -| Name | Description | Type | -| :------------------ | :---------------------------------------------------------------------------------- | :----- | -| enabled | Whether to delete old message data from the database based on maximum database size | bool | -| targetSize | Target size of the database | string | -| thresholdPercentage | The percentage the database size gets reduced if the target size is reached | float | -| cooldownTime | Cool down time between two pruning by database size events | string | - -Example: - -```json - "pruning": { - "milestones": { - "enabled": false, - "maxMilestonesToKeep": 60480 - }, - "size": { - "enabled": true, - "targetSize": "30GB", - "thresholdPercentage": 10.0, - "cooldownTime": "5m" - }, - "pruneReceipts": false - }, -``` - -## 6. Protocol - -| Name | Description | Type | -| :---------------------------------- | :------------------------------------------------ | :--------------- | -| networkID | The network ID on which this node operates on | string | -| bech32HRP | The HRP which should be used for Bech32 addresses | string | -| minPoWScore | The minimum PoW score required by the network | float | -| milestonePublicKeyCount | The amount of public keys in a milestone | integer | -| [publicKeyRanges](#publickeyranges) | List of public key ranges from the coordinator | array of objects | - -### PublicKeyRanges - -| Name | Description | Type | -| :---- | :-------------------- | :------ | -| key | Public key | string | -| start | Milestone start index | integer | -| end | Milestone end index | integer | - -Example: - -```json - "protocol": { - "networkID": "chrysalis-mainnet", - "bech32HRP": "iota", - "minPoWScore": 4000.0, - "milestonePublicKeyCount": 2, - "publicKeyRanges": [ - { - "key": "a9b46fe743df783dedd00c954612428b34241f5913cf249d75bed3aafd65e4cd", - "start": 0, - "end": 777600 - }, - { - "key": "365fb85e7568b9b32f7359d6cbafa9814472ad0ecbad32d77beaf5dd9e84c6ba", - "start": 0, - "end": 1555200 - }, - { - "key": "ba6d07d1a1aea969e7e435f9f7d1b736ea9e0fcb8de400bf855dba7f2a57e947", - "start": 552960, - "end": 2108160 - } - ] - }, -``` - -## 7. Proof of Work - -| Name | Description | Type | -| :------------------ | :------------------------------------------------------------------------------------------------------- | :----- | -| refreshTipsInterval | Interval for refreshing tips during PoW for spammer messages and messages passed without parents via API | string | - -Example: - -```json - "pow": { - "refreshTipsInterval": "5s" - }, -``` - -## 8. Requests - -| Name | Description | Type | -| :----------------------- | :---------------------------------------------------- | :----- | -| discardOlderThan | The maximum time a request stays in the request queue | string | -| pendingReEnqueueInterval | The interval the pending requests are re-enqueued | string | - -Example: - -```json - "requests": { - "discardOlderThan": "15s", - "pendingReEnqueueInterval": "5s" - }, -``` - -## 9. Coordinator - -| Name | Description | Type | -| :-------------------------- | :------------------------------------------------------------------------------------- | :------ | -| stateFilePath | The path to the state file of the coordinator | string | -| interval | The interval milestones are issued | string | -| powWorkerCount | The amount of workers used for calculating PoW when issuing checkpoints and milestones | integer | -| [checkpoints](#checkpoints) | Configuration for checkpoints | object | -| [tipsel](#tipsel) | Configuration for tip selection | object | -| [signing](#signing) | Configuration for signing | object | -| [quorum](#quorum) | Configuration for quorum | object | - -### Checkpoints - -| Name | Description | Type | -| :----------------- | :----------------------------------------------------------- | :------ | -| maxTrackedMessages | Maximum amount of known messages for milestone tip selection | integer | - -### Tipsel - -| Name | Description | Type | -| :--------------------------------------------- | :---------------------------------------------------------------- | :------ | -| minHeaviestBranchUnreferencedMessagesThreshold | Minimum threshold of unreferenced messages in the heaviest branch | integer | -| maxHeaviestBranchTipsPerCheckpoint | Maximum amount of checkpoint messages with heaviest branch tips | integer | -| randomTipsPerCheckpoint | Amount of checkpoint messages with random tips | integer | -| heaviestBranchSelectionTimeout | The maximum duration to select the heaviest branch tips | string | - -### Signing - -| Name | Description | Type | -| :------------ | :--------------------------------------------------------------------------- | :------ | -| provider | The signing provider the coordinator uses to sign a milestone (local/remote) | string | -| remoteAddress | The address of the remote signing provider (insecure connection!) | string | -| retryAmount | Number of signing retries to perform before shutting down the node | integer | -| retryTimeout | The timeout between signing retries | string | - -### Quorum - -| Name | Description | Type | -| :---------------- | :------------------------------------------------------------------------------------ | :--------------------- | -| enabled | Whether the coordinator quorum is enabled | bool | -| [groups](#groups) | The quorum groups used to ask other nodes for correct ledger state of the coordinator | array of object arrays | -| timeout | The timeout until a node in the quorum must have answered | string | - -#### Groups - -| Name | Description | Type | -| :-------------------------- | :----------------------------------------------------------------------------------- | :--------------- | -| [{GROUP_NAME}](#group_name) | The quorum group used to ask other nodes for correct ledger state of the coordinator | array of objects | - -##### {GROUP_NAME} - -| Name | Description | Type | -| :------- | :------------------------------------ | :----- | -| alias | Alias of the quorum client (optional) | string | -| baseURL | BaseURL of the quorum client | string | -| userName | Username for basic auth (optional) | string | -| password | Password for basic auth (optional) | string | - -Example: - -```json - "coordinator": { - "stateFilePath": "coordinator.state", - "interval": "10s", - "powWorkerCount": 0, - "checkpoints": { - "maxTrackedMessages": 10000 - }, - "tipsel": { - "minHeaviestBranchUnreferencedMessagesThreshold": 20, - "maxHeaviestBranchTipsPerCheckpoint": 10, - "randomTipsPerCheckpoint": 3, - "heaviestBranchSelectionTimeout": "100ms" - }, - "signing": { - "provider": "local", - "remoteAddress": "localhost:12345", - "retryAmount": 10, - "retryTimeout": "2s" - }, - "quorum": { - "enabled": false, - "groups": { - "hornet": [ - { - "alias": "hornet1", - "baseURL": "http://hornet1.example.com:14265", - "userName": "", - "password": "" - } - ], - "bee": [ - { - "alias": "bee1", - "baseURL": "http://bee1.example.com:14265", - "userName": "", - "password": "" - } - ] - }, - "timeout": "2s" - } - }, -``` - -## 10. Migrator - -This part is used in the migration from IOTA 1.0 to IOTA 1.5 (Chrysalis) - -| Name | Description | Type | -| :------------------ | :------------------------------------------------------ | :------ | -| stateFilePath | Path to the state file of the migrator | string | -| receiptMaxEntries | The max amount of entries to embed within a receipt | integer | -| queryCooldownPeriod | The cool down period of the service to ask for new data | string | - -Example: - -```json - "migrator": { - "stateFilePath": "migrator.state", - "receiptMaxEntries": 110, - "queryCooldownPeriod": "5s" - }, -``` - -## 11. Receipts - -This part was used in the migration from IOTA 1.0 to IOTA 1.5 (Chrysalis) - -| Name | Description | Type | -| :---------------------- | :-------------------------- | :----- | -| [backup](#backup) | Configuration for backup | object | -| [validator](#validator) | Configuration for validator | object | - -### Backup - -| Name | Description | Type | -| :------ | :---------------------------------------------- | :----- | -| enabled | Whether to backup receipts in the backup folder | bool | -| path | Path to the receipts backup folder | string | - -### Validator - -| Name | Description | Type | -| :-------------------------- | :---------------------------------------------------------------- | :----- | -| validate | Whether to validate receipts | bool | -| ignoreSoftErrors | Whether to ignore soft errors and not panic if one is encountered | bool | -| [api](#api) | Configuration for legacy API | object | -| [coordinator](#coordinator) | Configuration for legacy Coordinator | object | - -#### Api - -| Name | Description | Type | -| :------ | :----------------------------- | :----- | -| address | Address of the legacy node API | string | -| timeout | Timeout of API calls | string | - -#### Coordinator - -| Name | Description | Type | -| :-------------- | :------------------------------------------ | :------ | -| address | Address of the legacy coordinator | string | -| merkleTreeDepth | Depth of the Merkle tree of the coordinator | integer | - -Example: - -```json - "receipts": { - "backup": { - "enabled": false, - "path": "receipts" - }, - "validator": { - "validate": false, - "ignoreSoftErrors": false, - "api": { - "address": "http://localhost:14266", - "timeout": "5s" - }, - "coordinator": { - "address": "UDYXTZBE9GZGPM9SSQV9LTZNDLJIZMPUVVXYXFYVBLIEUHLSEWFTKZZLXYRHHWVQV9MNNX9KZC9D9UZWZ", - "merkleTreeDepth": 24 - } - } - }, -``` - -## 12. Tangle - -| Name | Description | Type | -| :--------------- | :-------------------------------------------------------------------------------- | :----- | -| milestoneTimeout | The interval milestone timeout events are fired if no new milestones are received | string | - -Example: - -```json - "tangle": { - "milestoneTimeout": "30s" - }, -``` - -## 13. Tipsel - -| Name | Description | Type | -| :------------------------------------ | :---------------------------------------------------------------------------------------------------------------------- | :------ | -| maxDeltaMsgYoungestConeRootIndexToCMI | The maximum allowed delta value for the YCRI of a given message in relation to the current CMI before it gets lazy | integer | -| maxDeltaMsgOldestConeRootIndexToCMI | The maximum allowed delta value between OCRI of a given message in relation to the current CMI before it gets semi-lazy | integer | -| belowMaxDepth | The maximum allowed delta value for the OCRI of a given message in relation to the current CMI before it gets lazy | integer | -| [nonLazy](#nonlazy) | Configuration for tips from the non-lazy pool | object | -| [semiLazy](#semilazy) | Configuration for tips from the semi-lazy pool | object | - -### NonLazy - -| Name | Description | Type | -| :---------------------- | :-------------------------------------------------------------------------------------------------------- | :------ | -| retentionRulesTipsLimit | The maximum number of current tips for which the retention rules are checked (non-lazy) | integer | -| maxReferencedTipAge | The maximum time a tip remains in the tip pool after it was referenced by the first message (non-lazy) | string | -| maxChildren | The maximum amount of references by other messages before the tip is removed from the tip pool (non-lazy) | integer | -| spammerTipsThreshold | The maximum amount of tips in a tip-pool (non-lazy) before the spammer tries to reduce these | integer | - -### SemiLazy - -| Name | Description | Type | -| :---------------------- | :--------------------------------------------------------------------------------------------------------- | :------ | -| retentionRulesTipsLimit | The maximum number of current tips for which the retention rules are checked (semi-lazy) | integer | -| maxReferencedTipAge | The maximum time a tip remains in the tip pool after it was referenced by the first message (semi-lazy) | string | -| maxChildren | The maximum amount of references by other messages before the tip is removed from the tip pool (semi-lazy) | integer | -| spammerTipsThreshold | The maximum amount of tips in a tip-pool (semi-lazy) before the spammer tries to reduce these | integer | - -Example: - -```json - "tipsel": { - "maxDeltaMsgYoungestConeRootIndexToCMI": 8, - "maxDeltaMsgOldestConeRootIndexToCMI": 13, - "belowMaxDepth": 15, - "nonLazy": { - "retentionRulesTipsLimit": 100, - "maxReferencedTipAge": "3s", - "maxChildren": 30, - "spammerTipsThreshold": 0 - }, - "semiLazy": { - "retentionRulesTipsLimit": 20, - "maxReferencedTipAge": "3s", - "maxChildren": 2, - "spammerTipsThreshold": 30 - } - }, -``` - -## 14. Node - -| Name | Description | Type | -| :------------- | :--------------------------------------- | :--------------- | -| alias | The alias to identify a node | string | -| profile | The profile the node runs with | string | -| disablePlugins | A list of plugins that shall be disabled | array of strings | -| enablePlugins | A list of plugins that shall be enabled | array of strings | - -Example: - -```json - "node": { - "alias": "Mainnet", - "profile": "auto", - "disablePlugins": [ - "Warpsync" - ], - "enablePlugins": [ - "Prometheus", - "Spammer" - ] - }, -``` - -## 15. P2P - -| Name | Description | Type | -| :-------------------------------------- | :----------------------------------------------------------------- | :--------------- | -| bindMultiAddresses | The bind addresses for this node | array of strings | -| [connectionManager](#connectionmanager) | Configuration for connection manager | object | -| [gossip](#gossip) | Configuration for gossip protocol | object | -| identityPrivateKey | private key used to derive the node identity (optional) | string | -| [db](#database) | Configuration for p2p database | object | -| reconnectInterval | The time to wait before trying to reconnect to a disconnected peer | string | -| [autopeering](#autopeering) | Configuration for autopeering | object | - -### ConnectionManager - -| Name | Description | Type | -| :------------ | :--------------------------------------------------------------------------- | :------ | -| highWatermark | The threshold up on which connections count truncates to the lower watermark | integer | -| lowWatermark | The minimum connections count to hold after the high watermark was reached | integer | - -### Gossip - -| Name | Description | Type | -| :----------------- | :----------------------------------------------------------------------------- | :------ | -| unknownPeersLimit | maximum amount of unknown peers a gossip protocol connection is established to | integer | -| streamReadTimeout | The read timeout for subsequent reads from the gossip stream | string | -| streamWriteTimeout | The write timeout for writes to the gossip stream | string | - -### Database - -| Name | Description | Type | -| :--- | :--------------------------- | :----- | -| path | The path to the p2p database | string | - -### Autopeering - -| Name | Description | Type | -| :------------------- | :--------------------------------------------------------------- | :--------------- | -| bindAddress | The bind address on which the autopeering module listens on | string | -| entryNodes | The list of autopeering entry nodes to use | array of strings | -| entryNodesPreferIPv6 | Defines if connecting over IPv6 is preferred for entry nodes | bool | -| runAsEntryNode | Defines whether the node should act as an autopeering entry node | bool | - -Example: - -```json - "p2p": { - "bindMultiAddresses": [ - "/ip4/0.0.0.0/tcp/15600", - "/ip6/::/tcp/15600" - ], - "connectionManager": { - "highWatermark": 10, - "lowWatermark": 5 - }, - "gossip": { - "unknownPeersLimit": 4, - "streamReadTimeout": "1m0s", - "streamWriteTimeout": "10s" - }, - "identityPrivateKey": "", - "db": { - "path": "p2pstore" - }, - "reconnectInterval": "30s", - "autopeering": { - "bindAddress": "0.0.0.0:14626", - "entryNodes": [ - "/dns/lucamoser.ch/udp/14826/autopeering/4H6WV54tB29u8xCcEaMGQMn37LFvM1ynNpp27TTXaqNM", - "/dns/entry-hornet-0.h.chrysalis-mainnet.iotaledger.net/udp/14626/autopeering/iotaPHdAn7eueBnXtikZMwhfPXaeGJGXDt4RBuLuGgb", - "/dns/entry-hornet-1.h.chrysalis-mainnet.iotaledger.net/udp/14626/autopeering/iotaJJqMd5CQvv1A61coSQCYW9PNT1QKPs7xh2Qg5K2", - "/dns/entry-mainnet.tanglebay.com/udp/14626/autopeering/iot4By1FD4pFLrGJ6AAe7YEeSu9RbW9xnPUmxMdQenC" - ], - "entryNodesPreferIPv6": false, - "runAsEntryNode": false - } - }, -``` - -## 16. Logger - -| Name | Description | Type | -| :------------ | :---------------------------------------------------------------------------------------------------------------- | :--------------- | -| level | The minimum enabled logging level. Valid values are: "debug", "info", "warn", "error", "dpanic", "panic", "fatal" | string | -| disableCaller | Stops annotating logs with the calling function's file name and line number | bool | -| encoding | Sets the logger's encoding. Valid values are "json" and "console" | string | -| outputPaths | A list of URLs, file paths or stdout/stderr to write logging output to | array of strings | - -Example: - -```json - "logger": { - "level": "info", - "disableCaller": true, - "encoding": "console", - "outputPaths": [ - "stdout", - "hornet.log" - ] - }, -``` - -## 17. Warpsync - -| Name | Description | Type | -| :--------------- | :------------------------------------------------- | :------ | -| advancementRange | The used advancement range per warpsync checkpoint | integer | - -Example: - -```json - "warpsync": { - "advancementRange": 150 - }, -``` - -## 18. Spammer - -| Name | Description | Type | -| :------------ | :---------------------------------------------------------------------------------- | :------ | -| message | The message to embed within the spam messages | string | -| index | The indexation of the message | string | -| indexSemiLazy | The indexation of the message if the semi-lazy pool is used (uses "index" if empty) | string | -| cpuMaxUsage | Workers remains idle for a while when cpu usage gets over this limit (0 = disable) | float | -| mpsRateLimit | The rate limit for the spammer (0 = no limit) | float | -| workers | The amount of parallel running spammers | integer | -| autostart | Automatically start the spammer on node startup | bool | - -Example: - -```json - "spammer": { - "message": "IOTA - A new dawn", - "index": "HORNET Spammer", - "indexSemiLazy": "HORNET Spammer Semi-Lazy", - "cpuMaxUsage": 0.8, - "mpsRateLimit": 0.0, - "workers": 0, - "autostart": false - }, -``` - -## 19. Faucet - -| Name | Description | Type | -| :------------------ | :--------------------------------------------------------------------------------------------------------------------------- | :------ | -| amount | The amount of funds the requester receives | integer | -| smallAmount | The amount of funds the requester receives if the target address has more funds than the faucet amount and less than maximum | integer | -| maxAddressBalance | The maximum allowed amount of funds on the target address | integer | -| maxOutputCount | The maximum output count per faucet message | integer | -| indexationMessage | The faucet transaction indexation payload | string | -| batchTimeout | The maximum duration for collecting faucet batches | string | -| powWorkerCount | The amount of workers used for calculating PoW when issuing faucet messages | integer | -| [website](#website) | Configuration for the faucet website | object | - -### Website - -| Name | Description | Type | -| :---------- | :---------------------------------------------------------------- | :----- | -| bindAddress | The bind address on which the faucet website can be accessed from | string | -| enabled | Whether to host the faucet website | bool | - -Example: - -```json - "faucet": { - "amount": 10000000, - "smallAmount": 1000000, - "maxAddressBalance": 20000000, - "maxOutputCount": 127, - "indexationMessage": "HORNET FAUCET", - "batchTimeout": "2s", - "powWorkerCount": 0, - "website": { - "bindAddress": "localhost:8091", - "enabled": true - } - }, -``` - -## 20. MQTT - -| Name | Description | Type | -| :---------- | :------------------------------------------------------------------ | :------ | -| bindAddress | Bind address on which the MQTT broker listens on | string | -| wsPort | Port of the WebSocket MQTT broker | integer | -| workerCount | Number of parallel workers the MQTT broker uses to publish messages | integer | - -Example: - -```json - "mqtt": { - "bindAddress": "localhost:1883", - "wsPort": 1888, - "workerCount": 100 - }, -``` - -## 21. Profiling - -| Name | Description | Type | -| :---------- | :------------------------------------------------ | :----- | -| bindAddress | The bind address on which the profiler listens on | string | - -Example: - -```json - "profiling": { - "bindAddress": "localhost:6060" - }, -``` - -## 22. Prometheus - -| Name | Description | Type | -| :-------------------------------------------- | :----------------------------------------------------------- | :----- | -| bindAddress | The bind address on which the Prometheus exporter listens on | string | -| [fileServiceDiscovery](#fileservicediscovery) | Configuration for file service discovery | object | -| databaseMetrics | Include database metrics | bool | -| nodeMetrics | Include node metrics | bool | -| gossipMetrics | Include gossip metrics | bool | -| cachesMetrics | Include caches metrics | bool | -| restAPIMetrics | Include restAPI metrics | bool | -| migrationMetrics | Include migration metrics | bool | -| coordinatorMetrics | Include coordinator metrics | bool | -| mqttBrokerMetrics | Include MQTT broker metrics | bool | -| debugMetrics | Include debug metrics | bool | -| goMetrics | Include go metrics | bool | -| processMetrics | Include process metrics | bool | -| promhttpMetrics | Include promhttp metrics | bool | - -### FileServiceDiscovery - -| Name | Description | Type | -| :------ | :---------------------------------------------------------- | :----- | -| enabled | Whether the plugin should write a Prometheus 'file SD' file | bool | -| path | The path where to write the 'file SD' file to | string | -| target | The target to write into the 'file SD' file | string | - -Example: - -```json - "prometheus": { - "bindAddress": "localhost:9311", - "fileServiceDiscovery": { - "enabled": false, - "path": "target.json", - "target": "localhost:9311" - }, - "databaseMetrics": true, - "nodeMetrics": true, - "gossipMetrics": true, - "cachesMetrics": true, - "restAPIMetrics": true, - "migrationMetrics": true, - "coordinatorMetrics": true, - "mqttBrokerMetrics": true, - "debugMetrics": false, - "goMetrics": false, - "processMetrics": false, - "promhttpMetrics": false - }, -``` - -## 23. Debug - -| Name | Description | Type | -| :--------------------------- | :------------------------------------------------------------------------------------------------------- | :----- | -| whiteFlagParentsSolidTimeout | Defines the the maximum duration for the parents to become solid during white flag confirmation API call | string | - -Example: - -```json - "debug": { - "whiteFlagParentsSolidTimeout": "2s" - }, -``` diff --git a/docs/maintain/hornet/1.2/docs/references/peering.md b/docs/maintain/hornet/1.2/docs/references/peering.md deleted file mode 100644 index 3056794fe47..00000000000 --- a/docs/maintain/hornet/1.2/docs/references/peering.md +++ /dev/null @@ -1,152 +0,0 @@ ---- -description: How to configure your nodes' peers, _neighbors_, and auto-peering. -image: /img/banner/banner_hornet_peering.png -keywords: - - IOTA Node - - HORNET Node - - configuration - - peer - - peering - - identity - - autopeering - - explanation ---- - -# Peering - -![HORNET Node Peering](/img/banner/banner_hornet_peering.png) - -The IOTA network is a distributed network. It uses a _gossip protocol_ to broadcast data among nodes. -To participate in a network, each node has to establish a secure connection to other nodes in the network (to its peer neighbors), and mutually exchange messages. - -## Node Identity - -Each node can be uniquely identified by a `peer identity`. `Peer identity` (also called `PeerId`) is represented by a public -and private key pair. -Since `PeerId` is a cryptographic hash of a peer's public key, the `PeerId` represents a verifiable link between the given peer and its public key. -It enables individual peers to establish a secure communication channel as the hash can be used to verify an identity of the peer. - -When HORNET is started for the first time, it will automatically generate a `PeerId` and save the identity's private key in the `./p2pstore/identity.key` file. -HORNET will keep the generated identity between subsequent restarts. - -Each time HORNET starts, the `PeerId` is written to stdout: - -```plaintext -2022-07-19T13:27:18+02:00 INFO P2P peer configured, ID: 12D3KooWF4B2jdZbSZFX1Z9PPKp2YQs58Hh2WfnoMKYx7yuzVx53 -``` - -Your `PeerId` is an essential part of your `multiaddr` used to configure neighbors. For example, `/dns/example.com/tcp/15600/p2p/12D3KooWHiPg9gzmy1cbTFAUekyLHQKQKvsKmhzB7NJ5xnhK4WKq`, -where `12D3KooWHiPg9gzmy1cbTFAUekyLHQKQKvsKmhzB7NJ5xnhK4WKq` corresponds to your `PeerId`. -Your `PeerId` is also visible on the start page of the dashboard. - -You can find more information on the `PeerId` in the [libp2p docs page](https://docs.libp2p.io/concepts/peer-id/). - -## Addressing Peer Neighbors - -To communicate to your peer _neighbors_, you will need an address to reach them. For that, HORNET uses the `MultiAddresses` format (also known as `multiaddr`). - -`multiaddr` is a convention on how to encode multiple layers of addressing information into a single path structure that is future-proof. -Basically, `multiaddr` combines several pieces of information in a single human-readable and machine-optimized string, including network protocol and [`PeerId`](#node-identity). - -For example, a node is reachable using IPv4 `100.1.1.1` using `TCP` on port `15600` and its `PeerId` -is `12D3KooWHjcCgWPnUEP8wNdbL2fx63Cmosk16xyZ25iUZagxmHb4`. A `multiaddr` encoding of this information would look like this: - -```plaintext -/ip4/100.1.1.1/tcp/15600/p2p/12D3KooWHjcCgWPnUEP8wNdbL2fx63Cmosk16xyZ25iUZagxmHb4 -``` - -:::note - -Consider how `ip4` is used. A common mistake is to use `ipv4`. - -::: - -If a node is reachable using a DNS name (for example `node01.iota.org`), then the given `multiaddr` would be: - -```plaintext -/dns/node01.iota.org/tcp/15600/p2p/12D3KooWHjcCgWPnUEP8wNdbL2fx63Cmosk16xyZ25iUZagxmHb4 -``` - -You will need to find out your own `multiaddr` to give to your peers for neighboring. To do so, combine the `peerId` you received -from the stdout when the HORNET node started up, and your configured `p2p.bindAddress`. -Replace the `/ip4/`/`/dns/` segments with the actual information. - -You can find more information about `multiaddr` at the [libp2p docs page](https://docs.libp2p.io/concepts/addressing/). - -## Adding Node Peers - -Once you know your node's own `multiaddr`, it can be exchanged with other node owners to establish a mutual peer connection. -We recommended several peer neighbors between 4-6 to get some degree of redundancy. - -## Finding Neighbors - -You can join the official IOTA Discord server and the `#nodesharing` channel. -There, you will be able to describe your node location (Europe, Asia, etc.), with your allocated high watermark resources and ask for neighbors. - -:::note - -Do not publicly disclose your node `multiaddr` to all readers but wait for an individual direct chat. - -::: - -You can add peers using the HORNET [dashboard](../how_tos/using_docker.md#starting-hornet). -To do so, go to _Peers_ and click on _Add Peer_. You can also add peers on the `peering.json` file. - -This is `peering.json` example, with `ip4`, `ip6` and `dns` peers: - -```json -{ - "peers": [ - { - "alias": "Node1", - "multiAddress": "/ip4/192.0.2.0/tcp/15600/p2p/12D3KooWCKWcTWevORKa2KEBputEGASvEBuDfRDSbe8t1DWugUmL" - }, - { - "alias": "Node2", - "multiAddress": "/ip6/2001:db8:3333:4444:5555:6666:7777:8888/tcp/16600/p2p/12D3KooWJDqHjhd8us8XdbKy1Adp5nV6XoI7XhjZbPWAfbAbkLbH" - }, - { - "alias": "Node3", - "multiAddress": "/dns/example.com/tcp/15600/p2p/12D3KooWN7F4eRAYbavnasME8WGXwkrpzWWoZSXfNSEpudmWi9YP" - } - ] -} -``` - -## Autopeering - -HORNET also supports automatic discovery of peers through the _autopeering_ module. -To minimize service distribution in case your autopeered peers are flaky, we recommend you only use autopeering if you have at least four static peers. - -Autopeering is disabled by default. If you want to enable it, set the `"p2p.autopeering.enabled"` value to `"true"`. -See the [configuration reference](configuration.md#-autopeering) for more information. - -:::note - -The autopeering plugin will disclose your public IP address to possibly all nodes and entry points. -Do not enable this plugin if you do not want this to happen! - -::: - -Your node will use the specified entry nodes under `p2p.autopeering.entryNodes` to find new peers. `entryNodes` are also encoded as `multiaddr`: - -``` -/ip4/45.12.34.43/udp/14626/autopeering/8CZELJwB3aBzxJgnLMvvt1FirAwNN6jif9LavYTNHCty -``` - -where the `/autopeering` portion defines the base58 encoded Ed25519 public key. - -By default, HORNET will peer up to four autopeered peers and initiate a gossip protocol with them. - -### Entry Node - -If you want to run your own node as an autopeering entry node, you should enable `p2p.autopeering.runAsEntryNode`. -The base58 encoded public key is in the output of the `p2pidentity-gen` HORNET tool. -Alternatively, if you already have an identity in a `p2pstore`, you can use the `p2pidentity-extract` HORNET tool to extract it. - -### Low/High Watermark - -The `p2p.connectionManager.highWatermark` and `p2p.connectionManager.lowWatermark` configuration options define "watermark" points. -Watermark points can be considered like a filling basin where if the `highWatermark` is reached, water will be drained until it reaches the `lowWatermark` again. -Similarly, the connection manager within HORNET will start trimming away connections to peers if `highWatermark` peers are connected until it reaches `lowWatermark` count of peers. -These watermarks exist for a certain buffer number of peers to be connected, which will not necessarily be targeted by the gossip protocol. diff --git a/docs/maintain/hornet/1.2/docs/welcome.md b/docs/maintain/hornet/1.2/docs/welcome.md deleted file mode 100644 index 7a1b6625370..00000000000 --- a/docs/maintain/hornet/1.2/docs/welcome.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -description: Hornet is a powerful, easy to install IOTA node software written in Go. It provides the full node capabilities including full support of the Chrysalis network update. -image: /img/banner/banner_hornet.png -keywords: - - IOTA Node - - Hornet Node - - Hornet - - IOTA - - Node Software - - Welcome - - explanation ---- - -# Welcome to Hornet - -![Hornet Node](/img/banner/banner_hornet.png) - -Hornet is a powerful, easy to install node software written in Go. -It provides the full node capabilities including full support of the latest network updates. - -By running your own node you have the following benefits: - -- You have direct access to the IOTA network, instead of having to connect to and trust someone else's node. -- You help the IOTA network to become more distributed and resilient by validating messages and _value transactions_ in - the IOTA network. - -## Source Code - -The source code of the project is available on [GitHub](https://github.com/iotaledger/hornet). diff --git a/docs/maintain/hornet/1.2/sidebars.js b/docs/maintain/hornet/1.2/sidebars.js deleted file mode 100644 index edd025e4a1c..00000000000 --- a/docs/maintain/hornet/1.2/sidebars.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * * Creating a sidebar enables you to: - - create an ordered group of docs - - render a sidebar for each doc of that group - - provide next/previous navigation - - The sidebars can be generated from the filesystem, or explicitly defined here. - - Create as many sidebars as you want. - */ - -module.exports = { - docs: [ - { - type: 'category', - label: 'Hornet', - collapsed: false, - items: [ - { - type: 'doc', - id: 'welcome', - }, - { - type: 'doc', - id: 'getting_started/getting_started', - }, - { - type: 'category', - label: 'How to', - items: [ - { - type: 'doc', - id: 'how_tos/using_docker', - label: 'Install Hornet using Docker', - }, - { - type: 'doc', - id: 'how_tos/post_installation', - label: 'Post Installation', - }, - { - type: 'doc', - id: 'how_tos/run_as_a_verifier', - label: 'Run a Node as a Verifier', - }, - ], - }, - { - type: 'category', - label: 'References', - items: [ - { - type: 'doc', - id: 'references/configuration', - label: 'Configuration', - }, - { - type: 'doc', - id: 'references/peering', - label: 'Peering', - }, - { - type: 'doc', - id: 'references/api_reference', - label: 'API Reference', - }, - ], - }, - ], - }, - ], -}; diff --git a/versionedConfig.js b/versionedConfig.js index 5180151ed2c..e4dcc897611 100644 --- a/versionedConfig.js +++ b/versionedConfig.js @@ -217,10 +217,6 @@ exports.maintainPluginsConfig = [ label: '2.0', badges: ['IOTA', 'Shimmer'], }, - { - label: '1.2', - badges: ['Deprecated'], - }, ], }, { From bd98f6380deb006c7a5c0af69382078e5a8fdc89 Mon Sep 17 00:00:00 2001 From: Dr-Electron Date: Tue, 16 Jan 2024 15:39:36 +0100 Subject: [PATCH 2/5] Update install guide to newest node-docker-setup --- .../hornet/2.0/docs/how_tos/using_docker.md | 52 +++++++++++++++++-- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/docs/maintain/hornet/2.0/docs/how_tos/using_docker.md b/docs/maintain/hornet/2.0/docs/how_tos/using_docker.md index 5663f77c632..62460ca306a 100644 --- a/docs/maintain/hornet/2.0/docs/how_tos/using_docker.md +++ b/docs/maintain/hornet/2.0/docs/how_tos/using_docker.md @@ -58,12 +58,32 @@ The commands assume you are using Linux. ::: -Once you have completed all the installation [requirements](#requirements), you can download the latest release by running the following command: +Once you have completed all the installation [requirements](#requirements), you can download one of the latest releases, depending on the network you want to join, by running the following command: + + + + +```sh +mkdir node-docker-setup && cd node-docker-setup && curl -L https://node-docker-setup.iota.org/iota | tar -zx +``` + + + + +```sh +mkdir node-docker-setup && cd node-docker-setup && curl -L https://node-docker-setup.iota.org/shimmer | tar -zx +``` + + + ```sh -mkdir node-docker-setup && cd node-docker-setup && curl -L https://node-docker-setup.iota.org/stardust | tar -zx +mkdir node-docker-setup && cd node-docker-setup && curl -L https://node-docker-setup.iota.org/testnet | tar -zx ``` + + + ## Prepare :::note @@ -107,10 +127,36 @@ You can configure your node to either use HTTP or HTTPS. For publicly exposed no ::: +:::info + +Just activating a Wasp node isn't enough for full participation in a smart contracts chain. If you're using our ShimmerEVM chain, a standalone Wasp node isn't necessary. For setting up your own chain, see our guide for the required steps: [Set Up a Chain](/wasp-cli/how-tos/setting-up-a-chain/) + +::: + + + + +```sh reference +https://github.com/iotaledger/node-docker-setup/blob/main/iota/env_template +``` + + + + +```sh reference +https://github.com/iotaledger/node-docker-setup/blob/main/shimmer/env_template +``` + + + + ```sh reference -https://github.com/iotaledger/node-docker-setup/blob/main/stardust/env_template +https://github.com/iotaledger/node-docker-setup/blob/main/testnet/env_template ``` + + + ### 3. Setup neighbors Add your HORNET neighbor addresses to the `peering.json` file. From 666380597fbbc66759a3d8df64547207abe95426 Mon Sep 17 00:00:00 2001 From: Dr-Electron Date: Tue, 16 Jan 2024 16:58:00 +0100 Subject: [PATCH 3/5] Fix redirects --- src/utils/pluginConfigGenerators.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/pluginConfigGenerators.js b/src/utils/pluginConfigGenerators.js index 25e8c942f8d..7ae1b031693 100644 --- a/src/utils/pluginConfigGenerators.js +++ b/src/utils/pluginConfigGenerators.js @@ -71,8 +71,8 @@ function createVersionRedirects(versionedConfig) { const routeBasePath = doc.routeBasePath ? doc.routeBasePath : doc.id; if (mainVersion) { - if (doc.versions.length > 1) { - // Redirect deep version link to route base path + if (mainVersion.label != '') { + // Redirect deep version link (for plugins that have a version) to route base path redirects.push({ from: '/' + routeBasePath + '/' + mainVersion.label, to: '/' + routeBasePath, From 11770213a1004542b76de1b3280cc60de04fdd2e Mon Sep 17 00:00:00 2001 From: Dr-Electron Date: Tue, 16 Jan 2024 16:58:50 +0100 Subject: [PATCH 4/5] Remove broken link --- .../chrysalis/docs/explanations/update/migration_mechanism.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/build/introduction-docs/chrysalis/docs/explanations/update/migration_mechanism.md b/docs/build/introduction-docs/chrysalis/docs/explanations/update/migration_mechanism.md index d707ba5904c..a3347c9cd68 100644 --- a/docs/build/introduction-docs/chrysalis/docs/explanations/update/migration_mechanism.md +++ b/docs/build/introduction-docs/chrysalis/docs/explanations/update/migration_mechanism.md @@ -109,5 +109,3 @@ A verifier node is a Chrysalis Phase 2 node which upon seeing receipts: 1. Queries a legacy node for the confirmation data for the specified milestone in the receipt. 2. Then performs WOTS signature verification of the legacy milestone bundle and all confirmed bundles. 3. Additionally, it also checks that all confirmed funds on the legacy network for the given legacy milestone, are indeed minted with a given batch of receipts (i.e. nothing is left out). - -For further reference, you can read the [Hornet as a verifier node](/hornet/1.2/how_tos/run_as_a_verifier) page. From 946b36c8d0455c3d13054397609c198e01d1cefc Mon Sep 17 00:00:00 2001 From: Dr-Electron Date: Tue, 16 Jan 2024 20:56:26 +0100 Subject: [PATCH 5/5] Update docs/maintain/hornet/2.0/docs/how_tos/using_docker.md Co-authored-by: Lucas Tortora <85233773+lucas-tortora@users.noreply.github.com> --- docs/maintain/hornet/2.0/docs/how_tos/using_docker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/maintain/hornet/2.0/docs/how_tos/using_docker.md b/docs/maintain/hornet/2.0/docs/how_tos/using_docker.md index 62460ca306a..766b2890f2f 100644 --- a/docs/maintain/hornet/2.0/docs/how_tos/using_docker.md +++ b/docs/maintain/hornet/2.0/docs/how_tos/using_docker.md @@ -129,7 +129,7 @@ You can configure your node to either use HTTP or HTTPS. For publicly exposed no :::info -Just activating a Wasp node isn't enough for full participation in a smart contracts chain. If you're using our ShimmerEVM chain, a standalone Wasp node isn't necessary. For setting up your own chain, see our guide for the required steps: [Set Up a Chain](/wasp-cli/how-tos/setting-up-a-chain/) +Activating a Wasp node isn't enough to fully participate in a smart contract chain. You don't need a standalone Wasp node if you're using our ShimmerEVM chain. For setting up your own chain, see our guide for the required steps: [Set Up a Chain](/wasp-cli/how-tos/setting-up-a-chain/) :::