Fun times recovering BEAM wallets

I don’t always ruin my crypto wallets, but when I do…

So I had a little bit of a screw up last night that almost cost me several hundred dollars in $BEAM. I was working on my automated exchanger program, and wanted to set up the BEAM wallet-api. It wasn’t included as a release like the CLI node and wallet programs, so I had to compile from source.

I cloned the git repo and tried to compile, but I had older versions of Boost and CMake that needed updating first. This wasn’t much of a problem, but after I got things compiled I actually wound up with executables ending with -masternet. I thought this was slightly unusual, but I threw them in with my node and wallet database files and ran them. I didn’t know it, but I had already made two mistakes.

The BEAM developers took the unusual step of using the Git master branch for their development branch. I had missed it in the build docs. So when I ran wallet-api the first time it actually upgraded my DB to this development version. Of course there was a mismatch with the node, which I caught, so I ran the updated node software as well. I still didn’t realize that I was running on testnet, and of course the node blockchain wasn’t valid. I was stuck.

I’m not sure how I finally made the connection, it might have been another read of the build docs, but I eventually realized that I needed to checkout the mainnet branch and build from there. Once I did that, I was still stuck, as the node and wallet DBs were already upgraded past the current version. So I had to download the entire blockchain before I could try to check my wallet. Oops.

That was done when I woke up this morning, but I still had several problems before I could fully recover my funds. The wallet DB was no good, and my first attempts recovering the wallet failed. “Invalid seed phrase,” it said, although I was one hundred percent sure I had saved the original phrase correctly. I eventually found a github issue that indicated the proper CLI input for the seed phrase, and was able to recover the wallet.

Unfortunately there were no funds in it. Due to the way privacy and anonymity is implemented in BEAM, the UTXOs belonging to the wallet can only be rescanned from a node running with the owner key active. This is usually used to collect mining rewards from multiple nodes running the same wallet, so I had to restart my node with this key, allow it to rescan the entire blockchain, and then run my wallet with the rescan option. Then I was finally able to see my funds in the wallet.

Obviously the main lesson here is that I should make backups of my DB files before updating anything relating to nodes or wallets. I should know better, honestly. Still, it serves as a bit of a reminder just how complicated cryptocurrency and blockchains are. We are still early.

Still, there’s a lot that can be improved by the Beam team to make things a bit more user friendly. Obviously GUI users take precedence for the teams, but a couple minor changes could go a long way. Keeping your development branch in master just seems… strange to me. And a bit of clarification in the CLI --help option would go a long way for the recovery process.

And when I’m ready to start back up work on the wallet-cli application this weekend, you can bet I’m going to do it with a testnet implementation.

Update 8-23-2020

After recovering my wallet and funds, I found that exchange payouts from my mining pool were not occuring. Turns out that the wallet address created by the wallet software are somewhat non-deterministic, and will not be restored on import. I was facing the prospect of having to contact the exchange and asking them to payout funds to another address, which I was sure would be a hassle.

Instead I decided to recompile the masternet branch of the wallet software, and managed to run the export data command (against a wallet backup!) to get all of my addresses and other data as JSON. I was able to import this into my live wallet, and verified that the address was restored.

After a few hours I checked, and verified that the pool had paid out.

Mining operation update

Mining BEAM cryptocurrency, and planning for profits

I started mining again recently, following a brief hiatus while I assessed my performance over the past two and a half years. I decided to take a look at BEAM, simply for the reason that it was listed at the top of the stats on WhatToMine and other calculators. So, I dove in and have been at it for a few weeks now.

One of the reasons that I stopped mining was that the rig management software that I had been using was discontinued. I’d given up Windows and Awesome Miner altogether some time ago and went with HashR8 OS, which was built on Linux. The software was cloud based, and free since I only have one rig, but it appears they were white labeling a product from RaveOS, with whom they decided to split. Rave was unfortunately able to support the influx of new users, as a lot of miners were unable to get support from them, myself included, so I decided to go with Simple Mining OS, (SMOS).

Previously, I’d held all my mining wallets on an old Windows 7 machine, but recently repurposed the hardware for Elder’s workstation upstairs. Having W7 is a security liability these days, and I don’t need the security risk. One thing I decided that I wanted to do differently is run nodes for the various cryptos I’m holding on my home server, so I set up a BEAM node on my Ubuntu 18 machine using Supervisor.

# /etc/supervisor/conf.d/beam.conf


BEAM is quite different from most cryptocurrencies that I’ve worked with in the past. Anonymity is a very important feature of it, and they way they’ve implemented it leads to a very different quirk. Usually, when transacting on a blockchain, the sender just broadcasts a transaction over the network. With BEAM though, the receiver actually has to be online in order to complete the transaction. It’s slightly weird, and causes some additional issues with wallet management. BEAM uses the term bulletin board to describe wallet addresses, and wallets have to be online in listen mode in order to receive a transaction. There are rules about running multiple wallets that have to do with the fact that transactions are only heard by one wallet node and are ethermeral, which can lead to divergences in the transaction databases. UXTOs and balances can be reclaimed if this wallet database is lost.

For a miner, this basically means that the wallet has to be online in order to receive mining payouts from a pool. In fact, after checking last night, I found that my wallet had not been running, and I had several weeks of mining proceeds on my pool. Thankfully, I restarted the wallet last night and it appears the payout was received. To rectify this, I am thinking about creating an additional supervisor service to keep the wallet running.

My entry into mining at the peak of the last bull run in December 2017 was obviously ill timed. While I have not sold any of my bags of RVN, XHV, ARW and others over the years, the value of my portfolio has remained at nearly a constant level, never actually surpassing the capital that we invested to get started. Granted, we bought our GPUs a the top of the market and practically FOMO’ed ourselves into getting some of them at outrageous prices, but I’ve still been dismayed at the performance. This was one of the reasons why I briefly considered shuttering operations last month. Indeed, when I calculate for the power consumption that I’ve used, roughly 800-1100W, (about $60/month) my costs up to this point are doubled.

All signs in the crypto markets point to the beginning of a new bull cycle, so I’m not going to stop quite yet. I have decided that I need a strategy to start taking profits instead of just holding onto coins forever, so I’m going to start taking some of the mining proceeds, and convert them to BTC. My plan is to convert enough to cover the month’s power consumption, and just tuck it in a wallet. This will of course only work for exchange-listed coins or ones with a healthy OTC market, but I’m far too busy to do the research necessary to keep up with spec mining at this point.

Last night I started working on a new Python program to manage this process for me. It involves getting the month’s payout from the mining pool API, calling the wallet command to send BEAM to my exchange, then uses the CCXT library to initiate a market sell order and send the proceeds to my hard wallet. I’ve got a lot of work to do to automate all this, but I think the time is close to take this mining operations from a speculative one to a profitable one.

Seeking joy

I’m writing this at the end of the workweek, perhaps the last thing I do before I decide that there is nothing more productive to be done today and crack open a cold one and plop my butt in front of the TV or a video game. Today’s has been slightly better than the rest of the week. Yesterday’s storms seem to have broken the five day three-digit heat wave, allowing the kids some outside time with their friends. I was not terribly productive at work, although I am managing to get some things done with my cryptocurrencies that are way overdue. I’ve mostly been knocking out little random things that weren’t necessarily on my lists, distracting myself from working on any big projects for the past day or two.

I’ve been limiting the girls television in the morning to PBS kids, instead of letting them watch whatever they want. Elder gave me trouble about it earlier in the week, but they’ve been misbehaving and being disrespectful quite a bit the past few weeks, and something needed to change. I am seeing some improvement in how they’re responding, and I’m trying to adjust my behavior as well so that I’m not being unfair. I’m having to take more of a hands on approach with Elder’s math and music lessons. Leaving her to herself is causing her to miss some of the more subtle points about what she’s learning. In both cases she’s trying to rush through everything without taking the time to read the question. And in cases where she’s getting the right answer, she’s missing the method that they’re demonstrating which makes it easier to do the calculation in your head. Similarly with music, she’s mostly focusing on the fingering numbers instead of the actual notes. With Playground Sessions, with the instant feedback of the score, she’s paying more attention to the visual feedback than she is to the actual notes she’s playing. She’s not listening.

And trying to tutor her myself seems to trigger some sort of defiance in her, where she either fights me and shuts down, or acts passive aggressive and refuses to answer correctly. Or again, perhaps she’s not listening to what I’m asking. Today I took my time with her and tried to be patient, and we were able to work through everything correctly, even with her difficulties.

My BEAM mining seems to be going well. I’m currently gaining about six dollars a day in crypto. I haven’t calculated my power consumption, but I was able to reduce my power consumption quite a bit and increase my hashrate by ten percent, so I’m doing better than the calculations. I’m probably netting more than three dollars a day right now. I’m going to wait another week to decide if I’m going to unload it. I’d have to make sure my Binance account is still good and figure out a way to automatically move the coins based on my pool earnings for the week. After two and a half years, I still haven’t traded any of my coins.

Yesterday I decided to use some of my Microsoft Partner Network benefits, namely my Visual Studio credits, to spin up an Ubuntu instance in Azure and see if I could sync up multiple blockchain nodes on one host. I was able to get BEAM and ARW up and running, but I shut it down earlier today until I can figure out exactly how I want to structure things. I fixed a firewall issue with my AWS node that I’m using for IDEX, so I think I want to run the nodes on it and keep wallets accessible from here at the house. I haven’t accessed so many of my bags in some time, so one of the first tasks is going to be getting my XDNA node up and running. I’ve got enough for a small masternode, about sixteen hundred dollars worth of fiat, so I may as well get that back online and start earning. The IDEX node isn’t using any CPU since the Ethereum node has been offfloaded to

Other than that, I just paid some house bills and checked my accounts. I linked one of my credit card rewards points to Amazon and found that I have over five hundred dollars worth, so I’m trying to resist the urge to blow that all at once.

And at work today I did have a call with the embedded systems firm. I was amazed at how they operate. No version control, no test driven development. I was shocked really. I’m going to start by going over their developer setup environment and converting the build process to something that can be automated as part of a new build chain. It relies on some custom Eclipse version from their hardware supplier, which integrates different Texas Instrument libraries. So hopefully I’ll be able to help them build out a brand new CI/CD pipeline for the project that they’re starting in the fall. I don’t know where it will take me, but it feels good to be able to put my computer science degree to good use in a professional environment. We shall see where it goes.

So I’m going to go crack that beer, dig into some hot wings in about an hour and try to watch a movie with the girls. This week marks the anniversary of the moon landing, so hopefully we can watch a show about it. I can’t stay up too late tonight watching Dark or playing video games, cause there’s a lot of projects that need to get done tomorrow morning, and I don’t want to waste too much of the morning sleeping in.

Here’s to a good weekend.

Morning pages

Lambo1, my six-GPU cryptocurrency mining rig, is operational again, fans running incessantly across the room. After a false start with RaveOS, I was able to get it up and running with SimpleMiner yesterday, finally getting it up and running mining BEAM, which is a new one for me. Getting it up and running was a bit of a challenge, both the node and the wallet. Apparently the wallet has to be online to receive a transaction, which is an issue with mining pool payouts. I’m not happy with my setup, running the node on my downstairs server with it’s old five hundred gigabyte SATA drives. I’m tempted to stand up a new cloud server to run all these blockchains, and I very may well do that since I have some Visual Studio Azure credits that I can put to use.

Bitcoin finally broke out a bit this week, ostensibly because off stimulus packages in Asia and the US. It’s a modest breakout, but we’ll have to wait and see if we threaten $10K again anytime soon. Patience.

Last night I combed through seven years of brokerage statements, making a spreadsheet of transactions that didn’t carry over from the Scottrade/TDAmeritrade merger. I want to add the activity to my total realized gains, so I can gauge my performance. My post-merger activity has outperformed the SPY by a significant margin since 2018, but carries a lot of purchases from before the merger, and I want to incorporate the gains and losses that I took before then. I haven’t finished calculating the numbers, however just looking through the transactions brought back a lot of memories, some good, some bad. There were a couple sales of some strong positions that I used to finance some other purchases that haven’t worked out well, so I might need to add some opportunity cost calculations to my spreadsheet. Also missing, dividends. There were just too many to go through, but I will likely need to incorporate it somehow. I’m wondering if there’s a proper application that I can use to incorporate all this historical data, or if I should write some custom software. After I figure all this out I want to dig up another, closed brokerage account going back to 2003. I’m sure I’ll be embarrassed by what I find there.

I finally registered my business as an LLC yesterday. I can’t even say how long that one has been on my list, but now I’ve got to prepare some documents before I kick off any of these new projects that I have to do. Only one of them is actually for hire, but I need to spend the time developing the documents for the next one, before I get sucked into another off-scope

Now that the last WordPress project is off my list, I’m enjoying being able to spend some time pulling whatever I want from my Kanban board. After having that project on there, staring at me for several weeks, it’s exhilarating to be able to work on something that’s not urgent. Seeing my rig sit there for weeks was starting to bother me, so I’m glad it’s back to work. There’s still a lot of work to be done. Being able to pull tasks from my backlog instead of having them pushed on me is a different type of feeling, and I like it.