-
Notifications
You must be signed in to change notification settings - Fork 2k
Dual Farming Mainnet and Testnet
These instructions are tailored for Linux. A similar approach could likely be followed for MacOS.
In some cases, you may want to farm the same plots you farm on mainnet on one of the testnets as well, without removing them from mainnet. This is doable with a bit of extra legwork to set up unique ports for the testnet chia installation.
There are a couple options for setting this up. You can either ensure you have the CHIA_ROOT set to unique values for each instance you want to run, or else run the installations on separate users. These instructions will show setting a specific CHIA_ROOT.
For the mainnet installation, we will stick with the default ports and CHIA_ROOT, so these steps are essentially no different than the standard installation instructions https://github.com/Chia-Network/chia-blockchain/wiki/INSTALL
- (Optional) Install
yq
to make editing the yaml files easier https://github.com/mikefarah/yq#install- Alternatively, you can manually edit the ports in config.yaml
export CHIA_ROOT ~/.chia/testnet
chia init
chia configure --testnet true
- Edit the file
~/.chia/testnet/config/config.yaml
and set the following fields to the new port values, to not conflict with the mainnet installation. You do not need to use the ports listed below, but these will not conflict with mainnet. Choose any ports you desire as long as they are different than the default values for mainnet.
yq -i '.daemon_port = 55401' ~/.chia/testnet/config/config.yaml
yq -i '.ui.daemon_port = 55401' ~/.chia/testnet/config/config.yaml
yq -i '.ui.port = 8802' ~/.chia/testnet/config/config.yaml
yq -i '.farmer.port = 8547' ~/.chia/testnet/config/config.yaml
yq -i '.full_node.farmer_peer.port = 8547' ~/.chia/testnet/config/config.yaml
yq -i '.harvester.farmer_peer.port = 8547' ~/.chia/testnet/config/config.yaml
yq -i '.harvester.port = 8548' ~/.chia/testnet/config/config.yaml
yq -i '.farmer.harvester_peer.port = 8548' ~/.chia/testnet/config/config.yaml
yq -i '.wallet.port = 8649' ~/.chia/testnet/config/config.yaml
yq -i '.full_node.wallet_peer.port = 8649' ~/.chia/testnet/config/config.yaml
yq -i '.full_node.rpc_port = 8800' ~/.chia/testnet/config/config.yaml
yq -i '.ui.rpc_port = 8800' ~/.chia/testnet/config/config.yaml
yq -i '.farmer.rpc_port = 8571' ~/.chia/testnet/config/config.yaml
yq -i '.harvester.rpc_port = 8572' ~/.chia/testnet/config/config.yaml
yq -i '.wallet.rpc_port = 9456' ~/.chia/testnet/config/config.yaml
chia start farmer
To swap between running commands for mainnet and running commands for testnet, you need to ensure your CHIA_ROOT
is set properly before running any commands
- Mainnet:
export CHIA_ROOT=~/.chia/mainnet
- Testnet:
export CHIA_ROOT=~/.chia/testnet
Chia Network - Green money for a digital world.
- Home
- Beginners Guide
- Install instructions
- Quick Start Guide
- FAQ - Frequently Asked Questions
- Pooling FAQ
- Pooling User Guide
- Chia Project FAQ
- Plotting Basics
- Alternate Plotters
- Plot Sizes (k-sizes)
- CLI Commands Reference
- Windows Tips & Tricks
- How to Check if Everything is Working (or Not)
- SSD Endurance - Info on SSD's and plotting
- Reference Plotting Hardware
- Reference Farming Hardware
- Farming on Many Machines
- Good Security Practices on Many Machines
- Chialisp Documentation (Official)
- How to Connect to Testnet
- Timelords and Cluster Timelords
- Release Notes
- RPC Interfaces
- Resolve Sync Issues - Port 8444