Skip to content
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 synchronisation takes to long #179

Closed
Darkman-Q-Tester opened this issue Jan 17, 2021 · 5 comments
Closed

Blockchain synchronisation takes to long #179

Darkman-Q-Tester opened this issue Jan 17, 2021 · 5 comments

Comments

@Darkman-Q-Tester
Copy link

OS Version: Windows 10 (20H2, Build 19042.746)
Wallet App Version: 2.1.9

Issue:
Blockchain synchronisation takes to long.
After a App Version update a complete synchronisation is startet even if one minute before the update the App was already in sync.
Sometimes it takes over 60 Minutes to sync.
The displayed amount is zero till synchronisation is finished.
Sometimes the synchronisation even failes and has to be restarted.

Expected behavior:
Synchronisation should be faster and should not block the display of last account balance.
What is the root cause if the synchronisation takes very long even with a fast internet connection and a fast High-End PC?

Proposal:
Would it be possible to do some kind of caching? Because the blockchain is anyway already stored local the last balance could also be stored and displayed while the synchronisation is still running in the background.
Some user could be confused about the zero amount balance.
Would it be possible to first compare and sync only the last/new blocks with the local copy then load the new blocks and then to check the whole blockchain after the current amount is already displayed.
If I compare with Ledger Live and Exodus it should be possible somehow.

Steps to Reproduce:
Launch the DeFi App
Do an update
Restart the DeFi App

Comment:
I have a fast internet connection and high-end PC.

Attachment:
grafik
grafik
grafik

@DanielZirkel
Copy link

Hi @izzycsy
Can you move that issue to the app, please?
This is the wrong place, I think.

Hi @Darkman-Q-Tester
Thanks a lot for posting all your app issues. They are really well prepared, but I think they should be created here (for the future)
https://github.com/DeFiCh/app/issues
In this folder the blockchain source code is handled, not the App.

@Darkman-Q-Tester
Copy link
Author

I'm sorry I was wrong. I apologize.

@Darkman-Q-Tester
Copy link
Author

Hi @izzycsy
I'm sorry, I did not saw the wiki "How to submit issues for DeFi app" before opening the bugs. Please cancel all my bug's because I don't have the logs stored for that so they are worthless. I will recreate them after testing again. I apologize.

@RomanShumkov
Copy link

I have an educated guess here - CPU usage is limited to 1 CPU only somewhere in defid source code.
So in order to speed up the sync there should be a way to allow using more than 1 CPU.

To add a bit more background, in my case sync is really fast for the first 50% of blocks when there are pretty much no transactions to verify. Disk writes go as high as 50-70 MB/sec but only one logical CPU is utilized.

As sync gets to more recent blocks with more transactions in each of them CPU utilization stays the same (only 1 logical CPU utilized out of many CPUs), but disk writes go to 10-20 MB/sec due to CPU bottleneck.

cc @izzycsy @Darkman-Q-Tester

@bvbfan
Copy link
Contributor

bvbfan commented Jan 21, 2021

Yes, that's reward history (enhancedcs). By default it's -acindex-mineonly if you don't need account history don't hesitate to use -acindex-mineonly=0. The app uses -acindex-mineonly to show the tx and rewards history. We are aware of the rewards are too frequent so that increase disk usage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants