Bitcoin Forum
April 16, 2024, 09:30:19 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4 5 6 7 8 9 10 11 12 »  All
  Print  
Author Topic: FPGA mining for fun and profit  (Read 67123 times)
cypherf0x (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 1



View Profile
May 16, 2011, 11:04:29 PM
Merited by ABCbits (1)
 #1

So I discovered Bitcoin today and soon after that dove into my usual obsessive research mode about mining.  The difficulty of generating bitcoins is going to keep going up and the amount of power the current mining rigs I've seen is going to go up.  I'm a computer engineer by trade so I'm kind of a bastard of electrical engineering and computer science.  I do know FPGAs though.  I've got a PICO EX-300 board in my workstation with 16 Xilinx Spartan FPGAs on it.  I still have a lot of work to do with optimization of the chips but I've got a single core running at about 117MH/s with a fairly quick and crude design.

I've been using the board to crack WPA 2 at some pretty amazing speeds.  If I can put enough time in it I should have a core design that could be loaded on USB/PCIE FPGA boards that'll use a lot less power and have some serious hashing power.
1713259819
Hero Member
*
Offline Offline

Posts: 1713259819

View Profile Personal Message (Offline)

Ignore
1713259819
Reply with quote  #2

1713259819
Report to moderator
1713259819
Hero Member
*
Offline Offline

Posts: 1713259819

View Profile Personal Message (Offline)

Ignore
1713259819
Reply with quote  #2

1713259819
Report to moderator
Even in the event that an attacker gains more than 50% of the network's computational power, only transactions sent by the attacker could be reversed or double-spent. The network would not be destroyed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713259819
Hero Member
*
Offline Offline

Posts: 1713259819

View Profile Personal Message (Offline)

Ignore
1713259819
Reply with quote  #2

1713259819
Report to moderator
1713259819
Hero Member
*
Offline Offline

Posts: 1713259819

View Profile Personal Message (Offline)

Ignore
1713259819
Reply with quote  #2

1713259819
Report to moderator
1713259819
Hero Member
*
Offline Offline

Posts: 1713259819

View Profile Personal Message (Offline)

Ignore
1713259819
Reply with quote  #2

1713259819
Report to moderator
keybaud
Full Member
***
Offline Offline

Activity: 120
Merit: 100


View Profile
May 16, 2011, 11:16:42 PM
 #2

So I discovered Bitcoin today and soon after that dove into my usual obsessive research mode about mining.  The difficulty of generating bitcoins is going to keep going up and the amount of power the current mining rigs I've seen is going to go up.  I'm a computer engineer by trade so I'm kind of a bastard of electrical engineering and computer science.  I do know FPGAs though.  I've got a PICO EX-300 board in my workstation with 16 Xilinx Spartan FPGAs on it.  I still have a lot of work to do with optimization of the chips but I've got a single core running at about 117MH/s with a fairly quick and crude design.

I've been using the board to crack WPA 2 at some pretty amazing speeds.  If I can put enough time in it I should have a core design that could be loaded on USB/PCIE FPGA boards that'll use a lot less power and have some serious hashing power.

Looking forward to seeing the final results.
sniper_sniperson
Full Member
***
Offline Offline

Activity: 124
Merit: 100


View Profile
May 16, 2011, 11:25:54 PM
 #3

Give us the averaged Mhash/power consumption stats for all 16 Xilinx, including the price for one of them, then we can talk.
cypherf0x (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 1



View Profile
May 16, 2011, 11:47:07 PM
Last edit: May 17, 2011, 12:01:41 AM by cypherf0x
 #4

Give us the averaged Mhash/power consumption stats for all 16 Xilinx, including the price for one of them, then we can talk.

The performance/watt isn't an issue, the cost however will.

The challenge will be to find an inexpensive FPGA board with the right performance/cost.

I can design a mining board with FPGAs and that's what I may end up doing but that's not trivial and would take some time.
Dayofswords
Member
**
Offline Offline

Activity: 138
Merit: 11


Exchange BTC in Telegram https://bit.ly/2MEfiw8


View Profile WWW
May 17, 2011, 01:16:16 AM
 #5

You did all this in a single day?

BTC Banker - Exchange BTC in Telegram bot https://bit.ly/2MEfiw8
cypherf0x (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 1



View Profile
May 17, 2011, 02:42:46 AM
 #6

I have a compiler that'll convert C code to VHDL that's why I said it was crude but it works as a proof of concept.  I've just got to go through the code and write properly now, which may take a bit depending on my workload.
Ac-town
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
May 17, 2011, 03:11:19 AM
 #7

Highly interested in this. How much would you say the FPGA's for usb/pci-e cost?
cypherf0x (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 1



View Profile
May 17, 2011, 03:49:41 AM
 #8

Highly interested in this. How much would you say the FPGA's for usb/pci-e cost?

http://www.picocomputing.com/E101/

They're about $400

It could be a lot cheaper.  If I get the VHDL optimized I can get it turned into an ASIC and put a number of those on a PCIe express card/other format card.

Development costs/time vs job will slow me down but I'm not going to be a tool and post my bitcoin address or a donate button like a beggar.  I could also get distracted by some other shiny project that has a greater return for my efforts.  That or it works so well I just keep it for myself and profit.

I may play with the idea of a standalone miner that you just put the configuration on a micro-sd card add power and Ethernet and get mining.
zoro
Full Member
***
Offline Offline

Activity: 226
Merit: 100


View Profile
May 17, 2011, 04:38:39 AM
 #9

I doubt that this could bit a single 5770 card, but i am looking forward for your results Smiley

"killer app" of BTC = MasterCoin https://bitcointalk.org/index.php?topic=265488.0Mastercoin(A new protocol layer on top of Bitcoin)
cypherf0x (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 1



View Profile
May 17, 2011, 05:40:29 AM
 #10

I doubt that this could bit a single 5770 card, but i am looking forward for your results Smiley

I know it can.  I've used FPGAs for brute forcing crypto before and it was a lot more involved than hashing.  Graphics cards aren't made for hashing. They're good at it because of the way their processing is optimized (ATIs over Nvidia), now with an FPGA you can get a processor that does everything in hardware, no software or code to run to perform the algorithms.  That's why you see very high performance out of FPGAs since they've essentially become a processor that does that one task purely in hardware.

I've prototyped a dedicated AES cypto chip for an in-line encryption device that was running at 10Gb/s with an FPGA.  It'll work, but I don't have a fat government contract funding development.  I'm shooting for the most cost effective solution in power an cost as possible.

That's the challenge, and I like challenges.
allangoing
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
May 17, 2011, 11:26:16 AM
 #11

if the algorithm can be implemented in a hardware, the power consumption will be decreased a lot, will this cause the BTC price down?
Sukrim
Legendary
*
Offline Offline

Activity: 2618
Merit: 1006


View Profile
May 17, 2011, 11:42:53 AM
 #12

if the algorithm can be implemented in a hardware, the power consumption will be decreased a lot, will this cause the BTC price down?
The BTC price is not tied to power prices (currently it costs ~ 1USD in electricity to mine 1 BTC!).

Should there be an easily available solution for a relatively cheap ASIC box with a few GHashes/s and low power consumption, the difficulty would probably skyrocket and the electricity cost on GPUs would go so high that it becomes as ineffective as CPU mining today.

I guess it'll still take a while (as ASICs also don't materialize out of thin air!) but I personally expect this to happen this year still, should bitcoin continue to be so popular.

Already a 400USD FPGA with (if you optimize the code maybe) ~150 MH/s that has a laughable power consumption might be a danger for GPU mining in the medium term (as they would be very easy to cool)

https://www.coinlend.org <-- automated lending at various exchanges.
https://www.bitfinex.com <-- Trade BTC for other currencies and vice versa.
cypherf0x (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 1



View Profile
May 17, 2011, 02:50:47 PM
 #13

So looking over the FPGA I realized how much of the chip was unused.  Why is this important?

FPGAs are reconfigurable, don't think of them as a single processor.  I did some coding and added another hashing pipeline to the chip and smoothed out some bumps.  A single pipeline is now doing about 133MH/s with the chip around 210MH/s total (a bit less for the crude pipeline I cut/pasted/mauled).  This is significant because as long as I have enough enough logic gates available I can add more pipelines.  How many more?  Quite a few  Grin

If I put this on a Virtex-7 which is designed for 400Gb/s operations and took advantage of it's large number of gates then it would be a hashing monster,
Convery
Sr. Member
****
Offline Offline

Activity: 966
Merit: 254



View Profile
May 17, 2011, 03:06:34 PM
 #14

Don't ruin bitcoin-.-

It wouldn't be too nice to have spent 1000$ when a 400$ chip will do it 40 times better-.-


             ▄          ▄▄▄▄    ▄
            ███      ▄██████▀  ▀█▀
            ███     ▄██▀
            ███     ███        ▄█▄   ▄█▄ ▄█████▄▄         ▄▄██████▄      ▄█▄ ▄█████▄▄         ▄▄█████▄▄        ▄▄█████▄▄
    ▄▄▄▄▄▄  ███     ███        ███   ██████▀▀▀▀███▄     ▄███▀▀▀▀▀███▄    ██████▀▀▀▀███▄     ▄███▀▀▀▀▀███▄    ▄███▀▀▀▀▀███▄
  ▄████████▄███  ▄█████████▄   ███   ████▀      ▀███   ▄██▀       ▀██▄   ████▀      ▀███   ▄██▀       ▀█▀   ▄██▀       ▀██▄
▄███▀    ▀█████   ▀▀███▀▀▀▀    ███   ███         ███   ███         ███   ███         ███   ███              ███████████████
███   ▄▄   ▀███     ███        ███   ███         ███   ███         ███   ███         ███   ███              ███▀▀▀▀▀▀▀▀▀▀▀
███   ▀▀   ▄███     ███        ███   ███         ███   ███         ███   ███         ███   ███         ▄    ███         ▄
▀███▄    ▄█████     ███        ███   ███         ███    ███▄▄   ▄▄████   ███         ███    ███▄▄    ▄███    ███▄▄   ▄▄███
  ▀████████▀███     ███        ███   ███         ███     ▀████████▀███   ███         ███     ▀█████████▀      ▀█████████▀
    ▀▀▀▀▀▀   ▀       ▀          ▀     ▀           ▀         ▀▀▀▀▀   ▀     ▀           ▀         ▀▀▀▀▀            ▀▀▀▀▀

       ▄▄▄▄▄▄▄
   ▄▄▀▀       ▀▀▄▄
  █               █ ▄
 █   █▀▄ ▀█▀ ▀█▀   █ ▀▄
 █   █▀▄  █   █    █  ▀▄
  █  ▀▀   ▀   ▀   █    █
▄▀ ▄▄           ▄▀    ▄▀
 ▀▀  ▀▀▄▄▄▄▄▄▄▀▀      ▀▄
        ▀▄▄      ▄▄▀▀▄▄▀
           ▀▀▀▀▀▀

                      ▄▄▄
  ▄█▄              ▄███████▄
  ▀████▄▄         ██████▀██████▀
    ▀▀▀████▄▄     ███████████▀
    ▀██▄███████▄▄███████████
     ▄▄▄▀██████████████████
      ▀████████████████████
▀█▄▄     ▀████████████████
  ▀████████████████▀█████
    ▀████████████▀▄▄███▀
       ▀▀██████████▀▀
           ▀▀▀▀▀

               ▄▄   ▄▄
              ▄▀ ▀▀█  █
             ▄▀     ▀▀
         ▄▄▄▄█▄
     ▄█▀▀▀▀▀▀▀▀▀▀█▄
 ▄▀▄▀              ▀▄▀▄
█  █   ▄█▄    ▄█▄   █  █
 ▀█    ▀█▀    ▀█▀    █▀
  █                  █
   █   ▀▄      ▄▀   █
    ▀▄   ▀▀▀▀▀▀   ▄▀
      ▀▀▄▄▄▄▄▄▄▄▀▀
New Age of DEFI
A Non-Code Platform for
Decentralized Trading Instruments

   ▄▄███████████████▄▄
 ▄█████████████████████▄
▄██████████████▀▀███████▄
████████████▀▀    ███████
█████████▀▀   ▄   ███████
██████▀▀     █    ███████
████▀       █     ███████
█████▄▄   ▄█      ███████
████████ ██▄      ███████
▀████████ ▀▄███▄▄███████▀
 ▀█████████████████████▀
   ▀▀███████████████▀▀

     ▄              ▄
   ▄███▄          ▄███▄
   █████▄  ▄▄▄▄  ▄█████
  ▄████████████████████▄
 ▄██████████████████████▄
 ████████████████████████
██████▀▀          ▀▀██████
█████▀   ▄      ▄   ▀█████
 ████   ███    ███   ████
  ████   ▀      ▀   ████
   ▀████▄▄▄▄▄▄▄▄▄▄████▀
     ▀▀████████████▀▀

   ▄▄████████████████▄▄
 ▄█████▀▀▀██████▀▀▀█████▄
▄████▀  ▀▀▀    ▀▀▀  ▀████▄
████▀                ▀████
███▀                  ▀███
███       ▄    ▄       ███
██▀      ███  ███      ▀██
██       ▀█▀  ▀█▀       ██
██▄     ▄        ▄     ▄██
▀██▄     ▀▀▄▄▄▄▀▀     ███▀
 ▀███▄▄▄▄▄▄████▄▄▄▄▄▄███▀
   ▀▀████████████████▀▀
bobR
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
May 17, 2011, 03:32:36 PM
 #15

So looking over the FPGA I realized how much of the chip was unused.  Why is this important?

FPGAs are reconfigurable, don't think of them as a single processor.  I did some coding and added another hashing pipeline to the chip and smoothed out some bumps.  A single pipeline is now doing about 133MH/s with the chip around 210MH/s total (a bit less for the crude pipeline I cut/pasted/mauled).  This is significant because as long as I have enough enough logic gates available I can add more pipelines.  How many more?  Quite a few  Grin

If I put this on a Virtex-7 which is designed for 400Gb/s operations and took advantage of it's large number of gates then it would be a hashing monster,


The concept appears viable but I fear might be cost prohibitive
Gpu's can be used for some other purpose once mining becomes in efficient
What's a person to do with the left over $1000 worth of fpga equipment in a yr or 2
xenon481
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile
May 17, 2011, 03:48:08 PM
 #16

The concept appears viable but I fear might be cost prohibitive
Gpu's can be used for some other purpose once mining becomes in efficient
What's a person to do with the left over $1000 worth of fpga equipment in a yr or 2

Continue to mine with extremely electricity efficient hardware.

Tips Appreciated: 171TQ2wJg7bxj2q68VNibU75YZB22b7ZDr
cypherf0x (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 1



View Profile
May 17, 2011, 04:16:30 PM
 #17

Apologies but no more development information will be posted.  I've been offered a 25% share from someone that owns 2 FPGA clusters.  If you haven't seen that type of hardware before think a 156 FPGAs per machine.
Jaime Frontero
Full Member
***
Offline Offline

Activity: 126
Merit: 100


View Profile
May 17, 2011, 04:23:14 PM
 #18

* sigh *

well, i guess we know where mining is headed...
Latregetic
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
May 17, 2011, 04:57:31 PM
 #19

Apologies but no more development information will be posted.  I've been offered a 25% share from someone that owns 2 FPGA clusters.  If you haven't seen that type of hardware before think a 156 FPGAs per machine.

I had a feeling this is what would happen.

Can you at least give us the rough specs of the clusters, so I can ballpark about how many Gh/sec you'll end up pulling?  If they're machines like this, then you're probably going to be pulling anywhere from 500Gh/sec to 5.5 Th/sec per machine.  If it's a small cluster of perhaps 24 machines used for cryptographic attacks and research, then that one cluster will probably end up with more compute power than the entire rest of the network. 

Man, now I want to dig out my old Spartan 3 fpga board and see if I can get a working hash engine out of it just for giggles.



For people who don't know a ton about FPGA stuff, you can run a hash engine natively in hardware using a hew hundred gates at most for MD5, and run one hash per clock cycle, with a clock speed of 5-550 Mhz.  Most of these chips have anywhere from 2000 gates for the barest of bare bones $50 DIY kits to about 9 million on the latest Virtex 7. 

Assuming the hash engine took 350 gates (2 orders of magnitude reliable), the chip runs at 550 MHz, and has 9 million gates, and was just 20% efficient, that is 80% of the time the chip is waiting for data or or otherwise not hashing, you could see about 2.8 trillion hashes per second.  TRILLION HASHES PER SECOND.  Even using worst case figures, a 5 million gate device at 250 Mhz, 5000 gates per hash engine, and a 5% utilization factor, you still get 50 Gh/sec, over 200 times the hash calculating power of a Ati Radeon 5850.

cypherf0x (OP)
Newbie
*
Offline Offline

Activity: 28
Merit: 1



View Profile
May 17, 2011, 05:02:18 PM
 #20

Apologies but no more development information will be posted.  I've been offered a 25% share from someone that owns 2 FPGA clusters.  If you haven't seen that type of hardware before think a 156 FPGAs per machine.

I had a feeling this is what would happen.

Can you at least give us the rough specs of the clusters, so I can ballpark about how many Gh/sec you'll end up pulling?  If they're machines like this, then you're probably going to be pulling anywhere from 500Gh/sec to 5.5 Th/sec per machine.  If it's a small cluster of perhaps 24 machines used for cryptographic attacks and research, then that one cluster will probably end up with more compute power than the entire rest of the network. 

Man, now I want to dig out my old Spartan 3 fpga board and see if I can get a working hash engine out of it just for giggles.



For people who don't know a ton about FPGA stuff, you can run a hash engine natively in hardware using a hew hundred gates at most for MD5, and run one hash per clock cycle, with a clock speed of 5-550 Mhz.  Most of these chips have anywhere from 2000 gates for the barest of bare bones $50 DIY kits to about 9 million on the latest Virtex 7. 

Assuming the hash engine took 350 gates (2 orders of magnitude reliable), the chip runs at 550 MHz, and has 9 million gates, and was just 20% efficient, that is 80% of the time the chip is waiting for data or or otherwise not hashing, you could see about 2.8 trillion hashes per second.  TRILLION HASHES PER SECOND.  Even using worst case figures, a 5 million gate device at 250 Mhz, 5000 gates per hash engine, and a 5% utilization factor, you still get 50 Gh/sec, over 200 times the hash calculating power of a Ati Radeon 5850.



Think more along the lines of this http://www.dinigroup.com/new/DNBFC_S12_12_Cluster.html
Pages: [1] 2 3 4 5 6 7 8 9 10 11 12 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!