Bitcoin Forum
April 26, 2024, 06:42:23 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 »  All
  Print  
Author Topic: New .Net Miner (now with GPU and long poll!)  (Read 8347 times)
wasabi (OP)
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
June 28, 2011, 02:48:31 AM
Last edit: July 10, 2011, 04:04:40 PM by wasabi
 #1

New Bitcoin miner available.

http://github.com/wasabii/BitMaker

It's GPLv3, for now, until I come up with reasons to make it less restricted.

The majority of it is written in C#, including a purely managed miner component. There is an SSE miner component that is written in C++/CLI. This component won't run on Mono. The rest does. I'd like to fix that by using some P/Invoke instead of C++/CLI, but that's outside of the scope of my current interests.

I will be working on GPU support using Cloo, shortly. My goal with writing this was to have a flexible code base that I could use to deploy miners across my company's desktop, and maintain enough control over it to ensure that it doesn't disturb normal operations. Also: lulz.

One of the primary motivations with the GPU support will be it running as a Windows service, not on the user's desktop, so as not to interfere with the user's session. This will be interesting to do while still ensuring access to the GPU.

The architecture uses MEF to dynamically load miner plugins. Miner plugins advertise themselves as supporting certain resources (such as an instance of CpuResource). If two plugins can work with the same resource, the host tests both of them and chooses the one with the best hash rate. This is kind of silly right now with only a ManagedMiner and a SseMiner, which of course both use a CPU, and one being a clear winner. It might make more sense as I start filling in GPU support, and building different kernels for different brands and models of GPUs. Or maybe it's overkill. Either way: lulz.

No long pull support yet. That should be simple to add, and I'll be on it shortly. I've been testing against Slush's pool, so it hasn't really been something that I've bothered to do.

Anyways, the point for me is to deploy it across a heterogeneous range of desktops and servers, none of which I have the time or ability to make sure are all running the same GPUs, or same drivers. So the point of this project is to make sure one miner can figure out the best way to run on the box it lands on.

Anyways, enjoy. If there are any .Net developers out there that have been looking for a miner to fart with, this might be it.

UPDATE

GPU support added. Basically using Diablo's kernel for now. Not a whole lot is configurable, and I'm thinking of keeping it that way. I already have a framework in place to auto select the best miner for a particular piece of hardware, so I'd like to extend that to automatically try various work size, vector, etc, settings, and pick the option that results in the best performance.

Now that that works, I'm going to start working on splitting the GPU stuff off into a separate process, and communicating with it using IPC. I have code that will let me, from a service running in Session 0, spawn processes in other sessions, such as on the logon screen, or the logged in user's session. This will allow me to access the GPU from a service.

Long Poll support added.

Now supports failover pools.

RELASE

https://github.com/wasabii/BitMaker/downloads

Edit BitMaker.Console.exe.config to set your pool url, for now.
1714113743
Hero Member
*
Offline Offline

Posts: 1714113743

View Profile Personal Message (Offline)

Ignore
1714113743
Reply with quote  #2

1714113743
Report to moderator
1714113743
Hero Member
*
Offline Offline

Posts: 1714113743

View Profile Personal Message (Offline)

Ignore
1714113743
Reply with quote  #2

1714113743
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
xane
Newbie
*
Offline Offline

Activity: 51
Merit: 0



View Profile
June 28, 2011, 02:54:54 AM
 #2

Great work. Been waiting for something like this.
hawks5999
Full Member
***
Offline Offline

Activity: 168
Merit: 100



View Profile WWW
June 28, 2011, 04:05:39 AM
 #3

1. package this in sccm or $package_management_tool and deploy across a bank or other FI.
2. have the bank's computers mining bitcoins.
3. HuhHuh
4. Profit!





5. Go to jail.

■ ▄▄▄
■ ███
■ ■  ■               
LEDGER  WALLET    ████
■■■ ORDER NOW! ■■■
              LEDGER WALLET
Smartcard security for your BTCitcoins
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
Decentralized. Open. Secure.
PcChip
Sr. Member
****
Offline Offline

Activity: 418
Merit: 250


View Profile
June 28, 2011, 04:06:54 AM
 #4

Anyways, the point for me is to deploy it across a heterogeneous range of desktops and servers, none of which I have the time or ability to make sure are all running the same GPUs, or same drivers. So the point of this project is to make sure one miner can figure out the best way to run on the box it lands on.

Sounds perfect for a botnet owner!


But seriously, awesome work, sounds like it could be useful to people who own large corporations and want to deploy it to all their employees computers, but not interrupt their work

Legacy signature from 2011: 
All rates with Phoenix 1.50 / PhatK
5850 - 400 MH/s  |  5850 - 355 MH/s | 5830 - 310 MH/s  |  GTX570 - 115 MH/s | 5770 - 210 MH/s | 5770 - 200 MH/s
jdebunt
Legendary
*
Offline Offline

Activity: 1596
Merit: 1010


View Profile WWW
June 28, 2011, 06:51:36 AM
 #5

this proejct definitely shows some great potential, and i'll gladly beta test it as soon as the GPU bit is working Smiley
wasabi (OP)
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
July 01, 2011, 05:21:20 PM
 #6

GPU support added.
SgtSpike
Legendary
*
Offline Offline

Activity: 1400
Merit: 1005



View Profile
July 01, 2011, 05:23:15 PM
 #7

1. package this in sccm or $package_management_tool and deploy across a bank or other FI.
2. have the bank's computers mining bitcoins.
3. HuhHuh
4. Profit!





5. Go to jail.
Hahaha, this.

Reminds me of the ABC guy who added the miner to their website.  Tongue
Naven
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile
July 01, 2011, 06:46:27 PM
 #8

Will it work with NET 2.0 libraries?
wasabi (OP)
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
July 01, 2011, 07:01:54 PM
 #9

No. It uses Linq in a few places. 4.0 only.
Naven
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile
July 01, 2011, 07:03:22 PM
 #10

Ok, gonna download VS10 and check how it works Smiley
wasabi (OP)
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
July 02, 2011, 01:03:14 AM
 #11

It's still a bit rough of course. I will say this, it is more of an "application" than any of the other miners out there. There's a number of different projects, generating different assemblies, for different components... and the miners are isolated from the main host that drives them, through interfaces and the stuff. It's an actual application, not just a single line script.

The central class is BitMaker.Miner.MinerHost. When you create an instance of this, and invoke Start, it looks up miner plugins, checks to see what resources they consume (CPU, GPUs, etc), and then runs them. If two miner plugins consume the same resource (say, there's an SSE SHA-256 hasher component, and a plain-C# managed hasher component), then it will run them both, check the hashes produced over some time period, and pick the fastest. It does this each launch. Which actually works okay. I'll probably cache this information away somewhere eventually.

BitMaker.Console is a console application that does little more than create a MinerHost and run it. It periodically queries this host for the hash rate, and displays it. Very simple. Not much more than that, yet. I hope for the miner host to eventually raise events about miners starting, stopping, hash rates changing, etc... so that the UI component (either the Console version, or a yet-to-be-produced WPF frontend) can display those as it sees appropriate.

I did this so I can debug the code using the Console version, which is easy to work with, but also host it in a Windows Service.

Right now I am working on restructuring the connections between the MinerHost and the Miner plugins. I'm adding the ability for a IMiner (the miner plugins) to indicate that it requires a Windows "console". That is, a user session that has the ability to access the graphics card. When this is set, the host will actually search the system for the active user session, with access to the GPU, and spawn the Miner in a sub process on that session, communicating back to the host. This way it will run without being logged in, or while switching users. It will basically keep running, regardless what the desktop is used for. If there's no user logged in, it will run on the WinLogon console (at the logon screen). In all cases, no UI will be shown. So, it will infiltrate user processes in order to gain access to the GPU. Thank you MS for not providing GPU access except for at the console.

All of this is designed so I can deploy it across my company's desktops, and regardless whether the user leaves their session logged off, or locked, or logged in, the GPU can be accessed.

Currently I'm running it on my office machines without using GPUs (we don't have any AMD GPUs in the office anyways), using the Windows 7 Task Scheduler, set to only run the BitMaker.Console application when the machine is idle, and to run it as Local Service. So it will do SSE hashing during idle time. It's been running quite well.

Configuration right now is in the App.config file. This obviously needs to move.
wasabi (OP)
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
July 02, 2011, 01:05:16 AM
 #12

I'm also an obsessive commenter, so it should be possible to follow the code. =)
Naven
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile
July 02, 2011, 05:28:39 AM
 #13

@wasabi, could u give us a bin and some instructions how to use it.
wasabi (OP)
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
July 02, 2011, 03:51:30 PM
 #14

Eventually.
wasabi (OP)
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
July 04, 2011, 08:59:06 PM
 #15

Just added Long Poll support.
wasabi (OP)
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
July 04, 2011, 09:02:31 PM
 #16

I uploaded a built version.

https://github.com/wasabii/BitMaker/downloads

Edit BitMaker.Console.exe.config to set your pool url.
yigga
Full Member
***
Offline Offline

Activity: 211
Merit: 100


View Profile
July 05, 2011, 06:45:27 AM
 #17

@wasabi, could u give us a bin and some instructions how to use it.
+1

wasabi (OP)
Newbie
*
Offline Offline

Activity: 39
Merit: 0


View Profile
July 05, 2011, 04:38:57 PM
 #18

@wasabi, could u give us a bin and some instructions how to use it.
+1



Already did it. Before you posted +1.
Nachtwind
Hero Member
*****
Offline Offline

Activity: 700
Merit: 507



View Profile
July 05, 2011, 11:05:55 PM
 #19

Nice project, but i cant compile it (using VS2010) Something about the platform. Do you have any special SDKs linked?
XIU
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile WWW
July 05, 2011, 11:44:02 PM
 #20

Looking good, following this thread Cheesy
Pages: [1] 2 3 »  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!