Bitcoin Forum
December 09, 2016, 05:46:29 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 [2] 3 »  All
  Print  
Author Topic: New .Net Miner (now with GPU and long poll!)  (Read 7440 times)
wasabi
Jr. Member
*
Offline Offline

Activity: 31


View Profile
July 06, 2011, 01:03:10 AM
 #21

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

Mind giving me the exact message? My guess is you aren't on 64 bit Windows. Which is required. I didn't bother to write a 32 bit version of the SSE crud.

I should probably fix this and just leave SSE disabled.
1481305589
Hero Member
*
Offline Offline

Posts: 1481305589

View Profile Personal Message (Offline)

Ignore
1481305589
Reply with quote  #2

1481305589
Report to moderator
1481305589
Hero Member
*
Offline Offline

Posts: 1481305589

View Profile Personal Message (Offline)

Ignore
1481305589
Reply with quote  #2

1481305589
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Nachtwind
Hero Member
*****
Offline Offline

Activity: 700



View Profile
July 06, 2011, 06:58:04 AM
 #22

Oh nevermind. it was late last night i tried to compile - i havent had the Platform SDK installed. Everything is working now. Looks great :0)
entens
Newbie
*
Offline Offline

Activity: 20


View Profile
July 06, 2011, 02:16:13 PM
 #23

No. It uses Linq in a few places. 4.0 only.
Will it work with NET 2.0 libraries?

Actually it should be possible to backport to NET 3.5 and into Visual Studio 2008 as the only NET 4.0 dependency ('System.Componentmodel') could be either replaced with MEF or worked around. I'll take a better look at the scope of changes later tonight.
wasabi
Jr. Member
*
Offline Offline

Activity: 31


View Profile
July 06, 2011, 03:15:59 PM
 #24

System.ComponentModel.Composition is MEF.
entens
Newbie
*
Offline Offline

Activity: 20


View Profile
July 06, 2011, 06:03:21 PM
 #25

System.ComponentModel.Composition is MEF.

Exactly. Unless you steal the assembly out of the GAC, it is easier to resort to MEF rc3 for backporting.
wasabi
Jr. Member
*
Offline Offline

Activity: 31


View Profile
July 06, 2011, 07:20:52 PM
 #26

I guess I find myself not too interested in pulling this off, or polluting the code enough to accomplish it. Either way, you are going to be installing this software on other machines. Can either bundle .Net 4 with it, or do something like AOT it with Mono.

I'd be more interested in making it compatible with Mono.
entens
Newbie
*
Offline Offline

Activity: 20


View Profile
July 07, 2011, 04:06:13 PM
 #27

I guess I find myself not too interested in pulling this off, or polluting the code enough to accomplish it. Either way, you are going to be installing this software on other machines. Can either bundle .Net 4 with it, or do something like AOT it with Mono.

I'd be more interested in making it compatible with Mono.

After looking at the code last night that was my general feeling also. Getting it to compile under Mono would be more groundbreaking than backporting to NET 3.5.
Nachtwind
Hero Member
*****
Offline Offline

Activity: 700



View Profile
July 07, 2011, 07:56:46 PM
 #28

ok.. late night question again: How to set what minerplugin to use - so wether it is GPU or CPU? I dont find the point where it does that..
wasabi
Jr. Member
*
Offline Offline

Activity: 31


View Profile
July 08, 2011, 12:37:09 AM
 #29

You don't really yet. It loads and attempts to run every plugin it finds. If the .Gpu assembly is in the same folder as the .exe, it's tested, and runs.

If the .Sse assembly is there, it's tested and runs. Same with .Managed.

Step #1 for me was getting an actual working miner. Next steps are making the thing configurable, usable, etc. I had previously decorated the code with Console.WRiteLIne's for each plugin, so you could see what the hell was going on, but kind of removed them all.
1bitc0inplz
Member
**
Offline Offline

Activity: 112


View Profile
July 08, 2011, 01:24:56 AM
 #30

@wasabi

I see you said you used Cloo. How did you like that? I had looked at it previously for another project, and I was curious what your impressions were.

Keep up the good work, this is an interesting project for sure!

Mine @ http://pool.bitp.it - No fees, virtually 0 stales, what's not to love!
Chat with us @ #bitp.it on irc.freenode.net
Learn more about our pool @ http://forum.bitcoin.org/index.php?topic=12181.0
wasabi
Jr. Member
*
Offline Offline

Activity: 31


View Profile
July 08, 2011, 01:38:43 AM
 #31

It's decent. It's a proper wrapping of OpenCL. There's a small annoyance with a memory leak of ComputeEvent's being generated even though you pass null as a event list for most calls. That's easy enough to solve by passing a list to put them in and disposing of them immediately though. The only thing really wrongn with it is a complete lack of documentation as far as I can see. That's fine though, since it's nothing but a loose wrapper over OpenCL itself.
wasabi
Jr. Member
*
Offline Offline

Activity: 31


View Profile
July 10, 2011, 04:04:21 PM
 #32

Okay. I now support multiple pools. The format of the .config file has changed.


    <bitmaker.miner>
        <pools>
            <add
                url="http://user:pass@host:8332/" />
            <add
                url="http://user:pass@host:8332/" />
            <add
                url="http://user:pass@host:8332/" />
        </pools>
    </bitmaker.miner>


Each time a thread desires work, it starts at the top and works it's way down. So, the pool at the top, if it's working, is currently always used. If it fails, the next one is tried. Work gets submitted back to the correct pool.

Thinking of implementing some sort of priority classing and load balancing to that. Maybe poolGroup or something.
Zagitta
Member
**
Offline Offline

Activity: 84


View Profile
July 13, 2011, 04:40:55 AM
 #33

What speed are you seeing on the completly managed SHA256 hasher you've made compared to the one built into the .net libary?
wasabi
Jr. Member
*
Offline Offline

Activity: 31


View Profile
July 13, 2011, 05:58:06 PM
 #34

What speed are you seeing on the completly managed SHA256 hasher you've made compared to the one built into the .net libary?

Don't know. Never tried the .Net one. I assume much faster. The .Net one's interface requires you to submit a byte[] of the data, which it no doubt has to split up internally into 64 byte blocks, and add the padding to. Additionally, when output, it probably reverses the endian. And thus it has to reverse it again when doing the second hash. And the second hash no doubt has to be copied, and padded, too. Also, I suspect that it probably uses CryptoAPI, so results in a P/Invoke.
Economics
Jr. Member
*
Offline Offline

Activity: 35


View Profile
July 13, 2011, 07:55:21 PM
 #35

I can't get the miner to log into deepbit.  It keeps giving me an authentication error.

Is anyone else having this problem?

--E
Zagitta
Member
**
Offline Offline

Activity: 84


View Profile
July 13, 2011, 07:58:24 PM
 #36

What speed are you seeing on the completly managed SHA256 hasher you've made compared to the one built into the .net libary?

Don't know. Never tried the .Net one. I assume much faster. The .Net one's interface requires you to submit a byte[] of the data, which it no doubt has to split up internally into 64 byte blocks, and add the padding to. Additionally, when output, it probably reverses the endian. And thus it has to reverse it again when doing the second hash. And the second hash no doubt has to be copied, and padded, too. Also, I suspect that it probably uses CryptoAPI, so results in a P/Invoke.

You're probably right about the first part however i only think the non managed version in the .net framework uses P/Invoke, i mean why else would they also have a managed version?

http://msdn.microsoft.com/en-us/library/system.security.cryptography.sha256managed.aspx vs  http://msdn.microsoft.com/en-us/library/system.security.cryptography.sha256cryptoserviceprovider.aspx
wasabi
Jr. Member
*
Offline Offline

Activity: 31


View Profile
July 13, 2011, 09:15:30 PM
 #37

http://msdn.microsoft.com/en-us/library/system.security.cryptography.sha256managed.aspx vs  http://msdn.microsoft.com/en-us/library/system.security.cryptography.sha256cryptoserviceprovider.aspx

I've never even noticed this! Assumed you were talking about the SHA256 one. I'm still going to assume it's faster for all the same reasons minus the P/Invoke.
Furyan
Full Member
***
Offline Offline

Activity: 175



View Profile
July 15, 2011, 01:28:58 AM
 #38

Ok, this is very cool.  I was looking for someone who had done this. If you need help with this, give me a hollar.  There is a reason I may be an ideal coding partner on this, which I will share over PM if you're interested.

You beat me to it.  I was still on the OpenCL .NET wrapper step.  That said, I've only been looking into Bitcoin for 9 days Smiley

Next step:  .NET pushpool.

That may be my next "side" project...
wasabi
Jr. Member
*
Offline Offline

Activity: 31


View Profile
July 15, 2011, 01:27:48 PM
 #39

Ok, this is very cool.  I was looking for someone who had done this. If you need help with this, give me a hollar.  There is a reason I may be an ideal coding partner on this, which I will share over PM if you're interested.

You beat me to it.  I was still on the OpenCL .NET wrapper step.  That said, I've only been looking into Bitcoin for 9 days Smiley

Next step:  .NET pushpool.

That may be my next "side" project...

Well there's work to be done on it, so just do it. Wink
XIU
Member
**
Offline Offline

Activity: 84


View Profile
July 15, 2011, 03:15:49 PM
 #40

http://msdn.microsoft.com/en-us/library/system.security.cryptography.sha256managed.aspx vs  http://msdn.microsoft.com/en-us/library/system.security.cryptography.sha256cryptoserviceprovider.aspx

I've never even noticed this! Assumed you were talking about the SHA256 one. I'm still going to assume it's faster for all the same reasons minus the P/Invoke.

Don't forget that on WinXP (yeah lol) only the Managed one is supported. We use the following code in our systems:

var sha256provider = Environment.OSVersion.Version.Major >= 6 ? new SHA256CryptoServiceProvider() : SHA256.Create();

1xiuHwHk81j4TRnLuLBMvH2ctqtTsubT6
Pages: « 1 [2] 3 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!