@dcousens I'm playing around with generating vanity addresses, e.g.
const bitcoin = require('bitcoinjs-lib')
const prefix = '1d'
while (true) {
const kp = bitcoin.ECPair.makeRandom()
const address = kp.getAddress()
if (address.startsWith(prefix)) {
console.log(address)
}
}
I noticed something when playing around. If I use the prefix 1d (I assume it has to be valid base58) it's a lot slower than 1D. Are some base58 characters in the public address more common than others?
For the lulz I tried this on samr7/vanitygen:
lms@x240 ~/vanitygen (master)
$ ./vanitygen 1d
Difficulty: 1353
Pattern: 1d
Address: 1dcaCYjhx2sNLxTSgcytravc7HEgArbEY
Privkey: 5JnASFQV43gpWz54wf439s6MSLy8jXUut2DWJjNEfkDuv5NqC7S
lms@x240 ~/vanitygen (master)
$ ./vanitygen 1D
Difficulty: 22
Pattern: 1D
Address: 1DYdf7CDGkEH6f7zQhUV2ZZALdmLKoHgpa
Privkey: 5J2TCZMNZRaHcRgYbHizne6kM9BQyMHiVQAjwTFj9TMEJUavNB4
So it seems 1d is more difficult than 1D, which I guess answers my question :grinning:. Will take a look at that c code to get some more information.
123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz so as you increase your hash value one by one the second value goes from 6 to 7 to 8... all the way to z and wraps back to 2 (can't be 1 since 1 serves the purpose of 0(in base 10) in base58 and counting will never increase the farthest left digit with the 0 numeral) all the way up to Q...6789ABCDEFGHJKLMNPQ) there is a much HIGHER CHANCE of randomly getting it since there's the 34 character versions AND the 33 character versions. all other letter should be the same as 1d... try 1R it should be the same as 1d, try 15 should be the same as 1d... try 19 should be same as 1D, try 1M should be the same as 1D.This has nothing to do with the C code, and more to do with understanding how base58 encoding works, and probability of number range occurrence.
Please re-open if this didn't answer your question. Merry Christmas.
Most helpful comment
123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyzso as you increase your hash value one by one the second value goes from 6 to 7 to 8... all the way to z and wraps back to 2 (can't be 1 since 1 serves the purpose of 0(in base 10) in base58 and counting will never increase the farthest left digit with the 0 numeral) all the way up to Q...6789ABCDEFGHJKLMNPQ) there is a much HIGHER CHANCE of randomly getting it since there's the 34 character versions AND the 33 character versions. all other letter should be the same as 1d... try 1R it should be the same as 1d, try 15 should be the same as 1d... try 19 should be same as 1D, try 1M should be the same as 1D.