trezor / blockbook

:blue_book: Trezor address/account balance backend
https://trezor.io
GNU Affero General Public License v3.0
656 stars 648 forks source link

Bitcoin SV Blockbook server sync-time falling behind the backend #764

Closed samholmes closed 1 year ago

samholmes commented 2 years ago

My BSV Blockbook service is syncing with the backend at a rate slower than the new blocks mined; this is causing the blockbook-bcashsv.service to increasingly fall behind. As of May 5th to today, the blockbook server was 3,676 blocks behind the latest block and now it's at 4,637 today.

This appears to be a matter of providing enough resources to the blockbook service. The system I am running is a Digital Ocean Droplet with these specs:

Memory: 64 GB Memory CPU: 8 vCPUs Disk Space: 200 GB Disk + 9.77 TB Attached Volume OS: Debian 10 x64

Here's a screenshot of the resource usage:

screencapture-cloud-digitalocean-droplets-286131098-graphs-2022-05-12-10_12_11

It appears the machine is under-utilized, so there may be potential to make configuration changes to resolve the sync-time issue. What sort of diagnostics can I run to determine which configuration changes can be made to improve the performance here? Are there known block-size limitations when it comes to how blockbook processes blocks, and if so what are some ways to overcome these limitations?

martinboehm commented 2 years ago

Hi. Blockbook is not optimized for BitcoinSV. I think this PR https://github.com/trezor/blockbook/pull/427 (which was not merged) could be interesting for you . Merge it to your codebase and try to run Blockbook with it.