Skip to content

Commit

Permalink
wordsmith connecting to network
Browse files Browse the repository at this point in the history
  • Loading branch information
barriebyron authored Aug 30, 2023
1 parent 14d0c9d commit 8d3943c
Showing 1 changed file with 13 additions and 36 deletions.
49 changes: 13 additions & 36 deletions docs/node-operators/connecting-to-the-network.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,32 +38,9 @@ Steps to install mina, connect to the Mina Mainnet network, and test connectivit

The first step to connecting to Mainnet is to install the latest daemon version.

Follow the steps for your operating system.

### Ubuntu 20.04 and Debian 10, 11, 12

Install the latest **Stable** [Mina Release 1.4.0](https://github.com/MinaProtocol/mina/releases/tag/1.4.0) or visit the [GitHub Releases Page](https://github.com/MinaProtocol/mina/releases) to install pre-release (Beta) builds.

To set up the new `stable` package repository and install the latest version:

```sh
echo "deb [trusted=yes] http://packages.o1test.net $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/mina.list
sudo apt-get install --yes apt-transport-https
sudo apt-get update
sudo apt-get install --yes curl unzip mina-mainnet=1.4.0-c980ba8
```

To verify the daemon is correctly installed:

```sh
mina version
```

The expected output is:

```text
Commit c980ba87c3417f40a7081225dfe7478c5ee70fd7 on branch master
```
To install the latest [Mainnet **Stable** Release 1.4.0](https://github.com/MinaProtocol/mina/releases/tag/1.4.0), use the [Installation](/node-operators/getting-started#installation) steps for your environment.

## Start a standalone mina node

Expand All @@ -73,13 +50,13 @@ Auto-restart flows are in place to ensure your nodes perform optimally.

1. Start a standalone mina node to make sure everything works.

To start a Mina node instance and connect to the live network:
To start a mina node instance and connect to the live network:

```sh
mina daemon --peer-list-url https://storage.googleapis.com/seed-lists/mainnet_seeds.txt
```

The `--peer-list` argument specifies the the source file of seed peer addresses for the initial peer to connect to on the network. Mina is a [peer-to-peer](/glossary#peer-to-peer) protocol, so there is no dependence on a single centralized server.
The `--peer-list` argument specifies the source file of seed peer addresses for the initial peer to connect to on the network. Mina is a [peer-to-peer](/glossary#peer-to-peer) protocol, so there is no dependence on a single centralized server.

If you have a key with MINA stake and want to produce blocks:

Expand Down Expand Up @@ -118,7 +95,7 @@ To produce blocks or otherwise customize the configuration for the mina daemon:
Replace `<BLOCK_PRODUCER_KEY_PATH>` with the full path to your block producer private key. For example, `/home/ubuntu/keys/my-wallet`.
If you do not want to produce blocks then you can keep `~/.mina-env` empty for now.
If you do not want to produce blocks, then you can keep `~/.mina-env` empty for now.
1. To change how mina is configured, specify flags to the mina daemon process with space-separated arguments between the quotes in `EXTRA_FLAGS=""`.
Expand All @@ -129,7 +106,7 @@ To produce blocks or otherwise customize the configuration for the mina daemon:
- Mainnet package [https://storage.googleapis.com/seed-lists/mainnet_seeds.txt](https://storage.googleapis.com/seed-lists/mainnet_seeds.txt)
- Change with `--peer-list-url`
1. After your `.mina-env` file is ready, start a Mina node instance and connect to the live network:
1. After your `.mina-env` file is ready, start a mina node instance and connect to the live network:
```sh
systemctl --user daemon-reload
Expand Down Expand Up @@ -168,15 +145,15 @@ Look at logs that show the last 1000 lines, and follow from there:
journalctl --user -u mina -n 1000 -f
```

In some cases, you might need run the following command to view the logs:
In some cases, you might need to run the following command to view the logs:

```sh
journalctl --user-unit mina -n 1000 -f
```

### Docker

When running your daemon using Docker, first ensure that your private key has the correct permissions.
When running your daemon using Docker, ensure your private key has the correct permissions.

```sh
cd ~
Expand All @@ -197,7 +174,7 @@ PEER_LIST_URL=https://storage.googleapis.com/seed-lists/mainnet_seeds.txt

Replace `<BLOCK_PRODUCER_KEY_PATH>` with the full path to your block producer private key. For example, `/home/ubuntu/keys/my-wallet`.

If you do not want to produce blocks, then provide only the `PEER_LIST_URL`.
If you do not want to produce blocks, provide only the `PEER_LIST_URL`.

Now, run the image with your `~/.mina-config` and `~/.mina-env` files mounted into the container:

Expand Down Expand Up @@ -234,7 +211,7 @@ Monitor connectivity to the network:
docker exec -it mina mina client status
```

At least 10 peers are expected. Watch the block height and the max observed block height climb.
At least 10 peers are expected. Watch the block height and the maximum observed block height climb.

:::tip

Expand All @@ -246,13 +223,13 @@ If you encounter `[Warn] Shutdown before Mina instance was created, not saving a

Monitor the mina client status in a different terminal window.

Now that a node is started and running the Mina daemon, run:
Now that a node is started and running the mina daemon, run:

```sh
mina client status
```

When first starting up a node, it can take up to a minute before `mina client status` connects to the daemon. If you see `Error: daemon not running. See mina daemon`, just a wait a bit and try again.
When first starting up a node, it can take up to a minute before `mina client status` connects to the daemon. If you see `Error: daemon not running. See mina daemon`, just wait a bit and try again.

The expected response includes these fields:

Expand All @@ -263,14 +240,14 @@ The expected response includes these fields:

- `Sync Status: Bootstrap` means that the node is bootstrapping and needs to sync with the rest of the network. Be patient here as this step might take some time for the node to get all the data it needs.

- After a while, the node connects to more peers and then moves into `Sync Status: Catchup` which gathers the most recent blocks and state while catching up to the the highest block.
- After a while, the node connects to more peers and then moves into `Sync Status: Catchup`, which gathers the most recent blocks and state while catching up to the the highest block.

- When sync status reaches `Synced` and the node is connected to 1 or more peers, the node is successfully connected to the network. A corresponding daemon log shows the sync status: `[Info] Mina daemon is now synced`.

- An issue with your port configuration can causethe `Bootstrap` state to persist for more than an hour.

## Step up your game

Now that you have a fully synced node, learn about some of the more advanced features of the daemon such as [Sending a payment](sending-a-payment) and [Staking & Delegating](staking-and-snarking).
Now that you have a fully synced node, learn about some of the more advanced features of the daemon, such as [Sending a payment](sending-a-payment) and [Staking & Delegating](staking-and-snarking).

To earn MINA tokens, check out the [Mina Foundation Delegation Program](foundation-delegation-program).

0 comments on commit 8d3943c

Please sign in to comment.