From 53a9ddb7964c0ba501395c42c1f97cb98b7fa037 Mon Sep 17 00:00:00 2001 From: Lucas Tortora Date: Tue, 7 May 2024 11:16:01 -0300 Subject: [PATCH 01/25] add iota-core first draft based on the Hornet docs. --- .../docs/getting_started/getting_started.md | 69 ++++ .../2.0/docs/how_tos/post_installation.md | 81 +++++ .../2.0/docs/how_tos/using_docker.md | 278 ++++++++++++++++ docs/maintain/iota-core/2.0/docs/welcome.md | 29 ++ docs/maintain/iota-core/2.0/sidebars.js | 310 ++++++++++++++++++ versionedConfig.js | 13 + 6 files changed, 780 insertions(+) create mode 100644 docs/maintain/iota-core/2.0/docs/getting_started/getting_started.md create mode 100644 docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md create mode 100644 docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md create mode 100644 docs/maintain/iota-core/2.0/docs/welcome.md create mode 100644 docs/maintain/iota-core/2.0/sidebars.js diff --git a/docs/maintain/iota-core/2.0/docs/getting_started/getting_started.md b/docs/maintain/iota-core/2.0/docs/getting_started/getting_started.md new file mode 100644 index 00000000000..d6ee25a2691 --- /dev/null +++ b/docs/maintain/iota-core/2.0/docs/getting_started/getting_started.md @@ -0,0 +1,69 @@ +--- +description: Getting started with the recommended requirements and installation links. +image: /img/banner/banner_hornet_getting_started.png +tags: + - 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 or Shimmer. 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 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 v2.0.0+ since it is the minimum version that targets the Stardust upgrade. + +::: + +## Recommended Requirements + +To handle a potential high rate of blocks 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). + +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 together with some [INX](../inx-plugins) extensions 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/iota-core/2.0/docs/how_tos/post_installation.md b/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md new file mode 100644 index 00000000000..c93ce52bcbf --- /dev/null +++ b/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md @@ -0,0 +1,81 @@ +--- +description: Introducing the HORNET nodes configuration files and their settings. +image: /img/logo/HORNET_logo.png +tags: + - 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). + +## Default Configuration + +There are default configuration files available that you can use: + +- `config_testnet.json` - Includes the default values required to join the Shimmer Testnet. +- `config_defaults.json` - Includes all default parameters used by HORNET. You can use this file as a reference when customizing your `config.json` + +You can pick one of these files and use it as your `config.json` to join the configured network. + +Please see the [`config.json`](../references/configuration.md) and [`peering.json`](../references/peering.md) articles for more information about the contents of the configuration files. + +## 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 [Core REST API v2](../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. + +### Other + +You can find all the HTTP REST API related options in the [`config.json` reference](../references/configuration.md#restapi) + +## Update to 2.x.x + +You can update HORNET to the latest stable version with no breaking updates by running the following command: + +```sh +docker compose down && docker compose pull && docker compose up -d +``` diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md new file mode 100644 index 00000000000..b5b9eb77645 --- /dev/null +++ b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md @@ -0,0 +1,278 @@ +--- +description: Learn how to install and run a HORNET node using Docker. +image: /img/banner/banner_hornet_using_docker.png +tags: + - IOTA Node + - HORNET Node + - Docker + - Install + - Run + - macOS + - Windows + - Linux + - how to +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import LinuxCommands from '@site/docs/_admonitions/_linux-commands.md'; + +# 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. +- [inx-dashboard](https://github.com/iotaledger/inx-dashboard) - Node dashboard. +- [inx-indexer](https://github.com/iotaledger/inx-indexer) - Indexer extension for wallets and applications. +- [inx-mqtt](https://github.com/iotaledger/inx-mqtt) - MQTT extension providing the Event API. +- [inx-participation](https://github.com/iotaledger/inx-participation) - Participation extension providing on-tangle-voting. +- [inx-poi](https://github.com/iotaledger/inx-poi) - Extension to generate proofs of _inclusion_. +- [inx-spammer](https://github.com/iotaledger/inx-spammer) - Network spammer. +- [wasp](https://github.com/iotaledger/wasp) - L2 Node for IOTA Smart Contracts. + +## Requirements + +1. A recent release of Docker enterprise or community edition. Avoid using the Docker version shipped with your OS since these are mostly out of date. 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)_ +- `4000 TCP/UDP` - Used for Wasp gossip. _(optional if not using Wasp)_ + +5. [curl](https://curl.se/). + +## Download the latest release + + + +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/testnet | tar -zx +``` + + + + +## Prepare + + + +### 1. Generate 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: + +```sh +docker compose run hornet tools pwd-hash +``` + +Copy the output of the command for the next step. + +### 2. Setup your Environment + +Copy the `env_template` file to `.env` using the following command: + +```sh +cp env_template .env +``` + +Modify the `.env` file to fit your needs with the editor of your choice. +We are using `nano` in the following example: + +```sh +nano .env +``` + +Follow the instructions provided in the file. +With `nano` you can save your changes and exit the editor using `CTRL+O` and `CTRL+X`. + +:::note + +You can configure your node to either use HTTP or HTTPS. For publicly exposed nodes, we heavily recommend using HTTPS. + +::: + +:::info + +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/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/testnet/env_template +``` + + + + +### 3. Setup neighbors + +Add your HORNET neighbor addresses to the `peering.json` file. + +:::note + +This step is recommended, but optional if you are using autopeering. +See [peering](../references/peering.md) for more information. + +::: + +### 4. Create the `data` folder + +All files used by HORNET, the INX extensions, Wasp, 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 +``` + +## Run + +### Starting the node + +You can start the HORNET node and INX extensions 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)_ +- Legacy-API: `https://node.your-domain.com/api/core/v0/info` _(optional if using "history-legacy" profile)_ +- Chrysalis-API: `https://node.your-domain.com/api/core/v1/info` _(optional if using "history-chrysalis" profile)_ +- Wasp API: `https://node.your-domain.com/wasp/api` _(optional if using "wasp" profile)_ +- Wasp Dashboard: `https://node.your-domain.com/wasp/dashboard` _(optional if using "wasp" 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)_ +- Legacy-API: `http://localhost/api/core/v0/info` _(optional if using "history-legacy" profile)_ +- Chrysalis-API: `http://localhost/api/core/v1/info` _(optional if using "history-chrysalis" profile)_ +- Wasp API: `http://localhost/wasp/api` _(optional if using "wasp" profile)_ +- Wasp Dashboard: `http://localhost/wasp/dashboard` _(optional if using "wasp" 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 and INX extensions 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 ` + +## INX + +This setup includes the INX extensions listed at the beginning of this guide. +If you want to disable certain extensions you can comment out the different services in the `docker-compose.yml` file and restart the node. + +# More Information + +For more information look at the [Github repository](https://github.com/iotaledger/node-docker-setup) diff --git a/docs/maintain/iota-core/2.0/docs/welcome.md b/docs/maintain/iota-core/2.0/docs/welcome.md new file mode 100644 index 00000000000..373a3c8ac85 --- /dev/null +++ b/docs/maintain/iota-core/2.0/docs/welcome.md @@ -0,0 +1,29 @@ +--- +description: 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. +image: /img/banner/banner_hornet.png +tags: + - IOTA Node + - HORNET Node + - HORNET + - IOTA + - Shimmer + - 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 or Shimmer network, instead of having to connect to and trust someone else's node. +- You help the network to become more distributed and resilient by validating blocks and _value transactions_. + +## Source Code + +The source code of the project is available on [GitHub](https://github.com/iotaledger/hornet). diff --git a/docs/maintain/iota-core/2.0/sidebars.js b/docs/maintain/iota-core/2.0/sidebars.js new file mode 100644 index 00000000000..7c077789659 --- /dev/null +++ b/docs/maintain/iota-core/2.0/sidebars.js @@ -0,0 +1,310 @@ +/** + * * 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: 'category', + label: 'INX-Plugins', + link: { + type: 'generated-index', + title: 'INX-Plugins', + description: + 'Use custom plugins to extend the functionality of your node.', + slug: '/inx-plugins', + keywords: ['inx', 'plugins'], + }, + items: [ + { + type: 'category', + label: 'API Core v0', + collapsed: true, + items: [ + { + type: 'doc', + label: 'Welcome', + id: 'inx-plugins/api-core-v0/welcome', + }, + { + type: 'doc', + label: 'Configuration', + id: 'inx-plugins/api-core-v0/configuration', + }, + ], + }, + { + type: 'category', + label: 'API Core v1', + collapsed: true, + items: [ + { + type: 'doc', + label: 'Welcome', + id: 'inx-plugins/api-core-v1/welcome', + }, + { + type: 'doc', + label: 'Configuration', + id: 'inx-plugins/api-core-v1/configuration', + }, + ], + }, + { + type: 'category', + label: 'Coordinator', + collapsed: true, + items: [ + { + type: 'doc', + label: 'Welcome', + id: 'inx-plugins/coordinator/welcome', + }, + { + type: 'doc', + label: 'Configuration', + id: 'inx-plugins/coordinator/configuration', + }, + ], + }, + { + type: 'category', + label: 'Dashboard', + collapsed: true, + items: [ + { + type: 'doc', + label: 'Welcome', + id: 'inx-plugins/dashboard/welcome', + }, + { + type: 'doc', + label: 'Configuration', + id: 'inx-plugins/dashboard/configuration', + }, + ], + }, + { + type: 'category', + label: 'Faucet', + collapsed: true, + items: [ + { + type: 'doc', + label: 'Welcome', + id: 'inx-plugins/faucet/welcome', + }, + { + type: 'doc', + label: 'Configuration', + id: 'inx-plugins/faucet/configuration', + }, + ], + }, + { + type: 'category', + label: 'Indexer', + collapsed: true, + items: [ + { + type: 'doc', + label: 'Welcome', + id: 'inx-plugins/indexer/welcome', + }, + { + type: 'doc', + label: 'Configuration', + id: 'inx-plugins/indexer/configuration', + }, + { + type: 'doc', + label: 'API Reference', + id: 'inx-plugins/indexer/api_reference', + }, + { + type: 'doc', + label: 'How To Query Outputs', + id: 'inx-plugins/indexer/how_to/query_outputs', + }, + ], + }, + { + type: 'category', + label: 'IRC Metadata', + collapsed: true, + items: [ + { + type: 'doc', + label: 'Welcome', + id: 'inx-plugins/irc-metadata/welcome', + }, + { + type: 'doc', + label: 'Configuration', + id: 'inx-plugins/irc-metadata/configuration', + }, + { + type: 'doc', + label: 'API Reference', + id: 'inx-plugins/irc-metadata/api_reference', + }, + ], + }, + { + type: 'category', + label: 'MQTT', + collapsed: true, + items: [ + { + type: 'doc', + label: 'Welcome', + id: 'inx-plugins/mqtt/welcome', + }, + { + type: 'doc', + label: 'Configuration', + id: 'inx-plugins/mqtt/configuration', + }, + { + type: 'doc', + label: 'API Reference', + id: 'inx-plugins/mqtt/api_reference', + }, + ], + }, + { + type: 'category', + label: 'Participation', + collapsed: true, + items: [ + { + type: 'doc', + label: 'Welcome', + id: 'inx-plugins/participation/welcome', + }, + { + type: 'doc', + label: 'Configuration', + id: 'inx-plugins/participation/configuration', + }, + { + type: 'doc', + label: 'API Reference', + id: 'inx-plugins/participation/api_reference', + }, + ], + }, + { + type: 'category', + label: 'POI', + collapsed: true, + items: [ + { + type: 'doc', + label: 'Welcome', + id: 'inx-plugins/poi/welcome', + }, + { + type: 'doc', + label: 'Configuration', + id: 'inx-plugins/poi/configuration', + }, + { + type: 'doc', + label: 'API Reference', + id: 'inx-plugins/poi/api_reference', + }, + ], + }, + { + type: 'category', + label: 'Spammer', + collapsed: true, + items: [ + { + type: 'doc', + label: 'Welcome', + id: 'inx-plugins/spammer/welcome', + }, + { + type: 'doc', + label: 'Configuration', + id: 'inx-plugins/spammer/configuration', + }, + ], + }, + { + type: 'category', + label: 'Community INX Plugins', + collapsed: true, + items: [ + { + label: 'INX Collector', + type: 'link', + href: 'https://github.com/teleconsys/inx-collector', + }, + ], + }, + ], + }, + { + 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 58b8fbb2d32..0fb3cac0497 100644 --- a/versionedConfig.js +++ b/versionedConfig.js @@ -124,6 +124,19 @@ exports.maintainPluginsConfig = [ }, ], }, + { + id: 'iota-core', + label: 'IOTA-Core', + description: 'IOTA\'s latest node software.', + icon: 'Iota20', + subsection: 'maintain-layer-1', + versions: [ + { + label: '2.0', + badges: ['IOTA', 'Shimmer'], + }, + ], + }, { id: 'wasp', label: 'Wasp', From 6690fab71a78a1de8952ec1ef79765d98417c011 Mon Sep 17 00:00:00 2001 From: Lucas Tortora Date: Tue, 7 May 2024 11:56:37 -0300 Subject: [PATCH 02/25] add config and link to api ref base replace hornet with iota-core replace icons --- .../docs/getting_started/getting_started.md | 19 +- .../2.0/docs/how_tos/post_installation.md | 14 +- .../2.0/docs/how_tos/using_docker.md | 37 +- .../2.0/docs/references/api_reference.md | 16 + .../2.0/docs/references/configuration.md | 462 ++++++++++++++++++ docs/maintain/iota-core/2.0/docs/welcome.md | 16 +- docs/maintain/iota-core/2.0/sidebars.js | 8 +- 7 files changed, 520 insertions(+), 52 deletions(-) create mode 100644 docs/maintain/iota-core/2.0/docs/references/api_reference.md create mode 100755 docs/maintain/iota-core/2.0/docs/references/configuration.md diff --git a/docs/maintain/iota-core/2.0/docs/getting_started/getting_started.md b/docs/maintain/iota-core/2.0/docs/getting_started/getting_started.md index d6ee25a2691..3beeabdcdd6 100644 --- a/docs/maintain/iota-core/2.0/docs/getting_started/getting_started.md +++ b/docs/maintain/iota-core/2.0/docs/getting_started/getting_started.md @@ -1,9 +1,9 @@ --- description: Getting started with the recommended requirements and installation links. -image: /img/banner/banner_hornet_getting_started.png +image: /img/icons/iota/iota_core.png tags: - IOTA Node - - HORNET Node + - IOTA-core Node - Linux - macOS - Windows @@ -14,7 +14,6 @@ tags: # Getting Started -![HORNET Node getting started](/img/banner/banner_hornet_getting_started.png) Running a node is an efficient way to use IOTA or Shimmer. 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 network to become more distributed and resilient. @@ -25,12 +24,6 @@ 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 v2.0.0+ since it is the minimum version that targets the Stardust upgrade. - -::: - ## Recommended Requirements To handle a potential high rate of blocks per second, nodes need enough computational power to run reliably, and @@ -44,7 +37,7 @@ should have the minimum specs: 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: +The IOTA-Core exposes different functionality on different ports: - `15600 TCP` - Gossip protocol port. - `14626 UDP` - Autopeering port (optional). @@ -56,12 +49,12 @@ 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 together with some [INX](../inx-plugins) extensions secured behind a [Traefik](https://traefik.io) SSL reverse proxy. +The IOTA-Core is written in Go and can be deployed on all major platforms. +The [recommended setup](../how_tos/using_docker.md) uses Docker to run the IOTA-Core together with some [INX](../inx-plugins) extensions 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: +The IOTA-Core 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). diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md b/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md index c93ce52bcbf..af6e8f37e9a 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md @@ -1,9 +1,9 @@ --- -description: Introducing the HORNET nodes configuration files and their settings. -image: /img/logo/HORNET_logo.png +description: Introducing the IOTA-core nodes configuration files and their settings. +image: /img/icons/iota/iota_core.png tags: - IOTA Node - - HORNET Node + - IOTA-core Node - Configuration - REST API - Dashboard @@ -12,7 +12,7 @@ tags: # Post-installation -Once you have deployed HORNET, you can set all the parameters using configuration files. +Once you have deployed the IOTA-core, you can set all the parameters using configuration files. ## Configuration Files @@ -26,7 +26,7 @@ The most important configuration files are: There are default configuration files available that you can use: - `config_testnet.json` - Includes the default values required to join the Shimmer Testnet. -- `config_defaults.json` - Includes all default parameters used by HORNET. You can use this file as a reference when customizing your `config.json` +- `config_defaults.json` - Includes all default parameters used by the IOTA-core. You can use this file as a reference when customizing your `config.json` You can pick one of these files and use it as your `config.json` to join the configured network. @@ -36,7 +36,7 @@ Please see the [`config.json`](../references/configuration.md) and [`peering.jso 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 [Core REST API v2](../references/api_reference.md) on port `14265`. +By default, the IOTA-core will expose the [Core REST API v2](../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: @@ -74,7 +74,7 @@ You can find all the HTTP REST API related options in the [`config.json` referen ## Update to 2.x.x -You can update HORNET to the latest stable version with no breaking updates by running the following command: +You can update the IOTA-core to the latest stable version with no breaking updates by running the following command: ```sh docker compose down && docker compose pull && docker compose up -d diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md index b5b9eb77645..11f7aa3b174 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md @@ -1,9 +1,9 @@ --- -description: Learn how to install and run a HORNET node using Docker. -image: /img/banner/banner_hornet_using_docker.png +description: Learn how to install and run a iota-CORE node using Docker. +image: /img/icons/iota/iota_core.png tags: - IOTA Node - - HORNET Node + - IOTA-core Node - Docker - Install - Run @@ -17,16 +17,15 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import LinuxCommands from '@site/docs/_admonitions/_linux-commands.md'; -# Install HORNET using Docker +# Install the IOTA-core 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: +This guide represents the recommended setup to run an IOTA-core node. +It includes everything required to set up a public node accessible by wallets and applications: -- [HORNET](https://github.com/iotaledger/hornet) +- [IOTA-core](https://github.com/iotaledger/iota-core) - [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. +- [Prometheus](https://prometheus.io) - Metrics scraper configured to collect all metrics from the IOTA-Core and INX extensions. - [Grafana](https://grafana.com) - Data visualizer that can be used to display the metrics collected by Prometheus. - [inx-dashboard](https://github.com/iotaledger/inx-dashboard) - Node dashboard. - [inx-indexer](https://github.com/iotaledger/inx-indexer) - Indexer extension for wallets and applications. @@ -43,8 +42,8 @@ It includes everything required to setup a public node accessible by wallets and 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. +- `15600 TCP` - Used for the IOTA-Core gossip. +- `14626 UDP` - Used for the IOTA-Core autopeering. - `80 TCP` - Used for HTTP. _(can be changed, see below)_ - `443 TCP` - Used for HTTPS. _(optional if not using HTTPS)_ - `4000 TCP/UDP` - Used for Wasp gossip. _(optional if not using Wasp)_ @@ -87,7 +86,7 @@ mkdir node-docker-setup && cd node-docker-setup && curl -L https://node-docker-s ### 1. Generate dashboard credentials -To access your HORNET dashboard, a set of credentials need to be configured. +To access your IOTA-Core dashboard, a set of credentials need to be configured. Run the following command to generate a password hash and salt for the dashboard: ```sh @@ -152,7 +151,7 @@ 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. +Add your IOTA-Core neighbor addresses to the `peering.json` file. :::note @@ -163,7 +162,7 @@ See [peering](../references/peering.md) for more information. ### 4. Create the `data` folder -All files used by HORNET, the INX extensions, Wasp, Traefik & co will be stored in a directory called `data`. +All files used by the IOTA-Core, the INX extensions, Wasp, 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: @@ -175,7 +174,7 @@ To create this directory with correct permissions run the contained script: ### Starting the node -You can start the HORNET node and INX extensions by running: +You can start the IOTA-Core node and INX extensions by running: ```sh docker compose up -d @@ -188,7 +187,7 @@ docker compose up -d 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` +- IOTA-Core Dashboard: `https://node.your-domain.com/dashboard` - Grafana: `https://node.your-domain.com/grafana` _(optional if using "monitoring" profile)_ - Legacy-API: `https://node.your-domain.com/api/core/v0/info` _(optional if using "history-legacy" profile)_ - Chrysalis-API: `https://node.your-domain.com/api/core/v1/info` _(optional if using "history-chrysalis" profile)_ @@ -210,7 +209,7 @@ You can configure your wallet software to use `https://node.your-domain.com` 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` +- IOTA-Core Dashboard: `http://localhost/dashboard` - Grafana: `http://localhost/grafana` _(optional if using "monitoring" profile)_ - Legacy-API: `http://localhost/api/core/v0/info` _(optional if using "history-legacy" profile)_ - Chrysalis-API: `http://localhost/api/core/v1/info` _(optional if using "history-chrysalis" profile)_ @@ -227,7 +226,7 @@ You can configure your wallet software to use `http://localhost` ### Displaying Log Output -You can display the HORNET logs by running: +You can display the IOTA-Core logs by running: ```sh docker compose logs -f hornet @@ -238,7 +237,7 @@ docker compose logs -f hornet ### Stopping the node -You can stop the HORNET node and INX extensions by running: +You can stop the IOTA-Core node and INX extensions by running: ```sh docker compose down diff --git a/docs/maintain/iota-core/2.0/docs/references/api_reference.md b/docs/maintain/iota-core/2.0/docs/references/api_reference.md new file mode 100644 index 00000000000..f2c1c9cfd33 --- /dev/null +++ b/docs/maintain/iota-core/2.0/docs/references/api_reference.md @@ -0,0 +1,16 @@ +--- +description: Links to the REST API reference and the Node event API reference. +image: /img/icons/iota/iota_core.png +tags: + - IOTA Node + - IOTA-Core Node + - REST API + - API + - Reference +--- + +# API Reference + +You can find specifications of the APIs exposed by in the links below: + +- [Core REST API v2](/apis/core/v2/iota-core-rest-api) diff --git a/docs/maintain/iota-core/2.0/docs/references/configuration.md b/docs/maintain/iota-core/2.0/docs/references/configuration.md new file mode 100755 index 00000000000..d7d8d33f62b --- /dev/null +++ b/docs/maintain/iota-core/2.0/docs/references/configuration.md @@ -0,0 +1,462 @@ +--- +# !!! DO NOT MODIFY !!! +# This file is auto-generated by the gendoc tool based on the source code of the app. +description: This section describes the configuration parameters and their types for your IOTA core node. +keywords: + - IOTA Node + - Configuration + - JSON + - Customize + - Config + - reference +--- + + +# Configuration + +IOTA core node 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). + +You can change the path of the config file by using the `-c` or `--config` argument while executing `iota-core` executable. + +For example: +```bash +iota-core -c config_example.json +``` + +You can always get the most up-to-date description of the config parameters by running: + +```bash +iota-core -h --full +``` + +## 1. Application + +| Name | Description | Type | Default value | +| ------------------------- | ------------------------------------------------------ | ------- | ------------- | +| checkForUpdates | Whether to check for updates of the application or not | boolean | true | +| [shutdown](#app_shutdown) | Configuration for shutdown | object | | + +### Shutdown + +| Name | Description | Type | Default value | +| ------------------------ | ------------------------------------------------------------------------------------------------------ | ------ | ------------- | +| stopGracePeriod | The maximum time to wait for background processes to finish during shutdown before terminating the app | string | "5m" | +| [log](#app_shutdown_log) | Configuration for log | object | | + +### Log + +| Name | Description | Type | Default value | +| -------- | --------------------------------------------------- | ------- | -------------- | +| enabled | Whether to store self-shutdown events to a log file | boolean | true | +| filePath | The file path to the self-shutdown log | string | "shutdown.log" | + +Example: + +```json + { + "app": { + "checkForUpdates": true, + "shutdown": { + "stopGracePeriod": "5m", + "log": { + "enabled": true, + "filePath": "shutdown.log" + } + } + } + } +``` + +## 2. Logger + +| Name | Description | Type | Default value | +| ----------- | -------------------------------------------------------------------------------------------------------------- | ------ | ------------- | +| name | The optional name of the logger instance. All log messages are prefixed with that name. | string | "" | +| level | The minimum enabled logging level | string | "info" | +| timeFormat | Sets the logger's timestamp format. (options: "rfc3339", "rfc3339nano", "datetime", "timeonly", and "iso8601") | string | "rfc3339" | +| outputPaths | A list of file paths or stdout/stderr to write logging output to | array | stdout | + +Example: + +```json + { + "logger": { + "name": "", + "level": "info", + "timeFormat": "rfc3339", + "outputPaths": [ + "stdout" + ] + } + } +``` + +## 3. Peer to Peer + +| Name | Description | Type | Default value | +| ------------------------------------------- | ----------------------------------------------------------------- | ------ | -------------------------------------------- | +| bindMultiAddresses | The bind multi addresses for p2p connections | array | /ip4/0.0.0.0/tcp/15600
/ip6/::/tcp/15600 | +| [connectionManager](#p2p_connectionmanager) | Configuration for connectionManager | object | | +| identityPrivateKey | Private key used to derive the node identity (optional) | string | "" | +| identityPrivateKeyFilePath | The file path to the private key used to derive the node identity | string | "testnet/p2p/identity.key" | +| [autopeering](#p2p_autopeering) | Configuration for autopeering | object | | + +### ConnectionManager + +| Name | Description | Type | Default value | +| ------------- | ---------------------------------------------------------------------------- | ---- | ------------- | +| highWatermark | The threshold up on which connections count truncates to the lower watermark | int | 10 | +| lowWatermark | The minimum connections count to hold after the high watermark was reached | int | 5 | + +### Autopeering + +| Name | Description | Type | Default value | +| ---------------------- | -------------------------------------------------------------------------- | ------- | ------------- | +| maxPeers | The max number of auto-peer connections. Set to 0 to disable auto-peering. | int | 5 | +| bootstrapPeers | Peers to be used as discovery for other peers | array | | +| allowLocalIPs | Allow local IPs to be used for autopeering | boolean | false | +| externalMultiAddresses | External reacheable multi addresses advertised to the network | array | | + +Example: + +```json + { + "p2p": { + "bindMultiAddresses": [ + "/ip4/0.0.0.0/tcp/15600", + "/ip6/::/tcp/15600" + ], + "connectionManager": { + "highWatermark": 10, + "lowWatermark": 5 + }, + "identityPrivateKey": "", + "identityPrivateKeyFilePath": "testnet/p2p/identity.key", + "autopeering": { + "maxPeers": 5, + "bootstrapPeers": [], + "allowLocalIPs": false, + "externalMultiAddresses": [] + } + } + } +``` + +## 4. Profiling + +| Name | Description | Type | Default value | +| ----------- | ------------------------------------------------- | ------- | ---------------- | +| enabled | Whether the profiling component is enabled | boolean | false | +| bindAddress | The bind address on which the profiler listens on | string | "localhost:6060" | + +Example: + +```json + { + "profiling": { + "enabled": false, + "bindAddress": "localhost:6060" + } + } +``` + +## 5. RestAPI + +| Name | Description | Type | Default value | +| --------------------------- | ---------------------------------------------------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| bindAddress | The bind address on which the REST API listens on | string | "0.0.0.0:14265" | +| publicRoutes | The HTTP REST routes which can be called without authorization. Wildcards using \* are allowed | array | /health
/api/routes
/api/core/v3/info
/api/core/v3/network\*
/api/core/v3/blocks\*
/api/core/v3/transactions\*
/api/core/v3/commitments\*
/api/core/v3/outputs\*
/api/core/v3/accounts\*
/api/core/v3/validators\*
/api/core/v3/rewards\*
/api/core/v3/committee\*
/api/debug/v2/\*
/api/indexer/v2/\*
/api/mqtt/v2
/api/blockissuer/v1/\* | +| protectedRoutes | The HTTP REST routes which need to be called with authorization. Wildcards using \* are allowed | array | /api/\* | +| debugRequestLoggerEnabled | Whether the debug logging for requests should be enabled | boolean | false | +| maxPageSize | The maximum number of results per page | uint | 100 | +| maxCacheSize | The maximum size of cache for results | string | "50MB" | +| [jwtAuth](#restapi_jwtauth) | Configuration for JWT Auth | object | | +| [limits](#restapi_limits) | Configuration for limits | object | | + +### JWT Auth + +| Name | Description | Type | Default value | +| ---- | --------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------------- | +| 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 | "IOTA" | + +### Limits + +| Name | Description | Type | Default value | +| ------------- | ------------------------------------------------------------------------- | ------ | ------------- | +| maxBodyLength | The maximum number of characters that the body of an API call may contain | string | "1M" | +| maxResults | The maximum number of results that may be returned by an endpoint | int | 1000 | + +Example: + +```json + { + "restAPI": { + "bindAddress": "0.0.0.0:14265", + "publicRoutes": [ + "/health", + "/api/routes", + "/api/core/v3/info", + "/api/core/v3/network*", + "/api/core/v3/blocks*", + "/api/core/v3/transactions*", + "/api/core/v3/commitments*", + "/api/core/v3/outputs*", + "/api/core/v3/accounts*", + "/api/core/v3/validators*", + "/api/core/v3/rewards*", + "/api/core/v3/committee*", + "/api/debug/v2/*", + "/api/indexer/v2/*", + "/api/mqtt/v2", + "/api/blockissuer/v1/*" + ], + "protectedRoutes": [ + "/api/*" + ], + "debugRequestLoggerEnabled": false, + "maxPageSize": 100, + "maxCacheSize": "50MB", + "jwtAuth": { + "salt": "IOTA" + }, + "limits": { + "maxBodyLength": "1M", + "maxResults": 1000 + } + } + } +``` + +## 6. DebugAPI + +| Name | Description | Type | Default value | +| ------------------ | ----------------------------------------- | ------- | ------------- | +| enabled | Whether the DebugAPI component is enabled | boolean | false | +| [db](#debugapi_db) | Configuration for Database | object | | + +### Database + +| Name | Description | Type | Default value | +| ------------------------------- | ---------------------------------------------------------- | ------ | --------------- | +| path | The path to the database folder | string | "testnet/debug" | +| maxOpenDBs | Maximum number of open database instances | int | 2 | +| granularity | How many slots should be contained in a single DB instance | int | 100 | +| [pruning](#debugapi_db_pruning) | Configuration for pruning | object | | + +### Pruning + +| Name | Description | Type | Default value | +| --------- | ---------------------------------- | ---- | ------------- | +| threshold | How many epochs should be retained | uint | 1 | + +Example: + +```json + { + "debugAPI": { + "enabled": false, + "db": { + "path": "testnet/debug", + "maxOpenDBs": 2, + "granularity": 100, + "pruning": { + "threshold": 1 + } + } + } + } +``` + +## 7. MetricsTracker + +| Name | Description | Type | Default value | +| ------- | --------------------------------------------- | ------- | ------------- | +| enabled | Whether the Metrics Tracker plugin is enabled | boolean | true | + +Example: + +```json + { + "metricsTracker": { + "enabled": true + } + } +``` + +## 8. Database + +| Name | Description | Type | Default value | +| ---------------------- | ----------------------------------------- | ------ | ------------------ | +| engine | The used database engine (rocksdb/mapdb) | string | "rocksdb" | +| path | The path to the database folder | string | "testnet/database" | +| maxOpenDBs | Maximum number of open database instances | int | 5 | +| [pruning](#db_pruning) | Configuration for pruning | object | | + +### Pruning + +| Name | Description | Type | Default value | +| ------------------------ | -------------------------------------------- | ------ | ------------- | +| threshold | How many finalized epochs should be retained | uint | 30 | +| [size](#db_pruning_size) | Configuration for size | object | | + +### Size + +| Name | Description | Type | Default value | +| ------------------- | --------------------------------------------------------------------------------- | ------- | ------------- | +| enabled | Whether to delete old block data from the database based on maximum database size | boolean | true | +| targetSize | Target size of the database | string | "30GB" | +| reductionPercentage | The percentage the database size gets reduced if the target size is reached | float | 10.0 | +| cooldownTime | Cooldown time between two pruning by database size events | string | "5m" | + +Example: + +```json + { + "db": { + "engine": "rocksdb", + "path": "testnet/database", + "maxOpenDBs": 5, + "pruning": { + "threshold": 30, + "size": { + "enabled": true, + "targetSize": "30GB", + "reductionPercentage": 10, + "cooldownTime": "5m" + } + } + } + } +``` + +## 9. Protocol + +| Name | Description | Type | Default value | +| -------------------------------- | ---------------------------------------------------------------- | ------- | ---------------------------------- | +| [snapshot](#protocol_snapshot) | Configuration for snapshot | object | | +| commitmentCheck | Specifies whether commitment and ledger checks should be enabled | boolean | true | +| [filter](#protocol_filter) | Configuration for filter | object | | +| protocolParametersPath | The path of the protocol parameters file | string | "testnet/protocol_parameters.json" | +| [baseToken](#protocol_basetoken) | Configuration for baseToken | object | | + +### Snapshot + +| Name | Description | Type | Default value | +| ----- | ------------------------------------------------------------------------------------------ | ------ | ---------------------- | +| path | The path of the snapshot file | string | "testnet/snapshot.bin" | +| depth | Defines how many slot diffs are stored in the snapshot, starting from the full ledgerstate | int | 5 | + +### Filter + +| Name | Description | Type | Default value | +| -------------------- | ------------------------------------------------------------------------------------------ | ------ | ------------- | +| maxAllowedClockDrift | The maximum drift our wall clock can have to future blocks being received from the network | string | "5s" | + +### BaseToken + +| Name | Description | Type | Default value | +| ------------ | --------------------------------- | ------ | ------------- | +| name | The base token name | string | "Shimmer" | +| tickerSymbol | The base token ticker symbol | string | "SMR" | +| unit | The base token unit | string | "SMR" | +| subunit | The base token subunit | string | "glow" | +| decimals | The base token amount of decimals | uint | 6 | + +Example: + +```json + { + "protocol": { + "snapshot": { + "path": "testnet/snapshot.bin", + "depth": 5 + }, + "commitmentCheck": true, + "filter": { + "maxAllowedClockDrift": "5s" + }, + "protocolParametersPath": "testnet/protocol_parameters.json", + "baseToken": { + "name": "Shimmer", + "tickerSymbol": "SMR", + "unit": "SMR", + "subunit": "glow", + "decimals": 6 + } + } + } +``` + +## 10. Retainer + +| Name | Description | Type | Default value | +| ----------------------- | ----------------------------------------------------- | ------- | ------------- | +| debugStoreErrorMessages | Whether to store debug error messages in the database | boolean | false | + +Example: + +```json + { + "retainer": { + "debugStoreErrorMessages": false + } + } +``` + +## 11. Node + +| Name | Description | Type | Default value | +| ----- | ------------------------------- | ------ | ---------------- | +| alias | Set an alias to identify a node | string | "IOTA-Core node" | + +Example: + +```json + { + "node": { + "alias": "IOTA-Core node" + } + } +``` + +## 12. Prometheus + +| Name | Description | Type | Default value | +| --------------- | ---------------------------------------------------- | ------- | -------------- | +| enabled | Whether the Metrics component is enabled | boolean | true | +| bindAddress | Bind address on which the Prometheus exporter server | string | "0.0.0.0:9311" | +| goMetrics | Include go metrics | boolean | false | +| processMetrics | Include process metrics | boolean | false | +| promhttpMetrics | Include promhttp metrics | boolean | false | + +Example: + +```json + { + "prometheus": { + "enabled": true, + "bindAddress": "0.0.0.0:9311", + "goMetrics": false, + "processMetrics": false, + "promhttpMetrics": false + } + } +``` + +## 13. INX + +| Name | Description | Type | Default value | +| ----------- | ------------------------------------------------------ | ------- | ---------------- | +| enabled | Whether the INX plugin is enabled | boolean | false | +| bindAddress | The bind address on which the INX can be accessed from | string | "localhost:9029" | + +Example: + +```json + { + "inx": { + "enabled": false, + "bindAddress": "localhost:9029" + } +} +``` diff --git a/docs/maintain/iota-core/2.0/docs/welcome.md b/docs/maintain/iota-core/2.0/docs/welcome.md index 373a3c8ac85..69523208719 100644 --- a/docs/maintain/iota-core/2.0/docs/welcome.md +++ b/docs/maintain/iota-core/2.0/docs/welcome.md @@ -1,10 +1,10 @@ --- -description: 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. -image: /img/banner/banner_hornet.png +description: The IOTA-Core 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. +image: /img/icons/iota/iota_core.png tags: - IOTA Node - - HORNET Node - - HORNET + - IOTA-core Node + - IOTA-core - IOTA - Shimmer - Node Software @@ -12,11 +12,9 @@ tags: - explanation --- -# Welcome to HORNET +# Welcome to IOTA-Core -![HORNET Node](/img/banner/banner_hornet.png) - -HORNET is a powerful, easy to install node software written in Go. +The IOTA-Core 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: @@ -26,4 +24,4 @@ By running your own node you have the following benefits: ## Source Code -The source code of the project is available on [GitHub](https://github.com/iotaledger/hornet). +The source code of the project is available on [GitHub](https://github.com/iotaledger/iota-core). diff --git a/docs/maintain/iota-core/2.0/sidebars.js b/docs/maintain/iota-core/2.0/sidebars.js index 7c077789659..7c229086616 100644 --- a/docs/maintain/iota-core/2.0/sidebars.js +++ b/docs/maintain/iota-core/2.0/sidebars.js @@ -282,7 +282,7 @@ module.exports = { ], }, ], - }, + },*/ { type: 'category', label: 'References', @@ -291,19 +291,19 @@ module.exports = { type: 'doc', id: 'references/configuration', label: 'Configuration', - }, + },/* { type: 'doc', id: 'references/peering', label: 'Peering', - }, + },*/ { type: 'doc', id: 'references/api_reference', label: 'API Reference', }, ], - },*/ + }, ], }, ], From 15792eb39c33a72dcdd8236fa3833e5243b7fe06 Mon Sep 17 00:00:00 2001 From: Philipp Gackstatter Date: Wed, 8 May 2024 14:39:46 +0200 Subject: [PATCH 03/25] Add validator setup guide and update docker setup --- .../2.0/docs/how_tos/using_docker.md | 71 +++--------- .../2.0/docs/how_tos/validator_setup.md | 103 ++++++++++++++++++ docs/maintain/iota-core/2.0/sidebars.js | 5 + 3 files changed, 121 insertions(+), 58 deletions(-) create mode 100644 docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md index 11f7aa3b174..67b6f867700 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md @@ -30,10 +30,6 @@ It includes everything required to set up a public node accessible by wallets an - [inx-dashboard](https://github.com/iotaledger/inx-dashboard) - Node dashboard. - [inx-indexer](https://github.com/iotaledger/inx-indexer) - Indexer extension for wallets and applications. - [inx-mqtt](https://github.com/iotaledger/inx-mqtt) - MQTT extension providing the Event API. -- [inx-participation](https://github.com/iotaledger/inx-participation) - Participation extension providing on-tangle-voting. -- [inx-poi](https://github.com/iotaledger/inx-poi) - Extension to generate proofs of _inclusion_. -- [inx-spammer](https://github.com/iotaledger/inx-spammer) - Network spammer. -- [wasp](https://github.com/iotaledger/wasp) - L2 Node for IOTA Smart Contracts. ## Requirements @@ -46,7 +42,6 @@ It includes everything required to set up a public node accessible by wallets an - `14626 UDP` - Used for the IOTA-Core autopeering. - `80 TCP` - Used for HTTP. _(can be changed, see below)_ - `443 TCP` - Used for HTTPS. _(optional if not using HTTPS)_ -- `4000 TCP/UDP` - Used for Wasp gossip. _(optional if not using Wasp)_ 5. [curl](https://curl.se/). @@ -57,21 +52,9 @@ It includes everything required to set up a public node accessible by wallets an 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 -``` - - - +TODO: Replace with link to iota2 node docker setup. ```sh mkdir node-docker-setup && cd node-docker-setup && curl -L https://node-docker-setup.iota.org/testnet | tar -zx @@ -90,7 +73,7 @@ To access your IOTA-Core dashboard, a set of credentials need to be configured. Run the following command to generate a password hash and salt for the dashboard: ```sh -docker compose run hornet tools pwd-hash +docker compose run iota-core tools pwd-hash ``` Copy the output of the command for the next step. @@ -119,31 +102,11 @@ You can configure your node to either use HTTP or HTTPS. For publicly exposed no ::: -:::info - -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/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/testnet/env_template +https://github.com/iotaledger/node-docker-setup/blob/feat/iota-core/testnet_iota-2.0/env_template ``` @@ -162,7 +125,7 @@ See [peering](../references/peering.md) for more information. ### 4. Create the `data` folder -All files used by the IOTA-Core, the INX extensions, Wasp, Traefik & co will be stored in a directory called `data`. +All files used by the IOTA-Core, the INX extensions, 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: @@ -189,10 +152,6 @@ After starting the node you will be able to access your services at the followin - API: `https://node.your-domain.com/api/routes` - IOTA-Core Dashboard: `https://node.your-domain.com/dashboard` - Grafana: `https://node.your-domain.com/grafana` _(optional if using "monitoring" profile)_ -- Legacy-API: `https://node.your-domain.com/api/core/v0/info` _(optional if using "history-legacy" profile)_ -- Chrysalis-API: `https://node.your-domain.com/api/core/v1/info` _(optional if using "history-chrysalis" profile)_ -- Wasp API: `https://node.your-domain.com/wasp/api` _(optional if using "wasp" profile)_ -- Wasp Dashboard: `https://node.your-domain.com/wasp/dashboard` _(optional if using "wasp" profile)_ :::warning @@ -202,7 +161,7 @@ Password: `admin` ::: -You can configure your wallet software to use `https://node.your-domain.com` +You can configure your wallet software to use `https://node.your-domain.com`. #### HTTP @@ -211,10 +170,6 @@ After starting the node you will be able to access your services at the followin - API: `http://localhost/api/routes` - IOTA-Core Dashboard: `http://localhost/dashboard` - Grafana: `http://localhost/grafana` _(optional if using "monitoring" profile)_ -- Legacy-API: `http://localhost/api/core/v0/info` _(optional if using "history-legacy" profile)_ -- Chrysalis-API: `http://localhost/api/core/v1/info` _(optional if using "history-chrysalis" profile)_ -- Wasp API: `http://localhost/wasp/api` _(optional if using "wasp" profile)_ -- Wasp Dashboard: `http://localhost/wasp/dashboard` _(optional if using "wasp" profile)_ :::note @@ -222,14 +177,14 @@ If you changed the default `HTTP_PORT` value, you will need to add the port to t ::: -You can configure your wallet software to use `http://localhost` +You can configure your wallet software to use `http://localhost`. ### Displaying Log Output You can display the IOTA-Core logs by running: ```sh -docker compose logs -f hornet +docker compose logs -f iota-core ``` - `-f` @@ -245,16 +200,16 @@ docker compose down ### Tools -To access the tools provided inside HORNET you can use: +To access the tools provided inside IOTA-Core you can use: ```sh -docker compose run hornet tool +docker compose run iota-core tool ``` To see the list of tools included run: ```sh -docker compose run hornet tool -h +docker compose run iota-core tool -h ``` ## JWT Auth @@ -262,7 +217,7 @@ docker compose run hornet tool -h 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 +docker compose run iota-core 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 ` diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md new file mode 100644 index 00000000000..06c278bde6b --- /dev/null +++ b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md @@ -0,0 +1,103 @@ +--- +description: Learn how to become a validator. +image: /img/icons/iota/iota_core.png +tags: + - IOTA Node + - IOTA-core Node + - Docker + - Install + - Run + - Validator + - Staking + - macOS + - Windows + - Linux + - how to +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import LinuxCommands from '@site/docs/_admonitions/_linux-commands.md'; + +# Validator Setup Guide + +Validators secure the network by issuing validation blocks and receive Mana as a reward. In order to become a validator, an accounts needs to be created that can issue blocks and the account needs to stake tokens. This guide explains how to create such an account and configure the validator plugin of the docker setup. This plugin will then attempt for the account to become a validator by issuing a candidacy announcement to the network and if selected into the committee, will start issuing validation blocks. Running a validator also means running a full node setup. + +Throughout the guide, we will use the CLI wallet from the iota-sdk and the [node docker setup](./using_docker.md). + +## Preliminaries + +We use the following notation in this guide. If `Public Key` has a value of `0xff` then running the command `echo {Public Key}` means replacing the variable `{Public Key}` with its value, i.e. running the command `echo 0xff`. + +## Wallet setup + +TODO: Link to CLI Wallet binaries once released, or keep the below manual instructions. (Those require Rust to be installed). + +1. `git clone -b 2.0 https://github.com/iotaledger/iota-sdk` +2. `cd iota-sdk/cli` +3. `cargo build --release` +4. `cp ../target/release/wallet wallet` +5. `./wallet init --node-url "https://api.iota2-testnet-domain"`. Alternatively, use the url of your own node. +6. Select secret manager. Unless you have a ledger, select stronghold. +7. Do you want to set the address of the new wallet? no. +8. Select bip path: Select any bip path of your choice (e.g. IOTA is fine) +9. Do you want to set an alias for the new wallet? yes. +10. Enter a wallet alias of your choice. + +## Account Creation + +1. Run `implicit-account-creation-address` and copy the implicit-address. +2. Enter the address at https://faucet.iota2-testnet-domain/ or run `faucet {implicit-address} --url https://faucet.iota2-testnet-domain/api/enqueue` +3. Repeatedly run `sync` and `implicit-accounts` to see when you got the implicit account creation output. +4. Repeatedly run `implicit-accounts` to view implicit accounts and wait until BIC changes from `None` to `Some(0)`, then copy the `Output Id`. +5. Run `implicit-account-transition {Output Id}` +6. Repeatedly run `sync` and `accounts` and make sure an account is displayed and it has Block Issuance Credit of `0`, which is the case if it displays `Some(0)` instead of `None`. +7. Now you haven a block issuer account and can send transactions as you wish as long as you have enough Mana available. + +## Adding a Block Issuer Key + +1. In the directory of the [node docker setup](./using_docker.md) file, run `docker compose run iota-core tools ed25519-key` to generate an Ed25519 keypair. +2. Take a note of the `ed25519 public key` and `ed25519 private key` and add a `0x` at the beginning of the public key. +3. Go back to the wallet. +4. Repeatedly run `sync` and `accounts` and pick an account you want to use for the validator to issue validation blocks and copy its `Account ID` and its `Account Address`. +5. Run `add-block-issuer-key {Account ID} {ed25519 public key}` (Note that the public key needs to have the `0x` prefix). +6. Verify the key was successfully added by running `sync` and `accounts`, then copy the `Output ID` of the account and run `output {Output ID}`. In the shown output, within the `features` section, find the `block_issuer_keys` list. It should show two entries. It might look like this but with different values: + +``` +block_issuer_keys: BlockIssuerKeys( + [ + 0x16cbbea33ebcf2e17528737ee64b7b8290fe5c5b0d3c60a05a05bff3d2517b10, + 0x1a6709248bd6f06b103e0b3173c16c69d9a457d447409a6efc9612ffb64da964, + ], +``` + +## Begin Staking + +1. Run `sync` and `accounts` again and take a note of the `Account ID` of the account you want to use for validating the network. +2. Run `output {Output ID}` and take a note of the `amount`. This is the highest possible amount you can stake. Decide on how much you want to stake, which can be anything between `1` and the displayed `amount` and note it as `Stake Amount`. Note that the higher your `Stake Amount`, the more likely it is that you will be selected into the validator committee, so setting `Stake Amount = amount` is preferred. +3. Decide on a `Fixed Cost`. This value is not particularly important for the testnet. A recommended value is anywhere between 1 and 10. +4. Run `begin-staking {Account ID} {Stake Amount} {Fixed Cost}`. +5. Verify you successfully started staking by running `sync` and `accounts`, then copy the `Output ID` of the account and run `output {Output ID}`. In the shown output, within the `features` section find the `StakingFeature`. It should show the `Stake Amount` and `Fixed Cost` you just entered. It should look like this, but again, with the values you entered: + +``` +StakingFeature { + staked_amount: 1000000000, + fixed_cost: 1, + ... +``` + +The account is now registered as a validator. Now we need to setup the infrastructure to actually issue validation blocks to secure the network. + +## Prepare the Validator Plugin + +1. Running a validator requires that you run a full iota-core node as well. Follow the steps outlined [here](./using_docker.md) to setup the node. Follow the next steps either after you've successfully setup the node or while setting it up, at your choice. +2. The `.env` file needs to be modified in the following ways. +3. Uncomment the `COMPOSE_PROFILES` line below the validator service. +4. Set the `Account Address` from earlier as the `VALIDATOR_ACCOUNT_ADDR`. +5. Set the `ed25519 private key` from earlier as the `VALIDATOR_PRV_KEY` (**with no** 0x prefix). +6. In order to issue a candidacy announcement to the network the used account needs Mana. It must be _allotted_ to the account which can be done via the `allot-mana` command in the CLI wallet or via the developer tools in Firefly. +6. When you start the docker containers, an `inx-validator` container should be started. Check the logs to see if everything is working with: `docker logs -f inx-validator`. + +If the logs don't show any errors, you should be good to go. If your stake is high enough, the network will select you as a validator. You can check the stake requirements as follows: The total pool stake, which consists of your `Stake Amount` and all the stake that is delegated to your account, must be greater than the _Pool Stake_ of the last entry in this list: https://explorer.iota2-testnet-domain/alphanet/validators/. Note that this list might change every epoch so the stake requirements might also change. + +Check your _Total pool stake_ by taking the `Account Address` and open this URL: `https://explorer.iota2-testnet-domain/alphanet/addr/{Account Address}` and open the _Validation_ tab. diff --git a/docs/maintain/iota-core/2.0/sidebars.js b/docs/maintain/iota-core/2.0/sidebars.js index 7c229086616..0694e91a257 100644 --- a/docs/maintain/iota-core/2.0/sidebars.js +++ b/docs/maintain/iota-core/2.0/sidebars.js @@ -33,6 +33,11 @@ module.exports = { id: 'how_tos/using_docker', label: 'Install HORNET using Docker', }, + { + type: 'doc', + id: 'how_tos/validator_setup', + label: 'Become a validator', + }, { type: 'doc', id: 'how_tos/post_installation', From 9834b8d0bcf09c35495a612c9a99fb7b7a9d9056 Mon Sep 17 00:00:00 2001 From: Lucas Tortora Date: Wed, 8 May 2024 10:12:15 -0300 Subject: [PATCH 04/25] yarn format --- docs/maintain/iota-core/2.0/sidebars.js | 8 ++++---- versionedConfig.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/maintain/iota-core/2.0/sidebars.js b/docs/maintain/iota-core/2.0/sidebars.js index 0694e91a257..77902e09a3a 100644 --- a/docs/maintain/iota-core/2.0/sidebars.js +++ b/docs/maintain/iota-core/2.0/sidebars.js @@ -44,7 +44,7 @@ module.exports = { label: 'Post Installation', }, ], - },/* + } /* { type: 'category', label: 'INX-Plugins', @@ -287,7 +287,7 @@ module.exports = { ], }, ], - },*/ + },*/, { type: 'category', label: 'References', @@ -296,12 +296,12 @@ module.exports = { type: 'doc', id: 'references/configuration', label: 'Configuration', - },/* + } /* { type: 'doc', id: 'references/peering', label: 'Peering', - },*/ + },*/, { type: 'doc', id: 'references/api_reference', diff --git a/versionedConfig.js b/versionedConfig.js index 0fb3cac0497..a6082186d50 100644 --- a/versionedConfig.js +++ b/versionedConfig.js @@ -127,7 +127,7 @@ exports.maintainPluginsConfig = [ { id: 'iota-core', label: 'IOTA-Core', - description: 'IOTA\'s latest node software.', + description: "IOTA's latest node software.", icon: 'Iota20', subsection: 'maintain-layer-1', versions: [ From deae748fec40aa4a6a1fd5697ba257ca77a59e03 Mon Sep 17 00:00:00 2001 From: Lucas Tortora Date: Wed, 8 May 2024 11:28:13 -0300 Subject: [PATCH 05/25] remove mentions of shimmer and hornet general style edits --- .../docs/getting_started/getting_started.md | 24 +- .../2.0/docs/how_tos/post_installation.md | 6 +- .../2.0/docs/how_tos/using_docker.md | 37 +- .../2.0/docs/how_tos/validator_setup.md | 315 +++++++++++++++--- .../2.0/docs/references/configuration.md | 4 +- docs/maintain/iota-core/2.0/docs/welcome.md | 12 +- docs/maintain/iota-core/2.0/sidebars.js | 4 +- 7 files changed, 305 insertions(+), 97 deletions(-) diff --git a/docs/maintain/iota-core/2.0/docs/getting_started/getting_started.md b/docs/maintain/iota-core/2.0/docs/getting_started/getting_started.md index 3beeabdcdd6..67b67636e85 100644 --- a/docs/maintain/iota-core/2.0/docs/getting_started/getting_started.md +++ b/docs/maintain/iota-core/2.0/docs/getting_started/getting_started.md @@ -14,27 +14,20 @@ tags: # Getting Started - -Running a node is an efficient way to use IOTA or Shimmer. 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 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. +Running a node is an efficient way to use IOTA. By doing so, you have direct access to the Tangle instead of connecting +to and trusting someone else's node. Additionally, you help the network to become more distributed and resilient. ## Recommended Requirements -To handle a potential high rate of blocks per second, nodes need enough computational power to run reliably, and -should have the minimum specs: +To handle a potentially high rate of blocks per second, nodes need enough computational power to run reliably and +should have the following 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 +The amount of storage you will need will depend on whether and how often you plan on _pruning_ old data from your local database. The IOTA-Core exposes different functionality on different ports: @@ -43,14 +36,15 @@ The IOTA-Core exposes different functionality on different ports: - `14626 UDP` - Autopeering port (optional). - `14265 TCP` - REST HTTP API port (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 +These ports are essential 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. You can customize all ports using the [`config.json`](../how_tos/post_installation.md) file. ## Operating System The IOTA-Core is written in Go and can be deployed on all major platforms. -The [recommended setup](../how_tos/using_docker.md) uses Docker to run the IOTA-Core together with some [INX](../inx-plugins) extensions secured behind a [Traefik](https://traefik.io) SSL reverse proxy. +The [recommended setup](../how_tos/using_docker.md) uses Docker to run the IOTA-Core together with some INX extensions +secured behind a [Traefik](https://traefik.io) SSL reverse proxy. ## Configuration diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md b/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md index af6e8f37e9a..d356af571c7 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md @@ -25,7 +25,7 @@ The most important configuration files are: There are default configuration files available that you can use: -- `config_testnet.json` - Includes the default values required to join the Shimmer Testnet. +- `config_testnet.json` - Includes the default values required to join the Testnet. - `config_defaults.json` - Includes all default parameters used by the IOTA-core. You can use this file as a reference when customizing your `config.json` You can pick one of these files and use it as your `config.json` to join the configured network. @@ -52,7 +52,7 @@ Since offering the HTTP REST API to the public can consume your node's resources To generate a JWT-token to be used with the protected routes you can run: ```sh -./hornet tool jwt-api --databasePath --salt +./iota-core tool jwt-api --databasePath --salt ``` If you are running our [recommended setup](using_docker.md) then see [here](using_docker.md#tools). @@ -72,7 +72,7 @@ When using our [recommended setup](using_docker.md) this is done for you automat You can find all the HTTP REST API related options in the [`config.json` reference](../references/configuration.md#restapi) -## Update to 2.x.x +## Update You can update the IOTA-core to the latest stable version with no breaking updates by running the following command: diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md index 67b6f867700..7f73151090c 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md @@ -19,8 +19,7 @@ import LinuxCommands from '@site/docs/_admonitions/_linux-commands.md'; # Install the IOTA-core using Docker - -This guide represents the recommended setup to run an IOTA-core node. +This article guides the recommended setup to run an IOTA-core node. It includes everything required to set up a public node accessible by wallets and applications: - [IOTA-core](https://github.com/iotaledger/iota-core) @@ -36,7 +35,7 @@ It includes everything required to set up a public node accessible by wallets an 1. A recent release of Docker enterprise or community edition. Avoid using the Docker version shipped with your OS since these are mostly out of date. 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: +4. Opening up the following ports in your server's firewall: - `15600 TCP` - Used for the IOTA-Core gossip. - `14626 UDP` - Used for the IOTA-Core autopeering. @@ -69,7 +68,7 @@ mkdir node-docker-setup && cd node-docker-setup && curl -L https://node-docker-s ### 1. Generate dashboard credentials -To access your IOTA-Core dashboard, a set of credentials need to be configured. +To access your IOTA-Core dashboard, you need to configure credentials. Run the following command to generate a password hash and salt for the dashboard: ```sh @@ -94,7 +93,7 @@ nano .env ``` Follow the instructions provided in the file. -With `nano` you can save your changes and exit the editor using `CTRL+O` and `CTRL+X`. +With `nano`, you can save your changes and exit the editor using `CTRL+O` and `CTRL+X`. :::note @@ -118,7 +117,7 @@ Add your IOTA-Core neighbor addresses to the `peering.json` file. :::note -This step is recommended, but optional if you are using autopeering. +This step is recommended but optional if you are using autopeering. See [peering](../references/peering.md) for more information. ::: @@ -127,7 +126,7 @@ See [peering](../references/peering.md) for more information. All files used by the IOTA-Core, the INX extensions, 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: +To create this directory with correct permissions, run the contained script: ```sh ./prepare_docker.sh @@ -147,7 +146,7 @@ docker compose up -d #### HTTPS -After starting the node you will be able to access your services at the following endpoints: +After starting the node, you will be able to access your services at the following endpoints: - API: `https://node.your-domain.com/api/routes` - IOTA-Core Dashboard: `https://node.your-domain.com/dashboard` @@ -155,9 +154,9 @@ After starting the node you will be able to access your services at the followin :::warning -After starting your node for the first time, please change the default grafana credentials -User: `admin` -Password: `admin` +After starting your node for the first time, please change the default grafana credentials. +**User**: `admin` +**Password**: `admin` ::: @@ -165,7 +164,7 @@ 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: +After starting the node, you will be able to access your services at the following endpoints: - API: `http://localhost/api/routes` - IOTA-Core Dashboard: `http://localhost/dashboard` @@ -173,7 +172,7 @@ After starting the node you will be able to access your services at the followin :::note -If you changed the default `HTTP_PORT` value, you will need to add the port to the urls. +If you changed the default `HTTP_PORT` value, you must add the port to the URLs. ::: @@ -200,13 +199,13 @@ docker compose down ### Tools -To access the tools provided inside IOTA-Core you can use: +To access the IOTA-Core tools, you can use the following command: ```sh docker compose run iota-core tool ``` -To see the list of tools included run: +To see the list of tools included run the following: ```sh docker compose run iota-core tool -h @@ -214,19 +213,19 @@ docker compose run iota-core tool -h ## JWT Auth -To generate a JWT token to be used to access protected routes you can run: +To generate a JWT token to be used to access protected routes, you can run the following: ```sh docker compose run iota-core 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 ` +- If you changed the `restAPI.jwtAuth.salt` value in the `config.json`, then you need to pass that value as a parameter as `--salt `. ## INX This setup includes the INX extensions listed at the beginning of this guide. -If you want to disable certain extensions you can comment out the different services in the `docker-compose.yml` file and restart the node. +If you want to disable certain extensions, you can comment out the different services in the `docker-compose.yml` file and restart the node. # More Information -For more information look at the [Github repository](https://github.com/iotaledger/node-docker-setup) +You can find more information in the [GitHub repository](https://github.com/iotaledger/node-docker-setup) diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md index 06c278bde6b..d90c9a6be7c 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md @@ -21,49 +21,199 @@ import LinuxCommands from '@site/docs/_admonitions/_linux-commands.md'; # Validator Setup Guide -Validators secure the network by issuing validation blocks and receive Mana as a reward. In order to become a validator, an accounts needs to be created that can issue blocks and the account needs to stake tokens. This guide explains how to create such an account and configure the validator plugin of the docker setup. This plugin will then attempt for the account to become a validator by issuing a candidacy announcement to the network and if selected into the committee, will start issuing validation blocks. Running a validator also means running a full node setup. +Validators secure the network by issuing validation blocks and receive Mana as a reward. To become a validator, you need +to create an account that can issue blocks, and the account needs to stake tokens. This guide explains how to create the +account and configure the validator plugin of the docker setup. +The validator plugin will then try to make the account a validator by issuing a candidacy announcement to the network. +The validator plugin will start issuing validation blocks if selected for the committee. -Throughout the guide, we will use the CLI wallet from the iota-sdk and the [node docker setup](./using_docker.md). +:::info -## Preliminaries +Running a validator implies [running a full-node setup](using_docker.md). -We use the following notation in this guide. If `Public Key` has a value of `0xff` then running the command `echo {Public Key}` means replacing the variable `{Public Key}` with its value, i.e. running the command `echo 0xff`. +::: -## Wallet setup +Throughout the guide, we will use the CLI wallet from the iota-SDK and the [node docker setup](./using_docker.md). -TODO: Link to CLI Wallet binaries once released, or keep the below manual instructions. (Those require Rust to be installed). +:::tip notation -1. `git clone -b 2.0 https://github.com/iotaledger/iota-sdk` -2. `cd iota-sdk/cli` -3. `cargo build --release` -4. `cp ../target/release/wallet wallet` -5. `./wallet init --node-url "https://api.iota2-testnet-domain"`. Alternatively, use the url of your own node. -6. Select secret manager. Unless you have a ledger, select stronghold. -7. Do you want to set the address of the new wallet? no. -8. Select bip path: Select any bip path of your choice (e.g. IOTA is fine) -9. Do you want to set an alias for the new wallet? yes. -10. Enter a wallet alias of your choice. +This guide uses the following notation. If `Public Key` has a value of `0xff`, then running the +command `echo {Public Key}` means replacing the variable `{Public Key}` with its value, i.e., running the +command `echo 0xff`. -## Account Creation +::: -1. Run `implicit-account-creation-address` and copy the implicit-address. -2. Enter the address at https://faucet.iota2-testnet-domain/ or run `faucet {implicit-address} --url https://faucet.iota2-testnet-domain/api/enqueue` -3. Repeatedly run `sync` and `implicit-accounts` to see when you got the implicit account creation output. -4. Repeatedly run `implicit-accounts` to view implicit accounts and wait until BIC changes from `None` to `Some(0)`, then copy the `Output Id`. -5. Run `implicit-account-transition {Output Id}` -6. Repeatedly run `sync` and `accounts` and make sure an account is displayed and it has Block Issuance Credit of `0`, which is the case if it displays `Some(0)` instead of `None`. -7. Now you haven a block issuer account and can send transactions as you wish as long as you have enough Mana available. +## Set Up the CLI Wallet + +You can download the CLI Wallet from the following link: +TODO: Link to CLI Wallet binaries once released, or keep the below manual instructions. (Those require Rust to be +installed). + +### Build From Source + +Please follow the instructions to build the CLI Wallet from source: + +#### 1. Clone the Repository + +You can clone the repository by running the following command: + +```bash +git clone -b 2.0 https://github.com/iotaledger/iota-sdk +``` + +#### 2. Build + +After you have downloaded the source code, you can build it by changing the current directory to `iota-sdk/cli` and +running the following command: + +```bash +cargo build --release +``` + +#### 3. (optional) Copy the Wallet + +For ease of access, you can copy the Wallet that you built into your current directory or even add it to your $PATH: + +```bash +cp ../target/release/wallet wallet +``` + +#### 4. Connect to a Node + +You can use the following command to connect your wallet to a Testnet node — alternatively, your node’s URL: + +```bash +./wallet init --node-url "https://api.iota2-testnet-domain" +``` + +#### 5. Configure Your Wallet + +Once you’ve connected your wallet to a node, you must answer the following setup questions: + +##### Select secret manager. + +Unless you have a ledger, select Stronghold. + +##### Do you want to set the address of the new wallet? + +No. + +##### Select bip path + +Select any bip path of your choice (e.g., IOTA is fine) + +##### Do you want to set an alias for the new wallet? + +Yes. + +Then, enter a wallet alias of your choice. + +## Create an Account + +### 1. Create an Implicit Account + +You can create an implicit account by running the following command: + +``` +./wallet implicit-account-creation-address +``` + +Please copy the implicit address returned by the command. + +### 2. Fund Your Account + +You can enter the address at the [Testnet Faucet](https://faucet.iota2-testnet-domain/) to fund your account or run the +following command + +```bash +./wallet faucet {implicit-address} --url https://faucet.iota2-testnet-domain/api/enqueue +``` + +### 3. Sync With the Node + +After creating and funding your implicit account, you should use the `sync` and `implicit-accounts` functionalities to +retrieve the implicit account creation output. + +```bash +./wallet sync +./wallet implicit-accounts +``` + +You should run this until the BIC changes from `None` to `Some(0)`, then copy the `Output Id`. + +### 4. Transition the Account + +You can transition your account by running the following command: + +```bash +./wallt implicit-account-transition {Output Id} + +``` + +### 5. Sync With the Node + +You can now `sync` with the node and run the `accounts` command to ensure an account is displayed with Block Issuance +Credit of `0`, which is the case if it displays `Some(0)` instead of `None`. + +```bash +./wallet sync +./wallet accounts +``` + +You now have a block issuer account and can send transactions as you wish if you have enough Mana available. ## Adding a Block Issuer Key -1. In the directory of the [node docker setup](./using_docker.md) file, run `docker compose run iota-core tools ed25519-key` to generate an Ed25519 keypair. -2. Take a note of the `ed25519 public key` and `ed25519 private key` and add a `0x` at the beginning of the public key. -3. Go back to the wallet. -4. Repeatedly run `sync` and `accounts` and pick an account you want to use for the validator to issue validation blocks and copy its `Account ID` and its `Account Address`. -5. Run `add-block-issuer-key {Account ID} {ed25519 public key}` (Note that the public key needs to have the `0x` prefix). -6. Verify the key was successfully added by running `sync` and `accounts`, then copy the `Output ID` of the account and run `output {Output ID}`. In the shown output, within the `features` section, find the `block_issuer_keys` list. It should show two entries. It might look like this but with different values: +### 1. Generate an Ed25519 Keypair + +In the directory of the [node docker setup](./using_docker.md) file, you can run the following command to generate an +Ed25519 keypair: + +```bash +docker compose run iota-core tools ed25519-key +``` + +Please take note of the `ed25519 public key` and `ed25519 private key` and add a `0x` at the beginning of the public +key. + +### 2. Select a Validator Account + +You can now return to the wallet and `sync` it. Afterward, you should run the `accounts` command to retrieve the list of +available accounts and choose an account you want to use as a validator to issue validation block. Please take note of +its `Account ID` and `Account Address`. +```bash +./wallet sync +./wallet account ``` + +### 3. Add the Account as a Block Issuer + +You can add the account as a block issuer using the following command: + +:::note +The public key needs to have the `0x` prefix. +::: + +```bash +./wallet add-block-issuer-key {Account ID} {ed25519 public key} +``` + +### 4. Verify + +You can verify you successfully added the key by running the `sync` and `accounts` commands. You should then copy +the `Output ID` of the account and run the `output {Output ID}` command. + +```bash +./wallet sync +./wallet account +./wallet output {Output ID} +``` + +You can find the `block_issuer_keys` list in the `features` section of the retrieved output. It should show two entries +that look like these but with different values: + +```plaintext block_issuer_keys: BlockIssuerKeys( [ 0x16cbbea33ebcf2e17528737ee64b7b8290fe5c5b0d3c60a05a05bff3d2517b10, @@ -71,33 +221,100 @@ block_issuer_keys: BlockIssuerKeys( ], ``` -## Begin Staking +## Start Staking + +### 1. Sync With the Node + +To start staking, you first need to run the `sync` and `accounts` commands and take note of the `Account ID` of the +account you want to use as a validator. + +```bash +./wallet sync +./wallet account +``` + +### 2. Decide Your Stake Amount + +Next, you should run the `output {Output ID}` command and take note of the `amount`. This is the highest possible amount +you can stake. Decide how much you want to stake. The `Stake Amount` can be anything between `1` and the +displayed `amount`. + +```bash +./wallet output {Output ID} +``` + +:::tip -1. Run `sync` and `accounts` again and take a note of the `Account ID` of the account you want to use for validating the network. -2. Run `output {Output ID}` and take a note of the `amount`. This is the highest possible amount you can stake. Decide on how much you want to stake, which can be anything between `1` and the displayed `amount` and note it as `Stake Amount`. Note that the higher your `Stake Amount`, the more likely it is that you will be selected into the validator committee, so setting `Stake Amount = amount` is preferred. -3. Decide on a `Fixed Cost`. This value is not particularly important for the testnet. A recommended value is anywhere between 1 and 10. -4. Run `begin-staking {Account ID} {Stake Amount} {Fixed Cost}`. -5. Verify you successfully started staking by running `sync` and `accounts`, then copy the `Output ID` of the account and run `output {Output ID}`. In the shown output, within the `features` section find the `StakingFeature`. It should show the `Stake Amount` and `Fixed Cost` you just entered. It should look like this, but again, with the values you entered: +The higher your `Stake Amount`, the more likely you will be selected for the validator committee, so +setting `Stake Amount = amount` is preferred. ``` + +### 3. Decide on a `Fixed Cost + +This value is not particularly important for the Testnet. A recommended value is anywhere between 1 and 10. + +### 4. Begin Staking + +You can use the following command to start staking: + +``` + +./wallet begin-staking {Account ID} {Stake Amount} {Fixed Cost} + +``` + +You can verify you successfully started staking by running the `sync` and `accounts` commands, copying the `Output ID` of the account, and then running `output {Output ID}`. You should be able to find the `StakingFeature` in within the `features` section. It should show the `Stake Amount` and `Fixed Cost` you just entered. It should look like this, but with the values you entered: + +``` + StakingFeature { - staked_amount: 1000000000, - fixed_cost: 1, - ... +staked_amount: 1000000000, +fixed_cost: 1, +... + ``` -The account is now registered as a validator. Now we need to setup the infrastructure to actually issue validation blocks to secure the network. +The account is now registered as a validator. Next, you must set up the infrastructure to issue validation blocks to secure the network. ## Prepare the Validator Plugin -1. Running a validator requires that you run a full iota-core node as well. Follow the steps outlined [here](./using_docker.md) to setup the node. Follow the next steps either after you've successfully setup the node or while setting it up, at your choice. -2. The `.env` file needs to be modified in the following ways. -3. Uncomment the `COMPOSE_PROFILES` line below the validator service. -4. Set the `Account Address` from earlier as the `VALIDATOR_ACCOUNT_ADDR`. -5. Set the `ed25519 private key` from earlier as the `VALIDATOR_PRV_KEY` (**with no** 0x prefix). -6. In order to issue a candidacy announcement to the network the used account needs Mana. It must be _allotted_ to the account which can be done via the `allot-mana` command in the CLI wallet or via the developer tools in Firefly. -6. When you start the docker containers, an `inx-validator` container should be started. Check the logs to see if everything is working with: `docker logs -f inx-validator`. +Running a validator requires running a full IOTA-core node. You can follow the steps outlined in the [how to install using Docker guide](./using_docker.md) to setup the node. + +Follow the next steps after successfully setting up the node or while setting it up at your choice. + +### 1. Update the `.env` File + +You must modify the `.env` file in the following ways: + +1. Uncomment the `COMPOSE_PROFILES` line below the validator service. +2. Set the `Account Address` from earlier as the `VALIDATOR_ACCOUNT_ADDR`. +3. Set the `ed25519 private key` from earlier as the `VALIDATOR_PRV_KEY` (**with no** 0x prefix). + +### 2. Allot Mana to the Account + +The selected account needs Mana to issue a candidacy announcement to the network. It must be _allotted_ to the account. You can do this using the `allot-mana` command in the CLI wallet or the developer tools in Firefly. + +```bash +./wallet allot-mana +``` + +### 3. Verify the `inx-validator` + +When you start the docker containers, an `inx-validator` container should also start. You can check the logs to see if +everything is working with the following command: + +```bash +docker logs -f inx-validator +``` + +If the logs don't show any errors, you should be good to go. The network will select you as a validator if your stake is +high enough. You can check the stake requirements as follows: The total pool stake, which consists of +your `Stake Amount` and all the stake that is delegated to your account, must be greater than the _Pool Stake_ of the +last entry in the [validator list]( https://explorer.iota2-testnet-domain/alphanet/validators/). Note that this list +might change every epoch, so the stake requirements might also change. -If the logs don't show any errors, you should be good to go. If your stake is high enough, the network will select you as a validator. You can check the stake requirements as follows: The total pool stake, which consists of your `Stake Amount` and all the stake that is delegated to your account, must be greater than the _Pool Stake_ of the last entry in this list: https://explorer.iota2-testnet-domain/alphanet/validators/. Note that this list might change every epoch so the stake requirements might also change. +You can check your _Total pool stake_ by taking the `Account Address`, opening the following URL, and checking +the `Validation` tab: -Check your _Total pool stake_ by taking the `Account Address` and open this URL: `https://explorer.iota2-testnet-domain/alphanet/addr/{Account Address}` and open the _Validation_ tab. +`https://explorer.iota2-testnet-domain/alphanet/addr/{Account Address}` diff --git a/docs/maintain/iota-core/2.0/docs/references/configuration.md b/docs/maintain/iota-core/2.0/docs/references/configuration.md index d7d8d33f62b..490cc9a3725 100755 --- a/docs/maintain/iota-core/2.0/docs/references/configuration.md +++ b/docs/maintain/iota-core/2.0/docs/references/configuration.md @@ -10,11 +10,9 @@ keywords: - Config - reference --- - - # Configuration -IOTA core node 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 IOTA core node 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). You can change the path of the config file by using the `-c` or `--config` argument while executing `iota-core` executable. diff --git a/docs/maintain/iota-core/2.0/docs/welcome.md b/docs/maintain/iota-core/2.0/docs/welcome.md index 69523208719..42187e2d5b3 100644 --- a/docs/maintain/iota-core/2.0/docs/welcome.md +++ b/docs/maintain/iota-core/2.0/docs/welcome.md @@ -6,7 +6,6 @@ tags: - IOTA-core Node - IOTA-core - IOTA - - Shimmer - Node Software - Welcome - explanation @@ -14,14 +13,15 @@ tags: # Welcome to IOTA-Core -The IOTA-Core 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. +The IOTA-Core is a powerful, easy-to-install node software written in Go. +It provides full-node capabilities, including full support for the latest network updates. -By running your own node you have the following benefits: +By running your own node, you have the following benefits: -- You have direct access to the IOTA or Shimmer network, instead of having to connect to and trust someone else's node. +- You have direct access to the IOTA network instead of having to connect to and trust someone else's node. - You help the network to become more distributed and resilient by validating blocks and _value transactions_. ## Source Code -The source code of the project is available on [GitHub](https://github.com/iotaledger/iota-core). +The project's source code is available on [GitHub](https://github.com/iotaledger/iota-core). + diff --git a/docs/maintain/iota-core/2.0/sidebars.js b/docs/maintain/iota-core/2.0/sidebars.js index 77902e09a3a..f97b84696f7 100644 --- a/docs/maintain/iota-core/2.0/sidebars.js +++ b/docs/maintain/iota-core/2.0/sidebars.js @@ -13,7 +13,7 @@ module.exports = { docs: [ { type: 'category', - label: 'Hornet', + label: 'IOTA-core', collapsed: false, items: [ { @@ -31,7 +31,7 @@ module.exports = { { type: 'doc', id: 'how_tos/using_docker', - label: 'Install HORNET using Docker', + label: 'Install using Docker', }, { type: 'doc', From beaafc2a3a971750222bb169bea8f1f0be774731 Mon Sep 17 00:00:00 2001 From: Lucas Tortora Date: Wed, 8 May 2024 11:38:03 -0300 Subject: [PATCH 06/25] fix dead links --- docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md | 2 +- docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md b/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md index d356af571c7..6c92c579857 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md @@ -30,7 +30,7 @@ There are default configuration files available that you can use: You can pick one of these files and use it as your `config.json` to join the configured network. -Please see the [`config.json`](../references/configuration.md) and [`peering.json`](../references/peering.md) articles for more information about the contents of the configuration files. +Please see the [`config.json`](../references/configuration.md) and `peering.json` articles for more information about the contents of the configuration files. ## Configuring HTTP REST API diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md index 7f73151090c..11990dd064e 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md @@ -118,7 +118,6 @@ Add your IOTA-Core neighbor addresses to the `peering.json` file. :::note This step is recommended but optional if you are using autopeering. -See [peering](../references/peering.md) for more information. ::: From 9d3b7769934d6f86ad6deb9b566494c6bf25e1e2 Mon Sep 17 00:00:00 2001 From: Lucas Tortora <85233773+lucas-tortora@users.noreply.github.com> Date: Wed, 8 May 2024 12:18:34 -0300 Subject: [PATCH 07/25] Apply suggestions from code review --- .../maintain/iota-core/2.0/docs/how_tos/validator_setup.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md index d90c9a6be7c..a673584dcf7 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md @@ -147,7 +147,6 @@ You can transition your account by running the following command: ```bash ./wallt implicit-account-transition {Output Id} - ``` ### 5. Sync With the Node @@ -166,7 +165,7 @@ You now have a block issuer account and can send transactions as you wish if you ### 1. Generate an Ed25519 Keypair -In the directory of the [node docker setup](./using_docker.md) file, you can run the following command to generate an +In the directory of the [node docker setup](./using_docker.md), you can run the following command to generate an Ed25519 keypair: ```bash @@ -250,7 +249,7 @@ setting `Stake Amount = amount` is preferred. ``` -### 3. Decide on a `Fixed Cost +### 3. Decide on a `Fixed Cost` This value is not particularly important for the Testnet. A recommended value is anywhere between 1 and 10. @@ -264,7 +263,7 @@ You can use the following command to start staking: ``` -You can verify you successfully started staking by running the `sync` and `accounts` commands, copying the `Output ID` of the account, and then running `output {Output ID}`. You should be able to find the `StakingFeature` in within the `features` section. It should show the `Stake Amount` and `Fixed Cost` you just entered. It should look like this, but with the values you entered: +You can verify you successfully started staking by running the `sync` and `accounts` commands, copying the `Output ID` of the account, and then running `output {Output ID}`. You should be able to find the `StakingFeature` within the `features` section. It should show the `Stake Amount` and `Fixed Cost` you just entered. It should look like this, but with the values you entered: ``` From 35c143b5113611fd0698e70bddf32c2eb2c1bd56 Mon Sep 17 00:00:00 2001 From: Lucas Tortora <85233773+lucas-tortora@users.noreply.github.com> Date: Wed, 8 May 2024 12:19:15 -0300 Subject: [PATCH 08/25] Apply suggestions from code review --- docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md index a673584dcf7..2a821075218 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md @@ -292,7 +292,7 @@ You must modify the `.env` file in the following ways: ### 2. Allot Mana to the Account -The selected account needs Mana to issue a candidacy announcement to the network. It must be _allotted_ to the account. You can do this using the `allot-mana` command in the CLI wallet or the developer tools in Firefly. +The selected account needs Mana to issue a candidacy announcement to the network. It must be _allotted_ to the account. You can do this using the `allot-mana` command in the CLI wallet or the developer tools in Firefly. ```bash ./wallet allot-mana From 3b80f102541ebc77c248b2b1bfd0c062e9e04958 Mon Sep 17 00:00:00 2001 From: Lucas Tortora Date: Wed, 8 May 2024 15:43:02 -0300 Subject: [PATCH 09/25] fix type --- docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md b/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md index 6c92c579857..54d02afcc0a 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md @@ -34,7 +34,7 @@ Please see the [`config.json`](../references/configuration.md) and `peering.json ## 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. +One of the tasks 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, the IOTA-core will expose the [Core REST API v2](../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. From c36520a332a4c789c3a8fae6bc2acf478044666f Mon Sep 17 00:00:00 2001 From: Philipp Gackstatter Date: Mon, 13 May 2024 10:51:12 +0200 Subject: [PATCH 10/25] Add allot mana command instructions --- .../2.0/docs/how_tos/validator_setup.md | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md index 2a821075218..38db7fbdd31 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md @@ -45,9 +45,10 @@ command `echo 0xff`. ## Set Up the CLI Wallet -You can download the CLI Wallet from the following link: -TODO: Link to CLI Wallet binaries once released, or keep the below manual instructions. (Those require Rust to be -installed). +You can download the latest release of the CLI Wallet from the following link: +https://github.com/iotaledger/iota-sdk/releases + +After downloading, copy the binary to your current directory. ### Build From Source @@ -292,10 +293,28 @@ You must modify the `.env` file in the following ways: ### 2. Allot Mana to the Account -The selected account needs Mana to issue a candidacy announcement to the network. It must be _allotted_ to the account. You can do this using the `allot-mana` command in the CLI wallet or the developer tools in Firefly. +The selected account needs Mana to issue candidacy announcements to the network. The Mana must be _allotted_ to the account. You can do this using the `allot-mana` command in the CLI wallet or the developer tools in Firefly. In the CLI Wallet, first check how much Mana can be allotted using `sync`, which shows you a `ManaBalance`: + +``` +ManaBalance { + total: DecayedMana { + stored: 1861687, + potential: 19380254, + }, + available: DecayedMana { + stored: 1861687, + potential: 19380254, + }, + rewards: 0, +}, +``` + +Set `Mana` as `stored + potential` from the `available` section. + +Now we allot the Mana to our account. If you happen to have multiple accounts, you also need to specify the ID of the account that will be used as the validator account. ```bash -./wallet allot-mana +allot-mana {Mana} ``` ### 3. Verify the `inx-validator` From f812b816dca77c8be1f2baf5aa34cef8ef00def7 Mon Sep 17 00:00:00 2001 From: Philipp Gackstatter Date: Mon, 13 May 2024 11:05:33 +0200 Subject: [PATCH 11/25] Add testnet url --- .../iota-core/2.0/docs/how_tos/validator_setup.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md index 38db7fbdd31..d05f110aab5 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md @@ -84,7 +84,7 @@ cp ../target/release/wallet wallet You can use the following command to connect your wallet to a Testnet node — alternatively, your node’s URL: ```bash -./wallet init --node-url "https://api.iota2-testnet-domain" +./wallet init --node-url "https://api.nova-testnet.iotaledger.net" ``` #### 5. Configure Your Wallet @@ -123,11 +123,11 @@ Please copy the implicit address returned by the command. ### 2. Fund Your Account -You can enter the address at the [Testnet Faucet](https://faucet.iota2-testnet-domain/) to fund your account or run the +You can enter the address at the [Testnet Faucet](https://faucet.nova-testnet.iotaledger.net/) to fund your account or run the following command ```bash -./wallet faucet {implicit-address} --url https://faucet.iota2-testnet-domain/api/enqueue +./wallet faucet {implicit-address} --url https://faucet.nova-testnet.iotaledger.net/api/enqueue ``` ### 3. Sync With the Node @@ -329,10 +329,10 @@ docker logs -f inx-validator If the logs don't show any errors, you should be good to go. The network will select you as a validator if your stake is high enough. You can check the stake requirements as follows: The total pool stake, which consists of your `Stake Amount` and all the stake that is delegated to your account, must be greater than the _Pool Stake_ of the -last entry in the [validator list]( https://explorer.iota2-testnet-domain/alphanet/validators/). Note that this list +last entry in the [validator list]( https://explorer.nova-testnet.iotaledger.net/alphanet/validators/). Note that this list might change every epoch, so the stake requirements might also change. You can check your _Total pool stake_ by taking the `Account Address`, opening the following URL, and checking the `Validation` tab: -`https://explorer.iota2-testnet-domain/alphanet/addr/{Account Address}` +`https://explorer.nova-testnet.iotaledger.net/alphanet/addr/{Account Address}` From 84096366c89fddba829e2c9755916971a20cc7f2 Mon Sep 17 00:00:00 2001 From: Philipp Gackstatter Date: Mon, 13 May 2024 15:42:06 +0200 Subject: [PATCH 12/25] Fix stake amount tip --- docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md index d05f110aab5..b32401cd2bb 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md @@ -248,7 +248,7 @@ displayed `amount`. The higher your `Stake Amount`, the more likely you will be selected for the validator committee, so setting `Stake Amount = amount` is preferred. -``` +::: ### 3. Decide on a `Fixed Cost` From 764b75f34b55c20999fc55db9a3c3f94c5904ab2 Mon Sep 17 00:00:00 2001 From: Lucas Tortora Date: Mon, 13 May 2024 12:47:12 -0300 Subject: [PATCH 13/25] fix bash commands --- .../2.0/docs/how_tos/validator_setup.md | 39 +++++++++++-------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md index b32401cd2bb..0bd97481354 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md @@ -111,12 +111,19 @@ Then, enter a wallet alias of your choice. ## Create an Account +:::tip Connect to a Node + +The following sections assume you have already set up your [CLI Wallet](#set-up-the-cli-wallet), +and [connected it to a node](#4-connect-to-a-node). + +::: + ### 1. Create an Implicit Account You can create an implicit account by running the following command: ``` -./wallet implicit-account-creation-address +implicit-account-creation-address ``` Please copy the implicit address returned by the command. @@ -127,7 +134,7 @@ You can enter the address at the [Testnet Faucet](https://faucet.nova-testnet.io following command ```bash -./wallet faucet {implicit-address} --url https://faucet.nova-testnet.iotaledger.net/api/enqueue +faucet {implicit-address} --url https://faucet.nova-testnet.iotaledger.net/api/enqueue ``` ### 3. Sync With the Node @@ -136,8 +143,8 @@ After creating and funding your implicit account, you should use the `sync` and retrieve the implicit account creation output. ```bash -./wallet sync -./wallet implicit-accounts +sync +implicit-accounts ``` You should run this until the BIC changes from `None` to `Some(0)`, then copy the `Output Id`. @@ -156,8 +163,8 @@ You can now `sync` with the node and run the `accounts` command to ensure an acc Credit of `0`, which is the case if it displays `Some(0)` instead of `None`. ```bash -./wallet sync -./wallet accounts +sync +accounts ``` You now have a block issuer account and can send transactions as you wish if you have enough Mana available. @@ -183,8 +190,8 @@ available accounts and choose an account you want to use as a validator to issue its `Account ID` and `Account Address`. ```bash -./wallet sync -./wallet account +sync +account ``` ### 3. Add the Account as a Block Issuer @@ -196,7 +203,7 @@ The public key needs to have the `0x` prefix. ::: ```bash -./wallet add-block-issuer-key {Account ID} {ed25519 public key} +add-block-issuer-key {Account ID} {ed25519 public key} ``` ### 4. Verify @@ -205,9 +212,9 @@ You can verify you successfully added the key by running the `sync` and `account the `Output ID` of the account and run the `output {Output ID}` command. ```bash -./wallet sync -./wallet account -./wallet output {Output ID} +sync +account +output {Output ID} ``` You can find the `block_issuer_keys` list in the `features` section of the retrieved output. It should show two entries @@ -229,8 +236,8 @@ To start staking, you first need to run the `sync` and `accounts` commands and t account you want to use as a validator. ```bash -./wallet sync -./wallet account +sync +account ``` ### 2. Decide Your Stake Amount @@ -240,7 +247,7 @@ you can stake. Decide how much you want to stake. The `Stake Amount` can be anyt displayed `amount`. ```bash -./wallet output {Output ID} +output {Output ID} ``` :::tip @@ -260,7 +267,7 @@ You can use the following command to start staking: ``` -./wallet begin-staking {Account ID} {Stake Amount} {Fixed Cost} +begin-staking {Account ID} {Stake Amount} {Fixed Cost} ``` From c636898c01202fe8bf1248957d2f87b5ea67194b Mon Sep 17 00:00:00 2001 From: Lucas Tortora Date: Mon, 13 May 2024 12:49:31 -0300 Subject: [PATCH 14/25] fix urls --- docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md index 0bd97481354..76a7744c4a2 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md @@ -336,10 +336,10 @@ docker logs -f inx-validator If the logs don't show any errors, you should be good to go. The network will select you as a validator if your stake is high enough. You can check the stake requirements as follows: The total pool stake, which consists of your `Stake Amount` and all the stake that is delegated to your account, must be greater than the _Pool Stake_ of the -last entry in the [validator list]( https://explorer.nova-testnet.iotaledger.net/alphanet/validators/). Note that this list +last entry in the [validator list](https://explorer.iota.org/iota2-testnet/validators/). Note that this list might change every epoch, so the stake requirements might also change. You can check your _Total pool stake_ by taking the `Account Address`, opening the following URL, and checking the `Validation` tab: -`https://explorer.nova-testnet.iotaledger.net/alphanet/addr/{Account Address}` +`https://explorer.iota.org/iota2-testnet/addr/ {Account Address}` From 7c02cd06e335be08ea0930b5e0cc918464312e3b Mon Sep 17 00:00:00 2001 From: Lucas Tortora Date: Mon, 13 May 2024 15:14:29 -0300 Subject: [PATCH 15/25] addressing comments --- .../2.0/docs/getting_started/getting_started.md | 8 ++++---- .../2.0/docs/how_tos/post_installation.md | 8 ++++---- .../iota-core/2.0/docs/how_tos/using_docker.md | 16 ++++++++-------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/maintain/iota-core/2.0/docs/getting_started/getting_started.md b/docs/maintain/iota-core/2.0/docs/getting_started/getting_started.md index 67b67636e85..b2b396a3ae1 100644 --- a/docs/maintain/iota-core/2.0/docs/getting_started/getting_started.md +++ b/docs/maintain/iota-core/2.0/docs/getting_started/getting_started.md @@ -30,7 +30,7 @@ should have the following minimum specs: The amount of storage you will need will depend on whether and how often you plan on _pruning_ old data from your local database. -The IOTA-Core exposes different functionality on different ports: +IOTA-Core exposes different functionality on different ports: - `15600 TCP` - Gossip protocol port. - `14626 UDP` - Autopeering port (optional). @@ -42,13 +42,13 @@ the [`config.json`](../how_tos/post_installation.md) file. ## Operating System -The IOTA-Core is written in Go and can be deployed on all major platforms. -The [recommended setup](../how_tos/using_docker.md) uses Docker to run the IOTA-Core together with some INX extensions +The IOTA-Core software is written in Go and can be deployed on all major platforms. +The [recommended setup](../how_tos/using_docker.md) uses Docker to run IOTA-Core together with some INX extensions secured behind a [Traefik](https://traefik.io) SSL reverse proxy. ## Configuration -The IOTA-Core uses two JSON configuration files that you can tweak based on your deployment requirements: +IOTA-Core 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). diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md b/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md index 54d02afcc0a..a0bf0a0d66a 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md @@ -12,7 +12,7 @@ tags: # Post-installation -Once you have deployed the IOTA-core, you can set all the parameters using configuration files. +Once you have deployed IOTA-core, you can set all the parameters using configuration files. ## Configuration Files @@ -26,7 +26,7 @@ The most important configuration files are: There are default configuration files available that you can use: - `config_testnet.json` - Includes the default values required to join the Testnet. -- `config_defaults.json` - Includes all default parameters used by the IOTA-core. You can use this file as a reference when customizing your `config.json` +- `config_defaults.json` - Includes all default parameters used by IOTA-core. You can use this file as a reference when customizing your `config.json` You can pick one of these files and use it as your `config.json` to join the configured network. @@ -36,7 +36,7 @@ Please see the [`config.json`](../references/configuration.md) and `peering.json One of the tasks 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, the IOTA-core will expose the [Core REST API v2](../references/api_reference.md) on port `14265`. +By default, IOTA-core will expose the [Core REST API v2](../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: @@ -74,7 +74,7 @@ You can find all the HTTP REST API related options in the [`config.json` referen ## Update -You can update the IOTA-core to the latest stable version with no breaking updates by running the following command: +You can update IOTA-core to the latest stable version with no breaking updates by running the following command: ```sh docker compose down && docker compose pull && docker compose up -d diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md index 11990dd064e..c99d8aaca10 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md @@ -17,14 +17,14 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import LinuxCommands from '@site/docs/_admonitions/_linux-commands.md'; -# Install the IOTA-core using Docker +# Install IOTA-core using Docker This article guides the recommended setup to run an IOTA-core node. It includes everything required to set up a public node accessible by wallets and applications: - [IOTA-core](https://github.com/iotaledger/iota-core) - [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 the IOTA-Core and INX extensions. +- [Prometheus](https://prometheus.io) - Metrics scraper configured to collect all metrics from IOTA-Core and INX extensions. - [Grafana](https://grafana.com) - Data visualizer that can be used to display the metrics collected by Prometheus. - [inx-dashboard](https://github.com/iotaledger/inx-dashboard) - Node dashboard. - [inx-indexer](https://github.com/iotaledger/inx-indexer) - Indexer extension for wallets and applications. @@ -37,8 +37,8 @@ It includes everything required to set up a public node accessible by wallets an 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 server's firewall: -- `15600 TCP` - Used for the IOTA-Core gossip. -- `14626 UDP` - Used for the IOTA-Core autopeering. +- `15600 TCP` - Used for IOTA-Core gossip. +- `14626 UDP` - Used for IOTA-Core autopeering. - `80 TCP` - Used for HTTP. _(can be changed, see below)_ - `443 TCP` - Used for HTTPS. _(optional if not using HTTPS)_ @@ -123,7 +123,7 @@ This step is recommended but optional if you are using autopeering. ### 4. Create the `data` folder -All files used by the IOTA-Core, the INX extensions, Traefik & co will be stored in a directory called `data`. +All files used by IOTA-Core, the INX extensions, 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: @@ -135,7 +135,7 @@ To create this directory with correct permissions, run the contained script: ### Starting the node -You can start the IOTA-Core node and INX extensions by running: +You can start IOTA-Core node and INX extensions by running: ```sh docker compose up -d @@ -179,7 +179,7 @@ You can configure your wallet software to use `http://localhost`. ### Displaying Log Output -You can display the IOTA-Core logs by running: +You can display IOTA-Core logs by running: ```sh docker compose logs -f iota-core @@ -198,7 +198,7 @@ docker compose down ### Tools -To access the IOTA-Core tools, you can use the following command: +To access IOTA-Core tools, you can use the following command: ```sh docker compose run iota-core tool From ef402e3764f01c7e06fc38030e4a29d9f7bce89b Mon Sep 17 00:00:00 2001 From: Lucas Tortora Date: Mon, 13 May 2024 15:14:50 -0300 Subject: [PATCH 16/25] addressing comments --- docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md b/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md index a0bf0a0d66a..e365ce40d95 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md @@ -1,5 +1,5 @@ --- -description: Introducing the IOTA-core nodes configuration files and their settings. +description: Introducing the IOTA-core node configuration files and their settings. image: /img/icons/iota/iota_core.png tags: - IOTA Node From 107b6def7b0ce64c92b38a1d1740224f740fee97 Mon Sep 17 00:00:00 2001 From: Lucas Tortora <85233773+lucas-tortora@users.noreply.github.com> Date: Mon, 13 May 2024 15:35:12 -0300 Subject: [PATCH 17/25] Update docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md Co-authored-by: Dr-Electron --- docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md index c99d8aaca10..12eb91f867e 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md @@ -50,18 +50,12 @@ It includes everything required to set up a public node accessible by wallets an 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: - - - TODO: Replace with link to iota2 node docker setup. ```sh mkdir node-docker-setup && cd node-docker-setup && curl -L https://node-docker-setup.iota.org/testnet | tar -zx ``` - - - ## Prepare From 8f5e178dde8d741f77229c8a64ca5fc65e4c22ef Mon Sep 17 00:00:00 2001 From: Lucas Tortora <85233773+lucas-tortora@users.noreply.github.com> Date: Mon, 13 May 2024 15:37:47 -0300 Subject: [PATCH 18/25] Apply suggestions from code review Co-authored-by: Dr-Electron --- .../iota-core/2.0/docs/how_tos/using_docker.md | 6 ------ .../iota-core/2.0/docs/how_tos/validator_setup.md | 10 +++++----- .../iota-core/2.0/docs/references/api_reference.md | 2 +- docs/maintain/iota-core/2.0/docs/welcome.md | 4 ++-- docs/maintain/iota-core/2.0/sidebars.js | 2 +- versionedConfig.js | 2 +- 6 files changed, 10 insertions(+), 16 deletions(-) diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md index 12eb91f867e..d8fb02de3ac 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md @@ -95,16 +95,10 @@ You can configure your node to either use HTTP or HTTPS. For publicly exposed no ::: - - - ```sh reference https://github.com/iotaledger/node-docker-setup/blob/feat/iota-core/testnet_iota-2.0/env_template ``` - - - ### 3. Setup neighbors Add your IOTA-Core neighbor addresses to the `peering.json` file. diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md index 76a7744c4a2..fc79df1d662 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md @@ -46,7 +46,7 @@ command `echo 0xff`. ## Set Up the CLI Wallet You can download the latest release of the CLI Wallet from the following link: -https://github.com/iotaledger/iota-sdk/releases +https://github.com/iotaledger/iota-sdk/releases/tag/cli-wallet-v2.0.0-alpha.1 After downloading, copy the binary to your current directory. @@ -199,7 +199,9 @@ account You can add the account as a block issuer using the following command: :::note + The public key needs to have the `0x` prefix. + ::: ```bash @@ -265,10 +267,8 @@ This value is not particularly important for the Testnet. A recommended value is You can use the following command to start staking: -``` - +```sh begin-staking {Account ID} {Stake Amount} {Fixed Cost} - ``` You can verify you successfully started staking by running the `sync` and `accounts` commands, copying the `Output ID` of the account, and then running `output {Output ID}`. You should be able to find the `StakingFeature` within the `features` section. It should show the `Stake Amount` and `Fixed Cost` you just entered. It should look like this, but with the values you entered: @@ -342,4 +342,4 @@ might change every epoch, so the stake requirements might also change. You can check your _Total pool stake_ by taking the `Account Address`, opening the following URL, and checking the `Validation` tab: -`https://explorer.iota.org/iota2-testnet/addr/ {Account Address}` +`https://explorer.iota.org/iota2-testnet/addr/{Account Address}` diff --git a/docs/maintain/iota-core/2.0/docs/references/api_reference.md b/docs/maintain/iota-core/2.0/docs/references/api_reference.md index f2c1c9cfd33..d597e0d63db 100644 --- a/docs/maintain/iota-core/2.0/docs/references/api_reference.md +++ b/docs/maintain/iota-core/2.0/docs/references/api_reference.md @@ -3,7 +3,7 @@ description: Links to the REST API reference and the Node event API reference. image: /img/icons/iota/iota_core.png tags: - IOTA Node - - IOTA-Core Node + - IOTA-Core Node - REST API - API - Reference diff --git a/docs/maintain/iota-core/2.0/docs/welcome.md b/docs/maintain/iota-core/2.0/docs/welcome.md index 42187e2d5b3..1accc8395d2 100644 --- a/docs/maintain/iota-core/2.0/docs/welcome.md +++ b/docs/maintain/iota-core/2.0/docs/welcome.md @@ -3,8 +3,8 @@ description: The IOTA-Core is a powerful, easy to install node software written image: /img/icons/iota/iota_core.png tags: - IOTA Node - - IOTA-core Node - - IOTA-core + - IOTA-Core Node + - IOTA-Core - IOTA - Node Software - Welcome diff --git a/docs/maintain/iota-core/2.0/sidebars.js b/docs/maintain/iota-core/2.0/sidebars.js index f97b84696f7..1716dce275c 100644 --- a/docs/maintain/iota-core/2.0/sidebars.js +++ b/docs/maintain/iota-core/2.0/sidebars.js @@ -13,7 +13,7 @@ module.exports = { docs: [ { type: 'category', - label: 'IOTA-core', + label: 'IOTA-Core', collapsed: false, items: [ { diff --git a/versionedConfig.js b/versionedConfig.js index a6082186d50..5f0d04f79b8 100644 --- a/versionedConfig.js +++ b/versionedConfig.js @@ -133,7 +133,7 @@ exports.maintainPluginsConfig = [ versions: [ { label: '2.0', - badges: ['IOTA', 'Shimmer'], + badges: ['Testnet'], }, ], }, From c8b6bfcaab4de4d226a17dcd73265ee78d3ea08e Mon Sep 17 00:00:00 2001 From: Lucas Tortora Date: Mon, 13 May 2024 15:39:57 -0300 Subject: [PATCH 19/25] unify spelling fix api --- .../iota-core/2.0/docs/getting_started/getting_started.md | 2 +- .../iota-core/2.0/docs/how_tos/post_installation.md | 8 ++++---- docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md | 6 +++--- .../iota-core/2.0/docs/how_tos/validator_setup.md | 4 ++-- .../iota-core/2.0/docs/references/api_reference.md | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/maintain/iota-core/2.0/docs/getting_started/getting_started.md b/docs/maintain/iota-core/2.0/docs/getting_started/getting_started.md index b2b396a3ae1..f7eb4895f9c 100644 --- a/docs/maintain/iota-core/2.0/docs/getting_started/getting_started.md +++ b/docs/maintain/iota-core/2.0/docs/getting_started/getting_started.md @@ -3,7 +3,7 @@ description: Getting started with the recommended requirements and installation image: /img/icons/iota/iota_core.png tags: - IOTA Node - - IOTA-core Node + - IOTA-Core Node - Linux - macOS - Windows diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md b/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md index e365ce40d95..54bdb0d5fc4 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/post_installation.md @@ -1,9 +1,9 @@ --- -description: Introducing the IOTA-core node configuration files and their settings. +description: Introducing the IOTA-Core node configuration files and their settings. image: /img/icons/iota/iota_core.png tags: - IOTA Node - - IOTA-core Node + - IOTA-Core Node - Configuration - REST API - Dashboard @@ -36,7 +36,7 @@ Please see the [`config.json`](../references/configuration.md) and `peering.json One of the tasks 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, IOTA-core will expose the [Core REST API v2](../references/api_reference.md) on port `14265`. +By default, IOTA-Core will expose the [Core REST API v3](../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: @@ -74,7 +74,7 @@ You can find all the HTTP REST API related options in the [`config.json` referen ## Update -You can update IOTA-core to the latest stable version with no breaking updates by running the following command: +You can update IOTA-Core to the latest stable version with no breaking updates by running the following command: ```sh docker compose down && docker compose pull && docker compose up -d diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md index d8fb02de3ac..9bab9da9e22 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md @@ -3,7 +3,7 @@ description: Learn how to install and run a iota-CORE node using Docker. image: /img/icons/iota/iota_core.png tags: - IOTA Node - - IOTA-core Node + - IOTA-Core Node - Docker - Install - Run @@ -17,9 +17,9 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import LinuxCommands from '@site/docs/_admonitions/_linux-commands.md'; -# Install IOTA-core using Docker +# Install IOTA-Core using Docker -This article guides the recommended setup to run an IOTA-core node. +This article guides the recommended setup to run an IOTA-Core node. It includes everything required to set up a public node accessible by wallets and applications: - [IOTA-core](https://github.com/iotaledger/iota-core) diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md index fc79df1d662..fe256ba8760 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md @@ -3,7 +3,7 @@ description: Learn how to become a validator. image: /img/icons/iota/iota_core.png tags: - IOTA Node - - IOTA-core Node + - IOTA-Core Node - Docker - Install - Run @@ -286,7 +286,7 @@ The account is now registered as a validator. Next, you must set up the infrastr ## Prepare the Validator Plugin -Running a validator requires running a full IOTA-core node. You can follow the steps outlined in the [how to install using Docker guide](./using_docker.md) to setup the node. +Running a validator requires running a full IOTA-Core node. You can follow the steps outlined in the [how to install using Docker guide](./using_docker.md) to setup the node. Follow the next steps after successfully setting up the node or while setting it up at your choice. diff --git a/docs/maintain/iota-core/2.0/docs/references/api_reference.md b/docs/maintain/iota-core/2.0/docs/references/api_reference.md index d597e0d63db..24c8f7b90e2 100644 --- a/docs/maintain/iota-core/2.0/docs/references/api_reference.md +++ b/docs/maintain/iota-core/2.0/docs/references/api_reference.md @@ -13,4 +13,4 @@ tags: You can find specifications of the APIs exposed by in the links below: -- [Core REST API v2](/apis/core/v2/iota-core-rest-api) +- [Core REST API v3](/apis/core/v3/iota-core-rest-api) From 5c01228165b4d0063366d6fa06b7d63bbb64d64b Mon Sep 17 00:00:00 2001 From: Dr-Electron Date: Mon, 13 May 2024 20:54:47 +0200 Subject: [PATCH 20/25] Add APIs --- docs/build/apis/sidebars.js | 6 ++++++ docusaurus.config.js | 13 ++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/build/apis/sidebars.js b/docs/build/apis/sidebars.js index f2eb2b5a0c0..4d133d52e71 100644 --- a/docs/build/apis/sidebars.js +++ b/docs/build/apis/sidebars.js @@ -48,6 +48,12 @@ const categories = [ collapsed: true, items: './docs/core/v2/sidebar', }, + { + type: 'category', + label: 'V3', + collapsed: true, + items: './docs/core/v3/sidebar', + }, ], }, { diff --git a/docusaurus.config.js b/docusaurus.config.js index 54475f71726..24a4aa77a8f 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -249,7 +249,7 @@ module.exports = async () => { id: 'openapi', docsPluginId: 'apis', // e.g. "classic" or the plugin-content-docs id config: { - coreApiShimmer: { + coreApiV2: { specPath: 'https://raw.githubusercontent.com/iotaledger/tips/main/tips/TIP-0025/core-rest-api.yaml', outputDir: path.resolve( @@ -260,6 +260,17 @@ module.exports = async () => { groupPathsBy: 'tag', }, }, + coreApiV3: { + specPath: + 'https://raw.githubusercontent.com/iotaledger/tips/tip48/tips/TIP-0048/openapi3-core.yaml', + outputDir: path.resolve( + __dirname, + 'docs/build/apis/docs/core/v3', + ), + sidebarOptions: { + groupPathsBy: 'tag', + }, + }, waspApi: { specPath: 'https://raw.githubusercontent.com/iotaledger/wasp/develop/clients/apiclient/api/openapi.yaml', From dacb5d56b76ba0c2936fa0ba9a5db6bec01f552b Mon Sep 17 00:00:00 2001 From: Philipp Gackstatter Date: Tue, 14 May 2024 09:17:27 +0200 Subject: [PATCH 21/25] Set BIP Path as in firefly --- docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md index fe256ba8760..4de7583578e 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md @@ -99,9 +99,9 @@ Unless you have a ledger, select Stronghold. No. -##### Select bip path +##### Select BIP path -Select any bip path of your choice (e.g., IOTA is fine) +Select `Custom` as the BIP path and type `1/0/0/0`. ##### Do you want to set an alias for the new wallet? @@ -154,7 +154,7 @@ You should run this until the BIC changes from `None` to `Some(0)`, then copy th You can transition your account by running the following command: ```bash -./wallt implicit-account-transition {Output Id} +implicit-account-transition {Output Id} ``` ### 5. Sync With the Node From 55e13e38372720ac6f27068ab61d1883cec37cb7 Mon Sep 17 00:00:00 2001 From: Philipp Gackstatter Date: Tue, 14 May 2024 09:18:29 +0200 Subject: [PATCH 22/25] Remove unnecessary port in docker setup --- docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md index 9bab9da9e22..fb6cfb94e10 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md @@ -38,7 +38,6 @@ It includes everything required to set up a public node accessible by wallets an 4. Opening up the following ports in your server's firewall: - `15600 TCP` - Used for IOTA-Core gossip. -- `14626 UDP` - Used for IOTA-Core autopeering. - `80 TCP` - Used for HTTP. _(can be changed, see below)_ - `443 TCP` - Used for HTTPS. _(optional if not using HTTPS)_ From 63f617f28ec4b2612bdf9b2c16341119aa75066a Mon Sep 17 00:00:00 2001 From: Dr-Electron Date: Wed, 15 May 2024 01:07:09 +0200 Subject: [PATCH 23/25] Update docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md --- docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md index 4de7583578e..21b0b3d93fd 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md @@ -46,7 +46,7 @@ command `echo 0xff`. ## Set Up the CLI Wallet You can download the latest release of the CLI Wallet from the following link: -https://github.com/iotaledger/iota-sdk/releases/tag/cli-wallet-v2.0.0-alpha.1 +https://github.com/iotaledger/iota-sdk/releases/tag/cli-wallet-v2.0.0-beta.2 After downloading, copy the binary to your current directory. From 76e738da12b799042f022cbc542eb6b4a342101b Mon Sep 17 00:00:00 2001 From: Dr-Electron Date: Wed, 15 May 2024 02:06:44 +0200 Subject: [PATCH 24/25] Cleanup headers and fix small mistake --- .../2.0/docs/how_tos/validator_setup.md | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md index 21b0b3d93fd..2aa71a1c8f1 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/validator_setup.md @@ -45,12 +45,20 @@ command `echo 0xff`. ## Set Up the CLI Wallet +### 1a. Downlaod the latest Version + You can download the latest release of the CLI Wallet from the following link: https://github.com/iotaledger/iota-sdk/releases/tag/cli-wallet-v2.0.0-beta.2 After downloading, copy the binary to your current directory. -### Build From Source +### 1b. Build From Source + +:::info Pre-build Release + +If you already downloaded the pre-build release version, you can skip this section and continue with [Connect to a Node](#2-connect-to-a-node) + +::: Please follow the instructions to build the CLI Wallet from source: @@ -79,7 +87,7 @@ For ease of access, you can copy the Wallet that you built into your current dir cp ../target/release/wallet wallet ``` -#### 4. Connect to a Node +### 2. Connect to a Node You can use the following command to connect your wallet to a Testnet node — alternatively, your node’s URL: @@ -87,23 +95,29 @@ You can use the following command to connect your wallet to a Testnet node — a ./wallet init --node-url "https://api.nova-testnet.iotaledger.net" ``` -#### 5. Configure Your Wallet +### 3. Configure Your Wallet Once you’ve connected your wallet to a node, you must answer the following setup questions: -##### Select secret manager. +:::info Not Mentioned Questions + +The setup questions that aren't asked here you can configure however you prefer, there config doesn't matter for this how-to. + +::: + +#### Select secret manager. Unless you have a ledger, select Stronghold. -##### Do you want to set the address of the new wallet? +#### Do you want to set the address of the new wallet? No. -##### Select BIP path +#### Select BIP path Select `Custom` as the BIP path and type `1/0/0/0`. -##### Do you want to set an alias for the new wallet? +#### Do you want to set an alias for the new wallet? Yes. @@ -114,7 +128,7 @@ Then, enter a wallet alias of your choice. :::tip Connect to a Node The following sections assume you have already set up your [CLI Wallet](#set-up-the-cli-wallet), -and [connected it to a node](#4-connect-to-a-node). +and [connected it to a node](#2-connect-to-a-node). ::: @@ -191,7 +205,7 @@ its `Account ID` and `Account Address`. ```bash sync -account +accounts ``` ### 3. Add the Account as a Block Issuer From c6e42b27ec790bba3e7d0c9c7471e265321171a4 Mon Sep 17 00:00:00 2001 From: Philipp Gackstatter Date: Wed, 15 May 2024 13:51:56 +0200 Subject: [PATCH 25/25] Add final node docker setup link --- docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md index fb6cfb94e10..3b49bd6e7a0 100644 --- a/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md +++ b/docs/maintain/iota-core/2.0/docs/how_tos/using_docker.md @@ -49,10 +49,8 @@ It includes everything required to set up a public node accessible by wallets an 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: -TODO: Replace with link to iota2 node docker setup. - ```sh -mkdir node-docker-setup && cd node-docker-setup && curl -L https://node-docker-setup.iota.org/testnet | tar -zx +mkdir node-docker-setup && cd node-docker-setup && curl -L https://node-docker-setup.iota.org/iota2-testnet | tar -zx ``` ## Prepare