Bitcoin Forum
December 05, 2016, 08:34:05 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: « 1 2 3 [4] 5 6 »  All
  Print  
Author Topic: [LTC] Online Litecoin Miner  (Read 44499 times)
btc_artist
Full Member
***
Offline Offline

Activity: 154


Bitcoin!


View Profile WWW
November 30, 2011, 08:26:44 AM
 #61

It would also be very nice if you could detect a laptop/device running on battery power and not mine in that case.  http://www.google.com/search?q=get%20battery%20level%20java  You also wouldn't want to mine if someone visits on a smartphone or some other low-powered device, but I guess the 2-core threshold will take care of that.

BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf
LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
1480926845
Hero Member
*
Offline Offline

Posts: 1480926845

View Profile Personal Message (Offline)

Ignore
1480926845
Reply with quote  #2

1480926845
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480926845
Hero Member
*
Offline Offline

Posts: 1480926845

View Profile Personal Message (Offline)

Ignore
1480926845
Reply with quote  #2

1480926845
Report to moderator
1480926845
Hero Member
*
Offline Offline

Posts: 1480926845

View Profile Personal Message (Offline)

Ignore
1480926845
Reply with quote  #2

1480926845
Report to moderator
btc_artist
Full Member
***
Offline Offline

Activity: 154


Bitcoin!


View Profile WWW
November 30, 2011, 08:27:26 AM
 #62

Another question-- is this, or will it be, open-sourced?

BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf
LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
pooler
Hero Member
*****
Offline Offline

Activity: 644


View Profile
November 30, 2011, 09:57:25 AM
 #63

Another question-- is this, or will it be, open-sourced?

Didn't read the thread, eh? Smiley Yes, the source will be released soon.

It would also be very nice if you could detect a laptop/device running on battery power and not mine in that case.  http://www.google.com/search?q=get%20battery%20level%20java

That would be nice, but sadly a standard way of getting battery level information in Java doesn't seem to exist. You may be able to get it on some phones, but I don't think an unsigned applet can get that kind of information when running on a laptop.

Quote
You also wouldn't want to mine if someone visits on a smartphone or some other low-powered device, but I guess the 2-core threshold will take care of that.

Not completely: dual-core mobile phones already exist. I will investigate, thank you for the suggestion!

BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
kano
Legendary
*
Online Online

Activity: 1918


Linux since 1997 RedHat 4


View Profile
November 30, 2011, 10:20:21 AM
 #64

Another question-- is this, or will it be, open-sourced?

Didn't read the thread, eh? Smiley Yes, the source will be released soon.

It would also be very nice if you could detect a laptop/device running on battery power and not mine in that case.  http://www.google.com/search?q=get%20battery%20level%20java

That would be nice, but sadly a standard way of getting battery level information in Java doesn't seem to exist. You may be able to get it on some phones, but I don't think an unsigned applet can get that kind of information when running on a laptop.

Quote
You also wouldn't want to mine if someone visits on a smartphone or some other low-powered device, but I guess the 2-core threshold will take care of that.

Not completely: dual-core mobile phones already exist. I will investigate, thank you for the suggestion!
Um - hang on a tick ... that should never be an issue.
You do ask them before taking their CPU cycles right?
You just simply say that "if they are on a mobile phone that they shouldn't" do it.

Edit: and the same issue regarding a laptop on a battery ... if you ask and explain the consequences there should be no issue .... unless you hid the consequences ... but you wouldn't do that coz that would be scamming them Smiley

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
pooler
Hero Member
*****
Offline Offline

Activity: 644


View Profile
November 30, 2011, 10:41:42 AM
 #65

Um - hang on a tick ... that should never be an issue.
You do ask them before taking their CPU cycles right?
You just simply say that "if they are on a mobile phone that they shouldn't" do it.

Edit: and the same issue regarding a laptop on a battery ... if you ask and explain the consequences there should be no issue .... unless you hid the consequences ... but you wouldn't do that coz that would be scamming them Smiley

Unfortunately it's not that simple. I think opt-out is more practical than opt-in for most sites, otherwise I'm pretty sure that many visitors who don't mind simply wouldn't bother turning the miner on.
Even if you start the applet on an opt-in basis, you certainly don't want the user to manually start the miner every time he goes from one page to another. You would probably use a cookie to remember the user's decision. So it would still be nice if the miner could automatically detect when a laptop is running on battery power and when it is not, as this could change at any time.

BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
pooler
Hero Member
*****
Offline Offline

Activity: 644


View Profile
November 30, 2011, 01:14:31 PM
 #66

I have done some research, and it looks like at present no mobile phone can run ordinary Java SE applets.
That would mean one less problem to deal with.
Can anyone confirm or refute this?

Of course the problem of laptops running on battery power still remains. I think the only satisfactory solution implies using cookies to remember users that have opted-out. My Javascript is a bit rusty, but if I remember correctly it shouldn't be too difficult to set these cookies client-side.

BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
kano
Legendary
*
Online Online

Activity: 1918


Linux since 1997 RedHat 4


View Profile
November 30, 2011, 01:50:57 PM
 #67

I have done some research, and it looks like at present no mobile phone can run ordinary Java SE applets.
That would mean one less problem to deal with.
Can anyone confirm or refute this?

Of course the problem of laptops running on battery power still remains. I think the only satisfactory solution implies using cookies to remember users that have opted-out. My Javascript is a bit rusty, but if I remember correctly it shouldn't be too difficult to set these cookies client-side.
I am obviously talking about the first choice to start mining, not the page switch.
When you first ask you also point out what they are doing (not hide it like a scammer)
Your reply seems to directly imply that you don't ask - (since you didn't already have a cookie to remember their choice) - thus it sounds like you ARE stealing CPU cycles ...

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
terrytibbs
Hero Member
*****
Offline Offline

Activity: 560



View Profile
November 30, 2011, 02:42:44 PM
 #68

I have done some research, and it looks like at present no mobile phone can run ordinary Java SE applets.
That would mean one less problem to deal with.
Can anyone confirm or refute this?

Of course the problem of laptops running on battery power still remains. I think the only satisfactory solution implies using cookies to remember users that have opted-out. My Javascript is a bit rusty, but if I remember correctly it shouldn't be too difficult to set these cookies client-side.
I am obviously talking about the first choice to start mining, not the page switch.
When you first ask you also point out what they are doing (not hide it like a scammer)
Your reply seems to directly imply that you don't ask - (since you didn't already have a cookie to remember their choice) - thus it sounds like you ARE stealing CPU cycles ...
Oh cut it out with the stealing already. Am I stealing your screen space if you visit my website?
btc_artist
Full Member
***
Offline Offline

Activity: 154


Bitcoin!


View Profile WWW
November 30, 2011, 02:46:51 PM
 #69

I have done some research, and it looks like at present no mobile phone can run ordinary Java SE applets.
That would mean one less problem to deal with.
Can anyone confirm or refute this?

Of course the problem of laptops running on battery power still remains. I think the only satisfactory solution implies using cookies to remember users that have opted-out. My Javascript is a bit rusty, but if I remember correctly it shouldn't be too difficult to set these cookies client-side.
I am obviously talking about the first choice to start mining, not the page switch.
When you first ask you also point out what they are doing (not hide it like a scammer)
Your reply seems to directly imply that you don't ask - (since you didn't already have a cookie to remember their choice) - thus it sounds like you ARE stealing CPU cycles ...
It should detect things like battery state and number of cpus, to offer reasonable defaults, or not even offer the option of running the miner.  It's not even about whether you as the user or not.

BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf
LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
btc_artist
Full Member
***
Offline Offline

Activity: 154


Bitcoin!


View Profile WWW
November 30, 2011, 02:57:52 PM
 #70

Another question-- is this, or will it be, open-sourced?

Didn't read the thread, eh? Smiley Yes, the source will be released soon.
I skimmed it, but I must have missed that.  Thanks.

It would also be very nice if you could detect a laptop/device running on battery power and not mine in that case.  http://www.google.com/search?q=get%20battery%20level%20java

That would be nice, but sadly a standard way of getting battery level information in Java doesn't seem to exist. You may be able to get it on some phones, but I don't think an unsigned applet can get that kind of information when running on a laptop.
I'm not a Java expert, but it would appear to be possible by interfacing with native OS APIs.  For example, on Windows, use JNI or JNA to call native Windows API functions to monitor battery status. Native calls could also be investigated for Linux and OSX.

Calling OS API functions from Java:
JNA http://stackoverflow.com/questions/2389156/calling-win32-api-method-from-java
JNI http://www.atwistedweb.com/java/jni.html

Windows Battery API functions:
http://stackoverflow.com/questions/3154554/how-do-i-get-battery-information-in-windows
http://stackoverflow.com/questions/233446/monitor-battery-charge-with-win32-api

I'm not saying it's easy or even possible at this point, but I think it warrants a bit more investigation.

Quote
You also wouldn't want to mine if someone visits on a smartphone or some other low-powered device, but I guess the 2-core threshold will take care of that.
Not completely: dual-core mobile phones already exist. I will investigate, thank you for the suggestion!
You're welcome.

BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf
LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
rTech
Sr. Member
****
Offline Offline

Activity: 305


Trust but confirm!


View Profile
November 30, 2011, 02:59:51 PM
 #71

Well "to not steal" my clans website has warning before you can acces forum. It says that user solely accepts that we can use their cpu for mining if they step in our forum. None forces them to join my forum and its their freedom to decide if they want. Luckily finnish law is great and its fair enought to infrom users before they access. So practically its not stealing... There are no free meals, everything cost something for someone.
btc_artist
Full Member
***
Offline Offline

Activity: 154


Bitcoin!


View Profile WWW
November 30, 2011, 03:01:02 PM
 #72

Another suggestion/question.

If this miner is running on a site and I open the site in 5 tabs or in tabs in 2 different browsers, how is this handled?  Will only one instance of the miner run?  Even if people opt in, I think by default it should still limit the rate on their box so as to not hurt performance.

BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf
LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
pooler
Hero Member
*****
Offline Offline

Activity: 644


View Profile
November 30, 2011, 04:02:47 PM
 #73

I'm not a Java expert, but it would appear to be possible by interfacing with native OS APIs.  For example, on Windows, use JNI or JNA to call native Windows API functions to monitor battery status. Native calls could also be investigated for Linux and OSX.

Calling OS API functions from Java:
JNA http://stackoverflow.com/questions/2389156/calling-win32-api-method-from-java
JNI http://www.atwistedweb.com/java/jni.html

Windows Battery API functions:
http://stackoverflow.com/questions/3154554/how-do-i-get-battery-information-in-windows
http://stackoverflow.com/questions/233446/monitor-battery-charge-with-win32-api

I'm not saying it's easy or even possible at this point, but I think it warrants a bit more investigation.

The problem is that, unless I'm mistaken, it is not possible to make native calls from an unsigned applet.

Another suggestion/question.

If this miner is running on a site and I open the site in 5 tabs or in tabs in 2 different browsers, how is this handled?  Will only one instance of the miner run?  Even if people opt in, I think by default it should still limit the rate on their box so as to not hurt performance.

That's another thing that is worth investigating. Of course at present every webpage loads its own miner, and that can be a problem if you have more than one page open. But... is it possible for an applet to detect the presence of other applets running?

BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
btc_artist
Full Member
***
Offline Offline

Activity: 154


Bitcoin!


View Profile WWW
November 30, 2011, 04:42:44 PM
 #74

That's another thing that is worth investigating. Of course at present every webpage loads its own miner, and that can be a problem if you have more than one page open. But... is it possible for an applet to detect the presence of other applets running?
Could it be done based on CPU usage?  If CPU usage is above a certain level, don't start the miner.

BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf
LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
pooler
Hero Member
*****
Offline Offline

Activity: 644


View Profile
December 02, 2011, 12:36:17 AM
 #75

If this miner is running on a site and I open the site in 5 tabs or in tabs in 2 different browsers, how is this handled?  Will only one instance of the miner run?  Even if people opt in, I think by default it should still limit the rate on their box so as to not hurt performance.

That's another thing that is worth investigating. Of course at present every webpage loads its own miner, and that can be a problem if you have more than one page open. But... is it possible for an applet to detect the presence of other applets running?

Well, it turns out it is possible after all. Smiley
I have updated the jar file; now if you open a second tab the second applet should refuse to start mining.
I have not had the time to test it extensively; as always, if you encounter any issue please let me know.

BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
BitcoinPorn
Hero Member
*****
Offline Offline

Activity: 560


Posts: 69


View Profile WWW
December 02, 2011, 12:43:41 AM
 #76

I am still taken back that someone finally up and made this work again, I swear there was a time I had a stack of suggestions and things, but as I am not a coder I never knew how hard or easy it is to do.  I am thinking on a web site to design around this.  Things are working pretty smooth so far, the ability to tweak as many settings as you have made tweakable is already making this better than previous online miners imo.   

kano
Legendary
*
Online Online

Activity: 1918


Linux since 1997 RedHat 4


View Profile
December 02, 2011, 02:37:51 AM
 #77

Well "to not steal" my clans website has warning before you can acces forum. It says that user solely accepts that we can use their cpu for mining if they step in our forum. None forces them to join my forum and its their freedom to decide if they want. Luckily finnish law is great and its fair enought to infrom users before they access. So practically its not stealing... There are no free meals, everything cost something for someone.
Well then yes that's not scammer material ...
The problem will be though that when other people use your version it should ask them once somewhere before it can mine.

Pool: https://kano.is BTC: 1KanoiBupPiZfkwqB7rfLXAzPnoTshAVmb
CKPool and CGMiner developer, IRC FreeNode #ckpool and #cgminer kanoi
Help keep Bitcoin secure by mining on pools with Stratum, the best protocol to mine Bitcoins with ASIC hardware
BitcoinPorn
Hero Member
*****
Offline Offline

Activity: 560


Posts: 69


View Profile WWW
December 02, 2011, 02:51:54 AM
 #78

The real scam here is advertisers that allow sound pop ups or even embedded flash ads, that have sound enabled by default, and don't give me a pop up warning, an email, an instant message, and a fax, before the sound is blasting through my speakers.  

Kano, your view of what a scam is skewed or you have some kind of personally history with technologies that have the ability to be good and bad, what is going on here man, where does this hard on for web mining come from?  You seem to be pestering the people who want to use it legitimately.  Is the fear someone uses a botnet and opens a thousand browser windows to mine or something?  That is the only worst case scenario I can think of, but honestly there may be more I am not, I am curious where your hate comes from.

Edit: In fairness, is it my view that is skewed where I believe that even knowing that it will be abused by somebody, there can be good to come from this?

pooler
Hero Member
*****
Offline Offline

Activity: 644


View Profile
December 03, 2011, 06:44:28 PM
 #79

For all those who wanted to play with the Javascript API but didn't know where to start:
I have written a simple widget that allows visitors to start/stop the miner, and uses a cookie to make the decision persistent.

http://jsfiddle.net/pooler/XB5Fg/

This is an opt-out version, i.e., the miner is auto-started by default. An opt-in version can easily be obtained by changing the condition in the "if" at the end of the code.

BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
mc_lovin
Legendary
*
Offline Offline

Activity: 1134


www.bitcointrading.com


View Profile WWW
December 22, 2011, 06:13:04 AM
 #80

Hm..  Not sure what's happening, but I think i'm falling in love with Litecoin all of a sudden.

Pages: « 1 2 3 [4] 5 6 »  All
  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!