Skip to content
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

SIA-Miner #63

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions Makefile

This file was deleted.

47 changes: 12 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,28 @@
# Sia-GPU-Miner
A GPU miner designed for mining siacoins. This miner runs in a command prompt
and prints your hashrate along side the number of blocks you've mined. Most
cards will see greatly increased hashrates by increasing the value of 'I'
(default is 16, optimal is typically 20-25).
A GPU miner plugin designed for mining siacoins. Supports Windows, Mac, and Linux. Unzip this file into your plugin directory for Sia.
E.g. C:\Users\John\Downloads\Sia-UI-v0.4.6-beta-win64\Sia-UI-v0.4.4-beta-win64\resources\app\plugins

![alt text](https://i.imgur.com/s2YMbRa.png "This is awesome!")


## How to Use
1) Build the miner by running `make`.
1) Open Sia-UI

2) Make sure you have a recent version of Sia installed and running.
2) Unlock Wallet

3) Run the miner by running `./gpu-miner`. It will mine blocks until killed with Ctrl-C.
3) Click the mining tab and start mining.

## Configuration
You can tweak the miner settings with five command-line arguments: `-I`, `-C`, `-p`, `-d`, and `-P`.
* -I controls the intensity. On each GPU call, the GPU will do 2^I hashes. The
* You can set the intensity with the provided field. On each GPU call, the GPU will do 2^I hashes. The
default value is low to prevent certain GPUs from crashing immediately at
startup. Most cards will benefit substantially from increasing the value. The
default is 16, but reccommended (for most cards) is 20-25.
* -C controls how frequently calls to siad are made. Reducing it substantially
could cause instability to the miner. Increasing it will reduce the frequency
at which the hashrate is updated. If a low 'I' is being used, a high 'C'
should be used. As a rule of thumb, the hashrate should only be updating a
few times per second. The default is 30.
* -p allows you to pick a platform. Default is the first platform (indexing
from 0).
* -d allows you to pick which device to copmute on. Default is the first device
(indexing from 0).
* -P changes the port that the miner makes API calls to. Use this if you
configured Sia to be on a port other than the default. Default is 9980.

If you wanted to run the program on platform 0, device 1, with an intensity of
24, you would call `./sia-gpu-miner -d 1 -I 24`
default is 20, but recommended (for most cards) is 20-28.

## Multiple GPUs
Each instance of the miner can only point to a single GPU. To mine on multiple
GPUs at the same time, you will need to run multiple instances of the miner and
point each at a different gpu. Only one instance of 'siad' needs to be running,
all of the miners can point to it.

It is highly recommended that you greatly increase the value of 'C' when using
multiple miners. As a rule of thumb, the hashrate for each miner should be
updating one time per [numGPUs] seconds. You should not mine with more than 6
cards at a time (per instance of siad).
Not currently supported. The miner will select the first card by default.

## Notes
* Each Sia block takes about 10 minutes to mine.
* Each Sia block takes about a week or so to mine.
* Once a block is mined, Sia waits for 144 confirmation blocks before the
reward is added to your wallet, which takes about 24 hours.
* Sia currently doesn't have any mining pools.
* Windows is poorly supported. For best results, use Linux when mining.
58 changes: 58 additions & 0 deletions Release_README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
README

Miner v1.0.5-ui
October 23, 2015
===============

The source code for the miner (and Sia as a whole) comes from Nebulous Labs,
check out their website for more info: https://siacoin.com/

The logo comes from Guvnor Co, AU and is licensed under CCC
check out their website for more info: https://thenounproject.com/term/pickaxe/18785/

This readme assumes you downloaded the latest release from the following link. It does not cover compiling from source:
https://github.com/droghio/Sia-GPU-Miner/releases


Anyhow this is the latest plugin build of the Sia-GPU-Miner dubbed version v1.0.5-ui.

THIS PLUGIN SUPPORTS x64 WINDOWS, LINUX, and MAC!
Unzip this to your plugin directory, eg
C:\Users\John\Downloads\Sia-UI-v0.4.6-beta-win64\Sia-UI-v0.4.4-beta-win64\resources\app\plugins



If you are still having problems and are missing things (probably libcurl.dll) you might want to make sure your antivirus isn't
messing with your zip file. Norton is notorious for killing dlls without consent.

If the miner fails to load make sure you have the 2012 MS Redistributable installed:
https://www.microsoft.com/en-us/download/details.aspx?id=30679

Other hints and tips:
1. MAKE SURE YOU CHANGE THE INTENSITY!
I upped the default intensity to 16 but make sure you
change this if your care can take it! I'm talking about
a 200+MH/s mining rate difference for a proper intensity value.
I use an intensity of 27 on my 7970 and get about 770MH/s on a hefty overclock.

To change this you'll need to launch the miner from a command prompt.
a. Hit the Windows key start typing "cmd".
You should see an app called Command Prompt

b. After opening the command prompt type "cd " into the black window then
click and drag the folder where the sia-gpu-miner.exe lives into the window.

You should see something like:
C:\>cd C:\Users\John\Downloads\sia-gpu-miner.exe

c. Press enter, then type "sia-gpu-miner.exe -I 27" where you replace the "27" with
whatever intensity works best for your card. Too low and you aren't using
your card's full potential, too high and you get diminishing returns.

2. I compile the binary against AMD's OpenCL libs and this is a 64 bit binary meaning it won't run
on older machines. Even though I am using AMD's libs I have tested this program on a Nvidia 970
and got good hash rates (~1MH/s) so you should be fine using either brand of card.


If you have any questions concerns etc feel free to reach out to me via email or irc (freenode). In the mean time happy mining!
- droghio
21 changes: 21 additions & 0 deletions assets/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 Nebulous

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
63 changes: 63 additions & 0 deletions assets/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
README

Miner v1.0.5-ui
October 23, 2015
===============

The source code for the miner (and Sia as a whole) comes from Nebulous Labs,
check out their website for more info: https://siacoin.com/

The logo comes from Guvnor Co, AU and is licensed under CCC
check out their website for more info: https://thenounproject.com/term/pickaxe/18785/

This readme assumes you downloaded the latest release from the following link. It does not cover compiling from source:
https://github.com/droghio/Sia-GPU-Miner/releases

Anyhow this is the latest Windows build of the Sia-GPU-Miner dubbed version v1.0.5.
Assuming everything unzipped correctly you should have the following five files.
- README (That's me.)
- LICENSE
- sia-gpu-miner.exe
- sia-gpu-miner.cl
- libcurl.dll

If you are missing any of these files you have a problem,
try redownloading the binary from my github:
https://github.com/droghio/Sia-GPU-Miner/releases

If you are still missing things (probably libcurl.dll) you might want to make sure your antivirus isn't
messing with your zip file. Norton is notorious for killing dlls without consent.

If the miner fails to load make sure you have the 2012 MS Redistributable installed:
https://www.microsoft.com/en-us/download/details.aspx?id=30679

Other hints and tips:
1. MAKE SURE YOU CHANGE THE INTENSITY!
I upped the default intensity to 20 but make sure you
change this if your care can take it! I'm talking about
a 200+MH/s mining rate difference for a proper intensity value.
I use an intensity of 27 on my 7970 and get about 770MH/s on a hefty overclock.

To change this you'll need to launch the miner from a command prompt.
a. Hit the Windows key start typing "cmd".
You should see an app called Command Prompt

b. After opening the command prompt type "cd " into the black window then
click and drag the folder where the sia-gpu-miner.exe lives into the window.

You should see something like:
C:\>cd C:\Users\John\Downloads\sia-gpu-miner.exe

c. Press enter, then type "sia-gpu-miner.exe -I 27" where you replace the "27" with
whatever intensity works best for your card. Too low and you aren't using
your card's full potential, too high and you get diminishing returns.

2. If you get an "HTTP error 400" make sure the Sia UI or siad is running AND you have unlocked your wallet.

3. I compile the binary against AMD's OpenCL libs and this is a 64 bit binary meaning it won't run
on older machines. Even though I am using AMD's libs I have tested this program on a Nvidia 970
and got good hash rates (~1MH/s) so you should be fine using either brand of card.


If you have any questions concerns etc feel free to reach out to me via email or irc (freenode). In the mean time happy mining!
- droghio
Binary file added assets/button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/libcurl.dll
Binary file not shown.
Binary file added assets/sia-gpu-miner-Linux
Binary file not shown.
Binary file added assets/sia-gpu-miner-Mac
Binary file not shown.
Binary file added assets/sia-gpu-miner-Windows.exe
Binary file not shown.
File renamed without changes.
58 changes: 58 additions & 0 deletions css/overview.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/* Style Guide:
* Transparent: 70% Opacity
*
* White: #FFFFFF
* Grey-White: #F5F5F5
* Faint-Grey: #ECECEC
* Light-Grey: #DDDDDD
* Grey: #C5C5C5
* Grey-Black: #4A4A4A
* Black: #000000
*/
.frame {
color: #f5f5f5;
}

.welcome {
-webkit-animation: fadein 3s;
position: relative;
top: 25%;
transform: translateY(-25%);
text-align: center;
color: #c5c5c5;
font-size: 48px;
vertical-align: middle;
}
.welcome .large {
font-size: 72px;
}
.welcome .small {
margin-top: 30px;
font-size: 32px;
}


.button{
cursor: pointer;
padding: 10px 20px;
transition: all 1s;
}

.button:not(:hover){
background-color: #f5f5f5;
border-radius: 35px;
}

#intensity{
text-align: left;
}

#hashrate, #balance{
display: none;
}


#hashratehuge{
font-size: 72px;
margin-bottom: 72px;
}
40 changes: 40 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html>
<head>
<!-- CSS -->
<link rel="stylesheet" href="../../css/roboto-condensed-min.css">
<link rel="stylesheet" href="../../css/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="../../css/plugin-standard.css">
<link rel="stylesheet" href="css/overview.css">
</head>
<body>
<!-- Frame -->
<div class="frame">
<!-- Header -->
<div class="header">
<div class="title">Sia GPU Miner</div>
<div class="capsule">
<div class="pod" id="minerstatus">Miner is Idle</div>
<div class="pod" id="gpublocks">Blocks Mined: 0</div>
<div class="pod" id="hashrate">Hash Rate: 0 MHz</div>
<div class="pod" id="balance">Balance Unknown</div>
<div class="pod" id="lock">Status Unknown</div>
</div>
</div>

<div class="welcome">
<div id="hashratehuge">Miner is Idle</div>
<a class="button" id="toggleminer">Start GPU Miner!</a>
<p class="small">
<label>Intensity: </label>
<input type="number" id="intensity" value="16"></input>
</p>
<!--<textarea class="text" id="mineroutput"></textarea>-->
</div>
</div>

<!-- JS -->
<script type="text/javascript" src="js/gpu-miner.js"></script>
<script type="text/javascript" src="js/buttons.js"></script>
</body>
</html>
Loading