-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Transactions list for addresses is always empty #188
Comments
Having the same issue. Opening an address page, for example for address
The issue is also present on the demo site: https://explorer.btc21.org/address/bc1qwqdg6squsna38e46795at95yu9atm8azzmyvckulcc7kytlcckxswvvzej However, the demo site shows a note indicating this is caused by #67. Local installation shows no such note, just an empty transactions list. Browsing the address page for addresses with fewer transactions, for example address |
If using Electrum Rust Server, you can start it with a custom From the Electrum Rust Server documentation:
|
I don't think my issue is caused by too many transactions. I have addresses with only a few txns on them. |
Does it work with other addresses that have <100 transactions, like |
Like I said: always. Here is an example for 1 tx: https://test.bitcoin.local/address/2N7m4LmHym3hLe48LswoZ9NncMPK1pp6RnT |
@schildbach I want to look into this. If you haven't already, can you update to v2.0.0, add another environment variable |
This is what I get on one request:
|
I am observing this same problem, both when I install btc-rpc-explorer by hand and when I use it as part of the myNodeBTC project. Some recent addresses (pick a random recent block) will show the transactions. But older addresses tend not to list any transactions-- or worse yet, sometimes btc-rpc-explorer will just hang and the page will not load (btc-rpc-explorer does not respond to the HTTP request). On my hand-rolled installation, I was using ElectrumX; on mynodebtc, it is using electrs. Works for me:
Does not work for me:
NOTE: I also just tried these on https://explorer.btc21.org/ and neither of them work. Does this public demo have Electrum configured? |
I just checked and this issue still exists on v2.01. |
Switching to BlueWallet-based ElectrumX connector which is a maintained fork of old ElectrumX connection code. Seems that some extra effort has been put into reconnecting and this also drops some manual error handling that my old code incorporated.
@scientastic Yes, the demo site is configured with an ElectrumX server for address queries, though the tool has historically had trouble maintaining the JSONRPC connection to ElectrumX. Recent changes switch to a better maintained library for connecting to ElectrumX so we'll see how well it maintains the connection on the demo site. As of this moment both of the addresses that you pointed to are working as they're supposed to (of course, the second address, for SlushPool, fails to return the transaction history due to a known issue with ElectrumX):
@schildbach If you're able to test again with the latest code (FYI there's no official release yet so won't be accessible via npm) that would be great. By the way, the testnet address you were trying before is also working on the testnet demo site:
|
I now get a formatted error, both on testnet and mainnet:
|
Ah good, we're getting some more details. Hmm, now what to do with this... The first thing that comes to mind: the "rejected" error that you're seeing is what I saw recently when I was testing ElectrumX reconnects. I took my ElectrumX server down and then tried to view an address page and saw a "rejected" error. Are you able to check your ElectrumX logs? Do you have any other tool/service that can verify your ElectrumX's proper functioning (Electrum itself, or BlueWallet perhaps)? |
As for logs, see #188 (comment) |
I mean the logs for the actual ElectrumX server. |
|
Are you able to connect to and query ElectrumX from another tool/service? |
At the moment I don't have another tool. I'm only using ElectrumX because btc-rpc-explorer depends on it. But I'm currently trying to implement a Docker health check for ElectrumX. Do you have a suggestion for a quick test if ElectrumX is responding to commands, maybe using a tool contained in busybox? |
@schildbach One thing you can try is connect via the commandline and see if your ElectrumX will communicate properly there. To do that, if you're running on port 50002 (SSL), you'd run this command (substituting the appropriate IP):
If that command is successful you'll see connection data printed and then have a blank prompt where you can enter data to send to ElectrumX. To test the transaction history for the testnet address you last referenced (2MwMu6CRdgkUyQMsLSiSxFXn1CBUXt9pTVN), you can enter the following data:
The "param" there is the "scripthash" associated with that address and is the primary identifier ElectrumX uses to query addresses. If you paste the above data and hit enter your testnet ElectrumX "should" return the following:
See what happens and let me know. |
From the same container:
|
From the btc-rpc-explorer container:
|
Just noticed that I have the TCP (non-SSL) connection configured between btc-rpc-explorer and electrumx, so I also tested:
|
This is all good stuff... Thanks for doing that ElectrumX debugging - it helps rule some things out. Concerning your last update: I think the 2 results is just a coincidence for this particular address. I believe that if you look at another address (with tx_count != 2) you'll still see 2 such errors. The reason for that is that there are 2 separate calls made to ElectrumX: 1 to get the current address balance and 1 to get the tx history. Again, thanks for your help debugging this. I'm looking more at the relevant code right now... |
@schildbach There are some new improvements to the code that connects to ElectrumX. Can you update to the latest code and send me an updated startup log. This time can you use the environment variable At startup I'm hoping to see the line:
And when viewing an address page we're looking for these 2 lines (for an address I picked at random from mainnet):
Seeing that first line (indicating successful connection to ElectrumX) is the first order of business. If you're not getting connected successfully then of course subsequent address requests will fail. |
Here is a complete log of the container startup, some wait time, and then I tried to query the I now see an "Error connecting to ElectrumX" which I whink I've not seen before (maybe it wasn't logged?). I have to investigate into this.
|
I tried again and can connect from the btc-rpc-explorer container to the ElectrumX container: I assume at that point in time ElectrumX is not ready to accept connections and btc-rpc-explorer is only trying three times (in less than a second). I think connection attempts should be spread out to like once per 5 seconds (optionally: exponential backoff) and basically continue forever, as ElectrumX can take a long time (days!) if they chain isn't up to date. |
I just checked the ElectrumX log and even for a fully synched blockchain it takes a good two minutes from starting the container until it starts listening. |
@schildbach Ok, there are some more changes and they might have this fixed for you. The changes are around the connection/re-connection logic and include a 10s delay between reconnect attempts and some improvements to error handling and error display. Again, the code has not been included in a release yet so you'll need to update from source. And for these changes to take effect please also be sure you run Please let me know what you see. |
Finally, it works! I get this the in the log:
I'm not sure what the error says, but nevertheless i was able to fetch the history of an address! Thanks! |
Fixed in v2.0.2. |
In version: when trying to access genesis block: IP-address:3002/address/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa I am shown : Error retrieving transaction history (#1) That is normal due to amount of transactions and default settings? |
Describe the bug
When I click on an address, the transactions list on
/address/…
is always empty. Obviously it should contain at least one entry.I have almost identical installations for mainnet and testnet; the issue appears on both. The connection to bitcoind appears to work fine. Both bitcoind and ElectrumX are fully synched.
In the logfile, for each
/address/…
request this error appears:Environment (please complete the following information):
I'm using the Docker images for all of the above, built myself from the respective git tags. No customizations.
Configuration file content
For testnet:
For mainnet:
The text was updated successfully, but these errors were encountered: