-
Notifications
You must be signed in to change notification settings - Fork 368
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
Bug: electrs will not run on a big-endian machine. yes, i know, who would try to do that anyway other than an IBMer! :) #414
Comments
I did verify the endian-ness issue, e.g., Bitcoin's block magic number isn't matched in (I may change the title on this issue to make it more pertinent. I suspect the exception in the issue description above gets thrown when the magic number happens to match 4-bytes somewhere in the .dat file and then it's over.)
|
Until I get around to testing and contributing it, this patch appears to address at least part of the endian issue (look for "endian"...there may be a less verbose way to express it in Rust). There are other areas, too, e.g., in mempool.rs (txid).
|
Perhaps send it in the form of PR? It's easier to review that way. |
@jlatone could you please test |
Could you please share the error you're getting there? |
I will, I want to test it more for completeness and make sure it's ok rust code (I don't know the language). So far so good, though, other than the issue raised in mempool.rs (I'll reply to @romanz). |
Oh, I didn't know about it, I'll try it today. |
Sure, and this may be obvious but I haven't spotted it, yet: the following assertion fails (full stack trace follows).
I thought it may be a byte ordering issue with the assertion only, but it doesn't appear to be judging from the left/right values (I looked up the hash values on blockchain.com and the left one doesn't exist and the right one is unconfirmed in the mempool at the time of this post). I suspect there's something more fundamental wrong with byte ordering here, even if electrs seems to be working (I do connect to it from an electrum wallet and it does simple things correctly, like txn lookups). [Edit: Oh, I should have mentioned: I "fixed" the above problem by commenting it out, :), just to get electrs to continue...]
|
OK, I tried the p2p branch of electrs and ran into 2 problems that appear to be byte-order issues:
The bitcoind log show this:
|
Thanks! |
Ah, thanks! This exposes a lot: TL;DR: test result: FAILED. 118 passed; 50 failed; 0 ignored; 0 measured; 0 filtered out
|
I posted an issue in rust-bitcoin to see what they say about the failed tests. Issue #550 appears to point out the problem on a bigger scale with the library, and if that's the case, I don't expect it to be resolved any time soon and I'm not sure I have the time at this point to help them work through it. So, I see 3 options:
P.S. I'll no longer put full traces in the bodies of my posts and attach files instead. :) |
Let's wait for rust-bitcoin/rust-bitcoin#627 and see if it helps :) |
I think that after rust-bitcoin/rust-bitcoin#631 lands, and a new rust-bitcoincore-rpc version is released, this issue should hopefully be resolved :) |
@jlatone Could you please try to reproduce this issue on the latest |
Closing for now, please reopen if the issue persists. |
Describe the bug
electrs effectively stops running after the following error message:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No "panicked" error messages about indexes out of range from rust.
System running electrs
Operating System: Ubuntu 20.04.2 LTS
Kernel: Linux 5.4.0-74-generic
Architecture: s390x
Additional context
This is running on an IBM Z (mainframe, 64-bit, big endian) running Linux. I mention this because the machine is big endian and I wonder if there's a endian issue somewhere (in a dependent library, in rust, etc) causing the above problem. I'm only looking for a pointer to where I should start looking if the error messages above might indicate anything obvious (googling it related to electrs/electrum didn't turn up much of anything).
The text was updated successfully, but these errors were encountered: