Author

Topic: Vanitygen: Vanity bitcoin address generator/miner [v0.22] - page 180. (Read 1152778 times)

sr. member
Activity: 350
Merit: 251
im trying to build it for windows and im running into some issues, this is the first time i ever tried to make anything bigger than wget.

i downloaded and installed all the list things but i run into issues when i want to build

Code:
Setting environment for using Microsoft Visual Studio 2010 x86 tools.

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>cd C:\Users\testbed\Deskt
op\New folder\src

C:\Users\testbed\Desktop\New folder\src>nmake /fMakefile.Win32 vanitygen.exe ocl
vanitygen.exe

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl /D_WIN32 /DPTW32_STATIC_LIB /DPCRE_STATIC /IC:\OpenSSL-Win32\include
/IC:\pthreads-w32 /IC:\pcre-7.9-src /c /Tpvanitygen.c /Fovanitygen.obj
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

vanitygen.c
vanitygen.c(24) : fatal error C1083: Cannot open include file: 'pthread.h': No s
uch file or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\cl.EXE"' : return code '0x2'
Stop.

C:\Users\testbed\Desktop\New folder\src>

this is a clean windows 7 x64 VM.

i guess im having trouble setting the cflags, i dont know what they are i guess.

Code:
C:\>dir
 Volume in drive C has no label.

 Directory of C:\

08/05/2011  09:52 PM              OpenSSL-Win32
08/05/2011  10:13 PM              pcre-7.9-src
08/05/2011  10:55 PM              pthread-w32
              24 File(s)      3,169,847 bytes
               8 Dir(s)  86,889,963,520 bytes free

C:\>cd pthread-w32

C:\pthread-w32>dir

 Directory of C:\pthread-w32

08/05/2011  10:55 PM              .
08/05/2011  10:55 PM              ..
12/21/2006  10:00 PM            14,188 ANNOUNCE
12/21/2006  10:00 PM             6,041 BUGS
12/21/2006  10:00 PM           184,885 ChangeLog
12/19/2006  10:00 PM             5,078 CONTRIBUTORS
12/19/2006  10:00 PM             5,939 COPYING
12/19/2006  10:00 PM            26,934 COPYING.LIB
12/19/2006  10:00 PM            15,359 FAQ
08/05/2011  10:54 PM              include
08/05/2011  10:54 PM              lib
12/21/2006  10:00 PM            89,608 libpthreadGC2.a
12/21/2006  10:00 PM            89,614 libpthreadGCE2.a
12/19/2006  10:00 PM                99 MAINTAINERS
12/21/2006  10:00 PM               132 md5.sum
12/21/2006  10:00 PM            38,603 NEWS
12/19/2006  10:00 PM               142 PROGRESS
12/19/2006  10:00 PM            43,162 pthread.h
12/21/2006  10:00 PM            60,273 pthreadGC2.dll
12/21/2006  10:00 PM           112,556 pthreadGCE2.dll
12/21/2006  10:00 PM            86,070 pthreadVC2.dll
12/21/2006  10:00 PM            29,280 pthreadVC2.lib
12/21/2006  10:00 PM            77,879 pthreadVCE2.dll
12/21/2006  10:00 PM            29,400 pthreadVCE2.lib
12/21/2006  10:00 PM            86,071 pthreadVSE2.dll
12/21/2006  10:00 PM            29,400 pthreadVSE2.lib
12/19/2006  10:00 PM            22,520 README
12/19/2006  10:00 PM             2,595 README.Borland
12/19/2006  10:00 PM            89,774 README.CV
12/19/2006  10:00 PM            12,014 README.NONPORTABLE
12/19/2006  10:00 PM             2,349 README.Watcom
12/19/2006  10:00 PM               220 README.WinCE
12/19/2006  10:00 PM             4,844 sched.h
12/19/2006  10:00 PM             4,429 semaphore.h
12/19/2006  10:00 PM               217 TODO
12/19/2006  10:00 PM             7,904 WinCE-PORT
              32 File(s)      1,177,579 bytes
               4 Dir(s)  86,889,963,520 bytes free

C:\pthread-w32>

if you need anymore info i can supply it, or just provide a windows binary and that will make me happy too  Grin

edit: well the problem above was a missing s on pthreads-w32

now i get

Code:
Setting environment for using Microsoft Visual Studio 2010 x86 tools.

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>cd C:\Users\testbed\Deskt
op\New folder\src

C:\Users\testbed\Desktop\New folder\src>nmake /fMakefile.Win32 vanitygen.exe ocl
vanitygen.exe

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl /D_WIN32 /DPTW32_STATIC_LIB /DPCRE_STATIC /IC:\OpenSSL-Win32\include
/IC:\pthreads-w32 /IC:\pcre-7.9-src /c /Tpvanitygen.c /Fovanitygen.obj
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

vanitygen.c
vanitygen.c(26) : fatal error C1083: Cannot open include file: 'openssl/sha.h':
No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\cl.EXE"' : return code '0x2'
Stop.

C:\Users\testbed\Desktop\New folder\src>

I fixed that problem by using Win32OpenSSL-1_0_0d.exe and not the lite version.

now i get
Code:
C:\Users\testbed\Desktop\New folder\src>nmake /fMakefile.Win32 vanitygen.exe ocl
vanitygen.exe

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

        link /nologo /out:vanitygen.exe vanitygen.obj pattern.obj winglue.obj C:
\OpenSSL-Win32\lib\libeay32.lib C:\pthreads-w32\pthread.lib C:\pcre-7.9-src\pcre
.lib ws2_32.lib
LINK : fatal error LNK1181: cannot open input file 'C:\pthreads-w32\pthread.lib'

NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\link.EXE"' : return code '0x49d'
Stop.

C:\Users\testbed\Desktop\New folder\src>

I can not find pthread.lib anywhere.

Code:
Directory of C:\pthreads-w32
08/05/2011  10:54 PM              include
08/05/2011  10:54 PM              lib
12/21/2006  10:00 PM            89,608 libpthreadGC2.a
12/21/2006  10:00 PM            89,614 libpthreadGCE2.a
12/21/2006  10:00 PM            60,273 pthreadGC2.dll
12/21/2006  10:00 PM           112,556 pthreadGCE2.dll
12/21/2006  10:00 PM            86,070 pthreadVC2.dll
12/21/2006  10:00 PM            29,280 pthreadVC2.lib
12/21/2006  10:00 PM            77,879 pthreadVCE2.dll
12/21/2006  10:00 PM            29,400 pthreadVCE2.lib
12/21/2006  10:00 PM            86,071 pthreadVSE2.dll
12/21/2006  10:00 PM            29,400 pthreadVSE2.lib

Directory of C:\pthreads-w32\lib
12/21/2006  10:00 PM            29,280 pthreadVC2.lib
12/21/2006  10:00 PM            29,400 pthreadVCE2.lib
12/21/2006  10:00 PM            29,400 pthreadVSE2.lib

C:\pthreads-w32\lib>C:\

i managed to get a working .exe but it requires pthreadVSE2.dll to be in the same dir as vanitygen.exe, also i can not seem to get oclvanitygen.exe to work.
full member
Activity: 140
Merit: 430
Firstbits: 1samr7
Code:
Driver: CAL 1.4.1417 (VM)

Well that's embarassing, Radeon 5830 is supposed to be one of the best tested cards!  Unfortunately I'm not sure how well tested it is with Catalyst 11.6 on either Windows or Linux, which would appear to be the driver you're using?

I'm going to look into this.

There are two things you can try:
  • Safe mode (-S flag), which disables loop unrolling optimizations, but also kills performance.
  • Different versions of the Catalyst driver.  My test environment is 11.5 on Linux.
legendary
Activity: 2072
Merit: 1001
well done fun program. thanks for writing it sam.
legendary
Activity: 1680
Merit: 1035
Using ATI 5830. Output is:
Quote
Prefix difficulty:            264104224 1Test
Difficulty: 264104224
Device: Cypress
Vendor: Advanced Micro Devices, Inc.
Driver: CAL 1.4.1417 (VM)
Profile: FULL_PROFILE
Version: OpenCL 1.1 AMD-APP-SDK-v2.4 (650.9)
Max compute units: 14
Max workgroup size: 256
Global memory: 838860800
Max allocation: 209715200
OpenCL compiler flags: -DUNROLL_MAX=16 -DVERY_EXPENSIVE_BRANCHES
Compiling kernel...

followed by a "oclvanitygen.exe has stopped working" window
full member
Activity: 140
Merit: 430
Firstbits: 1samr7
until now i have only tried it on a laptop with a small nvidia card, i dont know the exact type.
you say it is because of the work size. which value would you recommend to set with the '-w' option?

The -w option will help, but it won't reduce the overall workload alone, for that you'll also want to specify the total grid size, like: -w256 -g512x256.  Depending on what it chose as your default grid size, this could make it more responsive, but will probably reduce overall throughput.  It will display the grid size and all the other parameters if you run with -v.

This mechanism has worked quite well for large GPUs, but clearly doesn't cut it for smaller ones, and will be overhauled in a bit.

I'm trying to run oclvanitygen on Win7(x64) with an ATI card, and it keeps going into "compiling..." and then crashing out. Does this not run in Windows?

What hardware are you using?  If you could run oclvanitygen with the same options that caused the crash, plus -v, and post or PM the output, I'd appreciate it.
legendary
Activity: 1680
Merit: 1035
I'm trying to run oclvanitygen on Win7(x64) with an ATI card, and it keeps going into "compiling..." and then crashing out. Does this not run in Windows?
sr. member
Activity: 316
Merit: 250
thanks for your response.

until now i have only tried it on a laptop with a small nvidia card, i dont know the exact type.
you say it is because of the work size. which value would you recommend to set with the '-w' option?
full member
Activity: 140
Merit: 430
Firstbits: 1samr7
hey,

found this project today and tried it out.
so i ran vanitygen on the pattern "1", expecting it would write every address it generates to the out-file, what it did.

but when i tried oclvanitygen, it creates masses of addresses, but writes only very few (1 per second) to the out-file.

my command:
Code:
./oclvanitygen -o out -f in -k -q

Congrats, I'm glad it worked for you!

What GPU are you using?

Oclvanitygen currently has problems with work size autoconfiguration on smaller GPUs.  It will choose excessively large batches of keys that can take 1s or more to finish, and is restricted to producing at most a single match from each batch.  Even after this gets cleaned up, for the task of producing large numbers of matches to simpler patterns, vanitygen will always run circles around oclvanitygen.
sr. member
Activity: 316
Merit: 250
hey,

found this project today and tried it out.
so i ran vanitygen on the pattern "1", expecting it would write every address it generates to the out-file, what it did.

but when i tried oclvanitygen, it creates masses of addresses, but writes only very few (1 per second) to the out-file.

my command:
Code:
./oclvanitygen -o out -f in -k -q

any idea?
full member
Activity: 140
Merit: 430
Firstbits: 1samr7
I just tested the last version to try your fix but I get the same error

Are you referring to the problem where oclvanitygen won't start if there is an .oclbin file saved from a previous session, but works if you delete the .oclbin?

Somebody else was complaining about this, and we concluded that the AMD driver was broken somehow, but only for his GPU -- the binary save/restore still worked fine with the OpenCL CPU device.  Also, the GPU/driver stack was able to run DiabloMiner, which compiles its kernel each time from source, but not Phoenix Miner, which saves binaries.  In the end we disabled oclvanitygen OpenCL binaries for that specific GPU.  I believe it was RV710.  I hope this isn't happening with your GPU.
legendary
Activity: 1176
Merit: 1233
May Bitcoin be touched by his Noodly Appendage
I found Jackjack7eYNdGkbgUUrtKBraSWBUV5DJP too Grin

Wow!

Is that: 1Jackjack7eYNdGkbgUUrtKBraSWBUV5DJP, or without the 1?

How long did it take you to find it?
No, it really starts with a J, so it works only for Namecoin and testnets
It took less than 10h at about 16Mk/s, i was a bit lucky this time


I just tested the last version to try your fix but I get the same error
full member
Activity: 140
Merit: 430
Firstbits: 1samr7
Intresting it works on OS X for others, it's probably my MBP which is the problem. I'm throwing 10.7 Lion at it now so let's see if that fixes the problem...

Let me know how this goes!  Probably, it worked for defxor because he has an NVIDIA GPU.  Or, do the drivers actually share compiler infrastructure on OS X?
full member
Activity: 140
Merit: 430
Firstbits: 1samr7
I found Jackjack7eYNdGkbgUUrtKBraSWBUV5DJP too Grin

Wow!

Is that: 1Jackjack7eYNdGkbgUUrtKBraSWBUV5DJP, or without the 1?

How long did it take you to find it?
full member
Activity: 140
Merit: 430
Firstbits: 1samr7
Interesting. I would be surprised if the Apple default Snow Leopard OpenSSL installation (0.9.Cool wasn't optimized though - the Macports version (1.0.0d) was after all slightly faster. I didn't verify the compile flags used though.

Maybe we should just wait for other Mac users to report in Smiley My system could possibly have other issues.

There were some posts by another guy who built vanitygen on a Mac Pro, and had the same problem with OpenSSL.  Somehow he built OpenSSL from source by hand, and got the expected performance.  Here's one of his posts documenting what he got from openssl speed with 0.9.8.  Four posts up, he lists the 0.9.8 key rate, and two posts down, he got the key rate to nearly double.

Quote
Code:
$ ./oclvanitygen -w2 -d0 1pattern
Difficulty: 15318045009
vg_ocl_context_callback error: [CL_INVALID_COMMAND_QUEUE] : OpenCL Fatal Error : Kernel execute caused an error that invalidated the queue (0x1004103b0). This may be  due to a resource allocation failure at execution time.
vg_ocl_context_callback error: [CL_INVALID_COMMAND_QUEUE] : OpenCL Error : Failed to wait for events! Event 0 in waitlist failed. Invalid command queue

vg_ocl_context_callback error: [CL_INVALID_COMMAND_QUEUE] : OpenCL Error : clEnqueueNDRangeKernel failed: queue (0x1004103b0) has been invalidated.
clEnqueueNDRange(2): CL_INVALID_COMMAND_QUEUE

(followed by the GPU information I posted above)

Clearly you have a talent for finding bugs.  I never even thought to try -w1.  Anyway, to fix this, perhaps all it needs is a set of checks to enforce the NDRange maximum sizes.

Quote
Really bad lag, yes. Just for reference, for anyone who wants to start fine tuning, I ran (very briefly) all your examples above:

  • -w256 - no obvious difference in speed or responsiveness
  • -g512x256 - ~15% slower, more responsive
  • -b1024 - no obvious difference in speed or responsiveness

I guess that's expected.  If you combine -g512x256 and -w256 it might have similar performance with less lag.  To get this right with every GPU would require some sort of auto-tuning after initial configuration.  That will be trickier.
donator
Activity: 1653
Merit: 1286
Creator of Litecoin. Cryptocurrency enthusiast.
Thanks, that works.
legendary
Activity: 1176
Merit: 1233
May Bitcoin be touched by his Noodly Appendage
The --info flag does that, and doesn't import the key, even if the command is importkey:
Code:
./pywallet.py --info --importprivkey yourkey

Or you can use the web interface if you prefer
donator
Activity: 1653
Merit: 1286
Creator of Litecoin. Cryptocurrency enthusiast.
Sorry if this was already answered. Is there a way to easily verify that a private/public key pair is valid without having to import it?

Specifically, I want to use vanitygen to generating a few savings account address offline and possibly just write those keys down or print them out. I would prefer to not have to connect my computer to the internet to be safe. But I'm worried about a possible bug in the vanitygen code that may cause it to generate invalid keys. So I don't want to generate an address, put in 1000 bitcoins, then 5 years later find out that the corresponding private key doesn't work!
As vanitygen and pywallet "privkey to pubkey" functions weren't programmed by the same person you can use pywallet (getinfo function) to reassure you

I only see am importprivkey command. I assume that takes in a private key. That doesn't really confirm that the private key matches the public key. And I won't be able to be sure unless I send some money to the public key.

Would it be easy for you to add a command to let me validate priv/pub key pair without importing anything? I don't care for importing it into a wallet.dat file.
legendary
Activity: 1176
Merit: 1233
May Bitcoin be touched by his Noodly Appendage
Sorry if this was already answered. Is there a way to easily verify that a private/public key pair is valid without having to import it?

Specifically, I want to use vanitygen to generating a few savings account address offline and possibly just write those keys down or print them out. I would prefer to not have to connect my computer to the internet to be safe. But I'm worried about a possible bug in the vanitygen code that may cause it to generate invalid keys. So I don't want to generate an address, put in 1000 bitcoins, then 5 years later find out that the corresponding private key doesn't work!
As vanitygen and pywallet "privkey to pubkey" functions weren't programmed by the same person you can use pywallet (getinfo function) to reassure you
donator
Activity: 1653
Merit: 1286
Creator of Litecoin. Cryptocurrency enthusiast.
Sorry if this was already answered. Is there a way to easily verify that a private/public key pair is valid without having to import it?

Specifically, I want to use vanitygen to generating a few savings account address offline and possibly just write those keys down or print them out. I would prefer to not have to connect my computer to the internet to be safe. But I'm worried about a possible bug in the vanitygen code that may cause it to generate invalid keys. So I don't want to generate an address, put in 1000 bitcoins, then 5 years later find out that the corresponding private key doesn't work!
full member
Activity: 126
Merit: 100
Tell me about the crash!

With a 9400M, the number you got might not be too bad.  It probably needs tweaks to work well on smaller laptop GPUs, and I don't have one to test with.  I'll guess that it has long, uncomfortable display lag?  The work unit autoconfiguration certainly hasn't been tested with your GPU, and you might get performance or responsiveness improvements from command-line tweaks like -w256 or -g512x256 or -b1024.  It needs a built-in benchmark, among other things.
Intresting it works on OS X for others, it's probably my MBP which is the problem. I'm throwing 10.7 Lion at it now so let's see if that fixes the problem...
Jump to: