romanz / electrs

An efficient re-implementation of Electrum Server in Rust
MIT License
1.02k stars 373 forks source link

Bug: UnknownSegwitFlag(0) #1024

Closed Logfro closed 2 weeks ago

Logfro commented 3 months ago

Describe the bug Cant get an initial installation to complete first sync.

Getting this error, before systemd restarts: thread 'main' panicked at 'core returned invalid block: UnknownSegwitFlag(0)', src/index.rs:294:49

Electrs version Newest version (v0.10.4)

To Reproduce Steps to reproduce the behavior:

  1. Starting bitcoind with this following params in bitcoin.conf: txindex=1 server=1 dbcache=16384 maxmempool=20000

  2. After initial bitcoind sync, started electrs with following config: cookie_file = "/var/lib/bitcoind/.cookie" daemon_rpc_addr = "127.0.0.1:8332" daemon_p2p_addr = "127.0.0.1:8333" db_dir = "/home/bitcoin/electrs" daemon_dir = "/var/lib/bitcoind" network = "bitcoin" electrum_rpc_addr = "0.0.0.0:50001" log_filters = "DEBUG"

  3. After a long time, gets stuck at indexing 2000 blocks: [834441..836440] and error appears after: thread 'main' panicked at 'core returned invalid block: UnknownSegwitFlag(0)', src/index.rs:294:49

Expected behavior Well, that it works

System running electrs Compiled bitcoind and make install & built electrs on debian12 Tried the same with a docker approach from community images and got same error

Electrum client Not yet used, as electrs always crashes

romanz commented 2 months ago

Is it possible that the block data got corrupted?

Logfro commented 1 month ago

Will do a completely new sync and test

romanz commented 1 month ago

@Logfro any update?

Logfro commented 1 month ago

Still syncing, hdds not the fastest. Electrs runs on NVMe ssds though.

Logfro commented 3 weeks ago

Done syncing, started electrs initial sync now

Logfro commented 2 weeks ago

Can confirm, it was corrupted data. Works now.