Shop OBEX P1 Docs P2 Docs Learn Events
SHA-256 unique key generating with multiple propellers — Parallax Forums

SHA-256 unique key generating with multiple propellers

Clock LoopClock Loop Posts: 2,069
edited 2013-06-21 17:56 in Propeller 1
I just started reading about bitcoin, and it seems people are moving over to ASIC and FPGA chips to do the HASH computing.

What if any are the possibilities that a OBEX object could be created to do bitcoin mining? The biggest issue with bitcoin mining today is the power consumption of the cpus and gpus that they are using to generate the HASHES.

So a big move is to switch to less power hungry sources of HASH generation.

How feasible is using the propeller's 8 cores to do bitcoin hash mining?
If it is worth coding a program, this might get a bunch of BITCOIN miners interested in the propeller platform (if it can be successfully implemented) and also, HASH computation is perfect suited for our 8 core chip.

What I really wonder is what happens when we increase the # of propeller chips on a pcb all running HASH bitcoin mining, on say ... 100 prop chips?

Obviously some kinda computer client would need to interface the prop pcb to the bitcoin network.

But i figured Id mention it because there is a big demand to develop FPGA and ASIC boards for people that want to move away from PC based bitcoin mining for power consumption reasons.

Perhaps someone much more code savyy than I, can look into this, to determine whether a obex object would be worth creating.

Pseudo Code For Generating Bitcoins...
http://bitcointalk.org/index.php?topic=4502.0

SHA-256 cryptographic hash OBEX object
http://obex.parallax.com/objects/839/

Example c code.
http://pastebin.com/EXDsRbYH

Bitcoin Mining in Plain English
http://codinginmysleep.com/bitcoin-mining-in-plain-english/

http://www.weusecoins.com/mining-guide.php
The simplest miner would work like this:
  
[LIST=1]
[*]Request a new [URL="https://en.bitcoin.it/wiki/Getwork"]Getwork[/URL] from a given pool/bitcoind with specified credentials
[*]For nonce=0;nonce<0xFFFFFFFF;nonce++
[LIST]
[*]Set Getwork Data nonce
[*]SHA-256 hash the Getwork Data ([URL="https://en.bitcoin.it/wiki/Protocol_specification#Block_Headers"]block header[/URL])
[*]Check if hash result is smaller than Getwork Target, if so, submit a share
[*]If more than 1 second passed since you received Getwork, stop the loop
[/LIST]
 
[*]GOTO: 1
[/LIST]
  Now, if you want something that could rise up to par with currently used miners, you need to consider:
  
[LIST]
[*][URL="http://en.wikipedia.org/wiki/OpenCL"]OpenCL[/URL] calculations, without this you will never get the high hashrates of graphic cards.
[*]Midstate, or in other words hashing optimization. First half of  Getwork Data doesn't change, so no point in calculating midstate for  each hash.
[*][URL="https://en.bitcoin.it/wiki/Getwork#longpoll"]Longpolling[/URL], makes you calculate less stale blocks.
[*][URL="https://en.bitcoin.it/wiki/Getwork#rollntime"]Rollntime[/URL], minimizes communication with the pool.
[/LIST]
 

Comments

  • ericballericball Posts: 774
    edited 2012-10-30 12:07
    According to https://en.bitcoin.it/wiki/Mining_hardware_comparison GPUs and ASICs are hitting in the 100Mhash/sec to over 1Ghash/sec.

    Looking at the SHA-256 compression function, it will probably take ~60 opcodes per round and there's 64 rounds per hash (not including the input stretching function), so that's ~4K opcodes per hash or 16K cycles per hash or 20Khash/sec per core (at 80MHz). So you'd need 5000 Propellers to equal a single $100 graphics card.
  • Clock LoopClock Loop Posts: 2,069
    edited 2012-10-30 12:17
    Thanks for the reply!

    I didn't think that a prop method would compete with gpu's and cpu's....

    If I wasn't so busy and had more skill with code, id implement it just for fun.

    (then we could add the propeller to the list of Mining hardware comparison!!!)
  • Clock LoopClock Loop Posts: 2,069
    edited 2012-11-03 09:53
    My goal behind wanting a HASH function unique "token" like system on the prop is exactly for that. Multipropellers with multiple cores becomes a bit hard to manage, and seeing what a token type system of data interaction could do, would be interesting. Also seeing if one could stimulate the ability of a specific code to produce more unique replies, etc.

    The whole thing behind the "bitcoin" thing, is a game of who can oppress their people more, and just own the game with the most advanced technology only available to the "officials" at certain installations that make more money by violating their "OATH" to the people. No they would never abuse that though right? They either do it using secrecy, oppression, obfuscation etc..., and even in paper... but at least its public with the digital systems like this threads title.



    And so everyone can verify that the coins do solve the problem. If someone games the system by calculating faster, everyone will see it within a few days and the whole system(could) be just re-stored,,, the bank iz public.


    But I have no interest in using the prop for any of these "digital coin" type services/.... (bitcoin, namecoin, etc....) i was surprised at how many peer-to peer digital nested secure hash calculating services all of a sudden poped up. must mean that there really is something to this tho.)

    I would like to use it as a method of compression/encryption.

    Ah heres something to look at....
    https://en.bitcoin.it/wiki/Alternative_chain
  • W9GFOW9GFO Posts: 4,010
    edited 2013-06-20 00:32
    I've been reading about Bitcoin mining and using ASIC processors which will render GPU based systems obsolete. You can spend a couple grand on a system that claims to be able to make the equivalent of ten times that in a year. If true, what is the motivation for the companies that are selling these systems? They would make much more money using the machines than selling them.
  • Igor_RastIgor_Rast Posts: 357
    edited 2013-06-20 03:55
    W9GFO wrote: »
    I've been reading about Bitcoin mining and using ASIC processors which will render GPU based systems obsolete. You can spend a couple grand on a system that claims to be able to make the equivalent of ten times that in a year. If true, what is the motivation for the companies that are selling these systems? They would make much more money using the machines than selling them.

    The motivation to sell them is to decentraliz the bitcoin , If they mine themself with all the asci miners they build ,
    They are going to have too much of the network hashrate for them self . Not exactly decentrilized

    Makes a goverment jumping in to stop it so much easier , than if a bunch a people had a small unit running
    Lets say its for the better of bitcoin , So if they mine themselfs its probably gonna doom bitcoin

    Ive had my brainstorm myserlf on this mining thing

    Any idea ?
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2013-06-21 16:09
    They would make much more money using the machines than selling them.

    To get rich in a gold rush, sell picks and shovels...

    I've been researching the whole bitcoin thing. There are companies who are getting rich just selling the promise that in the future that they will deliver those picks and shovels. With bitcoin there is a technological arms race going on and every week someone comes up with a faster processor, rendering all slower processors obsolete (or more to the point, the cost of electricity for those slower processors outweighs any profit). So the companies that promised a nifty new shovel in 6 months time will no doubt deliver just that, and meanwhile everyone else has moved on to large scale strip mining!

    I think things very rapidly went from PCs to graphics cards, to FPGAs to ASICs.

    I'm not sure about making money mining bitcoins, but there could be some very interesting chips that come out of this, and maybe those chips might have other applications? It is the sort of boffins who hang out on these forums who would be well placed to see these things :)
  • Igor_RastIgor_Rast Posts: 357
    edited 2013-06-21 17:56
    Id say indeed the pc dont make any money with these high hashrates . But if you already have a miner from avalon or BFL you will make it back verry quick(1-2 monts) , *** soon as all the other guys also get there miners working the dificulty wil skyrocket. So it wil be a big question if you will earn it back if you step in now

    the new miners of BFL , the smal one of 5G/Hsec uses about 45watts total , when running from a R Pi. Pretty effeciant to worry about the power cost for now , thats why u wil not want our pc to do some stupic calculation the hole day consuming power , we can use the RPI for that , or the propeller

    There is absolutly no way of knowing what the price of the btc will be tomorrow , but at current around 100usd/btc . those 45 watt lets you still make a profit for at least the comming 6 months or so . probably far less over a year. If the price of the btc crases , then yes you will be not making any profit and there is nothing stopping it from crashing too . But neither of it going up .. The recent beatings on it have shown some effect . But to stop it will be next to impossible anyway . cause there is no way they can stop all those miners at there home , they can make it verry dificult for getting money in and out , that happens at the exchanges . But for the best of it .But not stop the miners mining , and confirming transactions . So if your not planning on changing the btc in fiat , the probably cant stop you even if they want . But anyway thats not the point , There are ongoing discussions the hole day on that , maybe you should chek


    If you beleve its a ponzy sceme , or not . The fact that its going on

    Those miners chips have been opensourced and there are allot of them hitting the streets pretty soon. The best design out there for those chips to work is the Klondike K-16 . also opensourse and a verry active tread of people following every single step of de develping to bo able to get there hands on the miner .

    ALL these guys with those klondikes , and other Avalon based miners , will be needing host to controll them
    and like you already said it all comes down to power consumption. so I think nobody wil be wanting to use a pc to controll them ,
    You will be wanting to get your hands on a R Pi ( 3 Watts ) to Host your miners ,
    And here is where the propeller + wiznet w5200 jumps to action ,

    DHCP so click in network and online, Webpage to setup the ting ( served by wiznet ) + and the propeller as the Host to controll the miners
    Click in and go , No need to go online and find software to install and all the fuzz

    Or do we want all those peopel to get a R Pi ??
Sign In or Register to comment.