There are two types of peer nodes -- trusted/known and untrusted/unknown. By default, your local node is your only trusted node. It is possible to add other nodes to the trusted list, for example if you personally run more than one full node. One reason to add a trusted node is to speed up the sync time of your light wallet.
The light wallet protocol has two techniques to sync:
- If you have access to at least one trusted node that is fully synced, then your wallet will sync by downloading blocks only from your trusted node(s)
- Otherwise, your wallet will sync by connecting to, and downloading from, multiple untrusted nodes, and verifying that the information downloaded from each node is the same
Typically, it is much faster to sync a wallet by connecting to a trusted node. Therefore, if you have access to a synced node that you trust, you may want to add that node to your trusted peers list. We recommend that you only add your own full nodes to this list.
Prerequisites
- Chia needs to be version 1.3.0 or later on all computers
- Have a full node running on version 1.3.0 or later
Steps to add a trusted node (peer)
- You'll need your trusted node's ID. From your trusted node, run
chia show -s
. Copy the value ofNode ID
, which will appear near the beginning of the output. For example:
~$chia show -s
Network: mainnet Port: 8444 Rpc Port: 8555
Node ID: 0ThisisanexampleNodeID7ff9d60f1c3fa270c213c0ad0cb89c01274634a7c3cb9
- Edit config.yaml. This file is located in
~/.chia/mainnet/config
on Linux and MacOS, andC:\Users\<username>\.chia\mainnet\config
on Windows.
Inside the wallet:
section in config.yaml, you should see trusted_peers:
. Add a new line with the value of Node ID
, like this example (do not use this Node ID, use the one from your trusted node):
trusted_peers:
0ThisisanexampleNodeID7ff9d60f1c3fa270c213c0ad0cb89c01274634a7c3cb9: Does_not_matter
- Note 1: It doesn't matter what you enter on the right side of the colon. The argument will be ignored. Just make sure to enter something
- Note 2: By default,
trusted_node_1
will be listed undertrusted_peers
. You can either keep this line or replace it. It will be ignored if you add a new peer as suggested above - Note 3: We plan to streamline this process in a future release
- Finally, restart Chia on the computer you are connecting to the trusted node to pick up the changes.