-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Blockchain download gets stuck #12
Comments
Thanks for the report. We've seen this happening every so often as well and are working to resolve it. |
Also, unrelated, it is crazy slow and thrashes my disk to the point of almost unusability. |
Can you elaborate some? Do you mean block download speed? Keep in mind that if you're connected a slow peer, you'll have really slow download speeds. You could try ctrl+c and restart to choose a different peer. We don't yet have to code to detect "slow" peers and try to switch to syncing from a faster one, so if you get stuck with a slow peer, it would definitely have slow speeds. Is that what you're experiencing? As far as disk trashing, none of us have experienced that, however, the next release is switching the default db back end to leveldb, which is less intensive on the disk. The SQLite db is definitely disk intensive - however it shouldn't be the point of unusability. |
Download speed spikes at 10s intervals to max out my connection so it's not necessarily slow peers. I suppose the bottleneck is my hard drive and the db. As it stands, I've left btcd running for a number of hours and it still has not completed the full blockchain download. The satoshi client would have finished at this point on my machine. I suspect disk activity is something particular to my system though. It has been acting wonky lately. Thanks for all of your work on this implementation though. I'm grateful for increased diversity in the ecosystem. |
Thanks for the feedback. There is definitely some room for optimization (only an alpha client right now). I'm curious how leveldb would work for you. I know that on my system, I'm able to get the entire block chain with full verification in ~18 hours with leveldb versus ~36-40 with SQLite, so it's a pretty significant difference. The main reason it isn't the default in the current release is the goleveldb driver had some bugs that we were working with the goleveldb authors to resolve. |
I've been downloading and processing from a local bitcoind for 24 hours, and am at block 233042. This is on an SSD with sqlite. Definitely slower than bitcoin qt. I'm excited to be done syncing! You might consider distributing a sqlite database as a torrent, or leveldb. The chain is verifiable, so you wouldn't need to overly worry about correctness. |
@davecgh Can you say more about these bugs? sqlite is killing me; I'm trying to figure out if I should turn it off and recompile with leveldb support. |
I believe all of the bugs with leveldb are remedied. The next release (I'm guessing will be Friday) will have leveldb enabled by default. The code is already in, so if you're running from source, you can follow the directions in the README on the front page to update (it's a single command). Windows users would obviously need to wait for the MSI. This, unfortunately does mean a redownload of the block database. Typically, I prefer for changes such as these to be automatic from a user perspective, but since it's still alpha level and SQLite is going to ultimately be removed altogether, we don't think it's worth writing a bunch of migration code. As the product matures and is finally production ready, any changes like this would automatically update as needed. |
Also, back on the original topic of this issue. We believe we have identified the sync issues and are reworking the code to improve things. |
@vessenes If you'd like to pull the latest btcd and its deps, the default is now leveldb. |
@dajohi Thanks! |
Just updated and tested it, the download rate is over 3Mb/s on my openSUSE machine. (2 days ago it can't even exceed 10Kb/s) |
@typeless Thanks for the update. I'm glad to hear the improvements we've made already are noticeable. We have a few more fixes in the pipeline for better handling of choosing a sync peer, peer timeout handling, and a couple other things that should continue to improve things as well. |
Cross-posting from here: https://blog.conformal.com/btcd-not-your-moms-bitcoin-daemon/#comment-265 I had similar issues with syncing (testnet3). Took almost 5 hours to sync from a local bitcoind instance. The second time I tried it crashed with a "unexpected EOF" error. I just resynced again. Hopefully this time it won't crash
Here is the log output. Any idea why the db got corrupted?
OS: MacOSX 10.7.2 |
@shripadk I tried on MacBook Air but couldn't reproduce the problem. (No .conf file supplied) |
@shripadk Can you make a separate issue for this? Yours is a separate issue than this issue. I'd like to keep different issues separate if possible. Once you've done that, I'll have the main btcdb dev work with you on the issue. |
We believe this should be fixed as of commit 5a9cc91. I'm going to leave the issue open for a bit to allow some testing against it. |
Is that commit rolled into the latest release (0.3.1-alpha)? I uninstalled, deleted \roaming\btcd, reinstalled the new version, and keep getting stuck syncing. I still see PEER messages in the windows, but don't see any BMGR messages. |
It is not. Here is the list of commits since the 0.3.1-alpha release: BTCD_0_3_1_ALPHA...master The commit that fixes this is 5a9cc91 on Oct 17. 0.3.1-alpha was released on Oct 15. I will likely be rolling another release tomorrow. |
The fix for this is included in the btcd v0.3.2-alpha release (https://github.com/conformal/btcd/releases/tag/BTCD_0_3_2_ALPHA) |
I can verify that the blockchain download no longer gets stuck. It remains slow though. |
@Azulan Thanks for the confirmation. I'll be creating a series of issues (enhancements) for various optimizations we have planned to speed things up so everyone can track progress on that front. I'm a firm believer in making it work, then making it fast! That is to say implement a proper and stable design first, then identify and address the areas that need to be sped up through profiling. |
This change adds support for the listtransactions RPC command. To properly reply to this command, additonal information about received transactions was added, and is now saved in an account's tx.bin file. Additionally, when sending a transaction, a *tx.SendTx is now saved to the Tx store, and is included in listtransactions replies under the "send" category. WARNING: All account's tx.bin and utxo.bin files should be removed before running with this change, or else the files may not be read correctly. Removing tx.bin is not an issue as it was not being used before, and was being saved with incorrect data. Removing utxo.bin is not an issue as it will just trigger a rescan on next start. File format versions are now included in both files, so automatic updates from previous file formats will be possible with future changes. Fixes btcsuite#12.
- Correct MsgFilterLoad max payload - Enforce max flag bytes per merkle block - Improve and finish tests to include testing all error paths - Add fast paths for BloomUpdateType - Convert all byte fields to use read/writeVarBytes - Style and consistency updates - README.md and doc.go updates Closes btcsuite#12.
RPC client handling has been added for the following new RPC commands: dcrd: -existsaddresses -livetickets dcrwallet: -accountaddressindex -accountfetchaddresses -accountsyncaddressindex -listscripts -walletinfo
…tcsuite#12) * Add AmountSorter, which implements the sort.Interface, for Amount. This is used by the median function in ticketfeeinfo.
wire/udata_test: Check the returned error in TestUDataSerialize()
cmd/btcctl, btcd: Rename to utreexo
On Win7x64, the blockchain download stopped acquiring new blocks after block 103520 or so. Killing the process and restarting it resumed normal downloading operations.
The text was updated successfully, but these errors were encountered: