Hey everyone,
Today's post is a bit of a story, and it comes with another big shoutout to @herman-german! He recently reached out for some help getting the auto-market
tool (the one for auto-selling/buying HIVE/HBD and Hive-Engine tokens) set up and running on Windows.
Now, I'll be the first to admit, I haven't regularly used Windows for going on three decades, so I knew this might be an adventure. I did what I could to assist remotely.
The Usual Suspect: scrypt
and OpenSSL
It turned out the main hurdle was a familiar one for many Python developers trying to install certain cryptographic libraries on Windows: the scrypt
package was failing to build. This is almost always due to missing OpenSSL development libraries – on Linux, it's usually a quick apt install libssl-dev
or similar. On Windows, it's often a bit more involved to get the right headers and libraries in place for C extensions to compile.
I pointed him to some common places one might get OpenSSL for Windows. We tried a few things, and... no dice. More errors.
The Solution? Blast from the Past!
Long story short, after a good bit of troubleshooting, the only way we could get the scrypt
dependency to build successfully on his Windows setup was by installing an antique version of OpenSSL. I'm talking so old, we had to dig up an installer via the Internet Archive because it wasn't readily available on current OpenSSL distribution sites!
But, persistence paid off! We eventually got auto-market
up and running for him. And as a small bonus, while working through this, I also managed to squash a couple of bugs related to the 'buy' functionality in the hive-market
script that weren't working quite right. So, win-win!
Back to the Main Point: Dependency Auditing
This whole experience brought a key thought back to the forefront. When I first started forking beem
to create hive-nectar
, one of my long-term goals was to audit its dependencies. The idea was to identify older, potentially problematic, or less maintained libraries and see if they could be swapped out for more modern, cross-platform friendly, and actively maintained alternatives.
The scrypt
library, given the hoops we had to jump through on Windows due to its OpenSSL compilation requirements, seems like a prime candidate for this review. If there's a more modern Python-native or easier-to-install cryptographic library that can provide the necessary KDF (Key Derivation Function) functionality without these heavy external C dependencies, it would likely make hive-nectar
(and by extension, tools that use it like auto-market
) much more accessible and easier to install for users across all operating systems, especially Windows.
It's a reminder that while a library might work perfectly fine in your own development environment (Linux, in my case), ensuring a smooth experience for users on different systems often means taking a hard look at the entire dependency chain.
Food for thought for future hive-nectar
development!
As always,
Michael Garcia a.k.a. TheCrazyGM