Bitcoin Forum
December 09, 2016, 07:56:07 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: GAE Miner  (Read 6311 times)
j16sdiz
Jr. Member
*
Offline Offline

Activity: 37


View Profile
January 11, 2011, 11:31:04 AM
 #1

Hi all,

Here is the GoogleAppEngine/Java Miner as promised.

   Project URL: https://github.com/j16sdiz/gaeminer

Background Infomation
Google App Engine is Google's computing platform, it provide 6.5 free "cpu hour" (which is, only 3 real hours) per application. Each user can create up to 10 applications for. That is .... around 50G hashes per day per mobile phone number. I have checked the TOS twice, and do not think this violate the TOS. If you have any concern, please don't use it and ask.

Installation Steps
Due to how Google App Engine works, you need the SDK to install it. Here are the steps:

  • Install Oracle Java SDK
  • Download and install Eclipse. The gae recommand the web version, but the Java version just fine and is smaller.
  • Install Google App Engine Plugin
  • Edit src/net.sdiz.bitcoin.jdo/Config.java and give your account details
  • Apply your GAE account at http://appspot.com/  You need a mobile phone that recieve SMS to pass this step
  • Create 10 applications in your GAE account, pick the default options is fine
  • Go back to eclipse, press the upload button .
  • Click the "App Engine project setting..." link and enter your application-id. Click OK
  • Enter your Google Account Details and click Depoly
  • Repeat the last three steps for the 9 other application-ids

Alternative Installation Step
If you really hate eclipse, there is an ant build.xml provided. But you are on your own.


--
If you love this application, consider donating to: 1JQ4o2onaJnCpKYZnJzHUok9E1GZewon27
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481270167
Hero Member
*
Offline Offline

Posts: 1481270167

View Profile Personal Message (Offline)

Ignore
1481270167
Reply with quote  #2

1481270167
Report to moderator
davout
Legendary
*
Offline Offline

Activity: 1358


1davout


View Profile WWW
January 11, 2011, 11:38:24 AM
 #2

Thank you!

But that's like 83.3 seconds worth of mining on a HD5970

j16sdiz
Jr. Member
*
Offline Offline

Activity: 37


View Profile
January 11, 2011, 11:41:51 AM
 #3

Thank you!

But that's like 83.3 seconds worth of mining on a HD5970

I am just a poor CPU Miner Sad
Cdecker
Hero Member
*****
Offline Offline

Activity: 487



View Profile WWW
January 11, 2011, 01:16:49 PM
 #4

Still cool though Cheesy I love this kind of crazy things Cheesy

Want to see what developers are chatting about? http://bitcoinstats.com/irc/bitcoin-dev/logs/
Bitcoin-OTC Rating
slush
Legendary
*
Offline Offline

Activity: 1358



View Profile WWW
January 11, 2011, 01:47:37 PM
 #5

Hey, crunching whole nonce space is useless. With your hash/s, you are crunching old blocks for 10% of time.

Edit: Sorry, I see your config has final nonce only 0xffff. Still, I see in logs you are working on one job more than 50 seconds, so you waste ~10% of time for crunching old jobs.

gigitrix
Hero Member
*****
Offline Offline

Activity: 490


Bitcoins finest!!!


View Profile
January 11, 2011, 05:16:30 PM
 #6

I'm only a newbie, but wouldn't task queues be a better (and more parralel) implementation than cron jobs?
j16sdiz
Jr. Member
*
Offline Offline

Activity: 37


View Profile
January 12, 2011, 12:12:26 AM
 #7

Hey, crunching whole nonce space is useless. With your hash/s, you are crunching old blocks for 10% of time.

Edit: Sorry, I see your config has final nonce only 0xffff. Still, I see in logs you are working on one job more than 50 seconds, so you waste ~10% of time for crunching old jobs.

No, it should not work on the same hash for more then 6 seconds.
It would adjust the final nonce.  

See Line 87
https://github.com/j16sdiz/gaeminer/blob/master/src/net/sdiz/bitcoin/MiningServlet.java#L87

And Line 39
https://github.com/j16sdiz/gaeminer/blob/master/src/net/sdiz/bitcoin/jdo/Config.java#L39
j16sdiz
Jr. Member
*
Offline Offline

Activity: 37


View Profile
January 12, 2011, 12:20:24 AM
 #8

I'm only a newbie, but wouldn't task queues be a better (and more parralel) implementation than cron jobs?

I have considered using queue, but it have some disadvantages:

- Old (outdated) hashes -- If we put the hash into the queue, we may work on a old, outdated hash. There is no way to check the queue size in java (afaik), so we would be always working on outdated hashes.

- Too parallel -- Heavy load on Google's server.  We have only ~3 hours per day, parallelism don't have any advantages. It's better to distribute it over the whole day.
Anonymous
Guest

January 12, 2011, 12:41:04 AM
 #9

Is this the gae agenda nanaimo gold was talking about?

 Grin
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652


Chief Scientist


View Profile WWW
January 12, 2011, 01:22:14 AM
 #10

Should we start a betting pool to see how long it takes Google to decide bitcoin mining should be against its terms of service?

I think.... three months.

How often do you get the chance to work on a potentially world-changing project?
gigitrix
Hero Member
*****
Offline Offline

Activity: 490


Bitcoins finest!!!


