How to join testnet
How to join testnet
These steps assume you have Chia installed.
Step 1. Run chia init
Step 2. If you do not already have keys generated then run chia keys generate
Step 3. Run chia configure --testnet true
Run chia configure --testnet true
, as this command will make your client automatically select and configure itself for the currently-active testnet. If you have previously run chia start
for this installation, at this point run chia stop all -d
to ensure that no mainnet processes are still running.
Step 3a. Edit ~\.chia\mainnet\config\config.yaml
to include testnet10 values
If you are running a version of Chia higher than 1.2.11, ignore this step and edit your config.yaml
file at your own risk. If you are running version 1.2.11 or below, you will need to manually edit the config.yaml
file to include testnet10 values. You can edit this file using a simple text editor such as Notepad, Vi, Nano, etc. or the IDE of your choice. In config.yaml
, add the following testnet10
sections:
...
farmer:
...
config:
...
testnet10:
address_prefix: txch
default_full_node_port: 58444
...
constants:
...
testnet10:
AGG_SIG_ME_ADDITIONAL_DATA: ae83525ba8d1dd3f09b277de18ca3e43fc0af20d20c4b3e92ef2a48bd291ccb2
DIFFICULTY_CONSTANT_FACTOR: 10052721566054
DIFFICULTY_STARTING: 30
EPOCH_BLOCKS: 768
GENESIS_CHALLENGE: ae83525ba8d1dd3f09b277de18ca3e43fc0af20d20c4b3e92ef2a48bd291ccb2
GENESIS_PRE_FARM_FARMER_PUZZLE_HASH: 3d8765d3a597ec1d99663f6c9816d915b9f68613ac94009884c4addaefcce6af
GENESIS_PRE_FARM_POOL_PUZZLE_HASH: d23da14695a188ae5708dd152263c4db883eb27edeb936178d4d988b8f3ce5fc
MEMPOOL_BLOCK_BUFFER: 10
MIN_PLOT_SIZE: 18
NETWORK_TYPE: 1
After the above code has been added to your config.yaml
, move further down the file and replace the existing entries with the following values:
full_node:
...
dns_servers:
- dns-introducer-testnet10.chia.net
...
introducer_peer:
host: introducer-testnet10.chia.net
...
wallet:
...
introducer_peer:
host: introducer-testnet10.chia.net
...
Once those replacements have been made, search the config.yaml
file for all instances of the selected_network
parameter, which should all show a value of mainnet
(or potentially a different testnet). Change all selected_network
parameters to show a value of testnet10
. Save the file. If you have previously run chia start
for this installation, at this point run chia stop all -d
to ensure that no mainnet processes are still running.
Step 4. (Optional) Download the Official Testnet DB
This step is optional, but it will speed up syncing with the testnet
For Linux users wget https://databases.chia.net/file/chia-public-databases/blockchain_v2_testnet10.sqlite.gz
while in the directory (a v1 DB is also available, but no longer updated). Windows users can download it from https://downloads.chia.net/testnet10/ and move it to the db folder in the mainnet/ directory in the Chia root folder (e.g., ~/.chia/mainnet/db would be the directory to put the database file in)
Make sure to unzip the database before continuing to the next step.
Step 5. Starting Your Node and Getting Peers
Prior to starting your node, you are recommended to delete peers.dat
, located in ~/.chia/mainnet/db
. If you don't delete this file you might see WARNING Invalid handshake with peer
in your log file. The reason for this is that peers.dat will contain mainnet peers, which are not running on the testnet. If you do see these warnings, there's no requirement to take further action -- they'll eventually stop appearing as your invalid peers are replaced with valid ones.
To start your node, run chia start farmer
and wait for it to start. Once your node has started, you can connect to Chia's testnet node by using chia show -a testnet10-node.chia.net:58444
. You can use chia show -s
to check your sync status, and once fully synced you can run chia wallet show
to see your wallet. chia wallet get_address
will give you your testnet wallet address, which will differentiate itself from your mainnet wallet by beginning with txch
instead of xch
.
Step 6. (Optional) Getting funds
Go to Chia testnet faucet and input your testnet address from step 6. If it says you are in the queue, it has worked. Funds will not appear in your wallet until you are fully synced to the blockchain.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· DeepSeek 开源周回顾「GitHub 热点速览」