Skip to content

Commit

Permalink
Rework libp2p requirements.
Browse files Browse the repository at this point in the history
  • Loading branch information
shimkiv committed Jun 4, 2024
1 parent 9da5363 commit ac6546b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 49 deletions.
60 changes: 13 additions & 47 deletions docs/node-operators/generating-a-keypair.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ In some cases, you want to generate more than one wallet key pair. For example,
The supported tools for generating public/private key pairs are:

- [mina-generate-keypair](#mina-generate-keypair) command line utility
- [mina libp2p generate-keypair](#mina-libp2p-generate-keypair) mina subcommand
- [mina libp2p generate-keypair](#generating-and-using-your-libp2p-keys) mina subcommand
- [Mina Signer](/node-operators/mina-signer)
- [Mina command line wallet package](https://github.com/jspada/ledger-app-mina/blob/v1.0.0-beta.2/README.md#command-line-wallet) that interfaces with your Ledger device and Mina blockchain to generate addresses on the Ledger hardware wallet

Expand Down Expand Up @@ -167,58 +167,20 @@ docker run -it --rm --entrypoint "" \
mina advanced validate-keypair --privkey-path /keys/my-wallet
```
## mina libp2p generate-keypair
Each node in the Mina network must possess its own distinct libp2p key pair. This requirement extends to block producer nodes, despite their utilization of a common block production key. Every node operator must generate unique libp2p keys locally on their respective machines.
Use the `mina` subcommand `libp2p` command line utility to create a libp2p key pair.
## Generating and using your libp2p keys
To ensure connectivity across the network, it is essential that all seed nodes start with the **same** `libp2p` keypair.
This consistency allows other nodes in the network to reliably connect.
Use the `libp2p` subcommand of `mina` CLI utility to create a libp2p key pair.
```
Mina

mina SUBCOMMAND

=== subcommands ===

accounts Client commands concerning account management
daemon Mina daemon
client Lightweight client commands
advanced Advanced client commands
ledger Ledger commands
libp2p Libp2p commands
internal Internal commands
parallel-worker internal use only
transaction-snark-profiler transaction snark profiler
version print version information
help explain a given subcommand (perhaps recursively)
```
The `libp2p` subcommand is used to create the libp2p key pair.
```
Generate a new libp2p keypair and print out the peer ID

mina libp2p generate-keypair

=== flags ===

--privkey-path FILE File to write private key into (public key will be
FILE.pub)
(alias: -privkey-path)
[-help] print this help text and exit
(alias: -?)
```
### Installation Instructions
See [Getting Started](./block-producer-node/getting-started)
## Generate your libp2p keys
mina libp2p generate-keypair --privkey-path <path-to-the-key-file>
```
Use the following command:
Generated libp2p keys can then be used with the Mina Daemon startup command like this:
```
mina libp2p generate-keypair -privkey-path <path-to-the-key-file>
mina daemon ... --libp2p-keypair <path-to-the-key-file> ...
```
## Ledger Hardware Wallet
Expand All @@ -229,6 +191,10 @@ You can use your [Ledger Nano S](https://www.ledger.com/) hardware wallet to sec
You can also use [Mina Signer](/node-operators/mina-signer) to generate key pairs and sign transactions.
## Installation Instructions
See [Getting Started](./block-producer-node/getting-started)
## Next steps
Now that you have created a public/private key pair, you are ready to [connect to the network](./block-producer-node/connecting-to-the-network) or share your public key.
16 changes: 15 additions & 1 deletion docs/node-operators/requirements.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Please note the following are the hardware requirements for each node type after

## Mina Daemon Requirements

### IP and Port configuration
### IP and Port configuration

**IP:**

Expand All @@ -42,3 +42,17 @@ You can use a different port by setting the `--external-port` flag.
### Node Auto-restart

Ensure your nodes are set to restart automatically after a crash. For guidance, refer to the [auto-restart instructions](/node-operators/block-producer-node/connecting-to-the-network#start-a-mina-node-with-auto-restart-flows-using-systemd)

## Seed Peer Requirements

### Generation of libp2p keypair

To ensure connectivity across the network, it is essential that all seed nodes start with the **same** `libp2p` keypair.
This consistency allows other nodes in the network to reliably connect.
Although the same libp2p keys can be reused from before the upgrade, if you need to manually generate new libp2p keys, use the following command:

```
mina libp2p generate-keypair --privkey-path <path-to-the-key-file>
```

Further information on [generating key pairs](/node-operators/generating-a-keypair) on Mina Protocol.
2 changes: 1 addition & 1 deletion docs/node-operators/seed-peers/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ keywords:

Seed peer providers are an independent group of nodes that assist new nodes to find peers and connect to the Mina Protocol. Seed peers improve the onboarding experience for other nodes and make sure the nodes start bootstrapping as soon as possible.

Minas seed peers are considered to be leaders among the community. They are not compensated in any way they perform their role as a service to the Mina community.
Mina's seed peers are considered to be leaders among the community. They are not compensated in any way - they perform their role as a service to the Mina community.

For the full list of seed peers and information on how to contribute, please refer to the [Official Git Repository](https://github.com/MinaFoundation/seeds).

Expand Down

0 comments on commit ac6546b

Please sign in to comment.