|
| 1 | +--- |
| 2 | +sidebar_position: 7 |
| 3 | +title: Network Configuration |
| 4 | +description: |
| 5 | + Learn about OpenMina's network configuration and how to contribute to the |
| 6 | + default peer list |
| 7 | +slug: /node-runners/network-configuration |
| 8 | +--- |
| 9 | + |
| 10 | +# Network Configuration |
| 11 | + |
| 12 | +This guide explains OpenMina's network configuration and how you can contribute |
| 13 | +to improving the network's connectivity. |
| 14 | + |
| 15 | +## Default Peers |
| 16 | + |
| 17 | +OpenMina includes hardcoded default peers for both mainnet and devnet networks |
| 18 | +to ensure reliable initial connectivity. These peers are defined in |
| 19 | +`core/src/network.rs:182` and `core/src/network.rs:265` respectively. |
| 20 | + |
| 21 | +### Mainnet Default Peers |
| 22 | + |
| 23 | +The mainnet configuration includes a curated list of reliable seed nodes |
| 24 | +operated by various community members and organizations. These peers help new |
| 25 | +nodes bootstrap their connection to the Mina Protocol network. |
| 26 | + |
| 27 | +### Devnet Default Peers |
| 28 | + |
| 29 | +The devnet configuration includes seed nodes specifically for development and |
| 30 | +testing purposes, allowing developers to connect to the test network. |
| 31 | + |
| 32 | +## Contributing to Default Peers |
| 33 | + |
| 34 | +The Mina community welcomes contributions to improve network connectivity by |
| 35 | +adding reliable seed nodes to the default peer lists. |
| 36 | + |
| 37 | +### Requirements for Peer Contribution |
| 38 | + |
| 39 | +To contribute a seed node to the default peer list, your node should meet these |
| 40 | +criteria: |
| 41 | + |
| 42 | +- **High Availability**: Node should have >99% uptime |
| 43 | +- **Stable Network**: Reliable internet connection with sufficient bandwidth |
| 44 | +- **Proper Configuration**: Correctly configured Mina Protocol node |
| 45 | +- **Long-term Commitment**: Willingness to maintain the node for extended |
| 46 | + periods |
| 47 | +- **Network Security**: Secure server setup and regular maintenance |
| 48 | + |
| 49 | +### Contribution Process |
| 50 | + |
| 51 | +#### 1. Via OpenMina Repository |
| 52 | + |
| 53 | +For OpenMina-specific peer additions: |
| 54 | + |
| 55 | +1. Fork the [OpenMina repository](https://github.com/o1-labs/openmina) |
| 56 | +2. Edit the appropriate default peer list in `core/src/network.rs`: |
| 57 | + - For mainnet: Update the `mainnet::default_peers()` function (line 265) |
| 58 | + - For devnet: Update the `devnet::default_peers()` function (line 182) |
| 59 | +3. Add your peer's multiaddr in the format: |
| 60 | + ```rust |
| 61 | + "/ip4/YOUR_IP/tcp/PORT/p2p/YOUR_PEER_ID", |
| 62 | + ``` |
| 63 | +4. Submit a pull request with: |
| 64 | + - Description of your node setup |
| 65 | + - Expected uptime and maintenance commitment |
| 66 | + - Contact information for node operator |
| 67 | + |
| 68 | +#### 2. Via Official Seeds Repository |
| 69 | + |
| 70 | +For broader Mina Protocol peer contributions, consider using the official seeds |
| 71 | +repository: |
| 72 | + |
| 73 | +1. Visit the |
| 74 | + [Mina Foundation Seeds Repository](https://github.com/o1-labs/seeds) |
| 75 | +2. Follow their contribution guidelines: |
| 76 | + - Fork the repository |
| 77 | + - Add your seed to the appropriate network list file |
| 78 | + - Ensure all pre-commit checks pass |
| 79 | + - Submit a pull request with detailed explanation |
| 80 | + - Wait for maintainer review and potential merge |
| 81 | + |
| 82 | +The seeds repository maintains the canonical list of seed nodes accessible at |
| 83 | +`https://bootnodes.minaprotocol.com/networks/mainnet.txt`. |
| 84 | + |
| 85 | +### Peer Address Format |
| 86 | + |
| 87 | +Peer addresses use the multiaddr format: |
| 88 | + |
| 89 | +``` |
| 90 | +/dns4/hostname/tcp/port/p2p/peer_id |
| 91 | +/ip4/ip_address/tcp/port/p2p/peer_id |
| 92 | +``` |
| 93 | + |
| 94 | +Where: |
| 95 | + |
| 96 | +- `hostname` or `ip_address`: Your node's network address |
| 97 | +- `port`: The libp2p port (commonly 8302 for mainnet, 10003 for devnet) |
| 98 | +- `peer_id`: Your node's unique peer identifier |
| 99 | + |
| 100 | +### Testing Your Contribution |
| 101 | + |
| 102 | +Before submitting a peer contribution: |
| 103 | + |
| 104 | +1. **Verify Connectivity**: Ensure your node is accessible from the internet |
| 105 | +2. **Test Peer Discovery**: Confirm other nodes can discover and connect to |
| 106 | + yours |
| 107 | +3. **Check Network Compatibility**: Verify your node works with both OCaml and |
| 108 | + Rust implementations |
| 109 | +4. **Monitor Performance**: Ensure stable performance under normal network load |
| 110 | + |
| 111 | +### Node Operation Best Practices |
| 112 | + |
| 113 | +When running a seed node: |
| 114 | + |
| 115 | +- **Monitor Uptime**: Use monitoring tools to track node availability |
| 116 | +- **Regular Updates**: Keep your node software up to date |
| 117 | +- **Resource Management**: Ensure adequate CPU, memory, and bandwidth |
| 118 | +- **Security Measures**: Implement proper firewall and security configurations |
| 119 | +- **Documentation**: Maintain documentation of your node's configuration |
| 120 | + |
| 121 | +### Community Resources |
| 122 | + |
| 123 | +- **GitHub Discussions**: Join discussions on the OpenMina repository |
| 124 | +- **Discord**: Connect with the community on the |
| 125 | + [Mina Protocol Discord](https://discord.com/channels/484437221055922177/1290662938734231552) |
| 126 | +- **Forums**: Participate in |
| 127 | + [Mina Protocol Forums](https://forums.minaprotocol.com/) |
| 128 | + |
| 129 | +## Advanced Network Configuration |
| 130 | + |
| 131 | +### Custom Peer Lists |
| 132 | + |
| 133 | +While OpenMina uses default peers for initial connectivity, you can configure |
| 134 | +your node to use custom peer lists by modifying the network configuration or |
| 135 | +using command-line options during node startup. |
| 136 | + |
| 137 | +### Network Monitoring |
| 138 | + |
| 139 | +Monitor your node's network connectivity through: |
| 140 | + |
| 141 | +- OpenMina's built-in dashboard |
| 142 | +- Peer connection metrics |
| 143 | +- Network synchronization status |
| 144 | + |
| 145 | +## Troubleshooting |
| 146 | + |
| 147 | +### Common Connectivity Issues |
| 148 | + |
| 149 | +- **Firewall Blocking**: Ensure the libp2p port is open |
| 150 | +- **NAT Configuration**: Configure port forwarding if behind NAT |
| 151 | +- **Peer Discovery**: Check if your node appears in other nodes' peer lists |
| 152 | +- **Network Segmentation**: Verify connectivity to multiple network regions |
| 153 | + |
| 154 | +For additional troubleshooting, refer to the |
| 155 | +[troubleshooting documentation](../troubleshooting) or reach out to the |
| 156 | +community for support. |
0 commit comments