Bitcoin Forum

Alternate cryptocurrencies => Mining (Altcoins) => Topic started by: boussena on September 13, 2013, 05:36:58 PM



Title: .net Sharp Miner open source c# cpu scrypt miner!
Post by: boussena on September 13, 2013, 05:36:58 PM
hello,
I m new to this forum, but not to the crypto currency business!
here a .net scrypt miner, I peaked scrypt because I think it's structure could be optimized by Artificial intelligence
this is still basic, but will continue to develop it if you show your interest!

you can download the code at: https://github.com/boussena/Sharp-Miner

Sharp Miner is an open source c# cpu scrypt miner
it's easy to use, easy to understand how the code and the process work!
currently it supports only longpooling pools (stratum will be add next release)
to make it work just edit Run.bat file with any editor with your pool info, save then execute it!

Features

-Multithreading
-Longpooling support
-Fast mining
-Easy to use

Requirement

-windows xp/7/8
-.net 3.5
-Microsoft Visual C++ 2010 runtime
x86: http://www.microsoft.com/en-us/download/details.aspx?id=8328
x64: http://www.microsoft.com/en-ca/download/details.aspx?id=13523

to build the code you will require this library:
https://github.com/replicon/Replicon.Cryptography.SCrypt

Binaries

Donload binaries at http://ge.tt/api/1/files/9lDw94s/0/blob?download

TODO Next

-gui interface
-multiple mining algorithms

Donation

Bitcoin: 1PEUeMrZ2Sf95tEYWSuNjtkXnmaYGdi5Qh
Litecoin: LQQGtMCw3KgdpZHLzqysfYbqFpzgnigNjM

Making the fastest scrypt miner on the internet is my goal!
using the power of .net and the Artifiial Inteligence, the sky is the limit!

Please test and report here! Thanks


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: milone on September 13, 2013, 06:36:11 PM
If your goal is to make this the fastest scrypt miner, you're not going to do it with a CPU miner. Maybe you meant the fastest CPU scrypt miner?

If the former, check out OpenCL.NET (http://openclnet.codeplex.com), which may make it easier to implement GPU mining using OpenCL. I don't know that you'll beat cgminer, but if you're serious about wanting to be the fastest then OpenCL is the way to go.

If the latter, well... good luck!


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: boussena on September 13, 2013, 07:20:48 PM
If your goal is to make this the fastest scrypt miner, you're not going to do it with a CPU miner. Maybe you meant the fastest CPU scrypt miner?

If the former, check out OpenCL.NET (http://openclnet.codeplex.com), which may make it easier to implement GPU mining using OpenCL. I don't know that you'll beat cgminer, but if you're serious about wanting to be the fastest then OpenCL is the way to go.

If the latter, well... good luck!
hello, first thanks for your reply!
my goal is to make fast cpu miner that beat gpu mining! using advanced artificial intelligence techniques (neural networks, genetic algorithms, etc...)
the version above is simple implementation of a srypt miner, good for learning purpose and for simple mining!
however, I m still working on the ai version and I ll release it once I got some interest in the project!


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: boussena on September 14, 2013, 01:04:23 AM
is any body need this? have interest? or have ability to help improving the code?


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: Eli0t on September 14, 2013, 03:41:19 AM
is any body need this? have interest? or have ability to help improving the code?
some comparisons vs poolers miner would be good and instruction sets you have optimised for (SSE AVX ect)


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: spoid on September 14, 2013, 03:52:35 AM
of course there is always interest - but although I'm fairly knowledgeable about neuroinformatics and machine learning, I don't know enough about cryptography to understand where you want to apply them. I thought results were truly random and there is nothing to be "learned".

for me, your program won't stop spamming https://i.imgur.com/cop0jII.png

.bat looks like this:

SharpMiner.exe http://pool1.eu.multipool.us:17777 spoid.1 x


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: boussena on September 14, 2013, 09:01:06 AM
is any body need this? have interest? or have ability to help improving the code?
some comparisons vs poolers miner would be good and instruction sets you have optimised for (SSE AVX ect)
will do this next release, thanks


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: boussena on September 14, 2013, 09:15:40 AM
of course there is always interest - but although I'm fairly knowledgeable about neuroinformatics and machine learning, I don't know enough about cryptography to understand where you want to apply them. I thought results were truly random and there is nothing to be "learned".

for me, your program won't stop spamming https://i.imgur.com/cop0jII.png

.bat looks like this:

SharpMiner.exe http://pool1.eu.multipool.us:17777 spoid.1 x

hello and thanks for your interest! you could help with those knowledges!
first about your error try to install those libraries:
x86: http://www.microsoft.com/en-us/download/details.aspx?id=8328
x64: http://www.microsoft.com/en-ca/download/details.aspx?id=13523

for the project we need to emulate the scrypt using a neural networks (32 network)
currently I m ex-hosted so I will tell the short story
scrypt algorithm have 80 byte input and 32 bye output and do a fixed logic not, random as you said!
a neural network could learn this logic but to make it fast we assign 1 output to each network!
so we end up with 32 networks each have 80 input and one out put!
of course we need to map each input from interval 0, 16 to 0, 1 or -1, 1
this the first step and it could multiply the hashing rate by at least 100 times!
what language do you code with? do you use c# or other ones?
Regards.


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: Carra23 on September 14, 2013, 09:34:05 AM
Good work, but scrypt mining with CPU is a waste. There are a lot of coins out there which will give you much bigger profits with a CPU.


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: eule on September 14, 2013, 10:01:17 AM
I like the idea of a miner AI network learning to get faster, I'm not sure if it's possible at all, sounds like sci-fi.  :D
If you can present your idea a bit more detailed, I'm sure people will be quite interested.
Also I think AI based mining might work best on Primecoin.  ???


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: spoid on September 14, 2013, 06:24:09 PM
thanks, I got it to run, the x86 version was apparently missing. I can mostly do python but I don't think anything but C / C++ can be fast enough for efficient mining? Your program reports huge jumping hashrates, but actually I mostly saw 7-21 kh/s reported in multipool's interface while pooler's cpuminer does around 100 kh/s. (i7 4770k @ 4.2 GHz)

but then again, it's still a prototype


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: boussena on September 14, 2013, 11:21:52 PM
hello all and thanks for replies!
@Carra23: scrypt is just the beginning, i didn't choose sha256 for the reason that we can't bit it with AI, but scrypt I think we can!
@eule: it look sci-fi but I m trying and I m close to it! will use scrypt for now then will scale up!
@spoid: c# could be fast enough using unsafe code (pointers), but for now we need to get it to work then will optimize and recode in other languages!
yes the hash rate calculation still have a glitch, will fix it soon!
I have coded a native c# scrypt class, but it's slow! I someone here could make it faster using unsafe code, this will be helpful!
if some one like to help, please donate! the money will used to outsource coders for many classes we will need!
Thanks All!


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: boussena on September 15, 2013, 07:29:54 AM
here the native version of the scrypt algo! http://pastebin.com/c0aJ0Aew
I hope someone could help me with it because I m not good enough with unsafe codes!


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: spoid on September 19, 2013, 05:58:58 PM
don't give up, things like this usually don't get the attention they deserve around here. you're in the pump and dump forum, should go to the miner's forum. I think this is one of the most interesting threads here right now - sadly I don't have the time to look into he code right now over the next few weeks. Hope I'll find some time later. Very, very interesting. Hope you get some more able programmers on board.


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: milone on September 19, 2013, 09:38:26 PM
don't give up, things like this usually don't get the attention they deserve around here. you're in the pump and dump forum, should go to the miner's forum. I think this is one of the most interesting threads here right now - sadly I don't have the time to look into he code right now over the next few weeks. Hope I'll find some time later. Very, very interesting. Hope you get some more able programmers on board.

I agree. I don't think this will ever beat cgminer as far as hashing speed (especially if you're planning on using cpu only), and creating an "AI" that works better than brute force would be big news to the cryptography world, not just mining. I'm not going to say it's impossible but it's something many people smarter than I have been trying to do for years, and many of them would say it's impossible... at least with current technology in a reasonable amount of time.

This page on using SAT solvers for mining might interest you: http://jheusser.github.io/2013/02/03/satcoin.html. I don't know enough to tell you whether it's possible or feasible, but any idea to improve efficiency over brute forcing is interesting at the very least.

That said, your project is a great way for programmers that don't know C to see how hashing works (someone just asked about this on reddit and I pointed them here). And if you get more programmers involved and do come up with some creative way to improve efficiency, you can always convert that to C and/or OpenCL later.

Even though you may have your expectations set a little high, I appreciate the effort. My advice would be to lower expectations a little and think of it as a community/learning project (maybe move to project development section) and people might take you more seriously. Right now you're saying "I'm going to use a VW Van to drag race against a Ferrari" and you should be saying "Here's my VW Van and I'm looking for people who want to learn about engines and see if we can make it faster."


On a somewhat related note, there's also a C# wrapper for Bitcoin-qt someone created and posted to reddit a while back: http://www.reddit.com/r/Bitcoin/comments/1h1tfg/up_to_date_net_c_wrapper_for_bitcoinqt_video. I haven't looked at that code or your code yet but I plan to one of these days.


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: smolen on September 19, 2013, 11:35:47 PM
creating an "AI" that works better than brute force would be big news to the cryptography world
Just an idea, may be genetic algorithms can be used to select good variable elimination order in SAT-solvers?


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: Wipeout2097 on September 20, 2013, 12:46:45 AM
.net is good for a lot of things. Speed is not one of them.


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: gristlelump on September 20, 2013, 01:13:55 AM
Very interested in this.  Minerd is flagged as a virus by my companies firewall so that's a no go.  Hopefully you have Stratum support built into this soon because that is what my pool uses.  have you had any luck using this with a Stratum proxy.  I have 40+computers I can use this with!


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: hanzac on September 20, 2013, 02:21:16 AM
I don't think it's possible. If AI find a proper path to search, why don't hard code the path? This is too much ambitious and not reasonable.
Have you ever studied deeply the scrypt salsa ROMIX? Don't you find each input words entangled, then salsa ROMIX, then entangled again?
I don't think there's some rules in it.

If you succeed, the security will crash both litecoin's and bitcoin's.

Worth a try, to get beat by the hash algorithm.


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: gristlelump on September 20, 2013, 07:18:04 AM
Got it working with a Stratum proxy...YAY!

Is there any way to enter commands in the BAT file to limit how many cores or threads the miner uses.  Currently it's maxing out the CPU at %100 and that's no good for a work environment!


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: TribalBob on September 20, 2013, 08:02:53 AM
http://www.troll.me/images/monitor-lizard/i-will-be-monitoring-this-thread.jpg


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: gristlelump on October 10, 2013, 01:37:35 AM
Stopped using it.  Got way to many rejected Shares. Up around 40%.  Where is your development process?  :-\


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: j0achim on December 11, 2013, 02:18:28 PM
Fun to play with! Thanks.

One improvement is remembering the nonce on new shares, then on new block reset nonce.



Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: emdje on January 15, 2014, 11:11:40 AM
Any improvements?


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: cmate on April 04, 2014, 12:21:17 AM
Anything new with this?   Alternatives?


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: ksoza on August 30, 2014, 08:54:46 AM
why .net when there is plenty of thing like html5 and other langs. that are made to be versatile and fast...html5 being the most recent i know of that can say let your app b ran and generated on devices as a front end while they would act like a conglomerate pool for say a back end sever set aka cloud that collects the (pool's) algorythims answers (works) and accuratelly spliting p2p work loads elimintaing need for pool configs and most importantly creating the blocks you need to make your coin at speed of lighting since the server is free to just conglomorate its collection of amassed wealth into coin BTCBTCBTCBTC[glow=greenBTCBTCBTCBTCBTC ;D ;D ;D ;D ;D ;D,2,300]BTCBTC[/glow]


Title: Re: .net Sharp Miner open source c# cpu scrypt miner!
Post by: frank_lbt on May 02, 2016, 08:53:52 PM
Hi,

I tried to build and execute your code bu when I call the compiled program with the following args :

SharpMiner.exe stratum+tcp://eu.multipool.us:3340 fr4nky89.PC x

It raises an Exception

System.NotSupportedException: Le préfixe URI n'est pas reconnu.
   at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
   at Miner.getwork(String url, String Credentials) dans C:\Users\frank\Desktop\Sharp-Miner-master\SharpMiner\Miner.cs:ligne 216
   at Miner.Go(Object args) dans C:\Users\frank\Desktop\Sharp-Miner-master\SharpMiner\Miner.cs:ligne 107
   at Miner.go(String url, String user, String pass) dans C:\Users\frank\Desktop\Sharp-Miner-master\SharpMiner\Miner.cs:ligne 46

Have you encoutered this issue ? Thanks for any answers