Bitcoin Forum
November 11, 2024, 10:58:26 PM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 [7] 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 »
  Print  
Author Topic: New demonstration CPU miner available  (Read 386312 times)
j16sdiz
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile
December 31, 2010, 02:48:26 AM
 #121

running ./configure for the .5 release, i get this:

Code:
configure: error: Missing required libcurl >= 7.10.1

this is on ubuntu lucid 32bit, with libcurl 7.19.7-1ubuntu1 installed.
any thoughts on why it'd think 7.19.7 is not >= 7.10.1 ?

sudo apt-get install libcurl4-openssl-dev
nanotube
Hero Member
*****
Offline Offline

Activity: 482
Merit: 501


View Profile WWW
December 31, 2010, 03:09:51 AM
 #122

running ./configure for the .5 release, i get this:

Code:
configure: error: Missing required libcurl >= 7.10.1

this is on ubuntu lucid 32bit, with libcurl 7.19.7-1ubuntu1 installed.
any thoughts on why it'd think 7.19.7 is not >= 7.10.1 ?

sudo apt-get install libcurl4-openssl-dev
doh, forgot to look at the -dev package. thanks, that did it. Smiley

Join #bitcoin-market on freenode for real-time market updates.
Join #bitcoin-otc - an over-the-counter trading market. http://bitcoin-otc.com
OTC web of trust: http://bitcoin-otc.com/trust.php
My trust rating: http://bitcoin-otc.com/viewratingdetail.php?nick=nanotube
lfm
Full Member
***
Offline Offline

Activity: 196
Merit: 104



View Profile
January 01, 2011, 08:31:24 PM
 #123

can we use gcc's __builtin_bswap32()?

ie in miner.h

#define swab32(x) __builtin_bswap32(x)

then it can compile to a single instruction in most cases

should work ok for anything gcc supports

it helps via a fair bit
SawEfDir
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
January 02, 2011, 01:08:25 AM
 #124

I've tried the following patch on a VIA Nano L2200 @ 1600 MHz on a Debian unstable amd64 system.

The speed increase is almost negligible. I've compiled minerd with using -O3, and with the patch, I'm getting really close to
1700kh/s. Without the patch, I'm getting about 1680. Using the builtin seems to gain 1% speed or so.

I've tried it on the testnet and got a good hash really quickly, so it seems to work ok.

Code:
diff --git a/miner.h b/miner.h
index 7979dc0..eda9498 100644
--- a/miner.h
+++ b/miner.h
@@ -22,15 +22,9 @@
 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
 #endif
 
-#define ___constant_swab32(x) ((uint32_t)(                       \
-        (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) |            \
-        (((uint32_t)(x) & (uint32_t)0x0000ff00UL) <<  8) |            \
-        (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >>  8) |            \
-        (((uint32_t)(x) & (uint32_t)0xff000000UL) >> 24)))
-
 static inline uint32_t swab32(uint32_t v)
 {
-       return ___constant_swab32(v);
+       return __builtin_bswap32(v);
 }
 
 extern bool opt_debug;
eMansipater
Sr. Member
****
Offline Offline

Activity: 294
Merit: 273



View Profile WWW
January 05, 2011, 11:52:16 AM
 #125

using minerd -a cryptopp_asm32 --url http://minining.bitcoin.cz:8332 --userpass XXXXXXX:YYYYYYYYYY
and getting http:400 errors on ubuntu lucid.  Anyone have compiled binaries in case I botched up compiling?

If you found my post helpful, feel free to send a small tip to 1QGukeKbBQbXHtV6LgkQa977LJ3YHXXW8B
Visit the BitCoin Q&A Site to ask questions or share knowledge.
0.009 BTC too confusing?  Use mBTC instead!  Details at www.em-bit.org or visit the project thread to help make Bitcoin prices more human-friendly.
slush
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
January 05, 2011, 01:00:48 PM
 #126

using minerd -a cryptopp_asm32 --url http://minining.bitcoin.cz:8332 --userpass XXXXXXX:YYYYYYYYYY
and getting http:400 errors on ubuntu lucid.  Anyone have compiled binaries in case I botched up compiling?

Remove one 'ni' in minining Wink

eMansipater
Sr. Member
****
Offline Offline

Activity: 294
Merit: 273



View Profile WWW
January 05, 2011, 10:55:40 PM
 #127

sorry--that was a mistype in my post.  I am running the command with the proper spelling (I've also gone by IP address).  I still get the 400 error, which is a malformed request, so that's why I was guessing compile error?

If you found my post helpful, feel free to send a small tip to 1QGukeKbBQbXHtV6LgkQa977LJ3YHXXW8B
Visit the BitCoin Q&A Site to ask questions or share knowledge.
0.009 BTC too confusing?  Use mBTC instead!  Details at www.em-bit.org or visit the project thread to help make Bitcoin prices more human-friendly.
David Armstrong
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
January 06, 2011, 10:35:17 AM
 #128

A new CPU miner is now available, making use of the new 'getwork' RPC command.

In the beginning, this is intended largely to demonstrate a 'getwork' miner.  It is written in straight C, with minimal dependencies (libcurl, jansson).

It has successfully generated blocks on testnet.

Linux/BSD release tarball: http://yyz.us/bitcoin/cpuminer-0.5.tar.gz
Windows installer: http://yyz.us/bitcoin/cpuminer-installer-0.5.zip
git repository: git://github.com/jgarzik/cpuminer.git

Contributions welcomed!  (GPL v2 license)  It's still quite rough around the edges.

Hi,

I just have a question about how the miner behaves after it has found a solution to a piece of work.  I briefly looked at the code and the run loop goes something like this:

while (running) {
  get_work();

  rc = find_solution();   // NOTE: solution here is for a reduced difficulty than that required to generate a new bitcoin block and generate 50 BTC.
  if (rc) {
    submit_solution();
  }
}

So my question then is what will happen, and what should happen, when a solution is found part-way through a block of work?  Does the miner continue looking for further solutions, or does it throw away the rest of the piece of work?  (I guess as well the answer partially depends on what the mining server is expecting).

If it throws away the rest of the piece of work that means the miner is behaving differently to the vanilla bitcoin client - in that case the worker loop keeps going until a solution is found (or someone else beats us to the solution).  Would there be any reason for the miner not to continue as well?

thanks,
David.
jgarzik (OP)
Legendary
*
Offline Offline

Activity: 1596
Merit: 1100


View Profile
January 06, 2011, 05:12:46 PM
 #129

So my question then is what will happen, and what should happen, when a solution is found part-way through a block of work?  Does the miner continue looking for further solutions, or does it throw away the rest of the piece of work?  (I guess as well the answer partially depends on what the mining server is expecting).

If it throws away the rest of the piece of work that means the miner is behaving differently to the vanilla bitcoin client - in that case the worker loop keeps going until a solution is found (or someone else beats us to the solution).  Would there be any reason for the miner not to continue as well?

If a solution is found, it is pointless to continue work on that block.  You cannot solve a block twice.

cpuminer's behavior matches the vanilla bitcoin client's BitcoinMiner().

Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
David Armstrong
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
January 07, 2011, 12:40:53 AM
 #130

So my question then is what will happen, and what should happen, when a solution is found part-way through a block of work?  Does the miner continue looking for further solutions, or does it throw away the rest of the piece of work?  (I guess as well the answer partially depends on what the mining server is expecting).

If it throws away the rest of the piece of work that means the miner is behaving differently to the vanilla bitcoin client - in that case the worker loop keeps going until a solution is found (or someone else beats us to the solution).  Would there be any reason for the miner not to continue as well?

If a solution is found, it is pointless to continue work on that block.  You cannot solve a block twice.

cpuminer's behavior matches the vanilla bitcoin client's BitcoinMiner().

I should clarify - I meant specifically in the case when the miner is running as part of a pooled mining effort like the one Slush is running.

The blocks the miner is solving are of a lower difficulty than required to generate a new Bitcoin block and generate the 50 BTC, but of a high enough difficulty to earn a share in the 50 BTC.  It is the pooled mining server that evaluates whether or not the solution is good enough to meet the main bitcoin difficulty level. 

By giving up on this piece of work and moving to the next I might be missing out on a) finding another solution within the same block of work, and therefore another share in the eventual 50 BTC, and b) more importantly, finding a solution within the block that reaches the main bitcoin difficulty threshold and so the whole pool is missing out on a chance of generating 50 BTC.

I've only just started using bitcoin so maybe I missed something obvious - please tell me if this is the case.
j16sdiz
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile
January 07, 2011, 01:17:18 AM
Last edit: January 07, 2011, 01:28:32 AM by j16sdiz
 #131

.....

By giving up on this piece of work and moving to the next I might be missing out on a) finding another solution within the same block of work, and therefore another share in the eventual 50 BTC, and b) more importantly, finding a solution within the block that reaches the main bitcoin difficulty threshold and so the whole pool is missing out on a chance of generating 50 BTC.

.....

You are right. --- But, consider this:

  1. The miner is general purpose. It have to work with the official bincoin client.

  2. You have to get a new block when a new block is generated on the network (this is every ~30sec). You need extra lucks to get two blocks in 30s.

Of course you can have it work for more blocks, but the only time saved is one json-rpc request.
Metal
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
January 07, 2011, 02:27:05 AM
 #132

Cool, I like simplicity of your code. I want to try similar implementation in javascript. Partially because of curiosity and partialy because (inspired by hashcash) it can generate few hashes by fighting comments spam :-).

I just made few tests. In four javascript threads I get ~4khash/s, which is EXTREMELY slow. Probably because javascript is interpreted and without any JIT yet. Would be great if javascript supports GPU. Flash will support GPU soon, so we will see Wink.

I do find the idea of web sites generating bitcoins using their visitor browsers very entertaining. If nothing else, it's a novel idea to monetize your traffic without having to hope your ad network won't get moody on you. Also, a little devious. No downside. Wink

Random ideas in no particular order:

- Flash Pixel Bender. GPU-rendered shaders. Not too sure how practical it is to use that to compute hashes.
- WebGL. more GPU-rendered stuff. meant for graphics too. see above.
- Web Workers: where available, will allow CPU-intensive JS code to run without noticeably slowing down the browser UI. Unfortunately, can't be used to control GPU approaches, but good as a CPU fallback method. Note that many JS engines are using JITs now. you'll get very different results on different browsers.
- unload event handler using a synchronous XHR: fairly reliable way to sync up whatever the browser computed back to a server when the user navigates away. except on some browsers, where periodic syncs are the only way.

Mix it all in a bag, use shaders creatively ( maybe a pixel could encode whether a bunch of hashes met some criteria for example), and you might get hashrates that don't totally suck, multiplied by whatever amount of traffic your site gets.

Interestingly, if the hashrates somehow approached what a real GPGPU solution can output (unlikely as that may be), then miner pooling sites could offer install-less approaches to participate in the pool..
tuxsoul
Newbie
*
Offline Offline

Activity: 40
Merit: 0



View Profile WWW
January 07, 2011, 07:48:52 AM
 #133

using minerd -a cryptopp_asm32 --url http://minining.bitcoin.cz:8332 --userpass XXXXXXX:YYYYYYYYYY
and getting http:400 errors on ubuntu lucid.  Anyone have compiled binaries in case I botched up compiling?

Hi @emansipater,

I have debian and ubuntu packages of bitcoin-cpuminer (0.5), you can find info here:
http://bitcointalk.org/index.php?topic=2207.0

This packages are no oficial.
Sorry my english is bad  Wink.
Greeting's.
m0mchil
Full Member
***
Offline Offline

Activity: 171
Merit: 127


View Profile
January 07, 2011, 08:12:53 AM
 #134

You are right. --- But, consider this:

  1. The miner is general purpose. It have to work with the official bincoin client.

Searching for more than one solution doesn't break compatibility - bitcoind would just reject second solution. Nothing is lost, you will have new search space in a short period.

But even if other miners do this, I am not quite sure if it improves apparent performance (to pool). Every nonce has equal probability.

eMansipater
Sr. Member
****
Offline Offline

Activity: 294
Merit: 273



View Profile WWW
January 07, 2011, 10:55:19 AM
 #135

Thanks so much @tuxsoul!!  If I can ever get set up with the pool I'll be sure to send a donation your way.  I'm afraid that even with the proper compile I'm getting the http:400 error.  Can anybody provide some insight?  The full message is:
Code:
HTTP request failed: The requested URL returned error: 400
json_rpc_call failed, retry after 30 seconds
and appears no matter what options I run minerd with (against http://mining.bitcoin.cz:8332 that is).  I have an account set up and am using that user/pass but is there a test account too?  Thanks in advance!

If you found my post helpful, feel free to send a small tip to 1QGukeKbBQbXHtV6LgkQa977LJ3YHXXW8B
Visit the BitCoin Q&A Site to ask questions or share knowledge.
0.009 BTC too confusing?  Use mBTC instead!  Details at www.em-bit.org or visit the project thread to help make Bitcoin prices more human-friendly.
slush
Legendary
*
Offline Offline

Activity: 1386
Merit: 1097



View Profile WWW
January 07, 2011, 12:09:14 PM
 #136

Code:
HTTP request failed: The requested URL returned error: 400
json_rpc_call failed, retry after 30 seconds

HTTP 40x server returns when JSON response is different that miner should expect. That means bad login, bad password, malformed request and so on. Typically the JSON response tell you what wrong happen. I don't know why miner does not display this message to user...

HTTP 50x is returned when pool has outage.

eMansipater
Sr. Member
****
Offline Offline

Activity: 294
Merit: 273



View Profile WWW
January 07, 2011, 07:07:13 PM
 #137

Found it! (little bit of egg on my face though  Roll Eyes )  Usernames are case sensitive, and mine was autofilled as "eMansipater" when signing up for the account.  D'oh!

If you found my post helpful, feel free to send a small tip to 1QGukeKbBQbXHtV6LgkQa977LJ3YHXXW8B
Visit the BitCoin Q&A Site to ask questions or share knowledge.
0.009 BTC too confusing?  Use mBTC instead!  Details at www.em-bit.org or visit the project thread to help make Bitcoin prices more human-friendly.
David Armstrong
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
January 07, 2011, 11:06:33 PM
 #138

You are right. --- But, consider this:

  1. The miner is general purpose. It have to work with the official bincoin client.

Searching for more than one solution doesn't break compatibility - bitcoind would just reject second solution. Nothing is lost, you will have new search space in a short period.

But even if other miners do this, I am not quite sure if it improves apparent performance (to pool). Every nonce has equal probability.

A nonce that isn't tested has zero probability  Smiley
huesped
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
January 08, 2011, 10:24:42 AM
 #139

Hey

I have an account on minining.bitcoin.cz and I crated own worker. In this line:

Code:
minerd -a cryptopp_asm32 --url http://minining.bitcoin.cz:8332 --userpass XXXXXXX:YYYYYYYYYY

should I write "huesped.name_of_worker:password" or only my nick without nick of worker?
doublec
Legendary
*
Offline Offline

Activity: 1078
Merit: 1005


View Profile
January 08, 2011, 10:38:38 AM
 #140

should I write "huesped.name_of_worker:password" or only my nick without nick of worker?

This first one: "huesped.name_of_worker:password"
Pages: « 1 2 3 4 5 6 [7] 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 »
  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!