Search content
Sort by

Showing 20 of 40 results by chromicant
Post
Topic
Board Mining software (miners)
Re: New demonstration CPU miner available
by
chromicant
on 13/05/2011, 22:16:23 UTC
Sorry I've missed most of the recent discussion...busy with a new addition...

The r10 "trick" of letting it get clobbered requires you know something about the calling convention of the OS in use. The Linux SSE2 code for x86_64 will completely break on Windows, since there's a different set of registers saved between function calls. Depending on what OSX does with r8, you may be able to let it get clobbered, saving you a cycle or two.

I never really found any docs on how the calling convention works under Darwin/Mac OSX. I'm sure reading the GCC source code would enlighten someone. But I also like my sanity.
Post
Topic
Board Mining software (miners)
Re: New demonstration CPU miner available
by
chromicant
on 30/03/2011, 21:08:01 UTC
This is expected.  As mentioned, sse2_64 only works on 64-bit Linux at the moment, so this high speed is not available under Windows.

For those who want to take on a challenge, what you need to do to allow sse2_64 to run on Win64 boxes is to change the assembly to handle the Windows ABI for x86_64.

This is a useful starting point:
https://secure.wikimedia.org/wikipedia/en/wiki/X86_calling_conventions#Table_of_x86_Calling_Conventions.5B1.5D
Since I don't do Windows development, I'm not going to port it. However, I'll look at pull requests on my SSE2 branch.
Post
Topic
Board Mining software (miners)
Re: New demonstration CPU miner available
by
chromicant
on 28/03/2011, 02:25:04 UTC
Ok. Took a look at the logs. Seems like configure is not doing the yasm test correctly. Can you run yasm --version and open an issue on my Github page for cpuminer?

https://github.com/chromicant/cpuminer/issues

And to talk to myself...I think I found the problem. Let me see if I can quickly fix it.

Edit

Fixed pushed to http://github.com/chromicant/cpuminer on the sse2 branch. Can people can pull from it and test to make sure it builds on other machines? It works on mine Ubuntu 10.10 x86_64 box with YASM 1.1.0.2352.

It also contains a minor update to the assembly code to remove the few pipeline stalls. I was playing with a profiler, and looking at some data people posted here, and made some minor fixes. Don't really see any noticeable speedup, but it should be there in theory. And we know how well theory is in practice.
Post
Topic
Board Mining software (miners)
Re: New demonstration CPU miner available
by
chromicant
on 27/03/2011, 16:03:30 UTC
Ok. Took a look at the logs. Seems like configure is not doing the yasm test correctly. Can you run yasm --version and open an issue on my Github page for cpuminer?

https://github.com/chromicant/cpuminer/issues
Post
Topic
Board Mining software (miners)
Re: New demonstration CPU miner available
by
chromicant
on 27/03/2011, 12:45:03 UTC
You can use a pastebin for the logs. Need them to help you out.
Post
Topic
Board Mining software (miners)
Re: New demonstration CPU miner available
by
chromicant
on 25/03/2011, 22:22:38 UTC
I'm having trouble getting decent speeds out of Jgarzik's miner on Ubuntu 10.10 (Phenom II X4 920). I'm only getting 125 kh/s per thread (4 threads), which drops to 50 kh/s with 4way enabled.

The same computer does 10+ mh/s using ufasoft's Win SSE2 miner.
Can someone please enlighten me as to how I can get the same performance under Linux.

If you do a ./minerd --help, is sse2_64 listed as a valid algorithm to use? If not, you need a copy of yasm 1.1 from Debian and use that. That'll compile the SSE2 code. You also need to be running a 64-bit version of Ubuntu.

The SSE2 code is not well-tuned for some AMD architectures, it seems.
Post
Topic
Board Mining
Re: UltraSPARC III @ 1200Mhz
by
chromicant
on 25/03/2011, 22:19:43 UTC
Thats funny since it is exactly the same speed the VIA-C7 hashing engine achieves with bitcoin. ($67 including motherboard).

Even funnier. A T2 system is *cough* slightly *cough* more expensive:

http://cgi.ebay.com/SUN-Coolthreads-UltraSPARC-T2-Enterprise-T5120-Server-/180516461674

Only $10k USED!

Course, if you have a fab shop, you can make your own T2 (the design is Open Sourced)...in theory. Don't know if anyone has ever done that.
Post
Topic
Board Mining
Re: UltraSPARC III @ 1200Mhz
by
chromicant
on 24/03/2011, 19:44:05 UTC
According to sun, T2 can do "32 Gb/s/chip" for SHA-1
let's just assume it's as fast for SHA-256.
let's further assume it's magic and has 0 setup cost.
SHA256 block size is 512 bits, so 32Gb/s / 512 = 62.5M sha256 blocks/s
one bitcoinhash is 2 sha256 blocks, so 62.5M / 2 =
31.25Mhash/s.

Not bad for a crypto accel.
A $110 HD5770 does > 5x that.
I did find a student paper which measured the performance of the T2 here: http://cs.anu.edu.au/student/projects/10S2/Reports/Cody%20Christopher.pdf...and ArtForz really hit the nail on the head (like, freaky scarily on the head) compared to the experimental results. Seems like if you run 8 threads worth on a T2 (there's 8 hashing units on each T2 die, from what I can read), you would hit ~31.25Mhash/sec if you hash 8k of data.

Where the paper is a little unclear is if hashing 512 bits on the hardware is worthwhile, since it seems like the Sun supplied code will use the hardware if it's worth it. From section 4.2.1 in the paper, if we force the hardware to hash 512 bits, then we see that the speed of the hardware is only 1510.94kb/sec. This leads to a rate of 2.95M sha256 blocks/s, or 1.5Mhash/s.

Looks like the setup cost is prohibitive for small blocks, but for larger ones, it's negligible. Tradeoff for the T2 is around the 8k mark.
Post
Topic
Board Mining software (miners)
Re: New demonstration CPU miner available
by
chromicant
on 23/03/2011, 12:17:38 UTC
Ok guys,
Question with bitcoins as reward for good info.

I have a Sun Fire V880 with 8 UltraSPARC III Cpus @ 1200mhz at my disposal. This thing is a beast. Surely there is a way for me to get some decent hashing going on with it?

I've noticed there's not really much of a port, or anything that's been moved over doesn't get decent speeds.

Can someone give me the hot tip on how I can start really utilising this machine?

Use a good compiler and the C code?

The UltraSPARC III is just a standard RISC 64-bit CPU. The UltraSPARC III does have "MMX Like" instructions (VIS), but the ISA doesn't even have a bit rotate if I recall, which makes it useless for trying SIMD tricks to speed up SHA-anything.

You may get something with some hand assembly, but I don't think it'll hold a candle to the tuned SSE2 code that's in some of the miners out there on modern hardware.
Post
Topic
Board Mining
Re: UltraSPARC III @ 1200Mhz
by
chromicant
on 23/03/2011, 12:01:37 UTC
You want an UltraSparc T2 for SHA256 acceleration. I've had zero luck trying to get a test account on one....it's not common hardware someone would say "sure, have a shell account on this $10k server".
Post
Topic
Board Mining software (miners)
Re: ubuntu problem
by
chromicant
on 23/03/2011, 02:50:24 UTC
cdnbcguy@hiscomputer:~/cpuminer-0.8.1$ minerd
No command 'minerd' found, did you mean:
 Command 'mined' from package 'mined' (universe)
minerd: command not found

What the problem, please?
Try ./minerd since . is traditionally not on your path.
Post
Topic
Board Mining software (miners)
Re: New demonstration CPU miner available
by
chromicant
on 22/03/2011, 13:30:15 UTC
So I tried to compile on my newer MacBook Pro (Intel i7; OS 10.6.6) with Xcode (and YASM 1.1.0) installed using the tarball version 0.8 of cpuminer with chromicant's patch. Indeed, the previous issue I had with libcurl seems to be machine-specific thing, but I ran into another problem. The configure runs fine but I run into a "in x86_64/libx8664.a, file was built for unsupported file format which is not the architecture being linked (x86_64)" error while trying to make amd2_sse64 module.    
Here is the output after running make:

Code:
Making all in x86_64
/usr/local/bin/yasm -f elf64 sha256_xmm_amd64.asm
rm -f libx8664.a
ar cru libx8664.a sha256_xmm_amd64.o
ranlib libx8664.a
ranlib: warning for library: libx8664.a the table of contents is empty (no object file members in the library define global symbols)

Any ideas? If I make without the sse2_amd64 module it builds and runs fine using the original algorithms as you may have guessed.

Try replacing "-f elf64" with "-f macho64" in the x86_64/Makefile as a workaround. Also, you need to make sure you're producing a 64-bit binary while you're compiling. Can't remember how to do that with XCode, but if you don't, the SSE2 code as written will fail. The code uses the added registers that come with the x86_64 architecture to prevent reading/writing to memory.
Post
Topic
Board Mining software (miners)
Re: New demonstration CPU miner available
by
chromicant
on 21/03/2011, 20:07:54 UTC
I have only spent a couple minutes playing with it but I got stuck at the same byteswap.h problem described previously in this thread (see: http://bitcointalk.org/index.php?topic=1925.msg48679#msg48679). I am sure it is possible so I'll give it another go when I have some time.

Hmm. Looks like it'll be a 5 line patch to fix that. Something like (the 5 lines plus the rest of the define):

Code:
#if defined(__APPLE__)
#include
#define bswap_16 OSSwapInt16
#define bswap_32 OSSwapInt32
#define bswap_64 OSSwapInt64
#elif ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
#define WANT_BUILTIN_BSWAP
#else
#include
#endif

Taken from XOrg, which had the same problem on OSX.

...and I think jgarzik's solution needs to be massaged into the OSX code above for maximum cleanliness!
Post
Topic
Board Mining software (miners)
Re: New demonstration CPU miner available
by
chromicant
on 21/03/2011, 19:50:47 UTC
As far as I know no one has been able to easily compile and get this to run on OS X natively. However, you can run the miner (unfortunately without ufasoft's sse2 optimizations) using the following steps:

Urm. Have you tried to compile it natively using XCode on OSX 10.6 on a machine that can handle SSE2? I'd like to see some bug reports as to why it won't compile. I don't think there's anything super specific that would prevent a build from happening. I've seen nothing on what sort of compile errors one gets on OSX. Also remember, I crafted the SSE2 code in jgarzik's miner to require the 64-bit mode of Intel/AMD chips. So if you're running a 32-bit kernel/userspace, you won't be able to use it.

(I'd try myself, but my Mac is in little bits...and it's just a CoreDuo, so I couldn't test the SSE2 code if I wanted to)

I do know my SSE2 WILL NOT WORK in win64, since the calling ABI is different.

The one place where there probably is a problem is I used ELF64 as the output for yasm. That should be Mach-O for OSX...but it may also just work.
Post
Topic
Board Bitcoin Discussion
Re: Can we keep bitcoin purses safe keeping them in special hardware?
by
chromicant
on 21/03/2011, 13:24:22 UTC
I thought that a separate little computer - such as a bankcard terminal - could be connected via serial port and could use its own keypad and display to get transaction confirmation from user. Connected by serial (RS232) this is a low bandwidth connection that would isolate it from attacks on the network.

A bankcard terminal is merely a form factor for a small computer. A desktop appliance with minimal display and often printing ability. Many devices would fit this purpose at a low cost.

Actually...that's an interesting idea.

I've been working with a STM8S-DISCOVERY board to run GNUK on the STM32 part. I still have some bugs to work out on the GnuPG implementation, but it may be interesting to try to hack up some code to make a smartcard-like application that can do transaction signing on said hardware. There is a bit of work that would need to be done on hardware as well as getting a client to be able to read the wallet from the hardware.

May be an interesting proof of concept.
Post
Topic
Board Mining software (miners)
Re: New demonstration CPU miner available
by
chromicant
on 21/03/2011, 10:41:42 UTC
Why sse2_amd64 algorithm did not compiling? My system is ubuntu 10.04 64 bit and Core2Duo P8400 cpu.

As I can see in miner.h there is a definition WANT_X8664_SSE2, with checking sse2 support. But checking don't passing. When i comment this checking and try to 'make' there is an error:

Don't do that. There's a reason the check is failing.

If you looked at config.log, it probably says your version of yasm is 0.8.0. You need 1.1.0. For Ubuntu, you either compile it yourself or get the right version from Debian's repository.
Post
Topic
Board Development & Technical Discussion
Re: Order ID in a new transaction type?
by
chromicant
on 15/03/2011, 13:37:49 UTC
I don't know the crypto side of things-- is it possible to create a half-key which can be combined with another half-key? So for example, the webserver can customize half the key per transaction (leading to unique addresses for the customer), but not have the information to spend that tx until its half-key is combined with the locked-up-safe master-half-key...

Yup. Secret sharing. Really easy math wise as well...it's just a system of linear equations IIRC.
Post
Topic
Board Hardware wallets
Re: Android Bitcoin Wallet
by
chromicant
on 11/03/2011, 23:26:49 UTC
I am still putzing around with my Android client work....but as for [mike]'s Java code, I'd think storing the block headers in an SQLite database may be the way to go, but you'd need to edit that code to do so as I saw it.

But great job on the first pass. I should clean up and release what I have with respect to using C2DM to notify a bitcoin client that blocks are waiting. Also, now that we have a growing DNS spec...I don't feel bad if I am not part of the network as a whole.
Post
Topic
Board Off-topic
Re: Take a break from G/hashes, A New Kind of Graph
by
chromicant
on 11/03/2011, 22:03:02 UTC
Researchers nowadays.

They need to read the literature that's already out there. Lazy bums.

http://upload.wikimedia.org/wikipedia/commons/d/d1/PiratesVsTemp_English.jpg
Post
Topic
Board Development & Technical Discussion
Re: Bandwith used by Bitcoin is almost irelevant right? Super low?
by
chromicant
on 11/03/2011, 19:32:49 UTC
Mining consumes very little bandwidth.

Running a bitcoin P2P node consumes a noticeable amount of bandwidth -- my VPS ran out of its 1000GB allocation this month.

Do you have an idea what part of the protocol munched up most of the bandwidth? It's a definite concern for people who want to run seed nodes to stabilize the network, as well as people interested in a mobile client.

If I had to guess, would it be exchanging/downloading the block chain?