Search content
Sort by

Showing 6 of 6 results by szeco
Post
Topic
Board Bitcoin Technical Support
Re: mempool / electrs install, can load transactions but not addresses
by
szeco
on 13/12/2021, 19:17:35 UTC
I think you might have a firewall. First try using 127.0.0.1 instead of 192.168.4.116

in /electrs/config.toml
Code:
electrum_rpc_addr = "127.0.0.1:50001"


hah! my electrum_rpc_addr was already set to 127.0.0.1, changing it back to the local IP 192.168.4.116 has (so far, I think, still indexing) resolved the address lookup issue!

Quote
~$ curl -sSL "http://mempool.myserver/api/address/1KXLMMcwtB9VsbBXboaV6AxUv7mmomWEeR"
{"address":"1KXLMMcwtB9VsbBXboaV6AxUv7mmomWEeR","chain_stats":{"funded_txo_count":0,"funded_txo_sum":979079,"spent_txo_count":0,"spent_txo_sum":0,"tx_count":1},"mempool_stats":{"funded_txo_count":0,"funded_txo_sum":0,"spent_txo_count":0,"spent_txo_sum":0,"tx_count":0},"electrum":true}

However, this does mean that I can no longer connect my desktop electrum to the hosted instance via the onion address which was working before (when I had rpc_addr set to 127.0.0.1) but this is a minor issue, I can probably resolve w opening the port through NAT.
Post
Topic
Board Bitcoin Technical Support
Re: mempool / electrs install, can load transactions but not addresses
by
szeco
on 13/12/2021, 03:47:57 UTC
I think it is likely the error is not on the Bitcoin side it is rather on the mempool. To be sure, try to add the debug configurations on my post above, I believe it will give clarity why the mempool is returning HTTP 500 since it will log more output on both electrs and mempool.

Looks like it's the connection between mempool and electrs as you suspected.

When I use the rpc values in bitcoin.conf as per the original guide I get the occasional error when running mempool, but I can see it syncing
Quote
Dec 13 14:43:40 [75581] DEBUG: Fetched transaction 1 / 6
Dec 13 14:43:40 [75581] DEBUG: Fetched transaction 2 / 6
Dec 13 14:43:40 [75581] DEBUG: Fetched transaction 3 / 6
Dec 13 14:43:40 [75581] DEBUG: Fetched transaction 4 / 6
Dec 13 14:43:40 [75581] DEBUG: Fetched transaction 5 / 6
Dec 13 14:43:40 [75581] DEBUG: Fetched transaction 6 / 6
Dec 13 14:43:40 [75581] DEBUG: Mempool blocks calculated in 0.001 seconds
Dec 13 14:43:40 [75581] DEBUG: New mempool size: 470 Change: 6
Dec 13 14:43:40 [75581] DEBUG: Mempool updated in 0.01 seconds
Dec 13 14:43:41 [75581] DEBUG: Electrum attempting reconnect...
Dec 13 14:43:41 [75581] ERR: Electrum error: {"errno":-61,"code":"ECONNREFUSED","syscall":"connect","address":"192.168.4.116","port":50001}
Dec 13 14:43:41 [75581] ERR: Electrum error: {"errno":-61,"code":"ECONNREFUSED","syscall":"connect","address":"192.168.4.116","port":50001}
Dec 13 14:43:41 [75581] INFO: Disconnected from Electrum Server at 192.168.4.116:50001

I tried your suggestion in another thread on here by setting the bind/allowip values
Quote
rpcbind:127.0.0.1
rpcbind:192.168.4.116
rpcallowip:192.168.4.122
rpcport:8332

But that causes mempool to fail immediately on restart (it never connects)
Quote
Dec 13 14:45:53 [75763] DEBUG: updateMempoolInfo: connect ECONNREFUSED 192.168.4.116:8332
Dec 13 14:45:53 [75763] WARN: runMainLoop error: connect ECONNREFUSED 192.168.4.116:8332. Retrying in 10 sec.
Dec 13 14:45:53 [75763] DEBUG: {"errno":-61,"code":"ECONNREFUSED","syscall":"connect","address":"192.168.4.116","port":8332}
Post
Topic
Board Bitcoin Technical Support
Re: mempool / electrs install, can load transactions but not addresses
by
szeco
on 12/12/2021, 02:46:56 UTC
Looks like I might be getting somewhere..

Quote
# bitcoin-cli getaddressinfo 1MDkeWhcTzvnZdqPbJDtPgrLp6QHJeAPNm
error code: -18
error message:
No wallet is loaded. Load a wallet using loadwallet or create a new one with createwallet. (Note: A default wallet is no longer automatically created)

