10gic / vanitygen-plusplus

A vanity address generator for BTC, ETH, LTC, TRX and 100+ more crypto currencies.
GNU Affero General Public License v3.0
269 stars 94 forks source link

question about case -Z 0000000000000000000000000000000000000000000000004000000000000000 #7

Closed serogaF closed 3 years ago

serogaF commented 3 years ago

hi to all, i want to get (for example 4 addresses) in order starting from 0000000000000000000000000000000000000000000000004000000000000000 using case -a4 and case -Z 0000000000000000000000000000000000000000000000004000000000000000 with the prefix 1N

./vanitygen++ -v -a4 -F compressed -o res.txt -Z 0000000000000000000000000000000000000000000000004000000000000000 1N

but i get 4 identical addresses

Prefix difficulty: 22 1N Difficulty: 22 Using 2 worker thread(s) Pattern: 1N Pubkey (hex): 0439eac472601ecee0268e29334ae521de79520d38579b1e5943f94918f08d7b39e9435a4c01410221aaf936e42a97900323748fc88924f097a22d88cf47441cf1 Privkey (hex): 400000000000001A Privkey (ASN1): 30740201010420000000000000000000000000000000000000000000000000400000000000001aa00706052b8104000aa1440342000439eac472601ecee0268e29334ae521de79520d38579b1e5943f94918f08d7b39e9435a4c01410221aaf936e42a97900323748fc88924f097a22d88cf47441cf1 Address: 1N7etpoFaQYxzb2fTTStC7Rd4S5oeBWvsY Privkey: KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYq1obWVDwSXmCfKkS66

I would like to receive

000000000000000000000000000000000000000000000000400000000000001A 1N7etpoFaQYxzb2fTTStC7Rd4S5oeBWvsY 000000000000000000000000000000000000000000000000400000000000001F 1NGrTnwtPq4uu1rpdK9wbwBAVtywaa4BdV 0000000000000000000000000000000000000000000000004000000000000034 1NVKJ1fxe8HSDkhMKb6svNPMYXaiWurXMR 000000000000000000000000000000000000000000000000400000000000004E 1NsY77WPsuB5awpmuguAoRbAgLLYCgiL7X

how can i do it ?, thanks in advance

10gic commented 3 years ago

This tool is not design for brute-force search.

You can try to add -l (specify the bits of prefix), for example: ./vanitygen++ -v -a4 -F compressed -o res.txt -Z 0000000000000000000000000000000000000000000000004000000000000000 -l $((256-7)) 1N

serogaF commented 3 years ago

-l $((256-7)) not what I need, addresses are repeated and out of order "This tool is not design for brute-force search." but this tool starts at the beginning of the search range 4000000000000000 adding one and checking each for compliance 1N if it matches an address to a pattern, it starts all over again, I want him to continue with 400000000000001F and not start with 4000000000000000. Or I misunderstand the logic of the program

10gic commented 3 years ago

Currently, thread would generate a new random private after it found a matching.

