2

First of all, I'm aware of the vast, vast keyspace of bitcoin addresses. However, I've been experimenting with Vanitygen these days and I was wondering if all the generated addresses in it were directly ported to a local server running the compiled blockchain instead of writing them to a file, wouldn't it be feasible?

1.With the current source of vanitygen, is it possible to directly drop chunks of addresses on the local server( say 'insight') and check for a positive balance?

How would you start with that?

Thanks in advance.

Here's my PHP code( Feel free to use it )

<?php    


$lines = file('in.csv', FILE_IGNORE_NEW_LINES);
$i=0;
foreach ($lines as $line_num => $line) {

$address = explode(',', $line);

$variablee = file_get_contents($address[0]);

$i++;


if($variablee!="0"){

$file = 'out.txt';

$current = file_get_contents($file);

$current .= $line;

file_put_contents($file, $current);



    }

echo "\n".$i;
}    
?>

Update: There is just one question here, which is to direct vanitygen generated addresses directly to a local server running the compiled blockchain rather than writing them to a file. The code shown above works as fast as 1,000 addresses/second while I've heard people checking as many as 50K addresses/second for a positive balance. I've tried using cwebsocket from here but can't figure out a way to implement it into vanitygen

Update:My code as of now checks about 1,000 addresses/second

  • 1
    Can you elaborate your first question, its not understandable. – MD IKRAM Nov 20 '14 at 09:52
  • If you want optimize your script, do this `$current = file_get_contents($file);` before foreach and `file_put_contents($file, $current);` after, only one time, actually you did it in all loop – Benjamin Poignant Dec 02 '14 at 14:17

1 Answers1

-1

To import the addresses you want to format the private key into "Wallet Import Format" or 'WIF'.

See: https://en.bitcoin.it/wiki/Wallet_import_format

The native client will want to reindex the whole blockchain per address if you import a non client based keypairs.

The native client also has a cap on how many addresses it will track.

JCR000
  • 966
  • 9
  • 11