Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 2 additions & 17 deletions docs/getting-started/testnets.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,27 +36,12 @@ chia configure --testnet true

### Download the official testnet database (optional)

This step is optional, but it will speed up syncing with the testnet.

- Linux users: `wget https://databases.chia.net/file/chia-public-databases/blockchain_v2_testnet11.sqlite.gz` while in the directory (a v1 db is not available for testnet11).
- Windows users: download it from [https://downloads.chia.net/testnet11/](https://downloads.chia.net/testnet11/) and move it to the db folder in the mainnet/ directory in the Chia root folder (i.e. `~/.chia/mainnet/db` is the database directory).

:::note

Make sure to unzip the database before continuing to the next step.

:::

:::tip

Prior to starting your node, it is 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.

:::
The process for using the official database snapshot torrent can be found here:
https://docs.chia.net/troubleshooting/node-syncing/#using-the-official-database-snapshot-torrent

### Start your node and connect to peers

```bash
# Note - make sure to delete the peers.dat file in ~/.chia/mainnet/db prior to starting your node
# Start your node
chia start farmer

Expand Down
14 changes: 0 additions & 14 deletions docs/guides/crash-course/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,20 +210,6 @@ If you are already on a testnet, skip to [instructions for the CLI](#cli).

For most dev work on Chia, you'll want to be on the testnet. That way, you're learning with fake Chia and don't put any funds at risk.

:::info

If you were previously running on mainnet, you will have a list of mainnet peers stored in the following file:

```
~/.chia/mainnet/db/peers.dat
```

Be sure to **rename or delete** this file when you convert your system to running on testnet. If you do not do this, your system will eventually drop its mainnet peers and add new testnet peers, but this could take a long time.

One way to speed up the peer discovery process even more is to run the [add-nodes bash script](https://github.com/wallentx/farm-and-ranch-supply-depot/blob/main/bin/extra/add-nodes). Note that this script won't work on Windows. Your mileage also may vary on Linux and MacOS.

:::

Run the following commands to instruct your node to connect to the testnet:

```bash
Expand Down
10 changes: 0 additions & 10 deletions docs/guides/nft/nft-bulk-mint.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,6 @@ The bulk minting tool comes with a packaged version of Chia. In order to use the
chia configure --testnet true
```

:::note
If you previously had been running Chia on mainnet, then your peers table will be populated with mainnet peers.
When you switch to running on the testnet, the peers listed in this table will time out.
Eventually the table will be repopulated with testnet peers, but this can take a long time.
In order to expedite this process, We recommend that you delete your peers tables:

- `~/.chia/mainnet/db/peers.dat`
- `~/.chia/mainnet/wallet/db/wallet_peers.dat`
:::

2. We recommend that you use `INFO` level logging instead of the default `WARNING` level. To do this, run:

```bash
Expand Down
8 changes: 2 additions & 6 deletions docs/resources/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -546,12 +546,8 @@ To show hidden files on Mac finder click "COMMAND"+"SHIFT"+"." (period), on linu

### How do I use the Official Chia Blockchain snapshot torrent?

1. Download the torrent file from https://www.chia.net/downloads/#database-checkpoint
2. Use a torrent client to download the full db (I have used bittorrent and qbittorrent)
3. Unpack/reassemble the torrent file that was downloaded (on windows I used 7zip, Mac and linux have built in tools that work for this)
4. Move the db to the correct folder (~\.chia\mainnet\db\) and update the name to "blockchain_v2_mainnet.sqlite" (removing the date information in the name)
5. Verify the config file (~\.chia\mainnet\config\config.yaml) has the correct value under the full_node section for `database_path: db/blockchain_v2_CHALLENGE.sqlite` (should only need to change the v1 to v2)
6. Launch chia and wait for a bit (the height to hash and peers files need to be built so this can take upwards of 30 minutes)
The process for using the official database snapshot torrent can be found here:
https://docs.chia.net/troubleshooting/node-syncing/#using-the-official-database-snapshot-torrent

### How do I move the Chia blockchain database to another drive?

Expand Down
99 changes: 97 additions & 2 deletions docs/troubleshooting/node-syncing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,103 @@ slug: /troubleshooting/node-syncing
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

## Using the Official Database Snapshot Torrent

:::note
This process assumes you already have chia installed and all files are present in their default locations, to confirm make sure the `~/.chia/mainnet/db/` directory exists.

If you are upgrading from a version prior to Chia 2.0.0, verify your config file has the correct value under the `full_node` section for `database_path` (v1 vs the current v2):
`db/blockchain_v2_CHALLENGE.sqlite`

When starting chia for the first time with the database snapshot it can take upwards of 30 minutes for it to verify the db and load.
:::

Using the GUI:

1. Download the torrent file from https://www.chia.net/downloads/#database-checkpoint (mainnet and testnet database torrents are available)
2. Use a torrent client to download the full db (bittorrent, qbittorrent, and transmission have be used successfully for this)
3. Unpack/reassemble the torrent file that was downloaded (on windows one can use 7zip, Mac and linux have built in tools that work for this)
4. Move the db and associated files to the correct folder (`~/.chia/mainnet/db/` is the default location for these files)

Using the CLI (Linux and MacOS only):

<Tabs
defaultValue="linux"
groupId="source"
values={[
{label: 'Linux', value: 'linux'},
{label: 'MacOS', value: 'macos'},
]}>
<TabItem value="linux">

1. Set your network (change to `testnet11` for the testnet db):

```bash
NETWORK="mainnet"
```

2. Install a torrent client (aria is used in the below examples, other torrent clients can be used).

```bash
sudo apt install aria2
```

3. Download the torrent using the network identifier set earlier. Note this can take a couple of hours depending on network speeds.

```bash
aria2c --seed-time=0 "https://torrents.chia.net/databases/$NETWORK/$NETWORK.latest.tar.gz.torrent" --dir="$HOME/Downloads"
```

4. Unpack the DB using the network identifier and wildcard for the date in the file name

```bash
ARCHIVE=$(find "$HOME/Downloads" -name "$NETWORK.*.tar.gz" -type f | sort -r | head -n1) && echo "Extracting $ARCHIVE - this may take upwards of 35 minutes with no visible progress..." && { tar -xf "$ARCHIVE" -C "$HOME/Downloads" || { echo "Error: Extraction failed, please verify the file downloaded properly and try again"; } }
```

5. Move the db and associated files to the correct folder. Make sure to update the final directory path if needed and note that any existing files with the same names will be overwritten.

```bash
echo "Moving files to Chia directory - this may take upwards of 5 minutes with no visible progress..." && mv -f "$HOME/Downloads/blockchain_v2_$NETWORK.sqlite" ~/.chia/mainnet/db/ && mv -f "$HOME/Downloads/height-to-hash" ~/.chia/mainnet/db/ && mv -f "$HOME/Downloads/sub-epoch-summaries" ~/.chia/mainnet/db/
```

</TabItem>
<TabItem value="macos">

1. Set your network (change to `testnet11` for the testnet db):

```bash
NETWORK="mainnet"
```

2. Install a torrent client (aria is used in the below examples, other torrent clients can be used).

```bash
brew install aria2
```

3. Download the torrent using the network identifier set earlier. Note this can take a couple of hours depending on network speeds.

```bash
aria2c --seed-time=0 "https://torrents.chia.net/databases/$NETWORK/$NETWORK.latest.tar.gz.torrent" --dir="$HOME/Downloads"
```

4. Unpack the DB using the network identifier and wildcard for the date in the file name

```bash
ARCHIVE=$(find "$HOME/Downloads" -name "$NETWORK.*.tar.gz" -type f | sort -r | head -n1) && echo "Extracting $ARCHIVE - this may take upwards of 35 minutes with no visible progress..." && { tar -xf "$ARCHIVE" -C "$HOME/Downloads" || { echo "Error: Extraction failed, please verify the file downloaded properly and try again"; } }
```

5. Move the db and associated files to the correct folder. Make sure to update the final directory path if needed and note that any existing files with the same names will be overwritten.

```bash
echo "Moving files to Chia directory - this may take upwards of 5 minutes with no visible progress..." && mv -f "$HOME/Downloads/blockchain_v2_$NETWORK.sqlite" ~/.chia/mainnet/db/ && mv -f "$HOME/Downloads/height-to-hash" ~/.chia/mainnet/db/ && mv -f "$HOME/Downloads/sub-epoch-summaries" ~/.chia/mainnet/db/
```

</TabItem>
</Tabs>

## Port Forwarding Settings

Forwarding port 8444 can solve many sync issues and it also helps improve Chia's overall network health.

Port 8444 is the [port](https://en.wikipedia.org/wiki/Port_%28computer_networking%29) through which other Chia nodes can communicate with your node. When you set up port forwarding on port 8444, the Chia software on your computer can easily communicate with other nodes and sync the Chia blockchain faster.
Expand All @@ -14,8 +111,6 @@ The network is undergoing rapid growth and expansion. Many newly arriving Chia n

Use [this port checker](https://portchecker.co/) to check if you have port forwarding configured correctly.

## Port Forwarding Settings

Port forwarding is done on your router. How you set it up depends on your router's make and model. Look through your router's manual or just search for "`<your router name and model>` how to port forward" to get started.

When you enable port forwarding, you are allowing any system on the Internet to connect to your Chia node through port 8444 to the Chia software.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,8 @@ chia configure --testnet true

This step is optional, but it will speed up syncing with the testnet

- 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: download it from [https://downloads.chia.net/testnet10/](https://downloads.chia.net/testnet10/) and move it to the db folder in the mainnet/ directory in the Chia root folder (i.e. \~/.chia/mainnet/db is the database directory).

:::note

_Make sure to unzip the database before continuing to the next step._

:::

:::tip

Prior to starting your node, it is 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.

:::
The process for using the official database snapshot torrent can be found here:
https://docs.chia.net/troubleshooting/node-syncing/#using-the-official-database-snapshot-torrent

### Start your node and connect to peers

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,20 +210,6 @@ If you are already on a testnet, skip to [instructions for the CLI](#cli).

For most dev work on Chia, you'll want to be on the testnet. That way, you're learning with fake Chia and don't put any funds at risk.

:::info

If you were previously running on mainnet, you will have a list of mainnet peers stored in the following file:

```
~/.chia/mainnet/db/peers.dat
```

Be sure to **rename or delete** this file when you convert your system to running on testnet. If you do not do this, your system will eventually drop its mainnet peers and add new testnet peers, but this could take a long time.

One way to speed up the peer discovery process even more is to run the [add-nodes bash script](https://github.com/wallentx/farm-and-ranch-supply-depot/blob/main/bin/extra/add-nodes). Note that this script won't work on Windows. Your mileage also may vary on Linux and MacOS.

:::

Run the following commands to instruct your node to connect to the testnet:

```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,6 @@ The bulk minting tool comes with a packaged version of Chia. In order to use the
chia configure --testnet true
```

:::note
If you previously had been running Chia on mainnet, then your peers table will be populated with mainnet peers.
When you switch to running on the testnet, the peers listed in this table will time out.
Eventually the table will be repopulated with testnet peers, but this can take a long time.
In order to expedite this process, We recommend that you delete your peers tables:

- `~/.chia/mainnet/db/peers.dat`
- `~/.chia/mainnet/wallet/db/wallet_peers.dat`
:::

2. We recommend that you use `INFO` level logging instead of the default `WARNING` level. To do this, run:

```bash
Expand Down