This document provides instructions to install and run Subnet, whether you are building it from source or using prebuilt binaries. Note that this project is currently under development, and breaking changes may occur.
- Using Prebuilt Binaries
- Building from Source
- Initializing Configuration
- Running the Subnet Node
- Development Status and Known Issues
- Feedback and Contribution
- License
We provide prebuilt binaries for major platforms (Linux, macOS, and Windows). You can download the binary for your system and start using Subnet without building it from source.
-
Download the Prebuilt Binary
- Go to the Releases Page.
- Download the binary for your operating system:
- Linux:
subnet-linux-amd64
- macOS:
subnet-darwin-amd64
- Windows:
subnet-windows-amd64.exe
- Linux:
-
Make the Binary Executable (Linux/macOS)
chmod +x subnet-linux-amd64
-
Move the Binary to Your PATH
sudo mv subnet-linux-amd64 /usr/local/bin/subnet
For macOS, replace
subnet-linux-amd64
withsubnet-darwin-amd64
. For Windows, no additional steps are needed if you run the.exe
file directly. -
Verify the Installation
subnet --version
-
Initialize the Configuration
- Follow the Initializing Configuration section.
If you prefer to build Subnet from source, follow these steps:
- Golang: Version 1.19 or higher (Install Go).
- Git: Version control system.
-
Clone the repository:
git clone https://github.com/unicornultrafoundation/subnet-node.git cd subnet-node
-
Build the source code:
go build -o ./build/subnet ./cmd/subnet
-
Verify the build:
cd ./build ./subnet --help
Before running the Subnet node, you must initialize its configuration.
-
Run the Initialization Command
./subnet --init --datadir ./.data
-
Verify the Configuration
- Check the generated file at
~/.subnet/config.yaml
:addresses: api: - /ip4/0.0.0.0/tcp/8080 # api server swarm: - /ip4/0.0.0.0/tcp/4001 # swarm server bootstrap: - /ip4/47.129.250.9/tcp/4001/p2p/12D3KooWDK63y6sxFi3dNqrS8yRetgbB81Tzszvs2yLoEtWtPCDa # subnet genesis boot node identity: peer_id: 12D3KooWLJCgSFv62DfQwNKTYxACMisLnCnGbYBp766p1K19PExx # DON'T USE! Example of ED25519 Public Key privkey: CAESQA0P3Td0UZ2sAoCflMNdUivxFbUdcuo+XraGbZk5EZEdm7ZnWjxFiBUG9M718wpSOzl8P4JDQe6vZ6w+F5S9VPE= # DON'T USE! Example of ED25519 Private Key
- Check the generated file at
Once the configuration is initialized, you can start the Subnet node.
-
Start the Node
./subnet --datadir ./.data
-
Connect to Bootstrap Peers
- If you need to connect to a bootstrap node manually:
./subnet connect /ip4/<bootstrap-ip>/tcp/<port>/p2p/<peer-id>
- If you need to connect to a bootstrap node manually:
-
Monitor Logs
- Observe logs for connections and resource discovery:
Initializing Subnet Node... Node started with Peer ID: <ED25519 Public Key> Listening on: /ip4/127.0.0.1/tcp/4001
- Observe logs for connections and resource discovery:
- Active Development: Subnet is currently in the alpha stage and under heavy development.
- Breaking Changes: APIs, configurations, and network protocols may change without notice.
-
Peer Connection Failures:
- NAT traversal issues may occur in certain network environments.
- Temporary fix: Ensure ports are forwarded manually or run on public networks.
-
Incomplete Features:
- Resource management and discovery are being actively developed.
-
Stability:
- The system may become unstable under heavy load or high peer counts.
We value your feedback to improve Subnet. If you encounter issues or have suggestions, please:
- Open an issue on our GitHub Repository.
- Join discussions and share ideas in the Community Forum.
For contributing to Subnet, refer to CONTRIBUTING.md.
This project is licensed under the MIT License.
For additional documentation, visit the Wiki.