-
Notifications
You must be signed in to change notification settings - Fork 551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Am I really mining? #31
Comments
How did you connect to a stratum pool? Did you use a proxy ? and can you share your configs? |
Hi I need support how to connect pci connectors to F2 . I need a power supply diagram how to connect .
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Sjenja87 ***@***.***>
Sent: Saturday, April 3, 2021 7:09:35 PM
To: progranism/Open-Source-FPGA-Bitcoin-Miner ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [progranism/Open-Source-FPGA-Bitcoin-Miner] Am I really mining? (#31)
How did you connect to a stratum pool? Did you use a proxy ? and can you share your configs?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#31 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADX6DCGDKHUPEAPRGUJLU2TTG6N27ANCNFSM4LGW672Q>.
|
Likely, your hash rate is too slow to produce any shares in time. ASICs are too performant in this day and age for cheap, single FPGA to compete with them. When I ran this on my DE2 board a couple of years ago, I don't recall it producing any shares at the time. |
Hello penguin359, Can you please guide me on how to get this project working on a different board. Can you steer me in the right direction if its not too much to ask? Thanks, |
What I would do is to first get a simpler Verilog project working on your board. First get a simple project working that will turn on an LED, then make it blink at a fixed rate. Try to make it blink at a rate of 1 Hz or 1 time per second. This will be important to make sure you have the correct clock rate and know how to divide it down appropriately. Once this is working, try writing a simple Verilog design that outputs the ASCII characters 'H' and 'i' followed by a short pause over a serial port or USB serial interface on your board, assuming you have one. Get this to work at some known baud rate and configuration like 9600 8N1 and make sure you can see the letters on a terminal emulator on your computer. Once you have this working, you should have most of the required basics needed to get this project going. There should be plenty of guides online for how to write a UART or LED blinking in Verilog or VHDL online. |
Hi penguin359, I followed your advice and ran the LED's and also got the serial working on the ZCU102 board. At this point I am getting error in getwork with the given config file. In miner.log: two test cases Contents of my config.py are OR pools = [ I am getting that the way to get work from the pool has changed. Thanks, |
For Slush Pool, and most likely BTC Guild, they no longer support the older getwork protocol used by miner.py. They use a newer protocol called Stratum. You need to run a local proxy to convert between the two protocols. There's one here you can use: https://github.com/slush0/stratum-mining-proxy You will start that up first and configure it to connect to the correct upstream pool. Then configure miner.py to send it's getwork requests to localhost so it goes through the proxy instead. That will convert the request and send it to the pool upstream for results. |
Hi penguin359, I really appreciate your reply.
The error I get when running miner.py is attached. On the other note, I would like to get the stratum working on this. Do you know or have the code for stratum for the miner.py? Or can you guide me to any resource that clears that up for me? Thanks, |
Do you have miner.py connecting to localhost at the getwork port listed in the output of the stratum proxy (8332)? Did the script act like it was able to connect to the proxy. The fundamental difference between getwork and stratum is that getwork just gives you the block header fully constructed by itself for you to hash and stratum gives you all of the inputs that go into building the block header. With stratum, you can see all of the transactions that are being included with this block and what part of the chain this block is building on. With getwork, you just have the block header and you won't be able to determine where in the chain this block fits or what transactions will be included in it. All of the work of making the block header is done by the pool owner instead. That makes getwork much simpler to implement as you will have to do all the work of building the Merkle tree and generating the block header when implementing the stratum protocol. The reason for choosing stratum is because you can verify that the pool owner is giving you legitimate work and you are building on the tip of the current block chain whereas with getwork, a malicious pool owner could give you a task to build on a fork of the current block chain and you won't be able to tell. If you really want to include support for stratum in miner.py, that getwork -> stratum proxy I linked to above is written in Python and fully open source. Spend some time researching both protocols so you understand them and then try merging in the code that the proxy uses to convert between the two. If you can get it working, then you can submit a pull request with it as both projects are GPLv3. I probably won't have much time to help, but all the code is there and there is documentation on both protocols if you Google them. https://braiins.com/stratum-v1 Otherwise, the proxy itself should be fine. |
Hi penguin359, I will work on getting the stratum to work but first I would like to see it work with proxy so I am sure spending time in understanding the code in proxy is worth it. With proxy running, I tried using the localhost but I get an exception in the following line of code in the miner.py in the getwork method. My entry in the config.py is this seems like my url in the config.py is not right. my proxy seems to connect to the servers but the miner.py is not connecting to the localhost. I changed the port that i used when I ran the proxy. There is an error in the proxy code Again can you guide me to Thanks, |
You have the Python backtrace and the code that produced it. I would recommend you try to look at the code calling splitlines() and try to debug it yourself. This should be a good learning exercise. Make judicious use of print() and see what values are going in and try to debug it. Figuring this out should be easier than the work required to merge stratum into miner.py so I would start with this project. You probably also want to look in the getwork_listener.py from the backtrace above that calls into the twisted HTTP framework. |
Hi penguin359, Looks Like "I AM MINING" I used the following command to run the proxy And The console output of the proxy is thiis I am receiving jobs and submitting job solutionsBut I am not getting why the calculation of the mining speed done in the function "run" of miner.py Do you know where this constant 45.335163 comes from? Thanks, |
As I mentioned earlier in this thread, this is good for a learning exercise, but don't expect to make any kind of profit from this mining. As I recall, a hash rate of 128 MH/s sounds about right for a single FPGA and matches what I see here: https://www.nandland.com/articles/using-your-fpga-to-mine-for-bitcoins.html However, that is probably too low to be recognized as generating any work for Slushpool (or any other pool these days) and you can find others with a similar issue here: https://www.reddit.com/r/BitcoinMining/comments/kx110v/minimum_mining_hash_rate_required/ He has a hash rate of 333 MH/s from an old ASIC miner and is complaining that Slushpool is not recognizing him as producing any work. The general consensus seem to be that you need a hash rate of 1 GH/s minimum to get any work accredited. There is just so much mining power currently on Bitcoin that the block difficulty has shot to the moon and requires more serious investment to contribute. However, if you just want to learn about how mining works or FPGAs, this is a nice introduction project. |
I didn't write that Python code, but based on context I can give you my best guess. Open-Source-FPGA-Bitcoin-Miner/projects/VHDL_Xilinx_Port/miner.py Lines 389 to 392 in fd76bc9
That code is doing an initial benchmark of the FPGA by submitting a known job with a known solution and timing how long the FPGA takes to return with a solution. The code likely assumes the FPGA is doing a linear sweep of nonces. For example the solution might be a nonce of
Which would be 268MH/s in this example. Back to the actual code, we can infer that the correct solution nonce must then be |
Hello penguin359, fpgaminer, penguin359, I really really appreciate your help and guidence. Thank you for clearning that out for me. I knew I couldnt make any profit but was just not sure why slushpool wasnt showing anything on the workers. I do understand that the hashrate is too slow. But I was expecting a worker registered with a hashrate of 0 or Nill. fpgaminer. To both of you angels, Thanks, |
I´m trying to connect to Slushpool using this Miner loaded on a DE0 Nano SoC. Even though the miner connects to the stratum proxy and the Slushpool page creates a new worker if I run the miner specifying the worker on the "config" file , the page show me the worker as "offline". It doesn´t show me any actual hashrate, too. In the miner window, after it begins accepting jobs, the hashrate is about ~2100 MH/s. I know it´s nothing compared to the hashrates nowadays, but shouldn´t the page at least show me the hashrate, or my worker active? Thanks.
The text was updated successfully, but these errors were encountered: