-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add independent txindex #6
Comments
The three options as I see them:
|
What would be the motivation of having at the same time pruning node and txindex? When user is using pruning, he wants to save disk space, which is then negated by saving txindex :) Also what is the reasoning of having separate index here instead of relying on bitcoind? |
Btw, getting back to bitcore fork (I am going back to it, because it does what I need :), but it's a bit painful to maintain because of the rather large patchset) If you have addressindex, spentindex, timestampindex and txindex enabled, the disk space significantly grows, I think about 2 or 3 times from blockchain without the indexes |
addrindex and txindex don't add nearly as much. If the exact figures are important I can look them up. |
@unsystemizer exactly |
@Runn1ng I don't have any special info but txindex may someday get retired from bitcoind, especially if external indexes like this are successful. Core contributors in general are quite down on additional indexes due to complexity and interactions with consensus code. |
Just did a repeat of the same experiment somebody did with addrindex before:
Conclusions:
It'd be valuable to be able to either load txindex in RAM (mainnet) or avoid wasting many GBs of RAM on caching in-memory UTXOs (testnet) in order to be able to fully cache txindex (edit: in indexd, of course) |
@unsystemizer I have a feeling you are mixing up txindex and chainstate. The UTXO set in bitcoind is in chainstate dir, while the txindex is in blocks/index. The chainstate is currently 2.8G for mainnet, a full index is 14G. edit: of course I could be wrong ... that is my understanding from chat with the devs. The dbcache switch is only used for the chainstate db in bitcoind. Just wanted to make sure you have the correct asumptions, not sure what you were trying to calculate. 4G dbcache is effectively an infinite space while syncing as the utxos set never raches it (core devs use it as the max in benchmarks). |
@Runn1ng exactly that. It allows me to keep my indexes on a fast node (while running bitcoind on a slow node) and at the same time doesn't require bitcoind admin to worry about index maintenance. There are several other reasons, some of which I mentioned 2 comments above. |
@unsystemizer the issue with a local transaction index, is that we can't index into the We would have to maintain nearly the entire blockchain in our database, as the block headers only account for 80 bytes... Hence, why I suggest that sane users will think they should prune... which could make any "catch up"/"resync" phase difficult if the data is missing. I agree that you could use an external node for initial resync, then the local pruning node after that. |
Another alternative is if we could ask network peers for the blocks on the initial sync... then continue as normal with our pruned node. If the block was verified by Maybe a new RPC call for pruned nodes? @theuni thoughts, could this be possible? This would allow us to resync, using a pruned node, and therefore drop our dependency on The option to fast synchronize via something like |
In the mean time, This wouldn't help if the database is lost, but, it would stop there being too much data duplication. |
@dcousens If I'm understanding your question, I think bitcoin/bitcoin#10794 would do what you want? |
@theuni yes it would. Thanks for pointing that issue out. |
This would mean we could run
indexd
on a pruning node, provided it is fully synchronized to start.The text was updated successfully, but these errors were encountered: