wizardsardine / liana

The missing safety net for your coins
https://wizardsardine.com/liana
BSD 3-Clause "New" or "Revised" License
322 stars 57 forks source link

Reorg issue w/ esplora backend #1258

Open pythcoiner opened 2 months ago

pythcoiner commented 2 months ago

testing reorg on regtest on top of 20c1880f9b7b0345c17ac343d6583806a4bc53e0 with esplora backend:

- (esplora running as as systemd service, it's then restarted by systemd 60 seconds later)
- esplora then restart but don't feel good:

Sep 04 12:52:35 bitcoin esplora[17739]: Config { log: StdErrLog { verbosity: Debug, quiet: false, show_level: true, timestamp: Off, modules: [], writer: "stderr", color_choice: Never, show_module_names: false }, network_type: Bitcoin, db_path: "./db/mainnet", daemon_dir: "/home/pyth/.bitcoin", blocks_dir: "/home/pyth/.bitcoin/blocks", daemon_rpc_addr: 127.0.0.1:18443, cookie: Some("pyth:coiner"), electrum_rpc_addr: 192.168.1.21:53003, http_addr: 127.0.0.1:3000, http_socket_file: None, monitoring_addr: 127.0.0.1:4225, jsonrpc_import: true, light_mode: false, address_search: false, index_unspendables: false, cors: None, precache_scripts: None, utxos_limit: 500, electrum_txs_limit: 500, electrum_banner: "Welcome to electrs-esplora 0.4.1", electrum_rpc_logging: None } Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG Server listening on 127.0.0.1:4225 Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG Running accept thread Sep 04 12:52:35 bitcoin esplora[17739]: INFO NetworkInfo { version: 270000, subversion: "/Satoshi:27.0.0/", relayfee: 1e-5 } Sep 04 12:52:35 bitcoin esplora[17739]: INFO BlockchainInfo { chain: "regtest", blocks: 3026, headers: 3026, bestblockhash: "4d690f0ddae9731877edc2ff8359c3ead1d72f75b7605e2c96eb8a55486823c5", pruned: false, verificationprogress: 1.0, initialblockdownload: Some(false) } Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG opening DB at "./db/mainnet/newindex/txstore" Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG 3037 blocks were added Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG opening DB at "./db/mainnet/newindex/history" Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG 3037 blocks were indexed Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG opening DB at "./db/mainnet/newindex/cache" Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG 3037 headers were loaded, tip at 0x4d690f0ddae9731877edc2ff8359c3ead1d72f75b7605e2c96eb8a55486823c5 Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG applying 3027 new headers from height 0 Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG downloading new block headers (3027 already indexed) from 4d690f0ddae9731877edc2ff8359c3ead1d72f75b7605e2c96eb8a55486823c5 Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG adding transactions from 0 blocks using Bitcoind Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG indexing history from 0 blocks using Bitcoind Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG flushing to disk Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG updating synced tip to 0x4d690f0ddae9731877edc2ff8359c3ead1d72f75b7605e2c96eb8a55486823c5 Sep 04 12:52:35 bitcoin esplora[17739]: INFO Electrum RPC server running on 192.168.1.21:53003 Sep 04 12:52:35 bitcoin esplora[17739]: INFO REST server running on 127.0.0.1:3000 Sep 04 12:52:44 bitcoin esplora[17739]: INFO [192.168.1.6:57712] connected peer Sep 04 12:52:44 bitcoin esplora[17739]: WARN rpc #404 blockchain.block.header [Number(3028)] failed: Error: missing header Sep 04 12:52:44 bitcoin esplora[17739]: 0: error_chain::backtrace::imp::InternalBacktrace::new Sep 04 12:52:44 bitcoin esplora[17739]: 1: electrs::electrum::server::Connection::handle_command Sep 04 12:52:44 bitcoin esplora[17739]: 2: electrs::electrum::server::Connection::handle_replies Sep 04 12:52:44 bitcoin esplora[17739]: 3: std::sys_common::backtrace::rust_begin_short_backtrace Sep 04 12:52:44 bitcoin esplora[17739]: 4: core::ops::function::FnOnce::call_once{{vtable.shim}} Sep 04 12:52:44 bitcoin esplora[17739]: 5: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:44 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:44 bitcoin esplora[17739]: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:44 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:44 bitcoin esplora[17739]: std::sys::unix::thread::Thread::new::thread_start Sep 04 12:52:44 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys/unix/thread.rs:108:17 Sep 04 12:52:44 bitcoin esplora[17739]: 6: Sep 04 12:52:44 bitcoin esplora[17739]: 7: Sep 04 12:52:46 bitcoin esplora[17739]: WARN rpc #809 blockchain.block.header [Number(3028)] failed: Error: missing header Sep 04 12:52:46 bitcoin esplora[17739]: 0: error_chain::backtrace::imp::InternalBacktrace::new Sep 04 12:52:46 bitcoin esplora[17739]: 1: electrs::electrum::server::Connection::handle_command Sep 04 12:52:46 bitcoin esplora[17739]: 2: electrs::electrum::server::Connection::handle_replies Sep 04 12:52:46 bitcoin esplora[17739]: 3: std::sys_common::backtrace::__rust_begin_short_backtrace Sep 04 12:52:46 bitcoin esplora[17739]: 4: core::ops::function::FnOnce::call_once{{vtable.shim}} Sep 04 12:52:46 bitcoin esplora[17739]: 5: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:46 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:46 bitcoin esplora[17739]: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:46 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:46 bitcoin esplora[17739]: std::sys::unix::thread::Thread::new::thread_start Sep 04 12:52:46 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys/unix/thread.rs:108:17 Sep 04 12:52:46 bitcoin esplora[17739]: 6: Sep 04 12:52:46 bitcoin esplora[17739]: 7: Sep 04 12:52:48 bitcoin esplora[17739]: WARN rpc #1214 blockchain.block.header [Number(3028)] failed: Error: missing header Sep 04 12:52:48 bitcoin esplora[17739]: 0: error_chain::backtrace::imp::InternalBacktrace::new Sep 04 12:52:48 bitcoin esplora[17739]: 1: electrs::electrum::server::Connection::handle_command Sep 04 12:52:48 bitcoin esplora[17739]: 2: electrs::electrum::server::Connection::handle_replies Sep 04 12:52:48 bitcoin esplora[17739]: 3: std::sys_common::backtrace::rust_begin_short_backtrace Sep 04 12:52:48 bitcoin esplora[17739]: 4: core::ops::function::FnOnce::call_once{{vtable.shim}} Sep 04 12:52:48 bitcoin esplora[17739]: 5: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:48 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:48 bitcoin esplora[17739]: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:48 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:48 bitcoin esplora[17739]: std::sys::unix::thread::Thread::new::thread_start Sep 04 12:52:48 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys/unix/thread.rs:108:17 Sep 04 12:52:48 bitcoin esplora[17739]: 6: Sep 04 12:52:48 bitcoin esplora[17739]: 7: Sep 04 12:52:50 bitcoin esplora[17739]: WARN rpc #1619 blockchain.block.header [Number(3028)] failed: Error: missing header Sep 04 12:52:50 bitcoin esplora[17739]: 0: error_chain::backtrace::imp::InternalBacktrace::new Sep 04 12:52:50 bitcoin esplora[17739]: 1: electrs::electrum::server::Connection::handle_command Sep 04 12:52:50 bitcoin esplora[17739]: 2: electrs::electrum::server::Connection::handle_replies Sep 04 12:52:50 bitcoin esplora[17739]: 3: std::sys_common::backtrace::rust_begin_short_backtrace Sep 04 12:52:50 bitcoin esplora[17739]: 4: core::ops::function::FnOnce::call_once{{vtable.shim}} Sep 04 12:52:50 bitcoin esplora[17739]: 5: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:50 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:50 bitcoin esplora[17739]: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:50 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:50 bitcoin esplora[17739]: std::sys::unix::thread::Thread::new::thread_start Sep 04 12:52:50 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys/unix/thread.rs:108:17 Sep 04 12:52:50 bitcoin esplora[17739]: 6: Sep 04 12:52:50 bitcoin esplora[17739]: 7: Sep 04 12:52:53 bitcoin esplora[17739]: WARN rpc #2024 blockchain.block.header [Number(3028)] failed: Error: missing header Sep 04 12:52:53 bitcoin esplora[17739]: 0: error_chain::backtrace::imp::InternalBacktrace::new Sep 04 12:52:53 bitcoin esplora[17739]: 1: electrs::electrum::server::Connection::handle_command Sep 04 12:52:53 bitcoin esplora[17739]: 2: electrs::electrum::server::Connection::handle_replies Sep 04 12:52:53 bitcoin esplora[17739]: 3: std::sys_common::backtrace::__rust_begin_short_backtrace Sep 04 12:52:53 bitcoin esplora[17739]: 4: core::ops::function::FnOnce::call_once{{vtable.shim}} Sep 04 12:52:53 bitcoin esplora[17739]: 5: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:53 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:53 bitcoin esplora[17739]: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:53 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:53 bitcoin esplora[17739]: std::sys::unix::thread::Thread::new::thread_start Sep 04 12:52:53 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys/unix/thread.rs:108:17 Sep 04 12:52:53 bitcoin esplora[17739]: 6: Sep 04 12:52:53 bitcoin esplora[17739]: 7: Sep 04 12:52:55 bitcoin esplora[17739]: WARN rpc #2429 blockchain.block.header [Number(3028)] failed: Error: missing header Sep 04 12:52:55 bitcoin esplora[17739]: 0: error_chain::backtrace::imp::InternalBacktrace::new Sep 04 12:52:55 bitcoin esplora[17739]: 1: electrs::electrum::server::Connection::handle_command Sep 04 12:52:55 bitcoin esplora[17739]: 2: electrs::electrum::server::Connection::handle_replies Sep 04 12:52:55 bitcoin esplora[17739]: 3: std::sys_common::backtrace::rust_begin_short_backtrace Sep 04 12:52:55 bitcoin esplora[17739]: 4: core::ops::function::FnOnce::call_once{{vtable.shim}} Sep 04 12:52:55 bitcoin esplora[17739]: 5: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:55 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:55 bitcoin esplora[17739]: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:55 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:55 bitcoin esplora[17739]: std::sys::unix::thread::Thread::new::thread_start Sep 04 12:52:55 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys/unix/thread.rs:108:17 Sep 04 12:52:55 bitcoin esplora[17739]: 6: Sep 04 12:52:55 bitcoin esplora[17739]: 7:

- after mining 3 blocks, esplora feel better:

Sep 04 13:15:34 bitcoin esplora[19223]: DEBUG downloading new block headers (3027 already indexed) from 2c156e8a7e42f1d255ecb1ad7f350e02cac67be69ed2ce3b84fb87b740c3b64a Sep 04 13:15:34 bitcoin esplora[19223]: INFO hash=2c156e8a7e42f1d255ecb1ad7f350e02cac67be69ed2ce3b84fb87b740c3b64a height=3029 @ 2024-09-04T06:15:32Z (3 left to index) Sep 04 13:15:34 bitcoin esplora[19223]: DEBUG adding transactions from 3 blocks using Bitcoind Sep 04 13:15:34 bitcoin esplora[19223]: DEBUG hash=2c156e8a7e42f1d255ecb1ad7f350e02cac67be69ed2ce3b84fb87b740c3b64a height=3029 @ 2024-09-04T06:15:32Z (3 left to index) Sep 04 13:15:34 bitcoin esplora[19223]: DEBUG writing 21 rows to RocksDB { path: "./db/mainnet/newindex/txstore" }, flush=Enable Sep 04 13:15:34 bitcoin esplora[19223]: DEBUG indexing history from 3 blocks using Bitcoind Sep 04 13:15:34 bitcoin esplora[19223]: DEBUG hash=2c156e8a7e42f1d255ecb1ad7f350e02cac67be69ed2ce3b84fb87b740c3b64a height=3029 @ 2024-09-04T06:15:32Z (3 left to index) Sep 04 13:15:34 bitcoin esplora[19223]: DEBUG writing 6 rows to RocksDB { path: "./db/mainnet/newindex/history" }, flush=Enable Sep 04 13:15:34 bitcoin esplora[19223]: DEBUG updating synced tip to 0x2c156e8a7e42f1d255ecb1ad7f350e02cac67be69ed2ce3b84fb87b740c3b64a Sep 04 13:15:34 bitcoin esplora[19223]: DEBUG applying 3 new headers from height 3027


- Liana then can sync and the unconfirmed coin disapear

note: while the electrum connection is hanging, we cannot close liana, neither by closing the window nor Ctrl+C, i do not think it's related to this PR but to iced not terminating the main process when a subprocess still running
darosior commented 2 months ago

We are supposed to eventually crash if our Bitcoin backend does. Is there anything to do on our side?

-------- Original Message -------- On 9/4/24 1:11 PM, pythcoiner wrote:

testing reorg on regtest on top of 20c1880 with esplora backend:

  • sending an unconfirmed coin to Liana
  • Liana detect unconfirmed coin
  • then invalidate 2 blocks on bitcoind
  • on esplora side the main thread panic:

Sep 04 12:47:30 bitcoin esplora[17154]: thread 'main' panicked at src/new_index/schema.rs:298:9: Sep 04 12:47:30 bitcoin esplora[17154]: assertion left == right failed Sep 04 12:47:30 bitcoin esplora[17154]: left: 0x43fe26141bc0e6623f85e495825f31bd86680e93681266a832f7988516d3588d Sep 04 12:47:30 bitcoin esplora[17154]: right: 0x63edb8e9ca07b76318fc95d5bfcb81549bd08aee2039047a9823d805f0f2c959 Sep 04 12:47:30 bitcoin esplora[17154]: stack backtrace: Sep 04 12:47:30 bitcoin esplora[17154]: 0: rust_begin_unwind Sep 04 12:47:30 bitcoin esplora[17154]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5 Sep 04 12:47:30 bitcoin esplora[17154]: 1: core::panicking::panic_fmt Sep 04 12:47:30 bitcoin esplora[17154]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14 Sep 04 12:47:30 bitcoin esplora[17154]: 2: core::panicking::assert_failed_inner Sep 04 12:47:30 bitcoin esplora[17154]: 3: core::panicking::assert_failed Sep 04 12:47:30 bitcoin esplora[17154]: 4: electrs::new_index::schema::Indexer::update Sep 04 12:47:30 bitcoin esplora[17154]: 5: electrs::main Sep 04 12:47:30 bitcoin esplora[17154]: note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.

  • Liana try to connect to esplora while esplora down:

2024-09-04T05:51:44.570242Z INFO liana::bitcoin::electrum:126: Performing sync.

2024-09-04T05:51:44.570280Z DEBUG liana::bitcoin::electrum:139: num SPKs for sync: 403

2024-09-04T05:51:44.570305Z WARN electrum_client::client:192: call 'block_headers_subscribe_raw' failed with EOF while parsing a value at line 1 column 0, retry: 1/6

2024-09-04T05:51:46.570423Z INFO electrum_client::raw_client:205: Trying to connect to 192.168.1.21:53003 (attempt 1/1) with timeout 180s

2024-09-04T05:51:46.574158Z WARN electrum_client::raw_client:215: Connection error: Os { code: 111, kind: ConnectionRefused, message: "Connection refused" }

2024-09-04T05:51:46.574225Z WARN electrum_client::client:192: re-creating client failed with Made one or multiple attempts, all errored:

  • Connection refused (os error 111) , retry: 2/6

    2024-09-04T05:51:50.574363Z INFO electrum_client::raw_client:205: Trying to connect to 192.168.1.21:53003 (attempt 1/1) with timeout 180s

    2024-09-04T05:51:50.576280Z WARN electrum_client::raw_client:215: Connection error: Os { code: 111, kind: ConnectionRefused, message: "Connection refused" }

    2024-09-04T05:51:50.576335Z WARN electrum_client::client:192: re-creating client failed with Made one or multiple attempts, all errored:

  • Connection refused (os error 111) , retry: 3/6

    2024-09-04T05:51:58.576473Z INFO electrum_client::raw_client:205: Trying to connect to 192.168.1.21:53003 (attempt 1/1) with timeout 180s

    2024-09-04T05:51:58.579033Z WARN electrum_client::raw_client:215: Connection error: Os { code: 111, kind: ConnectionRefused, message: "Connection refused" }

    2024-09-04T05:51:58.579090Z WARN electrum_client::client:192: re-creating client failed with Made one or multiple attempts, all errored:

  • Connection refused (os error 111) , retry: 4/6

    2024-09-04T05:52:14.579232Z INFO electrum_client::raw_client:205: Trying to connect to 192.168.1.21:53003 (attempt 1/1) with timeout 180s

    2024-09-04T05:52:14.582453Z WARN electrum_client::raw_client:215: Connection error: Os { code: 111, kind: ConnectionRefused, message: "Connection refused" }

    2024-09-04T05:52:14.582509Z WARN electrum_client::client:192: re-creating client failed with Made one or multiple attempts, all errored:

  • Connection refused (os error 111) , retry: 5/6
  • (esplora running as as systemd service, it's then restarted by systemd 60 seconds later)
  • esplora then restart but don't feel good:

Sep 04 12:52:35 bitcoin esplora[17739]: Config { log: StdErrLog { verbosity: Debug, quiet: false, show_level: true, timestamp: Off, modules: [], writer: "stderr", color_choice: Never, show_module_names: false }, network_type: Bitcoin, db_path: "./db/mainnet", daemon_dir: "/home/pyth/.bitcoin", blocks_dir: "/home/pyth/.bitcoin/blocks", daemon_rpc_addr: 127.0.0.1:18443, cookie: Some("pyth:coiner"), electrum_rpc_addr: 192.168.1.21:53003, http_addr: 127.0.0.1:3000, http_socket_file: None, monitoring_addr: 127.0.0.1:4225, jsonrpc_import: true, light_mode: false, address_search: false, index_unspendables: false, cors: None, precache_scripts: None, utxos_limit: 500, electrum_txs_limit: 500, electrum_banner: "Welcome to electrs-esplora 0.4.1", electrum_rpc_logging: None } Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG Server listening on 127.0.0.1:4225 Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG Running accept thread Sep 04 12:52:35 bitcoin esplora[17739]: INFO NetworkInfo { version: 270000, subversion: "/Satoshi:27.0.0/", relayfee: 1e-5 } Sep 04 12:52:35 bitcoin esplora[17739]: INFO BlockchainInfo { chain: "regtest", blocks: 3026, headers: 3026, bestblockhash: "4d690f0ddae9731877edc2ff8359c3ead1d72f75b7605e2c96eb8a55486823c5", pruned: false, verificationprogress: 1.0, initialblockdownload: Some(false) } Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG opening DB at "./db/mainnet/newindex/txstore" Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG 3037 blocks were added Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG opening DB at "./db/mainnet/newindex/history" Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG 3037 blocks were indexed Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG opening DB at "./db/mainnet/newindex/cache" Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG 3037 headers were loaded, tip at 0x4d690f0ddae9731877edc2ff8359c3ead1d72f75b7605e2c96eb8a55486823c5 Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG applying 3027 new headers from height 0 Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG downloading new block headers (3027 already indexed) from 4d690f0ddae9731877edc2ff8359c3ead1d72f75b7605e2c96eb8a55486823c5 Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG adding transactions from 0 blocks using Bitcoind Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG indexing history from 0 blocks using Bitcoind Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG flushing to disk Sep 04 12:52:35 bitcoin esplora[17739]: DEBUG updating synced tip to 0x4d690f0ddae9731877edc2ff8359c3ead1d72f75b7605e2c96eb8a55486823c5 Sep 04 12:52:35 bitcoin esplora[17739]: INFO Electrum RPC server running on 192.168.1.21:53003 Sep 04 12:52:35 bitcoin esplora[17739]: INFO REST server running on 127.0.0.1:3000 Sep 04 12:52:44 bitcoin esplora[17739]: INFO [192.168.1.6:57712] connected peer Sep 04 12:52:44 bitcoin esplora[17739]: WARN rpc #404 blockchain.block.header [Number(3028)] failed: Error: missing header Sep 04 12:52:44 bitcoin esplora[17739]: 0: error_chain::backtrace::imp::InternalBacktrace::new Sep 04 12:52:44 bitcoin esplora[17739]: 1: electrs::electrum::server::Connection::handle_command Sep 04 12:52:44 bitcoin esplora[17739]: 2: electrs::electrum::server::Connection::handle_replies Sep 04 12:52:44 bitcoin esplora[17739]: 3: std::sys_common::backtrace::rust_begin_short_backtrace Sep 04 12:52:44 bitcoin esplora[17739]: 4: core::ops::function::FnOnce::call_once{{vtable.shim}} Sep 04 12:52:44 bitcoin esplora[17739]: 5: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:44 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:44 bitcoin esplora[17739]: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:44 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:44 bitcoin esplora[17739]: std::sys::unix::thread::Thread::new::thread_start Sep 04 12:52:44 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys/unix/thread.rs:108:17 Sep 04 12:52:44 bitcoin esplora[17739]: 6: Sep 04 12:52:44 bitcoin esplora[17739]: 7: Sep 04 12:52:46 bitcoin esplora[17739]: WARN rpc #809 blockchain.block.header [Number(3028)] failed: Error: missing header Sep 04 12:52:46 bitcoin esplora[17739]: 0: error_chain::backtrace::imp::InternalBacktrace::new Sep 04 12:52:46 bitcoin esplora[17739]: 1: electrs::electrum::server::Connection::handle_command Sep 04 12:52:46 bitcoin esplora[17739]: 2: electrs::electrum::server::Connection::handle_replies Sep 04 12:52:46 bitcoin esplora[17739]: 3: std::sys_common::backtrace::__rust_begin_short_backtrace Sep 04 12:52:46 bitcoin esplora[17739]: 4: core::ops::function::FnOnce::call_once{{vtable.shim}} Sep 04 12:52:46 bitcoin esplora[17739]: 5: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:46 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:46 bitcoin esplora[17739]: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:46 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:46 bitcoin esplora[17739]: std::sys::unix::thread::Thread::new::thread_start Sep 04 12:52:46 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys/unix/thread.rs:108:17 Sep 04 12:52:46 bitcoin esplora[17739]: 6: Sep 04 12:52:46 bitcoin esplora[17739]: 7: Sep 04 12:52:48 bitcoin esplora[17739]: WARN rpc #1214 blockchain.block.header [Number(3028)] failed: Error: missing header Sep 04 12:52:48 bitcoin esplora[17739]: 0: error_chain::backtrace::imp::InternalBacktrace::new Sep 04 12:52:48 bitcoin esplora[17739]: 1: electrs::electrum::server::Connection::handle_command Sep 04 12:52:48 bitcoin esplora[17739]: 2: electrs::electrum::server::Connection::handle_replies Sep 04 12:52:48 bitcoin esplora[17739]: 3: std::sys_common::backtrace::rust_begin_short_backtrace Sep 04 12:52:48 bitcoin esplora[17739]: 4: core::ops::function::FnOnce::call_once{{vtable.shim}} Sep 04 12:52:48 bitcoin esplora[17739]: 5: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:48 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:48 bitcoin esplora[17739]: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:48 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:48 bitcoin esplora[17739]: std::sys::unix::thread::Thread::new::thread_start Sep 04 12:52:48 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys/unix/thread.rs:108:17 Sep 04 12:52:48 bitcoin esplora[17739]: 6: Sep 04 12:52:48 bitcoin esplora[17739]: 7: Sep 04 12:52:50 bitcoin esplora[17739]: WARN rpc #1619 blockchain.block.header [Number(3028)] failed: Error: missing header Sep 04 12:52:50 bitcoin esplora[17739]: 0: error_chain::backtrace::imp::InternalBacktrace::new Sep 04 12:52:50 bitcoin esplora[17739]: 1: electrs::electrum::server::Connection::handle_command Sep 04 12:52:50 bitcoin esplora[17739]: 2: electrs::electrum::server::Connection::handle_replies Sep 04 12:52:50 bitcoin esplora[17739]: 3: std::sys_common::backtrace::rust_begin_short_backtrace Sep 04 12:52:50 bitcoin esplora[17739]: 4: core::ops::function::FnOnce::call_once{{vtable.shim}} Sep 04 12:52:50 bitcoin esplora[17739]: 5: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:50 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:50 bitcoin esplora[17739]: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:50 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:50 bitcoin esplora[17739]: std::sys::unix::thread::Thread::new::thread_start Sep 04 12:52:50 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys/unix/thread.rs:108:17 Sep 04 12:52:50 bitcoin esplora[17739]: 6: Sep 04 12:52:50 bitcoin esplora[17739]: 7: Sep 04 12:52:53 bitcoin esplora[17739]: WARN rpc #2024 blockchain.block.header [Number(3028)] failed: Error: missing header Sep 04 12:52:53 bitcoin esplora[17739]: 0: error_chain::backtrace::imp::InternalBacktrace::new Sep 04 12:52:53 bitcoin esplora[17739]: 1: electrs::electrum::server::Connection::handle_command Sep 04 12:52:53 bitcoin esplora[17739]: 2: electrs::electrum::server::Connection::handle_replies Sep 04 12:52:53 bitcoin esplora[17739]: 3: std::sys_common::backtrace::__rust_begin_short_backtrace Sep 04 12:52:53 bitcoin esplora[17739]: 4: core::ops::function::FnOnce::call_once{{vtable.shim}} Sep 04 12:52:53 bitcoin esplora[17739]: 5: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:53 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:53 bitcoin esplora[17739]: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:53 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:53 bitcoin esplora[17739]: std::sys::unix::thread::Thread::new::thread_start Sep 04 12:52:53 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys/unix/thread.rs:108:17 Sep 04 12:52:53 bitcoin esplora[17739]: 6: Sep 04 12:52:53 bitcoin esplora[17739]: 7: Sep 04 12:52:55 bitcoin esplora[17739]: WARN rpc #2429 blockchain.block.header [Number(3028)] failed: Error: missing header Sep 04 12:52:55 bitcoin esplora[17739]: 0: error_chain::backtrace::imp::InternalBacktrace::new Sep 04 12:52:55 bitcoin esplora[17739]: 1: electrs::electrum::server::Connection::handle_command Sep 04 12:52:55 bitcoin esplora[17739]: 2: electrs::electrum::server::Connection::handle_replies Sep 04 12:52:55 bitcoin esplora[17739]: 3: std::sys_common::backtrace::rust_begin_short_backtrace Sep 04 12:52:55 bitcoin esplora[17739]: 4: core::ops::function::FnOnce::call_once{{vtable.shim}} Sep 04 12:52:55 bitcoin esplora[17739]: 5: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:55 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:55 bitcoin esplora[17739]: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce>::call_once Sep 04 12:52:55 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9 Sep 04 12:52:55 bitcoin esplora[17739]: std::sys::unix::thread::Thread::new::thread_start Sep 04 12:52:55 bitcoin esplora[17739]: at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys/unix/thread.rs:108:17 Sep 04 12:52:55 bitcoin esplora[17739]: 6: Sep 04 12:52:55 bitcoin esplora[17739]: 7:

  • after mining 3 blocks, esplora feel better:

Sep 04 13:15:34 bitcoin esplora[19223]: DEBUG downloading new block headers (3027 already indexed) from 2c156e8a7e42f1d255ecb1ad7f350e02cac67be69ed2ce3b84fb87b740c3b64a Sep 04 13:15:34 bitcoin esplora[19223]: INFO hash=2c156e8a7e42f1d255ecb1ad7f350e02cac67be69ed2ce3b84fb87b740c3b64a height=3029 @ 2024-09-04T06:15:32Z (3 left to index) Sep 04 13:15:34 bitcoin esplora[19223]: DEBUG adding transactions from 3 blocks using Bitcoind Sep 04 13:15:34 bitcoin esplora[19223]: DEBUG hash=2c156e8a7e42f1d255ecb1ad7f350e02cac67be69ed2ce3b84fb87b740c3b64a height=3029 @ 2024-09-04T06:15:32Z (3 left to index) Sep 04 13:15:34 bitcoin esplora[19223]: DEBUG writing 21 rows to RocksDB { path: "./db/mainnet/newindex/txstore" }, flush=Enable Sep 04 13:15:34 bitcoin esplora[19223]: DEBUG indexing history from 3 blocks using Bitcoind Sep 04 13:15:34 bitcoin esplora[19223]: DEBUG hash=2c156e8a7e42f1d255ecb1ad7f350e02cac67be69ed2ce3b84fb87b740c3b64a height=3029 @ 2024-09-04T06:15:32Z (3 left to index) Sep 04 13:15:34 bitcoin esplora[19223]: DEBUG writing 6 rows to RocksDB { path: "./db/mainnet/newindex/history" }, flush=Enable Sep 04 13:15:34 bitcoin esplora[19223]: DEBUG updating synced tip to 0x2c156e8a7e42f1d255ecb1ad7f350e02cac67be69ed2ce3b84fb87b740c3b64a Sep 04 13:15:34 bitcoin esplora[19223]: DEBUG applying 3 new headers from height 3027

  • Liana then can sync and the unconfirmed coin disapear

note: while the electrum connection is hanging, we cannot close liana, neither by closing the window nor Ctrl+C, i do not think it's related to this PR but to iced not terminating the main process when a subprocess still running

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

pythcoiner commented 2 months ago

i think we should not crash there, but rather wait, an then i'd follow same approach i offer in #1261, if we get an error response to the blockchain.block.header request, i think we should update our local chain height to the remote one value