From 1046cf1b30d7fe8d45bcb9c1792fc6fb9872df0d Mon Sep 17 00:00:00 2001 From: Andrew Toth Date: Tue, 14 Feb 2023 14:56:41 -0500 Subject: [PATCH 1/5] Add troubleshooting guide for syncing bitcoind --- docs/src/guides/inscriptions.md | 47 ++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/docs/src/guides/inscriptions.md b/docs/src/guides/inscriptions.md index 9fa64ea482..2e96530ec5 100644 --- a/docs/src/guides/inscriptions.md +++ b/docs/src/guides/inscriptions.md @@ -46,7 +46,7 @@ Making inscriptions requires Bitcoin Core 24 or newer. This guide does not cover installing Bitcoin Core in detail. Once Bitcoin Core is installed, you should be able to run `bitcoind -version` successfully from -the command line. +the command line. Do *NOT* use `bitcoin-qt`. Configuring Bitcoin Core ------------------------ @@ -85,6 +85,51 @@ agrees with the block count on a block explorer like [the mempool.space block explorer](https://mempool.space/). `ord` interacts with `bitcoind`, so you should leave `bitcoind` running in the background when you're using `ord`. +The blockchain takes about 600GB of disk space. If you have an external drive +you want to store blocks on, use the configuration option +`-blocksdir=`. This is much simpler than using the +`-datadir` option because the cookie file will still be in the default location +for `bitcoin-cli` and `ord` to find. + +Troubleshooting +--------------- + +Make sure you can access `bitcoind` with `bitcoin-cli -getinfo` and that it is +fully synced. + +If `bitcoin-cli -getinfo` returns `Could not connect to the server`, `bitcoind` +is not running. + +Make sure `rpcuser`, `rpcpassword`, or `rpcauth` are *NOT* set in your +`bitcoin.conf` file. `ord` requires using cookie authentication. Make sure there +is a file `.cookie` in your bitcoin data directory. + +If `bitcoin-cli -getinfo` returns `Could not locate RPC credentials`, then you +must specify the cookie file location. +If you are using a custom data directory (specifying the `datadir` option), +then you must specify the cookie location like +`bitcoin-cli -rpccookiefile=/.cookie -getinfo`. +When running `ord` you must specify the cookie file location with +`--cookie-file=/.cookie`. + +Make sure you do *NOT* have `disablewallet=1` in your `bitcoin.conf` file. If +`bitcoin-cli listwallets` returns `Method not found` then the wallet is disabled +and you won't be able to use `ord`. + +Make sure `txindex=1` is set. Run `bitcoin-cli getindexinfo` and it should +return something like +```json +{ + "txindex": { + "synced": true, + "best_block_height": 776546 + } +} +``` +If it only returns `{}`, `txindex` is not set. +If it returns `"synced": false`, `bitcoind` is still creating the `txindex`. +Wait until `"synced": true` before using `ord`. + Installing `ord` ---------------- From 353af7091ea4d588adfa083dc33ee15576c352b9 Mon Sep 17 00:00:00 2001 From: Andrew Toth Date: Tue, 14 Feb 2023 15:13:05 -0500 Subject: [PATCH 2/5] Add link to configuring bitcoin.conf --- docs/src/guides/inscriptions.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/src/guides/inscriptions.md b/docs/src/guides/inscriptions.md index 2e96530ec5..999b95f49f 100644 --- a/docs/src/guides/inscriptions.md +++ b/docs/src/guides/inscriptions.md @@ -66,6 +66,9 @@ Or, run `bitcoind` with `-txindex`: bitcoind -txindex ``` +Details on creating or modifying your `bitcoin.conf` file can be found +[here](https://github.com/bitcoin/bitcoin/blob/master/doc/bitcoin-conf.md). + Syncing the Bitcoin Blockchain ------------------------------ @@ -87,8 +90,8 @@ should leave `bitcoind` running in the background when you're using `ord`. The blockchain takes about 600GB of disk space. If you have an external drive you want to store blocks on, use the configuration option -`-blocksdir=`. This is much simpler than using the -`-datadir` option because the cookie file will still be in the default location +`blocksdir=`. This is much simpler than using the +`datadir` option because the cookie file will still be in the default location for `bitcoin-cli` and `ord` to find. Troubleshooting From 03196da2c8da17bb06570b042a886956731b2292 Mon Sep 17 00:00:00 2001 From: Andrew Toth Date: Tue, 14 Feb 2023 15:15:40 -0500 Subject: [PATCH 3/5] Add instructions to add rest and whitebind --- docs/src/guides/inscriptions.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/src/guides/inscriptions.md b/docs/src/guides/inscriptions.md index 999b95f49f..2bfac56553 100644 --- a/docs/src/guides/inscriptions.md +++ b/docs/src/guides/inscriptions.md @@ -51,19 +51,20 @@ the command line. Do *NOT* use `bitcoin-qt`. Configuring Bitcoin Core ------------------------ -`ord` requires Bitcoin Core's transaction index. +`ord` requires Bitcoin Core's transaction index and rest interface. To configure your Bitcoin Core node to maintain a transaction -index, add the following to your `bitcoin.conf`: +index and open the rest interface, add the following to your `bitcoin.conf`: ``` txindex=1 +rest=1 ``` -Or, run `bitcoind` with `-txindex`: +Or, run `bitcoind` with `-txindex -rest`: ``` -bitcoind -txindex +bitcoind -txindex -rest ``` Details on creating or modifying your `bitcoin.conf` file can be found @@ -133,6 +134,9 @@ If it only returns `{}`, `txindex` is not set. If it returns `"synced": false`, `bitcoind` is still creating the `txindex`. Wait until `"synced": true` before using `ord`. +If you have `maxuploadtarget` set it can interfere with fetching blocks for +`ord` index. Either remove it or set `whitebind=127.0.0.1:8333`. + Installing `ord` ---------------- From 7a740f6d102f2126e37a94b39a4b8064582b595b Mon Sep 17 00:00:00 2001 From: raphjaph Date: Tue, 3 Oct 2023 20:39:40 +0200 Subject: [PATCH 4/5] remove rest stuff --- docs/src/guides/inscriptions.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/src/guides/inscriptions.md b/docs/src/guides/inscriptions.md index 86215315e7..9e5153773f 100644 --- a/docs/src/guides/inscriptions.md +++ b/docs/src/guides/inscriptions.md @@ -58,16 +58,15 @@ index and open the rest interface, add the following to your `bitcoin.conf`: ``` txindex=1 -rest=1 ``` -Or, run `bitcoind` with `-txindex -rest`: +Or, run `bitcoind` with `-txindex`: ``` -bitcoind -txindex -rest +bitcoind -txindex ``` -Details on creating or modifying your `bitcoin.conf` file can be found +Details on creating or modifying your `bitcoin.conf` file can be found [here](https://github.com/bitcoin/bitcoin/blob/master/doc/bitcoin-conf.md). Syncing the Bitcoin Blockchain From 57327357e47b6f4bb1de1c30472409cbfa145a42 Mon Sep 17 00:00:00 2001 From: raphjaph Date: Tue, 3 Oct 2023 20:41:36 +0200 Subject: [PATCH 5/5] quick fix --- docs/src/guides/inscriptions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/guides/inscriptions.md b/docs/src/guides/inscriptions.md index 9e5153773f..e0280dd11f 100644 --- a/docs/src/guides/inscriptions.md +++ b/docs/src/guides/inscriptions.md @@ -54,7 +54,7 @@ Configuring Bitcoin Core `ord` requires Bitcoin Core's transaction index and rest interface. To configure your Bitcoin Core node to maintain a transaction -index and open the rest interface, add the following to your `bitcoin.conf`: +index, add the following to your `bitcoin.conf`: ``` txindex=1