Looks like the bitcoin-d install didn't include a wallet and that is required in order to query addresses?? I ran createwallet and it looks OK now.

Quote
# bitcoin-cli createwallet "testwallet"
{
  "name": "testwallet",
  "warning": ""
}

# bitcoin-cli getaddressinfo 1MDkeWhcTzvnZdqPbJDtPgrLp6QHJeAPNm
{
  "address": "1MDkeWhcTzvnZdqPbJDtPgrLp6QHJeAPNm",
  "scriptPubKey": "76a914ddcbf1131395a90e772396e0e5bad51cc2923c7388ac",
  "ismine": false,
  "solvable": false,
  "iswatchonly": false,
  "isscript": false,
  "iswitness": false,
  "ischange": false,
  "labels": [
  ]
}

Inspecting the URL via the Browser dev tools console gets me the same HTTP 500 error
Quote
Request URL: http://mempool.myserver.com/api/address/1MDkeWhcTzvnZdqPbJDtPgrLp6QHJeAPNm
Request Method: GET
Status Code: 500 Internal Server Error
Remote Address: 127.0.0.1:61274
Referrer Policy: strict-origin-when-cross-origin
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Length: 5
Content-Type: text/html; charset=utf-8
Date: Sun, 12 Dec 2021 00:35:02 GMT
ETag: W/"5-fy9qFc+NorJ+Wkr0e1jnrXHAs9k"
Server: nginx
X-Powered-By: Express
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Connection: keep-alive
Host: mempool.myserver.com
Referer: http://mempool.myserver.com/address/1MDkeWhcTzvnZdqPbJDtPgrLp6QHJeAPNm
Sec-GPC: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36
Post
Topic
Board Bitcoin Technical Support
Re: mempool / electrs install, can load transactions but not addresses
by
szeco
on 11/12/2021, 22:11:43 UTC
Appreciate the suggestions folks..

getmempoolinfo returns
Quote
{
  "loaded": true,
  "size": 572,
  "bytes": 191953,
  "usage": 1004624,
  "maxmempool": 300000000,
  "mempoolminfee": 0.00001000,
  "minrelaytxfee": 0.00001000,
  "unbroadcastcount": 0
}


nginx logs have some funky http codes, internal server error for the address GET?
Quote
185.220.101.178 - - [12/Dec/2021:09:01:06 +1100] "GET /api/tx/dba3a64c1117fb5c67dfc4546b18968ff6f6d716705427c86c6d7cb6d87afb3f HTTP/1.1" 200 801
185.220.101.178 - - [12/Dec/2021:09:01:07 +1100] "GET /api/tx/dba3a64c1117fb5c67dfc4546b18968ff6f6d716705427c86c6d7cb6d87afb3f/outspends HTTP/1.1" 501 15
185.220.101.178 - - [12/Dec/2021:09:01:51 +1100] "GET /api/address/bc1qn75z0k77ywdc47cu9t68xg67rr3g0sw3pm47jv HTTP/1.1" 500 5

could not find an associate log for electrs.

i can share the clearnet address for the mempool if that might help?

Post
Topic
Board Bitcoin Technical Support
Re: mempool / electrs install, can load transactions but not addresses
by
szeco
on 07/12/2021, 23:08:31 UTC
In the case of the Bitcoin node, you can use getchaintips RPC and it will tell you the current block height the node has processed. It also has a field for flags and at what block height they are activated; chances are if you aren't anywhere close to the Taproot flag block height then your node is not completely verified.

There is also a friendlier getblockchaininfo RPC that gives you the verification process as a decimal between 0 and 1 ( 1=fully verified ).

getblockchaininfo shows the latest block, and when I send a test transaction I can see it immediately in my mempool view by searching the txid. However if I then click on the associated address that's when I get the "Error loading address data" message.
Post
Topic
Board Bitcoin Technical Support
Topic OP
mempool / electrs install, can load transactions but not addresses
by
szeco
on 07/12/2021, 12:47:07 UTC
Hi all,

https://github.com/seth586/guides/blob/master/FreeNAS/bitcoin/README.md

I pretty much followed this excellent FreeNAS guide to get my bitcoin and lnd node up and running. I can load my local mempool install up and view any blocks/transactions without problems. But when I try to navigate/search for a particular address it always ends up with "Error loading address data." Is this a syncing issue? It's been almost a week since I got electrs up and running. Is there any way to know when a full sync has completed? Any specific logs I can inspect?

Thanks