View Profile
January 12, 2011, 01:56:55 AM
 #11

I'm only a newbie, but wouldn't task queues be a better (and more parralel) implementation than cron jobs?

I have considered using queue, but it have some disadvantages:

- Old (outdated) hashes -- If we put the hash into the queue, we may work on a old, outdated hash. There is no way to check the queue size in java (afaik), so we would be always working on outdated hashes.

- Too parallel -- Heavy load on Google's server.  We have only ~3 hours per day, parallelism don't have any advantages. It's better to distribute it over the whole day.

Thanks for explaining this. I have zero experience with GAE but I got this thing running. Hope google don't pull a switcheroo on the TOS any time soon, and my readthrough confirms that this is legal (if sketchy) according to their rules.
j16sdiz
Jr. Member
*
Offline Offline

Activity: 37


View Profile
January 12, 2011, 03:10:54 AM
 #12

Should we start a betting pool to see how long it takes Google to decide bitcoin mining should be against its terms of service?

I think.... three months.


I can see nothing in the TOS against this. Except, perhaps, in the "Program Policies":

Quote
In addition to (and/or as some examples of) the violations described in the Terms, you may not and may not allow any third party, including your end users, to:
   j. Interfere with other users' enjoyment of the Service;

But I have tried to minimize the effect of this. (for example, using cron job instead of queue, distributing the task over whole day, don't retry on server error, etc)
Local
Member
**
Offline Offline

Activity: 109



View Profile
January 12, 2011, 07:03:18 AM
 #13

Should we start a betting pool to see how long it takes Google to decide bitcoin mining should be against its terms of service?

I think.... three months.


I doubt it. Either it won't be a problem because it won't be profitable or it will be profitable and they'll do it themselves until it isn't and/or raise their rates.
Mike Hearn
Legendary
*
expert
Offline Offline

Activity: 1526


View Profile
January 12, 2011, 02:14:37 PM
 #14

I should note at this point that I work for Google in one of the anti-abuse departments and I'm watching this thread carefully Wink

I can't give you an authoritative answer on what violates the AppEngine ToS as that isn't my job. But consider the following passage from the terms:

Quote
4.4. You may not develop multiple Applications to simulate or act as a single Application or otherwise access the Service in a manner intended to avoid incurring fees.

We take a dim view of people who create attempt to work around the limits we put in place via multiple accounts or otherwise. The phone verification is specifically intended to make that hard. But you probably won't be able to earn interesting quantities of BitCoin unless you do attempt to repeatedly create the same app over and over again.

So I don't think BitCoin mining on App Engine has a future. Nice idea though and I'd love to see people write AppEngine apps for other BitCoin related purposes (Gavin has done a great job with some of his apps). For mining your best bet is ATI rather than Google, sorry.

/mike
j16sdiz
Jr. Member
*
Offline Offline

Activity: 37


View Profile
January 12, 2011, 03:24:36 PM
 #15

(...removed something I won't Comment on...)

But you probably won't be able to earn interesting quantities of BitCoin unless you do attempt to repeatedly create the same app over and over again.

So I don't think BitCoin mining on App Engine has a future. Nice idea though and I'd love to see people write AppEngine apps for other BitCoin related purposes (Gavin has done a great job with some of his apps). For mining your best bet is ATI rather than Google, sorry.

/mike

As davout have mentioned, all 10 application x 6.5 free "CPU" hour is just ~80 second on ATI.
Even when compared to CPU miner, each CPU gives only ~133khash/CPU-Second (around 450khash/wall-second). It is on the lower-end of the spectrum.

So, this application is more like a PoC than anything else.
Anonymous
Guest

January 12, 2011, 11:51:50 PM
 #16

I should note at this point that I work for Google in one of the anti-abuse departments and I'm watching this thread carefully Wink

I can't give you an authoritative answer on what violates the AppEngine ToS as that isn't my job. But consider the following passage from the terms:

Quote
4.4. You may not develop multiple Applications to simulate or act as a single Application or otherwise access the Service in a manner intended to avoid incurring fees.

We take a dim view of people who create attempt to work around the limits we put in place via multiple accounts or otherwise. The phone verification is specifically intended to make that hard. But you probably won't be able to earn interesting quantities of BitCoin unless you do attempt to repeatedly create the same app over and over again.

So I don't think BitCoin mining on App Engine has a future. Nice idea though and I'd love to see people write AppEngine apps for other BitCoin related purposes (Gavin has done a great job with some of his apps). For mining your best bet is ATI rather than Google, sorry.

/mike

Google should support open source projects then imho  Smiley



Cdecker
Hero Member
*****
Offline Offline

Activity: 487



View Profile WWW
January 13, 2011, 01:31:21 AM
 #17

I think it's a quiet innocent hack, and an interesting one if it comes to that. I'd have never thought using a cloud designed to deliver web content to do real calculations Cheesy
But I'd neve risk my Google account over it ^^

Want to see what developers are chatting about? http://bitcoinstats.com/irc/bitcoin-dev/logs/
Bitcoin-OTC Rating
LZ
Staff
Legendary
*
Offline Offline

Activity: 1456


Satoshi everywhere!


View Profile WWW
January 14, 2011, 03:09:55 PM
 #18

Just checked pool status. I got some shares today. So GAE Miner works.

"Never invest unless you can afford to lose your entire investment." © S3052
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!