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

Config: confused by skip_block_download_wait #1049

Open
jotapea opened this issue Jun 3, 2024 · 2 comments
Open

Config: confused by skip_block_download_wait #1049

jotapea opened this issue Jun 3, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@jotapea
Copy link

jotapea commented Jun 3, 2024

Hello, newbie user here.

After some time researching, I don't know if I am missing some step using the skip_block_download_wait = true configuration. If not, and is just not possible to use electrs during initial block download, then I'll be curious about the main use cases for such configuration.

Edit: Maybe is for the non-initial block downloads? Also found out that the "proxy" calls, like blockchain.transaction.get, do work.


Have you read the documentation?
Yes.

How did you configure electrs?

Running it with docker compose for local tests:

config.toml
daemon_rpc_addr = "bitcoind:8332"
daemon_p2p_addr = "bitcoind:8333"
auth = "rpc:rpc"
db_dir = "/data"
electrum_rpc_addr = "0.0.0.0:50001"
skip_block_download_wait = true

Environment variables: ENV RUST_BACKTRACE=1, ENV RUST_LOG=info
Arguments: target/release/electrs --conf config.toml

Debug output of configuration

Starting electrs 0.10.5 on x86_64 linux with Config { network: Bitcoin, db_path: "/data/bitcoin", db_log_dir: None, daemon_dir: "/root/.bitcoin", daemon_auth: UserPass("rpc", ""), daemon_rpc_addr: 172.21.0.3:8332, daemon_p2p_addr: 172.21.0.3:8333, electrum_rpc_addr: 0.0.0.0:50001, monitoring_addr: 127.0.0.1:4224, wait_duration: 10s, jsonrpc_timeout: 15s, index_batch_size: 10, index_lookup_limit: None, reindex_last_blocks: 0, auto_reindex: true, ignore_mempool: false, sync_once: false, skip_block_download_wait: true, disable_electrum_rpc: false, server_banner: "Welcome to electrs 0.10.5 (Electrum Rust Server)!", signet_magic: f9beb4d9, args: [] }

Expected behavior
I expected calls like blockchain.headers.subscribe and blockchain.block.header to return results for blocks that have already been synced by bitcoind.

Actual behavior
blockchain.headers.subscribe returns height 0 and blockchain.block.header with height 2 returns error 'no header at 2'.


The same setup without the skip_block_download_wait = true worked, electrs synced after bitcoin and I was able to make successful calls. So, I am now focused on learning about this specific configuration.

Tried to find an answer in this repo, the docs and searching the web. Finally tried reading the code, but I can't figure it out with my limited rust knowledge.

Thank you for your work and time.

@jotapea jotapea added the bug Something isn't working label Jun 3, 2024
@jotapea jotapea closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2024
@jotapea jotapea changed the title Config: skip_block_download_waituno Config: confused by skip_block_download_wait Jun 3, 2024
@jotapea jotapea reopened this Jun 3, 2024
@Kixunil
Copy link
Contributor

Kixunil commented Jun 17, 2024

I don't know what's wrong but FYI it got added in #410 and it supposedly worked at the time.

@jotapea
Copy link
Author

jotapea commented Jun 29, 2024

Thank you @Kixunil. Maybe I'll try to run that older version, or just continue learning Rust and get into the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants