electrs: Bug: lenghty initialization on each start

Describe the bug After updating from 0.8.x, to 0.9.0 and then 0.9.1, electrs goes through a lengthy initialization, producing these two messages in the log over and over again:

electrs_1           | [2021-10-18T15:57:48.619Z DEBUG electrs::p2p] loading 10 blocks
electrs_1           | [2021-10-18T15:57:48.622Z DEBUG electrs::index] writing 18 funding and 4 spending rows from 14 transactions, 10 blocks

The process takes roughly an hour for testnet. That’s fine, as it is mentioned in the release notes. However it’s unexpected this process needs to be repeated over and over again for each restart of electrs.

The old 0.8.x. version also had some initialization time, but it was only about 1-2 minutes.

Electrs version 0.9.1 (and 0.9.0)

To Reproduce Steps to reproduce the behavior:

  1. Configure and start electrs

Expected behavior Init times < 2 minutes for testnet.

Configuration

      - ELECTRS_NETWORK=testnet
      - ELECTRS_VERBOSE=3
      - ELECTRS_ELECTRUM_RPC_ADDR=0.0.0.0:…
      - ELECTRS_DAEMON_RPC_ADDR=bitcoind:…
      - ELECTRS_DAEMON_P2P_ADDR=bitcoind:…
      - ELECTRS_COOKIE_FILE=…
      - ELECTRS_WAIT_DURATION_SECS=10
      - ELECTRS_BULK_INDEX_THREADS=2
      - ELECTRS_TXID_LIMIT=200

System running electrs Docker, built from the provided Dockerfile

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 23 (23 by maintainers)

Most upvoted comments

Thanks to everyone involved!