Cryptocurrency Mining – Transition To Cloud

7m ago
420.74 KB
10 Pages
Last View : 2d ago
Last Download : 12d ago
Upload by : Rosemary Rios

(IJACSA) International Journal of Advanced Computer Science and Applications,Vol. 6, No. 9, 2015Cryptocurrency Mining – Transition to CloudHari Krishnan R.1Sai Saketh Y. 2Venkata Tej Vaibhav M.3Department of Computer Scienceand EngineeringSRM University, Chennai, IndiaDepartment of Computer Scienceand EngineeringSRM University, Chennai, IndiaDepartment of Computer Scienceand EngineeringSRM University, Chennai, IndiaAbstract—Cryptocurrency, a form of digital currency thathas an open and decentralized system and uses cryptography toenhance security and control the creation of new units, is toutedto be the next step from conventional monetary transactions.Many cryptocurrencies exist today, with Bitcoin being the mostprominent of them. Cryptocurrencies are generated by mining,as a fee for validating any transaction. The rate of generatinghashes, which validate any transaction, has been increased by theuse of specialized machines such as FPGAs and ASICs, runningcomplex hashing algorithms like SHA-256 and Scrypt, therebyleading to faster generation of cryptocurrencies. This arms racefor cheaper-yet-efficient machines has been on since the day thefirst cryptocurrency, Bitcoin, was introduced in 2009. However,with more people venturing into the world of virtual currency,generating hashes for this validation has become far morecomplex over the years, with miners having to invest huge sumsof money on employing multiple high performance ASICs. Thusthe value of the currency obtained for finding a hash did notjustify the amount of money spent on setting up the machines, thecooling facilities to overcome the enormous amount of heat theyproduce and electricity required to run them. The next logicalstep in this is to utilize the power of cloud computing. Minersleasing super computers that generate hashes at astonishing ratesthat have a high probability of profits, with the same machinebeing leased to more than one person on a time bound basis is awin-win situation to both the miners, as well as the cloud serviceproviders. This paper throws light on the nuances ofcryptocurrency mining process, the traditional machines used formining, their limitations, about how cloud based mining is thelogical next step and the advantage that cloud platform offersover the traditional machines.Keywords—Cryptocurrency; Bitcoin mining; Cloud mining;Double Spending; ProfitabilityI.INTRODUCTION TO MININGMining is the integral process wherein generation,transmission and validation of transactions of cryptocurrenciesis done. It ensures stable, secure and safe propagation of thecurrency from the payer to payee. Unlike fiat currency, wherea centralized authority controls and regulates the transactions,cryptocurrencies are decentralized and work on a peer-to-peersystem. Banks that generate physical currency and monitor thetransactions require huge infrastructure to function andoperate. Cryptocurrencies overcome this need byimplementing a mining system where people in the network,called 'miners' or 'nodes', monitor and validate transactionswhich generates currency.In cryptocurrency, a transaction is a transfer of coins fromone wallet to another. When a transaction is made, the detailsof the transaction will be broadcast to every node in thenetwork. The transactions made over a set period of time arecollected to form a 'Block'. To incorporate transparency in thesystem, it is designed in such a way that all the transactionsmade from the inception of the currency are recorded andmaintained in a general ledger called the 'Block chain' which,as the name suggests, is a list of blocks created from thebeginning.Miners play a predominant role in mining. Miners processtransactions by verifying the ownership of the currency fromsource to destination. Every transaction contains the hash ofthe previous transaction made by the owner through whichauthenticity of a present transaction is tested, therebyvalidating it. Miners also inhibit double spending of thecurrency through this validation process.The main purpose of mining is to generate and releasecoins into its coin economy. Whenever a transaction takesplace and is validated, miners collect these transactions andinclude them into the block they are currently solving. Everyblock has to be solved before being broadcasted and put in theblock chain. Solving of a block involves mathematical puzzleswhich are difficult to unlock and crack provided there will besome constraints on the output generated. Only on solving themathematical puzzle is one allowed to add the block to theledger and a reward of coins is given in return. Thus miningeventually boils down to a competition of mathematicalpuzzles to solve for the reward of coins. This mechanismprevents miners from easily procuring coins and thusmaintains the fairness of the system. [1][2][3][4]II.MINING MACHINESMining of crypto currency is done through purposespecific designed machines called as ‗Mining machines‘. Thehistory of mining machines starts from CPU to the currentlywidely used ASICs. The periodic growth of mining difficultyled to evolution of new machines with higher efficiency thanpreviously designed machines. The cost and performance ofthe mining machine determine its mining profitability, hencethe design and its implementation is very crucial in mining.The various machines used in mining are:A. CPUDuring initial days of mining, CPU was used to mine thecoins effectively with hash rates less than or equal to10MH/sec. A personal PC with mining software installed in itwas enough to cope with the mining process. But, due to theconstant increase of difficulty in mining, usage of CPU‘s asmining machine became irrelevant to the evolving machineswith higher hashing rates. A popular mining software for CPUmining was cpuminer.115 P a g

(IJACSA) International Journal of Advanced Computer Science and Applications,Vol. 6, No. 9, 2015cpuminer is a simple client program that performs PooledMining or solo mining. The program receives proposed blockdata from the server, for which it tries to guess a nonce valuethat will result in a valid block. If a block hash with at least 32consecutive zero bits is found, the block data containing theguessed nonce value is sent back to the server. If used inPooled Mining mode, this block is called a "share" becausethe server is supposed to credit the registered user's account,according to the number of shares that user has contributed,and eventually transfer an amount of Bitcoins to the registereduser's address.B. GPUAs the power of CPU mining didn‘t meet the growingdemands, CPU with Graphic cards are used to mine the coins.Graphic cards contain Graphical Processing Units (GPU‘s),which are used to solve high mathematical calculationfunctions and complex polygons used in gaming. Differentcryptocurrencies uses different hash-proof based algorithms tosolve transaction blocks which require high mathematicallifting, hence GPU‘s were seen as a credible alternative to theCPU mining.A CPU core can execute 4 32-bit instructions per clock(using a 128-bit SSE instruction) or 8 via AVX (256-Bit),whereas a GPU like the Radeon HD 5970 can execute 320032-bit instructions per clock (using its 3200 ALUs or shaders).This is a difference of 800 (or 400 in case of AVX) timesmore instructions per clock. As of now, the fastest CPUs haveup to 6, 8, or 12 cores and a somewhat higher frequency clock(2000-3000 MHz vs. 725 MHz for the Radeon HD 5970), butone HD5970 is still more than five times faster than four 12core CPUs at 2.3GHz (which is also costlier at 4700 whencompared to 350 for the HD5970).In October 2010 an open-source OpenCL miner wasreleased on the web which was rapidly optimized and adaptedby miners. These miners would typically implement the SHAprotocol in languages such as Java or Python which wascompiled down by the hidden ISA of the GPU.Since these rigs are left to mine for many months the usersaggressively tweak the voltages (to lower in order to reducemining costs, or higher, with frequency, to increase Gh/s) andoperating frequencies of video ram (lower to save energy,since memory is unused) and the GPU core itself, as well asparameters of the code such as the number of threads that areenqueued at a given instance, so as to maximize throughputwithin reasonable bounds of stability and temperature. Sincethe Bitcoin computation does not exercise the memory system,many of the critical paths and bottlenecks in the GPU are notexercised, which means that the system can be pushed beyondthe normal bounds of reliability. Over time it often becomesnecessary to retune the parameters as fans and power deliverysystem wear eventually causes the GPU core to run tooslowly.GPUs tend to be much more accessible than FPGAs forend users, requiring PC-building skills and avid forum readingbut no formal training in parallel programming or FPGA tools.The goal of scaling BTC hash rate through GPUs pushes thelimits of consumer computing in amazing and novel ways.Despite such benefits GPU have some limitations.Limitations: Though Graphic cards can give over 800 MH/sec, butthey are of high cost than normal CPU‘s. The GPUs cannot be used standalone. Each GPU has tobe plugged into a PCI-E 8x or 16x slot, of which thereare relatively few on commercial motherboards. All the components like motherboard, hard-drive andRAM are not used in GPU mining which ultimatelyincreases the cost of mining. GPU‘s require high additional power of 200-300W formining effectively. GPU‘s normally takes two slots in a case ormotherboard which makes it difficult to attach two ormore GPU‘s to a single computer for greaterperformance.GPU mining is largely inactive these days as the miningdifficulty has exceeded the levels it can compete and further,with the advent of FPGAs and ASICs into the field of miningwhich vouched for good mining profitability.C. FPGA (Field Programmable Gate Array)June 2011 brought the first open-source FPGA Bitcoinminer implementations. With the constant increase of miningcost against the coins earned as a result of mining, it impactedmining profitability in a negative sense. GPU mining with itshigh mining cost and low per day return was incompetent tomine any more. There was an immediate need for anemergence of machines which could make the miningprofitable for the miners to continue with the mining.FPGA known as Field Programmable Gate Array is areprogrammable IC which can be configured or designed aftermanufacturing. FPGAs contain individual programmable logicblocks commonly called as Configurable Logic Blocks (CLB).These logic blocks are inter-connected in a manner that can bereconfigured. FPGAs contain large resources of logic gatesand RAM‘s for complex digital computation.FPGAs are flexibly configurable and reprogrammable,hence a designer can design and implement any digitalfunction. FPGAs are easier to synthesize than its othercounterparts which made FPGAs a good option for Bitcoinmining. FPGAs are reusable as they can be reprogrammedvery easily. FPGAs consume energy one-fifth less than that ofGPU, which was a major issue with GPU mining. FPGAs arealso good at rotate-by-constant operations and at bit-leveloperations used in hash-proof based algorithms like SHA256used in Bitcoin transactions.A Butterfly labs mini rig FPGA mines at around25,200Mh/s with efficiency 20.26Mhash/J consuming1,250Watts of power I contrast to the GPU‘s which mine at800MH/s in general.116 P a g

(IJACSA) International Journal of Advanced Computer Science and Applications,Vol. 6, No. 9, 2015Limitations: Though BTC FPGAs are easily synthesizable, theyconsume high power than typical FPGAs. FPGAs are good for low quantity production,otherwise cost per product increases with the requiredquantity increment which less efficient than itscompetitors like ASICs.D. ASIC (Application Specific Integrated Circuit)Mining coins with time became hard to come by with theupgraded machines available at cheaper prices made hugecompetition among the miners to achieve more gains throughmining. FPGAs designed for mining purpose though areflexible to program and manufacture, consumes a lot of poweragainst the return it gets. With the use of ASICs for mining,these offered an improved performance than FPGAs whenused for large scale mining. ASICs are a logical progression ofthis trend: circuits are specifically designed to calculate hashesas fast as possible, while consuming as little energy aspossible. The best ASICs on the market today are capable ofwell over 1,000 Mhash (1 billion hashes) per joule of energy.ASICs are Application Specific Integrated Circuits usedfor various types of specified applications. They aremicrochips built for single purpose though its applications areimplemented in various fields. Bitcoin ASICs which aredesigned specifically to mine Bitcoins, are good at complexmathematical tasks that mining needs, as fast and efficiently aspossible. Although FPGAs dominated only a short time, itsdevelopment efforts served as a quick stepping stone toASICs. ASIC Verilog are similar to FPGA Verilog in itsdesign and implementation that came before it.Advanced ASICs in the present market are capable ofproducing more than or equal to 1,000Mhash per joule ofenergy consumed. An ASIC Ant-Miner S5 costing up to 370typically gives 1957Mhash/J and consumes around 590 Watts,which makes ASICs the most profitable privately ownedmachine available in the market for mining as of today.The disadvantages faced through ASICs is its cost and thespeed with which the entire field is developing. The pace withwhich the field is updating with improved hardware achievinghigh hash rates than previously designed economically makesthe ASIC mining profitable only for a short period of timeuntil a new machine with higher performance emerges.Due to its obvious advantages when compared to the othermining machines available, ASICs are currently reigning themining field with their performance, though it remains to beseen how much it will withstand and sustain with the everemerging improved machines. [2][8]III.COMPARISON OF HARDWAREMining machines characterize the whole mining processwith their action and output. Mining difficulty and miningprofitability are dependent on the machines used at therespective times in the history of mining. Figure 1 shows therevenue per GH/s that bit coin network generated since 2010.The horizontal lines depict the energy costs per GH/s ofCPU‘S, GPU‘S, FPGAS and ASICS. When revenue per GH/sgoes below these costs the profits will turn negative and rigshould turn off.Fig. 1. Revenue per GH/s vs. Energy costs [8]The above graph also suggests that ASICs have the highestreturns/capital spent on energy requirement in comparison tothe other three mining systems.The general comparison between ASICs, FPGAs, GPUsand CPUs against various parameters is shown below:TABLE I.NAMECORE i7950Atom N450ATI 4850ATI 5770DIGILENTNEXYS 2500KMONARCHBPU 600 CBLOCKERUPTERSAPPHIREPERFORMANCE CHARACTERISTICS OF VARIOUS MACHINES ENERGYEFFICIENCY‘E’(Mhash/J)COST( ability is a major criterion when we considerperforming Bitcoin mining operations. The profitability ofmining depends on factors like: The initial cost of the mining rigs like the ASICs The hashing rate of the machine The total network hashing power and the currentdifficulty of hashing problems. The cost of electricity consumption. The current and future value of Bitcoins.A traditional mining technique requires miners to purchaselarge and multiple highly powered ASICs machines to117 P a g

(IJACSA) International Journal of Advanced Computer Science and Applications,Vol. 6, No. 9, 2015perform hashing operations which yields Bitcoins. Howeversuch a technique is not practical to a new or even anexperienced miner with respect to profitability. This isbecause as the number of miners increases, greater amount ofprocessing power is being added to the Bitcoin network. Thisrequires vast amount of electricity to keep the machinesrunning at constant rate and thereby not only resulting in ahigher carbon footprint that has environmental consequencesbut also increasing the cost of electricity consumption permachines, thereby reducing the profit obtained by mining ofBitcoins.A. Efficiency calculationsMining requires a lot of electricity. If we are building aDIY system then we will be getting an ATX power supplyunit (PSU). Therefore it‘s worth investing in the most efficientsupply you can get.Let us consider the following two cases for determiningefficiency of rigs: A PSU that is guaranteed to supply 860Wand is 93% efficient would actually draw 925W (860W/0.93).By contrast, a 750W power supply that is only 80% efficientwould actually draw 937.5 W (750/0.8) - thus using morepower, but supplying less. When building a mining rig, minerswill need to take account of the power requirements of all thecomponents they are using, especially all the graphics cards.Also it is a good idea to provide some excess capacity to dealwith unexpected events and provide the potential to overclockthe system. ASICs, on the other hand, can do far morecalculations with far less power because they are highlyspecialized devices. And since they ship with an appropriatepower adapter, miners do not have to worry about doing allthe math to find one that is up to the task. The miningefficiency of different systems can be compared by taking theratio of the number of hashes it can perform in a second,divided by the power it consumes:Hashing speed / power consumption mining efficiency.The profitability calculators like the Genesis block ask forthe electricity costs and the initial investments in thehardware. Effectively the miners are being asked for theirongoing and one-off investments. The conversion process isn‘tcompletely straightforward; In the case of hardware miners,the monthly running cost can be worked out by multiplyingthe electricity charge (i.e., per KWh) by the powerconsumption of the unit and by a conversion factor of 0.744(the ratio of seconds per month to joules of energy per KWh).adoption, major developments can still affect the pricemarkedly.TABLE II.BITCOIN DIFFICULTY AND HASH RATE HISTORY (11 MONTHS)[25]DateDifficultyChangeHash RateMar 22 201546,717,549,645-1.50%334,417,246 GH/sMar 08 201547,427,554,9511.59%339,449,662 GH/sFeb 22 201546,684,376,3175.01%334,179,783 GH/sFeb 09 201544,455,415,9627.71%318,224,263 GH/sJan 27 201541,272,873,895-6.14%295,442,739 GH/sJan 12 201543,971,662,0568.20%314,761,417 GH/sDec 30 201440,640,955,0173.00%290,919,288 GH/sDec 17 201439,457,671,307-1.37%282,449,013 GH/sDec 02 201440,007,470,271-0.73%286,384,627 GH/sNov 18 201440,300,030,3281.76%288,478,854 GH/sNov 05 201439,603,666,25210.05%283,494,086 GH/sOct 23 201435,985,640,2652.81%257,595,247 GH/sOct 09 201435,002,482,0260.98%250,557,526 GH/sSep 25 201434,661,425,92416.20%248,116,151 GH/sSep 13 201429,829,733,1248.75%213,529,547 GH/sAug 31 201427,428,630,90215.03%196,341,788 GH/sAug 19 201423,844,670,03920.86%170.686.797 GH/sAug 08 201419,729,645,9415.30%141.230.307 GH/sJul 25 201418,736,441,5588.08%134.120.673 GH/sJul 12 201417,336,316,9793.08%124,098,191 GH/sJun 29 201416,818,461,37124.93%120,391,236 GH/sJun 18 201413,462,580,11514.51%96,368,902 GH/sJun 05 201411,756,551,91712.44%84,156,677 GH/sMay 24 201410,455,720,13818.10%74,844,960 GH/sHowever the main question is: Has profitability increasedor decreased over the years?Recent data, table 2, pertaining to difficulty of mining andcorresponding hash rates clearly indicate that traditionalmining techniques can lead to losses or reduce profitabilitysubstantially. From the data we can conclude that over periodof 11 months the difficulty and hashing rate has increased by7.5% and 346.81331% respectively.

leasing super computers that generate hashes at astonishing rates that have a high probability of profits, with the same machine being leased to more than one person on a time bound basis is a win-win situation to both t