mynodebtc / mynode

The easiest way to run Bitcoin and Lightning!
Other
649 stars 146 forks source link

undefined symbol: secp256k1_ecdh #604

Open HamishMacEwan opened 2 years ago

HamishMacEwan commented 2 years ago

Running JoinInBox's local Ob-watcher results in the error in the attached image.

WindowsTerminal_H2FlnvvZ62

[This error also occurs if you run other scripts in the /home/joinmarket/joinmarket-clientserver/scripts directory as user joinmarket. For example ./genwallet.py]

ImportError: /home/joinmarket/.local/lib/python3.8/site-packages/coincurve/_libsecp256k1.cpython-38-arm-linux-gnueabihf.so: undefined symbol: secp256k1_ecdh

The error has been submitted as an issue in the joinmarket-clientserver github at https://github.com/JoinMarket-Org/joinmarket-clientserver/issues/1099 where @AdamISZ has offered some advice on how to resolve it. Sadly it's beyond my ability to diagnose.

The device is Raspberry Pi4 and it is running the v0.2.47 release.

tehelsper commented 2 years ago

In the other issue, I see you said it was a custom install. Had you added this yourself in a different location? I'm wondering if it's related to the python upgrade I did to 3.8. Have you tried re-installing JoininBox? I'm trying to reproduce it now.

HamishMacEwan commented 2 years ago

Yes, for a long time I've installed it in /opt/mynode/joinmarket-clientserver (following the pattern of other apps, and I was very relieved when JoinInBox didn't collide with that, for reasons I'm sure).

I've been unwilling to attribute the issue to the upgrade to Python 3.8.9, because I don't have the skills to confirm that this is the case, even with the guidance Adam offered. There certainly was a lot of activity during the upgrade.

Since there was an upgrade to JoinInBox to include joinmarket-clientserver 0.9.4, I took the opportunity to see if JoinInBox was working in the myNode context, and if so, hopefully be able to work out what I'd need to do to my bespoke effort to remedy the undefined symbol.

Unfortunately JoinInBox's independent installation of joinmarket-clientserver 0.9.4 seems to suffer the same problem, which is sort of encouraging, since it suggests the environment might hold the solution.

I haven't reinstalled JoinInBox, my reinstalls of joinmarket-clientserver 0.9.4 have reliably produced the same result each time, and given the match in error, concluded that reinstallation would effect no improvement for JoinInBox.

Does Adam's suggestion give you any guidance on what the problem might be?

tehelsper commented 2 years ago

Unfortunately, that didn't give me many ideas. I tried on my 64-bit version and was able to run joinmarket scripts just fine as well as the obwatcher.

After the python upgrade, I was expecting the dependent packages were installed for Python 3.7, but was now using 3.8 (no dependencies). However, if you've upgraded / re-installed manually, then there must be another issue. I'll try on a 32 bit device tomorrow.

tehelsper commented 2 years ago

Actually, one of my devices was in this state already. 32-bit and had JoininBox installed prior to python upgrade. I'm getting the same error as you. Trying a re-install and will see if it helps. I'll also mark this app to auto-reinstall if Python gets upgraded again.

HamishMacEwan commented 2 years ago

Sounds like one avenue to progress would be the 64bit route. I've been meaning to.

The reinstall I did was of joinmarket-clientserver 0.9.4 in /opt/mynode/joinmarket-clientserver and it was definitely post the Python 3.8.9 upgrade.

(jmvenv) bitcoin@myNode:/opt/mynode/joinmarket-clientserver $ python --version
Python 3.8.9
tehelsper commented 2 years ago

This may help. I do have a libsecp256k1 library installed that doesn't have echd enabled. I can enable it, but my first test didn't seem to help.

https://github.com/ofek/coincurve/issues/71

HamishMacEwan commented 2 years ago

Upgraded to 64bit and now JoinInBox's install of joinmarket-clientserver is working fine.

How do you install an echd enabled libsecp256k1 library?

I'll follow up the link.

tehelsper commented 2 years ago

I just added a commit that shows how to do it, but it doesn't seem to help on 32 bit. This at least controls the versions better though in case I can find a way to force coincurve to start using it again.

https://github.com/mynodebtc/mynode/commit/318b9decdad42e313a3f81b2eae16b8987fbcea1

I added a comment to the other issue as well. Both the local version and the version that is getting installed by joinmarket both have ecdh marked. I'm not sure how it's getting missed.

