mludvig/aws-ethereum-miner

Modified for Flux mining

Closed this issue · 11 comments

Hi, I modified the code for the default vpc to download the miniZ miner and then run it with its command line options. I am not sure why, but when I upload this modified template, the process seems to get stuck on the Lambda function fluxminer-test-AsgUpdaterLambda-sur4A5k5pDIb and I cannot find any logs to tell me what's stopping it from creating instances.
template-flux-default-vpc.template.yml.zip

Seems to be hanging on the Lambda instance filter creation process.?

2021-12-15_15-16-48

I am sure its something stupid that I missed... I've never worked with CF so I am not sure why the instance filter keeps failing.

The instance filter simply filters the list of instances by availability and then sorts by their cost/performance ratio. It shouldn't take too long. By now it will probably have timed out - what errors do you see?
You can check the InstanceFilterLambda logs in CloudWatch logs.

I found this in the Lambda logs:
[ERROR] Runtime.UserCodeSyntaxError: Syntax error in module 'index': invalid syntax (index.py, line 1)
Traceback (most recent call last):
  File "/var/task/index.py" Line 1
    %%{lambdas/instance-filter.min.py}%%


timestamp message
1639599711287 START RequestId: 47fde443-90f0-4882-979c-260f3ba1f1e1 Version: $LATEST
1639599711288 [ERROR] Runtime.UserCodeSyntaxError: Syntax error in module 'index': invalid syntax (index.py, line 1) Traceback (most recent call last):   File "/var/task/index.py" Line 1     %%{lambdas/instance-filter.min.py}%%
1639599711306 END RequestId: 47fde443-90f0-4882-979c-260f3ba1f1e1
1639599711306 REPORT RequestId: 47fde443-90f0-4882-979c-260f3ba1f1e1 Duration: 19.05 ms Billed Duration: 20 ms Memory Size: 128 MB Max Memory Used: 37 MB Init Duration: 117.74 ms
1639599771441 START RequestId: 47fde443-90f0-4882-979c-260f3ba1f1e1 Version: $LATEST
1639599771443 [ERROR] Runtime.UserCodeSyntaxError: Syntax error in module 'index': invalid syntax (index.py, line 1) Traceback (most recent call last):   File "/var/task/index.py" Line 1     %%{lambdas/instance-filter.min.py}%%
1639599771444 END RequestId: 47fde443-90f0-4882-979c-260f3ba1f1e1
1639599771444 REPORT RequestId: 47fde443-90f0-4882-979c-260f3ba1f1e1 Duration: 0.90 ms Billed Duration: 1 ms Memory Size: 128 MB Max Memory Used: 37 MB
1639599904615 START RequestId: 47fde443-90f0-4882-979c-260f3ba1f1e1 Version: $LATEST
1639599904617 [ERROR] Runtime.UserCodeSyntaxError: Syntax error in module 'index': invalid syntax (index.py, line 1) Traceback (most recent call last):   File "/var/task/index.py" Line 1     %%{lambdas/instance-filter.min.py}%%
1639599904618 END RequestId: 47fde443-90f0-4882-979c-260f3ba1f1e1
1639599904618 REPORT RequestId: 47fde443-90f0-4882-979c-260f3ba1f1e1 Duration: 1.26 ms Billed Duration: 2 ms Memory Size: 128 MB Max Memory Used: 37 MB

I have not had any problems running your version of the script, I just don't see how my version would change this part of the code at all.

Well I found a number of problems with my template. The first is that the commands actually don't work, AND more importantly, for the AMI you are using, miniZ miner does not detect any CUDA gpu's. I looked up the AMI from a working ethminer I have running using your script, and then launched another instance using that AMI (which I assume has the cuda drivers and gpu's installed as a G4.xlarge instance). However, it could be that miniZ does not support the V4 GPU? This might be over my head to troubleshoot.

Righto, you have based your mods on src/template-eth-default-vpc.yml which doesn't have the Lambdas included. You'll need to do your changes in the top directory's template-eth-default-vpc.yml instead. Or run "make" in the top directory but for that you'll need to install some extra tools - pyminifier, pylint, maybe some more. It's easier to port your changes to the compiled yml file in the top dir.

And regarding the incompatibility with miniZ - I don't know to be honest. It could be that it doesn't support the newer GPUs or CUDA 11. You can try to force the template to g4dn.xlarge - that's got an older GPU, that may be supported. But since ETH is more profitable still I'd just mine that if I were you.

Thanks! This was a great learning experience. I got to touch on many new things and see how they work. Flux is certainly not worth mining on AWS, and Eth is only worth doing if you have the extra compute to spare. I will try to incorporate the changes you mentioned and give it another shot. If successful I will upload the forked version so others can try different coins. Now, what would be super cool would be an encompassing CF template that ran a check on whattomine to see whats most profitable and run that, and dual mine a CPU coin like Raptoreum at the same time. :) (AND just as I was typing this, my template is working fine now.... THANKS!)

Glad that it works now :)

The trouble with whattomine is that it doesn’t list the performance of the cards used by AWS. So it’s hard to use for our needs.