100% hands-off turnkey AWS solo mining and fullnodes

the backup/dump commands are the same as for bitcoin, and are (somewhere!) in the zcash docs (or “zcash-cli help” output :slight_smile: )

I haven’t won any ZEC block rewards yet myself, so I haven’t had call to fool with it (and the testnet was down yesterday because of a stale genesis block on it!)

1 Like

No. just sent. Check email again.

ok, will do right now, I hadn’t sent to the other one yet

Wow someone else is jumping in on our convo. Unbelievable. My email addy has 68 in it.

ok…heh, I guess that dropping a smooth as butter AMI like this was my “proof of skillz”, at least so far as systems integration goes! :slight_smile:

Hi Radix, Thanks for putting this all together, i just have a few questions if you have the time to answer :slight_smile:

  1. can AMI be used with a mining pool? i tried installing nheqminer but it asked for the zcash user pw. if there is another/easier way to pool mine it would be great if you could let us know how

  2. how can i see my miner mining, i used “zcashd -getmininginfo -getmetrics=1 -gen=1” but all it says is server starting up then nothing. if i enter the command again then it tells me that i am already running it. side note: my AWS console is clearly telling me that i am using 100% cpu so im sure that its running i would just like to see it as well

Thanks for your time!

Its stock Ubuntu 16.04 with Zcash Sprout compiled on Ubuntu with a Xeon processor so it runs better on AWS, so you can do whatever you want with it after you deploy your image.

  1. It should NOT be asking for a password to switch to the zcash user if you are logged in as username Ubuntu…you are the second user who has reported this, but I need to see a cut/paste or screenshot of EXACTLY what you are doing, as I can’t reproduce, and other users can switch to the zcash user just fine.

I don’t know what pool mining software will end up being the best for AWS, once a stable open source NVIDIA miner is out by someone and the dust settles in the next week or so, I’ll be looking to put together an AMI that uses that.

  1. you don’t want to launch zcashd if it is already running! you have to run:
    zcash-cli stop
    first as the zcash user, and then re-launch it in the foreground.

wow, thanks for the quick reply,

so it’s not asking for a password to get into zcash but rather to install something while on the user. i think this screen shot might help you understand.

in this screenshot i am just trying to switch back to ubuntu user but the response is the same as when i did “sudo apt-get install qt5-default” to install nheqminer

but what i think your saying is to “zcash-cli stop” in the zcash user, start it up in the ubuntu user and then install whatever miner i want in the ubuntu user. does that sum it up?

1 Like

this is my result from running “zcashd -getmininginfo -getmetrics=1 -gen=1” on ubuntu

no joy :frowning:

ah, when you have already run “sudo su - zcash” and are the zcash user, you just need to type “exit” to switch back to the ubuntu user! The ubuntu user can run “sudo …” ANYTHING, including setting the password for the zcash user, the ubuntu user (neither of which are set by default for security purposes, as its a public linux distro! :slight_smile: )

And yes, you are correct, after you login as the ubuntu user, switch to zcash with “sudo su - zcash” (which gives you a login shell as the zcash user, so the homedir and everything is setup right), as the zcash user do a “zcash-cli stop” to stop zcashd, and THEN type “exit” to flip back to username ubuntu and you can run “sudo apt-get install qt5-default”

WHEW! :slight_smile:
If you want to keep zcashd from starting up on boot, edit /etc/rc.local (as described in the README), and if you want to keep running zcashd as a fullnode for a wallet but not do CPU mining with it, follow the instructions in ~zcash/.zcash/README as the zcash user.

Are you running my current Sprout AMI, or the old (now removed for launching new instances) rc4 one? also, when you are running in the foreground like that, did you stop zcashd first as the zcash user (and you need to be username zcash when you run that, too, or it won’t find the zcash user’s zcash.conf file in ~zcash/.zcash/)?

That’s about consistent with what I’m getting.

With nheqminer I’m getting approx 1 sol/sec per CPU on r, c3, and c4 instance types.

EDIT: I had said ‘tomp solver’ earlier, but I haven’t actually benchmarked the tromp solver yet – mostly because I haven’t figured out how to pool mine with the tromp solver.

not sure if my other reply was 100% clear, to run zcashd in the foreground like that, when you first login as the ubuntu user, switch to the zcash user with “sudo su - zcash”, then run “zcash-cli stop” and THEN as the zcash user run the command to mine in the foreground.

Next release I think I’ll just have everything running as username ubuntu, so no flipping usernames, and have a script to switch between background and foreground mining, and mining and just running a fullnode/wallet.

Automate all the things!

With tromp’s solver with zcashd I get these results after running for an hour in the foreground:

3.2xlarge:- You have contributed 6.5720 Sol/s on average to the network solution rate.
c3.4xlarge:- You have contributed 12.7153 Sol/s on average to the network solution rate.
c4.xlarge:- You have contributed 4.3195 Sol/s on average to the network solution rate.

Sorry, I mean ‘nheqminer’. I haven’t benchmarked with tromp (because I haven’t figured out how to pool mine with tromp yet).

i am using ami-56fc5a36
which to my knowledge is your latest one

so the steps i have taken:


ssh connect
sudo su - zcash
zcash-cli stop
exit
zcashd -getmininginfo -showmetrics=1 -gen=1

the result is

Ill be trying to get the nheqminer up and running tomorrow and let you all know how that goes!

Starting it up in the foreground even once when it was running
automatically on boot could mess up your blockchain and need a re-index or
worse. With it shut off (“zcash-cli stop” as zcash), run the following
commands as the zcash user (this will delete your blockchain copy but leave
your wallet file, wallet.dat, intact):

cd ~/.zcash
rm -rf blocks  chainstate  database fee_estimates.dat  peers.dat

and then you should be able to startup zcashd in the foreground

Is 6 Sol/s a lot? I have red, that GPU miner have 60 Sol/s?

yes, that’s all correct, and with the drop in price of zec back down to
earth, its why the folks who were mining on a ton of AWS instances have
stopped doing so: pool mining on AWS is no longer profitable, and solo
mining is even more of a gamble.

Once there is a GPU miner that runs on AWS (tons of people are waiting for
someone to release an open source NVIDIA miner right now), it’ll probably
become worth it again. When that happens, I’ll cook up an AMI for the AWS
GPU instances, but until then I’d not recommend mining on AWS.

I’m going to re-configure the AMI’s I have shared on AWS to default to
being fullnodes (zcashd but not mining) for use as a wallet only. More than
one person is running it that way right now, and it runs even on the free
tier instances, although they may not have enough RAM to complete a private
transaction (from or to a zaddr). That remains to be tested, as ZEC is in
such short supply.

In short, I would NOT keep mining on AWS unless you are doing it purely as
a novelty. Any instances you have deployed right now with my AMI’s will
keep working after I take down the current ones, but you won’t be able to
make new instances with them unless you clone one of your own
already-existing instances.

So, we should wait till the GPU miner are availible on AWS? :slight_smile: 3-6 Sols /s is not really much :slight_smile: