4 ms·
Minting Money with Monero and CPU Vector Intrinsics
- d4vlx 12y agoLove the story, reminds me of the early days of Primecoin where I had my first exposure to cryptocurrency code. I spent the first two months of it fighting to stay ahead of the curve as well and had a blast. Not nearly as successfully as Dave however and my wife wasn't too happy about me spending every waking hour when home from my full time job on it.
- gwern 12y agoI remember when Bytecoin was released; the claims to have been used for years were clearly wrong, but I couldn't figure out what the real story was skimming the forum posts. I'm glad someone figured it out!
- dgacmu 12y agoThanks. I don't deserve too much of the credit there, though -- I think a bunch of people started realizing it at the same time. It was just too weird to go unnoticed forever. Someone should see if they can dig up transaction volume data to estimate how much the Bytecoin people made. :)
- d4vlx 12y agoPremining and instamining (where they just start the coin with x coins in the devs wallet) are fairly common practices among new cryptocoins. They are usually frowned upon by the community but not always as the coin developers will sometimes keep a 1-2% for use promoting and developing the coin. Which most people consider fair. An 80% premine like bytecoin is ridiculous. It is very easy to tell if a coin has been premined by checking the state of the block chain for the number of outstanding coins. The coins with large premines are usually outed withing an hour of their release.
- gwern 12y agoI realize that, which is why I didn't believe the Bytecoin claims to have been used for years. (That and I spend a lot of time on Tor so I was skeptical I'd've never heard of it if there really was an active community using it.) But that didn't explain where the huge apparently-PoW-intensive blockchain came from.
- Cyther606 12y agoMuch respect for profiting hand over fist from pure knowledge. But the fact that this "opportunity" existed in the code is really damning for the Monero project. It highlights the staggering amounts of greed and hushed fraud rampant in the Bitcoin space. I don't fault him for selling everything.
- drcode 12y agoCrptocurrency is all about giving economic incentives to do the right thing. In most fields, fraud/lying/cheating are ethical failures. In cryptocurrency, they are bugs that need to be fixed and giving them moral assignations isn't helpful, IMHO. A cryptocurrency that fails doesn't do so because "bad people ruined it" but only fails because of its own shortcomings.
- d4vlx 12y agoI agree there is a lot of fraud and greed in the cryptocoin community which makes it risky for people new to it or the naive. For people who have done some reading or hung around for a while it's usually pretty easy to spot most scams. In cases like Monero it was probably a something the developers missed. The important thing to note is that the community fixed that oversight within a month or two.
- ayrx 12y agoThere is a huge difference between unoptimized code and maliciously slow code. This case definitely falls in the second category.
- oafitupa 12y agoBytecoin falls in the scam, yes. But the Monero community fixed this quite fast.
- tromp 12y agoNew proof-of-work schemes in crypto-currencies should ideally have optimized implementations from day 0, to prevent the situation described in the article where some people can mine much more efficiently than others. To this end, I offer several bounties for my Cuckoo Cycle proof-of-work scheme, which David has helped refine, and which has yet to be deployed by any coin. See https://github.com/tromp/cuckoo https://github.com/tromp/cuckoo for details and a whitepaper.
- MichaelGG 12y agoWhat is the incentive for the open source developers to release such fast miners? Dave says that one guy could beat him and "everyone" would be running his code. Why wouldn't the other guy run his privately, thus effectively splitting the money with other smart folks? You can always release it later to get the fame and ego points for being brilliant.
- yuhong 12y agoI still remember this: (notice the GPL violation and 2% donation) http://cryptomining-blog.com/2496-new-sgminer-fork-for-x11-mining-with-higher-performance/ http://cryptomining-blog.com/2496-new-sgminer-fork-for-x11-m...
- waterlesscloud 12y agoEntirely possible they release a generation of code only when they're already on the next generation. Sort of like Quake, maybe. Of course, even if you're 3 gens ahead, that's still better than updating everyone else to 2 gens behind you.
- dgacmu 12y agoStyle difference? yvg makes money from a built-in 1-2% dev fee on his (binary) miners. They are fast, support many pools and protocols, and are robust enough that you can pretty much start them running in /etc/rc.local and trust that they'll still be running a month later. I don't know what his total crypto income is, but I suspect he's doing OK. In contrast, you'd cringe at the horrible code I cranked out for some of these miners. Quality, high-performance, and delivered fast: pick two. It wouldn't surprise me if his business model was, in the long term, more profitable. He argues that it is. I haven't wanted to lock myself into providing support for software long term, so I picked a very different model. I believe, though, that there's a mix of both in many situations. I think some of the miner devs release some code openly as an advertisement for their skills and then do some contract work. The shady ones probably have opportunities to collaborate with coin developers to pre-develop a secret GPU miner for a "CPU only" coin so that the devs can instamine it. There's at least one I know of who's customized his code and sold it to a botnet herder. I love the question someone raised earlier: If someone can get a huge advantage that "kills" the coin, it's a flaw in the coin design. Is there a way to have the coin dynamics incentivize developers to make fast code and release it? That's one to chew on...
- jnbiche 12y agoAny suggestions/resources on learning how to implement these kinds of optimizations?
- nkurz 12y agoAgner Fog's guides and the Intel reference documents are the best resources that I've found: http://www.agner.org/optimize/ http://www.agner.org/optimize/ http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html http://www.intel.com/content/www/us/en/processors/architectu... IACA, perf, pmu-tools, and likwid are very useful tools. https://software.intel.com/en-us/articles/intel-architecture-code-analyzer https://software.intel.com/en-us/articles/intel-architecture... https://perf.wiki.kernel.org/index.php/Main_Page https://perf.wiki.kernel.org/index.php/Main_Page https://github.com/andikleen/pmu-tools https://github.com/andikleen/pmu-tools https://code.google.com/p/likwid/ https://code.google.com/p/likwid/
- dgacmu 12y agoIn addition to that great list, see also "Hacker's Delight", and several of Jon Bentley's books (Programming Pearls, Writing Efficient Programs, etc.). They're dated, but the basic ideas are eternal. The application to x86 requires combining those ideas with the specifics you get from Agner Fog's references.
- nkurz 12y agoOn sitkack's recommendation (see my comment history) I'm currently reading through Rick Booth's "Inner Loops". It's another dated classic that may be useful when used in combination with other more modern resources. Some of Booth's explanations micro-ops and superscalar dispatch are great, although it would be difficult for a beginner to differentiate what still applies today from what doesn't.