kmanriqu commented 2 years ago

Actually, one of my devices was in this state already. 32-bit and had JoininBox installed prior to python upgrade. I'm getting the same error as you. Trying a re-install and will see if it helps. I'll also mark this app to auto-reinstall if Python gets upgraded again.

I am having the same issue since the upgrade. How do i fix it?

tehelsper commented 2 years ago

Upgrading to 64-bit appears to be the easiest option for now.

Otherwise, changing python3 to python 3.7 (rather than 3.8) for the joininbox install should also fix it, but that would be relatively involved.

kmanriqu commented 2 years ago

Thanks for the response Taylor. I started to use JM because a previous update messed up Samourai/Whirlpool/Dojo. I went through and did the manual Dojo update/fix but then could not get access to the wallets. I had to recover those funds to electrum and move to JM to CJ. I never received a response to requests in the telegram premium group. I actually like JM better. it is also cheaper.

Then, the recent MyNode update after numerous attempts to update with web then flashing SD, then web again, I get MyNode back up. . Now JM doesn't work. It has been frustrating. Each update something else goes wrong. I purchased the MyNode premium in hopes it would be more simple to operate, having zero experience in CL. I have been learning as much as possible over the last few months. Going to try raspiblitz to see if I have less issues. I am looking for some consistency. I never seem to get any assistance in the telegram group even. I feel disappointed I spent the extra cash to purchase full my node premium package to support the product/devs but continue to have problems man. It is a good product but I continue to have issues when updates come through.

On Sun, Dec 12, 2021 at 11:22 PM Taylor Helsper @.***> wrote:

Upgrading to 64-bit appears to be the easiest option for now.

Otherwise, changing python3 to python 3.7 (rather than 3.8) for the joininbox install should also fix it, but that would be relatively involved.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mynodebtc/mynode/issues/604#issuecomment-992098214, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALJCZOCRE4NHEEDV67IOT53UQVYHTANCNFSM5JNS7O7Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

tehelsper commented 2 years ago

Sorry to hear you've been having issues. The "official" premium support is via email and I'm not sure I've heard from you.

There have been some large upgrades recently that were probably higher risk, but were required to continue updating apps to recent versions. A consistent backup plan is to only upgrade between stable SD card images. The myNode design allows re-flashing the SD card without losing any data - the only downside is your password does get recent and any optional apps may need to be re-installed.

The 64-bit image is now the suggested option. Support for 32-bit is slowing from other projects and it would be a good idea to upgrade when possible.

tehelsper commented 2 years ago

PR opened with joininbox to control python version as workaround.

https://github.com/openoms/joininbox/pull/73

btcviking commented 2 years ago

I only wanted to say that I seem to face the same issues here since the most recent update. image

I really hope the next update gets joinmarket going again. Thanks for all the work and merry Christmas!

tehelsper commented 2 years ago

Next update should have a fix, but I'm also waiting on a new JoininBox release to include the fix. Switching to 64-bit (re-flash SD card) also can resolve the issue.

btcviking commented 2 years ago

Can I follow step 2 here to reflash? https://mynodebtc.github.io/troubleshooting/sd-card-readonly-error.html

I am running 0.2.49, and now I would love to upgrade to 64Bit for a multitude of reasons (didn't know I am not automatically doing that somehow), but on the website there is only the compiled image for 0.2.49. Where can I get the newest image to reflash? Thank you 🙏

tehelsper commented 2 years ago

Yes, that's right. Or the instructions on mynodebtc.com/download

You would re-flash with the latest image and re-upgrade to the latest version, if one is available. Going from 32-bit to 64-bit does require re-flashing since it's a full OS upgrade.

btcviking commented 2 years ago

Do I have to downgrade from 0.2.49 > 0.2.48 since that is the latest image available on the website mynodebtc.com/download ? I am just making sure I don't mess this up 🤷‍♂️ 🙏

tehelsper commented 2 years ago

Yes, that's right. Full SD card images are not made for each release.

btcviking commented 2 years ago

I updated the mynode to 0.02.50 (still 32-bit) and the issue remains the same. Will proceed soon to re-flash just do not yet have access to the node physically.

tehelsper commented 2 years ago

Yeah, the fix within JoininBox did not make it in so its still using Python 3.8 rather than 3.7. Once a myNode release has JoininBox 6.6+, the issue should be resolved.