Author

Topic: Inconsistencies with txindex=1. What's going on here? (Read 1316 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
I see that this is working now, but this still brings up an inconsistency in bitcoin-qt. If the Bitcoin-Qt.conf file has "txindex=1" added to it, the client will request a reindex, however, it will reindex as if txindex=0. It smells as if it is checking Bitcoin-Qt.conf for the option to load a full index, but when reindexing, since a bitcoin.conf file isn't created to specify txindex=1, it doesn't do a full index.
Again, as I said before, Bitcoin-Qt.conf is never checked by the client. It is only used by the Qt backend to handle QSettings stuff which is not related to your issue.

Double check the commands that you are using to start Bitcoin Core. My guess is that you have -reindex in your command and are conflating behavior from the CLI args and with this conf file which has nothing to do with Bitcoin Core's startup options.
newbie
Activity: 5
Merit: 0
I added "txindex=1" to ~/.config/Bitcoin/Bitcoin-Qt.conf
Added "txindex=1" to ~/.config/Bitcoin/Bitcoin-Qt.conf
That is your problem. That file is not the Bitcoin Core's config file. The config file is located in ~/.bitcoin/bitcoin.conf. It will not exist unless you create it; Bitcoin Core does not create it automatically.

~/.config/Bitcoin/Bitcoin-Qt.conf is what is created automatically in a Debian environment by bitcoin-qt. the file you reference is for bitcoind. I had made a file for bitcoind in that same location you suggest and tried it that way as well, but it didn't work. This config file should not matter since passing parameters in the command line is the same as adding them to the configuration file.
That file is a qt specific file done by the Qt framework behind the scenes. In windows it would add registry keys. The bitcoin.conf file is for both bitcoind and bitcoin-qt; they both do the same exact thing except that one has a gui and the other does not. The qt conf file is for qt specific options set by the gui, not the command line arguments that you are trying to use, that is for the bitcoin.conf file.

Use or make the bitcoin.conf file in ~/.bitcoin (or whatever you are using for your data directory). I guarantee you that it will work.

I see that this is working now, but this still brings up an inconsistency in bitcoin-qt. If the Bitcoin-Qt.conf file has "txindex=1" added to it, the client will request a reindex, however, it will reindex as if txindex=0. It smells as if it is checking Bitcoin-Qt.conf for the option to load a full index, but when reindexing, since a bitcoin.conf file isn't created to specify txindex=1, it doesn't do a full index.
staff
Activity: 3458
Merit: 6793
Just writing some code
I added "txindex=1" to ~/.config/Bitcoin/Bitcoin-Qt.conf
Added "txindex=1" to ~/.config/Bitcoin/Bitcoin-Qt.conf
That is your problem. That file is not the Bitcoin Core's config file. The config file is located in ~/.bitcoin/bitcoin.conf. It will not exist unless you create it; Bitcoin Core does not create it automatically.

~/.config/Bitcoin/Bitcoin-Qt.conf is what is created automatically in a Debian environment by bitcoin-qt. the file you reference is for bitcoind. I had made a file for bitcoind in that same location you suggest and tried it that way as well, but it didn't work. This config file should not matter since passing parameters in the command line is the same as adding them to the configuration file.
That file is a qt specific file done by the Qt framework behind the scenes. In windows it would add registry keys. The bitcoin.conf file is for both bitcoind and bitcoin-qt; they both do the same exact thing except that one has a gui and the other does not. The qt conf file is for qt specific options set by the gui, not the command line arguments that you are trying to use, that is for the bitcoin.conf file.

Use or make the bitcoin.conf file in ~/.bitcoin (or whatever you are using for your data directory). I guarantee you that it will work.
newbie
Activity: 5
Merit: 0
I added "txindex=1" to ~/.config/Bitcoin/Bitcoin-Qt.conf
Added "txindex=1" to ~/.config/Bitcoin/Bitcoin-Qt.conf
That is your problem. That file is not the Bitcoin Core's config file. The config file is located in ~/.bitcoin/bitcoin.conf. It will not exist unless you create it; Bitcoin Core does not create it automatically.

~/.config/Bitcoin/Bitcoin-Qt.conf is what is created automatically in a Debian environment by bitcoin-qt. the file you reference is for bitcoind. I had made a file for bitcoind in that same location you suggest and tried it that way as well, but it didn't work. This config file should not matter since passing parameters in the command line is the same as adding them to the configuration file.
staff
Activity: 3458
Merit: 6793
Just writing some code
I added "txindex=1" to ~/.config/Bitcoin/Bitcoin-Qt.conf
Added "txindex=1" to ~/.config/Bitcoin/Bitcoin-Qt.conf
That is your problem. That file is not the Bitcoin Core's config file. The config file is located in ~/.bitcoin/bitcoin.conf. It will not exist unless you create it; Bitcoin Core does not create it automatically.
newbie
Activity: 5
Merit: 0
Is there something wrong with the way bitcoin-qt handles txindex=1?

Current project: Raspnode full node

To assist with data creation, I synced the blockchain on a Debian machine.
To easily have visual feedback of its progress, I ran Bitcoin-Qt:
Code:
bitcoin-qt -txindex=1 -reindex -datadir=/media//

I added "txindex=1" to ~/.config/Bitcoin/Bitcoin-Qt.conf

On this Debian machine, starting bitcoin-qt or bitcoin-qt -txindex=1 will start Bitcoin-Qt, but it acts as if txindex=0 since the RPC console cannot find spent transactions.

Starting bitcoind requests a reindex using command:
Code:
bitcoind -txindex=1 -datadir=/media//

I moved the data drive to Raspbian, with a freshly compiled 0.13.1
Added "txindex=1" to ~/.config/Bitcoin/Bitcoin-Qt.conf
Running bitcoin-qt will start Bitcoin-Qt, but will not be able to find spent transactions in the RPC console
Running bitcoin-qt -txindex=1 will request a reindex (this is different from the Debian machine)
Running bitcoind requests a reindex

What's going on? It seems like Bitcoin-Qt might not be properly reindexing when given the command. Is anyone familiar with this quirk? I'm currently reindexing on the Debian machine using bitcoind to see if that helps.
Jump to: