brichard19 / BitCrack

A tool for cracking Bitcoin private keys
MIT License
678 stars 450 forks source link

Cant add more than 16 keys to file Error: invalid argument #265

Open githubcolorado opened 3 years ago

githubcolorado commented 3 years ago

brichard19 - thank you for providing this code - it is awesome. Not sure if there are any easy settings I could try to fix this before digging deeper.

When I add more than 16 addresses always get [Info] Error: invalid argument When I just run any key 17 it works or if put it at top of list and clip off list it also works. Note: I am using Cuda 11.0

D:\crypto\BitCrack>cuBitCrack.exe -d 0 -i list.txt -b 1024 --continue continue.txt -o out.txt --keyspace e4a74a27db001d1be11a96e34c23332b7b6e09d52daaee2b7dee982c656aad114d82112f4408 [2020-09-14.14:40:50] [Info] Compression: compressed [2020-09-14.14:40:50] [Info] Starting at: 1D1BE11A96E34C23332B7B6E09D52DAAEE2B7DEE982C656AAD114D82112F4408 [2020-09-14.14:40:50] [Info] Ending at: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140 [2020-09-14.14:40:50] [Info] Counting by: 0000000000000000000000000000000000000000000000000000000000000001 [2020-09-14.14:40:50] [Info] Initializing GeForce RTX 2060 [2020-09-14.14:40:50] [Info] Generating 8,388,608 starting points (320.0MB) [2020-09-14.14:41:23] [Info] 10.0% [2020-09-14.14:41:45] [Info] 20.0% [2020-09-14.14:42:09] [Info] 30.0% [2020-09-14.14:42:35] [Info] 40.0% [2020-09-14.14:43:01] [Info] 50.0% [2020-09-14.14:43:27] [Info] 60.0% [2020-09-14.14:43:53] [Info] 70.0% [2020-09-14.14:44:16] [Info] 80.0% [2020-09-14.14:44:41] [Info] 90.0% [2020-09-14.14:45:06] [Info] 100.0% [2020-09-14.14:45:06] [Info] Done [2020-09-14.14:45:06] [Info] Loading addresses from 'list.txt' [2020-09-14.14:45:06] [Info] 17 addresses loaded (0.0MB) [2020-09-14.14:45:06] [Info] Allocating bloom filter (0.0MB) [2020-09-14.14:45:06] [Info] Error: invalid argument

MRGiacalone commented 3 years ago

This is just a comment on your keyspace. It looks like you are using an input of 76 hex and its being sliced to fit a 64 hex number.

RB61 commented 3 years ago

what's in your file list.txt ?

githubcolorado commented 3 years ago

Here are 20 randomly generated addresses that trigger error on my side. Should I be using compressed flag?

1MP8n5pvs3XEcyh9gE7i6Fd8vJwXSEGkm5 12SMh4Gan6M6neayKmph3cboQQTcD9ZneX 1P4SNbBZQ3xfn3rg7ftSPzvajFSBZhM5Nu 1JZQTcQAF6GmZ6Z72iSZD5gapmCUNrPhbq 13dNCjwfB3dPw8eAZWkGyhQAYKEsN5MqPu 1AEDzZ8W4mWS3zUVENivj322HGDxVrnoDM 1Ayygwvcj5oVub86V5R6ceKJgLnSD4LGKU 1CBfff57dzaPD2eFvyhZ3f3go6ybvp6EaA 1Bfw9EEUEMz4xQJ6qf4JnMcCDiNMnRHs2u 1KpYsLnPJs8JoZJAGMS4eVWRWLadma5LGz 16pnnEBSDrJJePpXGafiwR6q42m2btt18K 1GuV6gKE42ZANVhNZrpKH3f4t2SKUxC2WT 1PcYMCVj55GXRe1VqtF7u885ShYfR62FBm 1JU4qr788TCeuLTLTPttazZZujn5BoPytm 13zU19U5cAtkY4iFGNFpnAGWABNjadhWBD 16U6yp2NqHUE2fktNxrKvUeZiLjn6mqzMU 1JNro2QMJcGLmfDLa4uU79sgBcAxom3KW8 12GsvuaHp3SUvH2APBEyJbSh3ivY7Up6xv 1NGvG2Fziv9hxJ1cDcBdHPbZbPVBkfEJY8 1PQAi2oPn8EtWwtjm5bSAUWswp23qtNdCF

MRGiacalone commented 3 years ago

Should I be using compressed flag?

The public address will not tell you if a compressed or uncompressed key is used to derive it. Consider using flag: --compression BOTH

githubcolorado commented 3 years ago

Thank you MRGiacalone!

MRGiacalone commented 3 years ago

Thank you MRGiacalone!

Cheers. Have you tried using clbitcrack instead of cubitcrack? clbitcrack -d 0 -i list.txt -b 1024 --continue continue.txt -o out.txt --keyspace e4a74a27db001d1be11a96e34c23332b7b6e09d52daaee2b7dee982c656aad114d82112f4408

maxya commented 3 years ago

I'm getting similar error with more than 16 addresses in input šŸ¤”

[2020-11-16.10:28:23] [Info] Loading ' huge_run.dat'
[2020-11-16.10:28:23] [Info] Compression: compressed
[2020-11-16.10:28:23] [Info] Starting at: 00000000000000000000000000000A0000000000000000000002990851830000
[2020-11-16.10:28:23] [Info] Ending at:   FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140
[2020-11-16.10:28:23] [Info] Counting by: 0000000000000000000000000000000000000000000000000000000000000001
[2020-11-16.10:28:23] [Info] Initializing GeForce GTX 1060 6GB
[2020-11-16.10:28:23] [Info] Generating 32,194,560 starting points (1228.1MB)
[2020-11-16.10:28:36] [Info] 10.0%
[2020-11-16.10:28:38] [Info] 20.0%
[2020-11-16.10:28:38] [Info] 30.0%
[2020-11-16.10:28:39] [Info] 40.0%
[2020-11-16.10:28:39] [Info] 50.0%
[2020-11-16.10:28:40] [Info] 60.0%
[2020-11-16.10:28:40] [Info] 70.0%
[2020-11-16.10:28:41] [Info] 80.0%
[2020-11-16.10:28:41] [Info] 90.0%
[2020-11-16.10:28:42] [Info] 100.0%
[2020-11-16.10:28:42] [Info] Done
[2020-11-16.10:28:42] [Info] Loading addresses from 'blockchain_addresses_with_ballance.txt'
[2020-11-16.10:31:47] [Info] 22,958,808 addresses loaded (437.9MB)
[2020-11-16.10:31:50] [Info] Allocating bloom filter (512.0MB)
[2020-11-16.10:31:57] [Info] Error: invalid argument

clbitcrack works, but hashrate is terrible šŸ˜ž

[2020-11-16.11:30:24] [Info] Loading ' huge_run.dat'
[2020-11-16.11:30:24] [Info] Compression: compressed
[2020-11-16.11:30:24] [Info] Starting at: 00000000000000000000000000000A0000000000000000000002990851830000
[2020-11-16.11:30:24] [Info] Ending at:   FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140
[2020-11-16.11:30:24] [Info] Counting by: 0000000000000000000000000000000000000000000000000000000000000001
[2020-11-16.11:30:25] [Info] Compiling OpenCL kernels...
[2020-11-16.11:30:55] [Info] Initializing GeForce GTX 1060 6GB
[2020-11-16.11:30:59] [Info] Generating 32,194,560 starting points (1228.1MB)
[2020-11-16.11:31:05] [Info] 10.0%
[2020-11-16.11:31:07] [Info] 20.0%
[2020-11-16.11:31:08] [Info] 30.0%
[2020-11-16.11:31:08] [Info] 40.0%
[2020-11-16.11:31:09] [Info] 50.0%
[2020-11-16.11:31:10] [Info] 60.0%
[2020-11-16.11:31:10] [Info] 70.0%
[2020-11-16.11:31:10] [Info] 80.0%
[2020-11-16.11:31:11] [Info] 90.0%
[2020-11-16.11:31:11] [Info] 100.0%
[2020-11-16.11:31:11] [Info] Done
[2020-11-16.11:31:11] [Info] Loading addresses from 'blockchain_addresses_with_ballance.txt'
[2020-11-16.11:34:13] [Info] 22,958,808 addresses loaded (437.9MB)
[2020-11-16.11:34:23] [Info] Checkpoint
GeForce GTX 1060 3459 / 6077MB | 22958808 targets 61.50 MKey/s (731,213,277,757,440 total) [12:21:48:34]
bill32767 commented 3 years ago

Reduce the figure of your '-b, -t or -p' then try again.

On Mon, Nov 16, 2020 at 11:34 AM Max notifications@github.com wrote:

I'm getting similar error with more than 16 addresses in input šŸ¤”

[2020-11-16.10:28:23] [Info] Loading ' huge_run.dat'

[2020-11-16.10:28:23] [Info] Compression: compressed

[2020-11-16.10:28:23] [Info] Starting at: 00000000000000000000000000000A0000000000000000000002990851830000

[2020-11-16.10:28:23] [Info] Ending at: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140

[2020-11-16.10:28:23] [Info] Counting by: 0000000000000000000000000000000000000000000000000000000000000001

[2020-11-16.10:28:23] [Info] Initializing GeForce GTX 1060 6GB

[2020-11-16.10:28:23] [Info] Generating 32,194,560 starting points (1228.1MB)

[2020-11-16.10:28:36] [Info] 10.0%

[2020-11-16.10:28:38] [Info] 20.0%

[2020-11-16.10:28:38] [Info] 30.0%

[2020-11-16.10:28:39] [Info] 40.0%

[2020-11-16.10:28:39] [Info] 50.0%

[2020-11-16.10:28:40] [Info] 60.0%

[2020-11-16.10:28:40] [Info] 70.0%

[2020-11-16.10:28:41] [Info] 80.0%

[2020-11-16.10:28:41] [Info] 90.0%

[2020-11-16.10:28:42] [Info] 100.0%

[2020-11-16.10:28:42] [Info] Done

[2020-11-16.10:28:42] [Info] Loading addresses from 'blockchain_addresses_with_ballance.txt'

[2020-11-16.10:31:47] [Info] 22,958,808 addresses loaded (437.9MB)

[2020-11-16.10:31:50] [Info] Allocating bloom filter (512.0MB)

[2020-11-16.10:31:57] [Info] Error: invalid argument

ā€” You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/brichard19/BitCrack/issues/265#issuecomment-728175927, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHWRFWLWASAFBASOV7WALMLSQFICTANCNFSM4RMD4ARA .

MRGiacalone commented 3 years ago

@maxya I'm curious, what does your clbitcrack full command looks like? How can you say it's terrible if you are not getting anything with cubitcrack?

maxya commented 3 years ago

@MRGiacalone I was getting around 90 Mkeys/s with cuBitCrack prior to drivers and cuda 11 libraries update. Right now driver is 450, cuda 11

./bin/clBitCrack --continue huge_run_d1.dat -d 2 -b 30 -t 512 -p 2096 -i ${MATCHLIST} -o found_keys.txt -c \
--keyspace 0000000000000000000000000000000000000000000000000A00000000000000:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140
hamnaz commented 3 years ago

try these setting -b 10 -t 512 -p 1024 if you get better speed, then try difrent by adding 32 into, example -p 1056, then try next speed -p 1088, till you get error, before error command will be your last speed you will get by testing

maxya commented 3 years ago

@hamnaz Just tried, getting same error: Command:

./bin/cuBitCrack --continue huge_run_d1.dat -d 1 -b 10 -t 512 -p 1056 -i ${MATCHLIST} -o found_keys.txt -c \
--keyspace 0000000000000000000000000000000000000000000000000BF261B5FA720000:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140

Output:

[2020-11-18.07:59:38] [Info] Loading ' huge_run_d1.dat'
[2020-11-18.07:59:38] [Info] Compression: compressed
[2020-11-18.07:59:38] [Info] Starting at: 0000000000000000000000000000000000000000000000000BF261B5FA720000
[2020-11-18.07:59:38] [Info] Ending at:   FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140
[2020-11-18.07:59:38] [Info] Counting by: 0000000000000000000000000000000000000000000000000000000000000001
[2020-11-18.07:59:38] [Info] Initializing GeForce GTX 1060 6GB
[2020-11-18.07:59:39] [Info] Generating 5,406,720 starting points (206.2MB)
[2020-11-18.07:59:41] [Info] 10.0%
[2020-11-18.07:59:41] [Info] 20.0%
[2020-11-18.07:59:42] [Info] 30.0%
[2020-11-18.07:59:42] [Info] 40.0%
[2020-11-18.07:59:42] [Info] 50.0%
[2020-11-18.07:59:42] [Info] 60.0%
[2020-11-18.07:59:42] [Info] 70.0%
[2020-11-18.07:59:42] [Info] 80.0%
[2020-11-18.07:59:42] [Info] 90.0%
[2020-11-18.07:59:42] [Info] 100.0%
[2020-11-18.07:59:42] [Info] Done
[2020-11-18.07:59:42] [Info] Loading addresses from 'blockchain_addresses_with_ballance.txt'
[2020-11-18.08:02:49] [Info] 22,958,808 addresses loaded (437.9MB)
[2020-11-18.08:02:52] [Info] Allocating bloom filter (512.0MB)
[2020-11-18.08:03:00] [Info] Error: invalid argument
hamnaz commented 3 years ago

remove from line and then test --continue huge_run_d1.dat

hamnaz commented 3 years ago

you modified ver of bitcrack or original, chnage it to -i ${MATCHLIST} -i inputfile.txt

hamnaz commented 3 years ago

go to in bin folder, then run this command ./cuBitCrack -b 10 -t 512 -p 1024-i blockchain_addresses_with_ballance.txt -o found_keys.txt -c --keyspace 0000000000000000000000000000000000000000000000000A00000000000000:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140

githubcolorado commented 3 years ago

Thanks @maxya, @hamnaz, @bill32767, @RB61. I am still getting same problem with CUDA 11 and limited addresses to test - haven't cracked it yet. Tried all sorts of settings. Let me know if you find a config that works for you. My next step was to try to put some error handling and reporting around the reading in of the keys and Error: invalid argument error - but day job...

hamnaz commented 3 years ago

for 1060 ./cuBitCrack -b 10 -t 512 -p 1024 -i blockchain_addresses_with_ballance.txt -o found_keys.txt -c --keyspace 0000000000000000000000000000000000000000000000000A00000000000000:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140

for 2060

./cuBitCrack -b 30 -t 512 -p 1024 -i blockchain_addresses_with_ballance.txt -o found_keys.txt -c --keyspace 0000000000000000000000000000000000000000000000000A00000000000000:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140

you can add switch -d with number some have -d 0 or some have -d 2 as mention in above messages, based on you device location

dont try clBitCrack, as your gpu hardware is cuda enable devices, only use cuBitcrack command if you compile it proper with change your Makefile inside bItcrack main folder COMPUTE_CAP=30 these setting you need to change as per your devices then compile for GTX 1060 COMPUTE_CAP=61

for RTX 2060 COMPUTE_CAP=75 change these setting in Makefile, then compile and run above command for make it proper work

githubcolorado commented 3 years ago

Thanks @hamnaz I'll change compute cap and recompile and let you know.

githubcolorado commented 3 years ago

Compute cap didn't fix it - I am putting in some additional error handling to see if I can figure out what is going on. If it is one value - report it - kick it out and keep going. That said I my instincts say this is a cuda 11 array bounds issue....

hamnaz commented 3 years ago

then install cuda 10 and 10.1, and try with that ver

githubcolorado commented 3 years ago

Added logging - I am making some progress finding the exact place the error is occurring. Should be able to find the exact invalid Argument triggering the exception in about half an hour.

hamnaz commented 3 years ago

here we already talk about cuda ver if device 1060 maybe cuda 9.2 good, if 2060 and onword, cuda 10 good, try cuda versions https://github.com/brichard19/BitCrack/issues/154

githubcolorado commented 3 years ago

Error is in :

    main.cpp - calling 
    KeyFinder f(_config.nextKey, _config.endKey, _config.compression, d, _config.stride);
    **f.run();** call 

Digging into KeyFinder.h now

githubcolorado commented 3 years ago

Seems more likely the error is in KeySearchDevice* d but I may need to roll off for a bit.

Rsalazarm commented 3 years ago

Hi guys! Any update onthis one? I get the same "Invalid argument" error with a GTX1050TI (tested with 2 executables compiled with COMPUTE_CAP=61)

BTW, for all interested in COMPUTE_CAP values and cards, here you have it: https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/

Regards

Jolly-Pirate commented 3 years ago

You don't need to edit the Makefile to set the compute cap, you can do it directly when making the binaries, for example: make BUILD_CUDA=1 COMPUTE_CAP=75

JJandre25 commented 2 years ago

Hello, Gentlemen, I want to ask if what this title mentions has already been resolved, the same thing happens to me

Compiled with cuda 11.2 and using more than 16 addresses received the Invalid Argument message.

how can it be solved?

Thanks

talpih commented 1 year ago

im getting this error too. has anyone solved the problem?

mikorist commented 1 year ago

Same error with more than 16 keys. I think the error comes from

./CudaKeySearchDevice/CudaHashLookup.cu

after "Allocating bloom filter"

GraverErmitage commented 1 year ago

Same for me. Only 16 keys work. If one more in my text file I will have the error [Info] Error: invalid argument