// file vanitygen.c
242         switch (test_func(vxcp)) {
243         case 1:
244             npoints = 0;
245             rekey_at = 0;    // lead to generate a new random private key, in your case start again

You can comment out line 244 and 245. However, threads are not cooperative currently. You would also get same 4 results, but you can get 4 different results by specifying only a thread (-t1).

serogaF commented 3 years ago

commenting lines 244 and 245 using (-t1) resulted in a prefix not matching, got 4 different results in order but with the wrong prefix ./vanitygen++ -v -t1 -a4 -F compressed -o res.txt -Z 0000000000000000000000000000000000000000000000004000000000000000 1N Prefix difficulty: 22 1N Difficulty: 22 Using 1 worker thread(s) Pattern: 1N
Pubkey (hex): 0439eac472601ecee0268e29334ae521de79520d38579b1e5943f94918f08d7b39e9435a4c01410221aaf936e42a97900323748fc88924f097a22d88cf47441cf1 Privkey (hex): 400000000000001A Privkey (ASN1): 30740201010420000000000000000000000000000000000000000000000000400000000000001aa00706052b8104000aa1440342000439eac472601ecee0268e29334ae521de79520d38579b1e5943f94918f08d7b39e9435a4c01410221aaf936e42a97900323748fc88924f097a22d88cf47441cf1 Address: 1N7etpoFaQYxzb2fTTStC7Rd4S5oeBWvsY Privkey: KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYq1obWVDwSXmCfKkS66 Pattern: 1N
Pubkey (hex): 041112963858a4adb7999ab39bb4515d4b3c5e1374cf8fa08e573c94e005153f6cf4651513223d3a9d6d88ab1d1fc7bfb956480665927c3fc492c12ca98061cf4d Privkey (hex): 400000000000002C Privkey (ASN1): 30740201010420000000000000000000000000000000000000000000000000400000000000002ca00706052b8104000aa144034200041112963858a4adb7999ab39bb4515d4b3c5e1374cf8fa08e573c94e005153f6cf4651513223d3a9d6d88ab1d1fc7bfb956480665927c3fc492c12ca98061cf4d Address: 15MqHynYAEwzkZh2GLH5uN4Eg8pD9SeMba Privkey: KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYq1obWVDwSXvAagry9b Pattern: 1N
Pubkey (hex): 0448c00a3015743142fe18736fe5a15aac6dd3822f22797b66ae84143796f3dbb927b7341c7eb7218bf391bd609e6a70a25be55133481e8e53805d0aab6290c7e6 Privkey (hex): 400000000000003B Privkey (ASN1): 30740201010420000000000000000000000000000000000000000000000000400000000000003ba00706052b8104000aa1440342000448c00a3015743142fe18736fe5a15aac6dd3822f22797b66ae84143796f3dbb927b7341c7eb7218bf391bd609e6a70a25be55133481e8e53805d0aab6290c7e6 Address: 1EPKQ3jSjrVdU3t658sjMNUx1yNZ4EdgHN Privkey: KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYq1obWVDwSY3dppDfBG Pattern: 1N
Pubkey (hex): 04bec70892e8d045b8180e940864b8fc1a23600cd81478365b243721e1cc8ec95302e34659c469a8780c88584cb25b8ae40c575eeeea351878a38a475d1b5178e5 Privkey (hex): 400000000000004A Privkey (ASN1): 30740201010420000000000000000000000000000000000000000000000000400000000000004aa00706052b8104000aa14403420004bec70892e8d045b8180e940864b8fc1a23600cd81478365b243721e1cc8ec95302e34659c469a8780c88584cb25b8ae40c575eeeea351878a38a475d1b5178e5 Address: 12DZnqJUA7r8ozDWFw9sHSPCT7G1QepEKN Privkey: KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYq1obWVDwSYB713HWyo

serogaF commented 3 years ago

this is the result obtained during the first iteration of Privkey (hex): 400000000000001A add 1 to it we get 400000000000001b add in before 00000000000000000000000000000000000000000000 send it to case 'Z' and continue or start over from it

10gic commented 3 years ago

Line 246 in vanitygen.c also should be commented out.

// file vanitygen.c
242         switch (test_func(vxcp)) {
243         case 1:
244             npoints = 0;
245             rekey_at = 0;    // lead to generate a new random private key, in your case start again
246             i = nbatch;

Another point: it generate a new random private key when reach rekey_max (const BN_ULONG rekey_max = 10000000) keys.

serogaF commented 3 years ago

hurray it worked !!!, thank you very much, you are a genius of the code, without you I would not have figured it out, thanks again)))

Sentient-XII commented 2 years ago

Hi, @10gic I know this issue is closed but how can I do the same for oclvanitygen.c, which lines should I comment out?

Sentient-XII commented 2 years ago

@10gic are you officially on holiday any feedback on the above question, thanks in advance

10gic commented 2 years ago

@NewCoNam It seems that you have mastered the debugging skills. To be honest, I don’t know more about this question than you. Sorry for no more suggestions for you.

Sentient-XII commented 2 years ago

@10gic thanks for the feedback, got other tools that do what I need, yeah I am trying...mission im-possible :)