Javascript Bitcoin Miner
forum.bitcoin.org
forum.bitcoin.org
Additionally, does this automatically hook in to slush's pool or something? Bitcoin mining is practically useless on CPU; even the fastest CPUs out get way, way less than 10mhash. The average length of time to find a block at 9999khash and current difficulty is 1200+ days, so even that estimate is over-optimistic, so this isn't worth anything if your users don't sit on your site for 5 years+, unless it's hooked into a pool or some other contraption to pay on shares instead of blocks.
Chrome13-canary: ~15.2k/s
FF4: ~6.4k/s
Safari5: ~6.2k/s
IE9: ~1.6k/s
So yeah, massively massively slower than regular GPU mining. Anyone know of a way to push WebGL into doing hashing functions, and reading the results out?And you come to a total of 21,600,000 unique visitors per day that you would need to your website in order to hash the equivalent of a $100 GPU.
Or make about $8 per day according to the bitcoin calculator right now from 21 million unique visitors.... totally not worth it.
So, yeah. Significantly crapping on the user experience of 21M people by reducing their battery life, adding heat, adding fan noise, slowing down other actions - all to substitute for one gpu?
It seems like there must be better ways to ruin your high traffic websites reputation if that's what you're looking to do.
This doesn't seem particularly viable, but it is a nice effort.
I am afraid the bitcoin mining is practically over, and the much more interesting question is - should I really invest my real money to buy some bitcoins? (current rate is about 7 USD). I am curious to learn what other HN-ers think of all this stuff.
Spoiler: bitcoin is a scam
I'd love to find an in-depth debate on Bitcoin from an economic standpoint, but this is not it. It's just more of the same half-understood FUD. And it is a horrible idea when half-understood - IMO, it remains to be seen if it's a horrible idea when fully-understood.
Are there any official currencies that this doesn't apply to?
Whether a gold (or Bitcoin) standard is good for the world economy as a whole is irrelevant, since the governments hold the power to implement it (or ban Bitcoin) and will act in their self-interest.
bitcoin is born out of a distrust with the current global economic status quo
The economic assumptions underpinning the Bitcoin ecosystem are laughable, and ignore hundreds of years of accumulated understanding of how currencies work with each other.
Paper money is about 100 years old. That's it.
The only thing about "paper money" that I can think of that is about 100 years old is the beginning of the departure from the gold standard (http://en.wikipedia.org/wiki/Gold_standard).
... why would it be true for economic practices? Some experimentation is good, without it there would never be any progress at all.
Appeal to authority based on the age of ideas is something you can only get away with in religion, astrology, and it seems, economic 'science'.
Sure, there is a large chance that new ideas might fail but you can't simply argue against them because they go against old ideas.
The alternative, of course, is that bitcoin takes off, is not banned by governments, and is useful enough to enough people. If that occurs then I expect pretty high returns.
s/mhash/Mhash/
It's like ranting that people talk about "10mb" files. Or "100gb" or "100GB" drives. When they're technically "93.1GiB" drives ("gibibyte" [1],[2], or [3]).
[1]: http://en.wikipedia.org/wiki/Hard_disk_drive#Capacity_measur... [2]: http://en.wikipedia.org/wiki/Mebibyte [3]: http://en.wikipedia.org/wiki/Binary_prefix
It used to be common to speak of sizes in "hard drive megabytes". Eventually, the disk manufacturers won the pointless semantic battle and that went away.
In practice, it matters not in the slightest.
In a way, this is the perfect internet model: I offer my content for free but visitors pay me with cpu cycles. It's superior to the ad-model because it pays according to time spent on the page regardless of who the audience is.
It's too bad that it's infeasible because of the very low rate.
I'm watching Bitcoin with a curious eye, but this really nails a pretty novel and interesting aspect of it. That yes, you are paying the site owner for viewing their site, in a way that is (mostly) transparent to you and with billing already captured by your power company.
I haven't actually run it so I don't know just how badly it thrashes my machine, but assuming that can be worked out, this particular idea is the KillerApp(tm) of Bitcoing as I see it.
Actually, now that I'm thinking of it, one giant achilles heal:
If this really takes off and the mass of the internet uses it, then that means the entire mass of the internet can only be monetized at the set rate that Bitcoins are made. Which isn't much money.
But I still think there is something interesting here.. hrmm.
SO the people I deliver the most value to, I extract the most value from. // WIth an added bonus that I recieve more value from the people with more expensive computers (aka the wealthier viewers)
I've seen in the last few weeks apparently relevant and polite posts that had been flagged dead[1]. One of these was a post by jashkenas in a CoffeeScrit thread. This one could hardly have been more on topic.
Is there a new moderation policy, or is it a bot with a happy trigger?
[1] In this thread, http://news.ycombinator.com/item?id=2566826 , a post by jhuckestein, and http://news.ycombinator.com/item?id=2566797 by csomar.
What about using gamers' excess GPU to mine Bitcoins in an installable massively-multiplayer game? Is anyone trying this?
In fact, it might be an interesting way for EVE (for instance) to link ISK to real-world value. There's a lot that a MMORPG company could do with a system which encourages people to stay in-game more than they already do...
Can't be done.
According to this BitCoin calculator[1] you need to generate 245 Mhashes/sec (mega-hashes per second) to generate 1 bitcoin per day today. (Remeber that number will go up as time goes on)
I assume that calculator is for 24/7 calculation (which you won't get with gamers), let's assume they are hardcore and play 6 hours per day, every day. You can't dedicate 100% of your customer's GPU power to bitcoin mining (since they'll need to actually play yoru game), let's say you dedicate 20% of their GPU.
To get 1 bitcoin per day you need hardware that's able to do 245 × 4 × 5 = 4,900 Mhashes/sec.
This thread[2] from the bitcoin forum today has some idea of what current hardware can do. They say "5870's are $250 apiece at the moment and each only get around 350 Mh/s", so in order to get 4,900 Mh/s, you'll need about 14 of them.
i.e. If the players of your MMO have 14 graphics cards (costing ~US$250 each) in their machine, then you can probably generate 1 bitcoin per day per hardcore player. i.e. It's not possible, forget about it.
[1] http://www.alloscomp.com/bitcoin/calculator.php [2] http://forum.bitcoin.org/index.php?topic=9052.0
But then let's reassess this 1 BT/Day thing. That's $8 a day right now, you'd be pretty pissed paying $8/day for most any game.
What if we said 1 BT/month instead? Then all your numbers kind of point to that being pretty feasible no? If I'm reading your calculations right, then a gamer with one GPU would generate 2 BTs per month.
I think miners also need to download a lot of data initially (i think 500GB). Mining might require network access which has a negative impact on network latency, and a negative impact on most real time MMOs.
i.e. there are also a whole pile reasons why running a miner would pissed off your paying customers.
Also, MMO games generally have pretty low graphics requirements (to appeal to the widest possible install-base), so a lot of gamers have excess GPU that could be used for mining.
This is some impressive code but not practical.
And I don't think visitors are going to like you maxing out their cpu.
Curious to see what you guys think of the ethical side of it though - do you let this run on mobile, etc? This will almost definitely cause extra battery drain on mobile devices, you think it's fine to have this happen without user consent? ;)
Flash needs to stay out of this argument, as at the end of the day it's still a real ethical question - how much CPU are you realistically allowed to take and continually use from a user visiting your page?
It is probably fair to say most people don't care all that much provided their user experience is not noticeably impacted, but it looks like this work is failing to deliver in that respect. If they manage to throttle CPU usage effectively then this is at least a semi-feasible alternative to "monetizing" traffic.. I find that quite interesting conceptually, even if it doesn't work in practice at the moment.
It actually starts up a web worker with the exact same file and communicates with itself back and forth, the browser version to the worker version. Not the first time this technique has been used but it's still pretty new.
I'm getting about 13K hashes/sec with this JavaScript miner. For comparison, my GPU gives me 100M hashes/sec, and even my 12 CPU cores give me 10M hashes/sec with the official Bitcoin client.
So you'd need about 1000 concurrent users at all times to match a single machine. EngineYard SHA1 contestants who used this approach had the same problem.
Now, if Native Client was widely deployed, or you could somehow rig up WebGL...
On my computer (netbook running Chrome in Ubuntu), bitp.it clocks at 2.2khash/sec. Using this, I'll give 2000hash/sec/user as a conservative estimate.
If you had 1M daily visits, averaging about 1 minute of interaction (high, but assuming you have long-form content), you'd have 12000Mhash/day, or about 2.77Mhash/sec.
Plugging this in with current rates, this ends up being $0.08/day. For 1M views. This is about 3 orders of magnitude lower than just AdWords.
It seems closer to stealing from your users (with enormous inefficiency) than something that creates any real value.
- Since you're going out, anyway...
One thing I'm particularly interested in would be embedding this in a frame similar to stumbleupons web interface and allowing for revenue sharing with the user.
I guess our economy does too (quant finance)
The traditional approach is to have a central bank which does the minting and printing, and then the regular banks can borrow that money. Those banks then lend that money to their customers, possibly creating more virtual currency by fractional reserve banking.
Bitcoin obviously can't do that because it is a decentralized system. The traditional approach also has the disadvantage that all currency in circulation is ultimately borrowed, so there is always more debt than money unless you allow banks to default. That can only work as long as the economy is growing fast enough.
I think there are even better alternatives, by modeling currency after trust and social capital: http://ripple-project.org/decentralizedcurrency.pdf
Bitcoin isn't perfect. But we can test it, and if it breaks, we'll see quickly. Broken rep-net economies are like building markets on pyramid schemes: people have an incentive to pretend it still works until the damage is orders of magnitude larger than the economy proper.
And I encourage you to investigate what fractional reserve banking looked like in the days of specie-backed-currency. Banks still made loans and kept less than the entire value of their demand accounts on hand. It'll be weird, but there will be an M2 and an M1 in bitcoin, we aren't technically limited to an M0 money supply.
My browser is often brought to it's knees by badly written flash ads - is there a difference?
As many people are pointing out that GPUs are faster for mining that CPUs, would you be able to make use of a GPU with WebGL (or GPU-accelerated Flash)? I guess the GPU computations don't fall in the spec of WebGL though.
As for the GPU-accelerated JS, check out WebCL: http://webcl.nokiaresearch.com/
But social problems tend not to end up as near the worst case as is often feared. What you're describing is like saying that if we break the crypto underlying git repositories, you can trick the world into thinking you are the original author of linux. Obviously, no one would fall for that. But every git commit after the exploit, or from sources lacking a large consensus, would be of suspect authorship. It's a big problem, but not exactly the way you imply.
That said, it's a nice proof-of-concept. Is there anyway to block this type of use of CPU without blocking JS?
The mining process validates the transactions. Transactions are grouped in blocks. The blocks are chained in one big sequence and the miners validate the block chain.
Even if a rogue miner validates a block that steals coins, his fork of the block chain will not be validated by honest miners. As long as the computing power of the honest miners is above the one of an attacker, the block chain is safe.
A dishonest, big enough botnet could overpower the honest miners, fork the block chain and wreak havoc in the system.
--
The biggest threat to bitcoin is not technical, though, it is financial. The bitcoin market cap is currently of ~ $50M. If people with deep pockets and trading experience figure that bitcoin is a threat to their deadline, they can easily manipulate the market and crash it.
I can think of ways to manipulate bitcoin market with large sums of money, but nothing that would make bitcoin unusable.
In fact, I think such attack would only create a short term volatility spike but make bitcoin market sturdier in a long term.
In first phase of the attack you would pour in huge amounts of liquidity which would attract more people to bitcoin market.
In the selling phase of the attack you would cause a temporary market panic but only for as long as you sell. And if bitcoin market players managed to find out about what you are doing, they would profit from it.
Finally, when you are out of money, the market would return to its normal course.
Simply buy it up and delete the wallet.dat ... bitcoins go poof with no way to recreate (the total number of created will max out with no regard to losses, intentional or otherwise)
The 4.11% reduction you experienced is likely gained at the expense of invalidating the code.
In terms of ramping this up to actually be a viable revenue source... I guess you'd need a browser plugin which was hard-core about making sure you agreed to usage, and verified to the server that you were actually doing the mining you'd agreed to - and that could tap in to the GPU.
But then, if Bitcoins become worth something meaningful, wouldn't we all be using our GPU most of the time to be generating them anyway? In which case, the website starts asking you for the opportunity cost of using your GPU instead, and you know how much that's worth, and boom, micropayments.